@hashgraph/sdk
    Preparing search index...

    Class TokenClaimAirdropTransaction

    A transaction that allows an account to claim tokens from a pending airdrop. This transaction is used to finalize the receipt of tokens that were distributed through an airdrop mechanism but require explicit claiming by the recipient.

    Hierarchy

    • default
      • TokenClaimAirdropTransaction
    Index

    Constructors

    Properties

    _customFeeLimits: CustomFeeLimit[]

    The maximum custom fee that the user is willing to pay for the message. If left empty, the user is willing to pay any custom fee. If used with a transaction type that does not support custom fee limits, the transaction will fail.

    _operatorAccountId: undefined | null | AccountId

    Accessors

    • get batchKey(): undefined | null | Key

      Returns undefined | null | Key

      Get the key that will sign the batch of which this Transaction is a part of.

    • get bodySize(): number

      Get the transaction body size Protobuf encoding has specific rules about how data is serialized Different fields take different amounts of space depending on their values The actual wire format size can only be determined after encoding

      Returns number

    • get bodySizeAllChunks(): number[]

      Get the body sizes for all chunks in a Chunked transaction. For transactions with multiple chunks (like large topic message submissions), this returns an array containing the size of each chunk's transaction body. The size is calculated by encoding the transaction body to protobuf format.

      Returns number[]

      An array of body sizes, where each element represents the size in bytes of a chunk's transaction body

    • get grpcDeadline(): null | number

      Get the grpc deadline

      Returns null | number

    • get maxAttempts(): number

      Get the max attempts on the request

      Returns number

    • get maxBackoff(): number

      Get the max backoff

      Returns number

    • get maxRetries(): number

      Returns number

    • get minBackoff(): null | number

      Get the min backoff

      Returns null | number

    • get nodeAccountIds(): null | AccountId[]

      Get the list of node account IDs on the request. If no nodes are set, then null is returned. The reasoning for this is simply "legacy behavior".

      Returns null | AccountId[]

    • get regenerateTransactionId(): null | boolean

      Is transaction ID regeneration enabled

      Returns null | boolean

    • get signableNodeBodyBytesList(): SignableNodeTransactionBodyBytes[]

      Returns a List of SignableNodeTransactionBodyBytes for each node the transaction is intended for. These are the canonical bytes that must be signed externally (e.g., via HSM).

      Returns SignableNodeTransactionBodyBytes[]

    • get size(): Promise<number>

      Protobuf encoding has specific rules about how data is serialized Different fields take different amounts of space depending on their values The actual wire format size can only be determined after encoding

      Returns Promise<number>

    • get transactionValidDuration(): number

      Get the transaction valid duration

      Returns number

    Methods

    • Add a signature explicitly This method supports both single and multiple signatures. A single signature will be applied to all transactions,

      While an array of signatures must correspond to each transaction individually.

      Parameters

      • publicKey: PublicKey
      • signature: Uint8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike>[]

      Returns TokenClaimAirdropTransaction

    • Collects all signatures from signed transactions and returns them in a format keyed by PublicKey.

      Returns Map<PublicKey, Uint8Array<ArrayBufferLike>[]>

      The collected signatures keyed by PublicKey.

    • Removes all signatures from a transaction and collects the removed signatures.

      Parameters

      • transaction: ISignedTransaction

        The transaction object to process.

      • publicKeyHex: string

        The hexadecimal representation of the public key.

      Returns Uint8Array<ArrayBufferLike>[]

      An array of removed signatures.

    • Parameters

      • request: Transaction

      Returns Uint8Array<ArrayBufferLike>

    • Resets the transaction to its initial state

      Parameters

      • client: Client<any, any>

      Returns void

    • Parameters

      • response: TransactionResponse

      Returns Uint8Array<ArrayBufferLike>

    • Set the node account IDs using the client

      Parameters

      • client: null | Client<Channel, any>

      Returns void

    • Not sure why this is called setTransactionId() when it doesn't set anything... FIXME: Remove this?

      Returns void

    • Determines whether a signature should be removed based on the provided public key.

      Parameters

      • sigPair: ISignaturePair

        The signature pair object that contains the public key prefix and signature to be evaluated.

      • publicKeyHex: string

        The hexadecimal representation of the public key to compare against.

      Returns boolean

      true if the public key prefix in the signature pair matches the provided public key, indicating that the signature should be removed; otherwise, false.

    • Parameters

      • client: Client<any, any>

      Returns void

    • Parameters

      • client: Client<Channel, any>
      • batchKey: Key

      Returns Promise<TokenClaimAirdropTransaction>

      Batchify method is used to mark a transaction as part of a batch transaction or make it so-called inner transaction. The Transaction will be frozen and signed by the operator of the client.

    • Freeze this transaction from further modification to prepare for signing or serialization.

      Will use the Client, if available, to generate a default Transaction ID and select 1/3 nodes to prepare this transaction for.

      Parameters

      • client: null | Client<Channel, any>

      Returns TokenClaimAirdropTransaction

    • Get the current signatures on the request NOTE: Does NOT support sign on demand

      Returns SignatureMap

    • Get the transaction hash

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Get all the transaction hashes

      Returns Promise<TransactionHashMap>

    • Returns boolean

    • This method clears all signatures from the transaction and returns them in a specific format.

      It will call collectSignatures to get the removed signatures, then clear all signatures from the internal tracking.

      Returns Map<PublicKey, Uint8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike>[]>

      The removed signatures in the specified format.

    • This method removes all signatures from the transaction based on the public key provided.

      Parameters

      • publicKey: PublicKey

        The public key associated with the signature to remove.

      Returns Uint8Array<ArrayBufferLike>[]

      The removed signatures.

    • Set the ID for this transaction.

      The transaction ID includes the operator's account ( the account paying the transaction fee). If two transactions have the same transaction ID, they won't both have an effect. One will complete normally and the other will fail with a duplicate transaction status.

      Normally, you should not use this method. Just before a transaction is executed, a transaction ID will be generated from the operator on the client.

      Parameters

      Returns TokenClaimAirdropTransaction

    • Sign the transaction with the public key and signer function

      If sign on demand is enabled no signing will be done immediately, instead the private key signing function and public key are saved to be used when a user calls an exit condition method (not sure what a better name for this is) such as toBytes[Async](), getTransactionHash[PerNode]() or execute().

      Parameters

      • publicKey: PublicKey
      • transactionSigner: (message: Uint8Array) => Promise<Uint8Array<ArrayBufferLike>>

      Returns Promise<TokenClaimAirdropTransaction>

    • Serialize the request into bytes. This will encode all the transactions into a proto.TransactionList and return the encoded protobuf.

      NOTE: Does not support sign on demand

      Returns Uint8Array<ArrayBufferLike>

    • Serialize the transaction into bytes

      NOTE: Supports sign on demand

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • This method is called by each *Transaction._fromProtobuf() method. It does all the finalization before the user gets hold of a complete Transaction

      Type Parameters

      Parameters

      • transaction: TransactionT
      • transactions: ITransaction[]
      • signedTransactions: ISignedTransaction[]
      • transactionIds: TransactionId[]
      • nodeIds: AccountId[]
      • bodies: ITransactionBody[]

      Returns TransactionT

    • Deserialize a transaction from bytes. The bytes can either be a proto.Transaction or proto.TransactionList.

      Parameters

      • bytes: Uint8Array<ArrayBufferLike>

      Returns Transaction