- Please see the transaction and query fees table for the base transaction fee
- Please use the Hedera fee estimator to estimate your transaction fee cost
addApprovedHbarTransfer()addApprovedTokenTransfer()addApprovedNftTransfer()addApprovedTokenTransferWithDecimals()
Note: The allowance spender must pay the fee for the transaction.
- The accounts the tokens are being debited from are required to sign the transaction
- If an authorized spender account is spending on behalf of the account that owns the tokens then the spending account is required to sign
- The transaction fee-paying account is required to sign the transaction
Methods
| Method | Type | Description |
|---|---|---|
addHbarTransfer(<accountId>, <evmAddress>, <value>) | AccountId, string, HBAR | The account involved in the transfer and the number of HBAR. The sender and recipient values must net zero. |
addTokenTransfer(<tokenId>, <accountId>, <evmAddress>, <value>) | TokenId, AccountId, string, long | The ID of the token, the account ID involved in the transfer, and the number of tokens to transfer. The sender and recipient values must net zero. |
addNftTransfer(<nftId>, <sender>, <receiver>) | NftId, AcountId, AccountId | The NFT ID (token + serial number), the sending account, and receiving account. |
addTokenTransferWithDecimals(<tokenId>, <accountId>, <value>, <int>) | TokenId, AccountId, long, decimals | The ID of the token, the account ID involved in the transfer, the number of tokens to transfer, the decimals of the token. The sender and recipient values must net zero. |
addApprovedHbarTransfer(<ownerAccountId>,<amount>) | AccountId, Hbar | The owner account ID the spender is authorized to transfer from and the amount. Applicable to allowance transfers only. |
addApprovedTokenTransfer(<tokenId>, <accountId>, <value>) | TokenId, AccountId, long | The owner account ID and token the spender is authorized to transfer from. The debiting account is the owner account. Applicable to allowance transfers only. |
addApprovedTokenTransferWithDecimals(<tokenId>, <accountId>, <value>, <decimals>) | TokenId, AccountId, long, int | The owner account ID and token ID (with decimals) the spender is authorized to transfer from. The debit account is the account ID of the sender. Applicable to allowance transfers only. |
addApprovedNftTransfer(<nftId>,<sender>, <receiver>) | NftId, AcountId, AccountId | The NFT ID the spender is authorized to transfer. The sender is the owner account and receiver is the receiving account. Applicable to allowance transfers only. |
Get transaction values
| Method | Type | Description |
|---|---|---|
getHbarTransfers() | Map<AccountId, Hbar> | Returns a list of the hbar transfers in this transaction |
getTokenTransfers() | Map<TokenId, Map<AccountId, long>> | Returns the list of token transfers in the transaction |