java.lang.Object
com.hedera.hashgraph.sdk.TokenTransfer
A token transfer record.
Internal utility class.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final AccountId(package private) long(package private) Integer(package private) FungibleHookCall(package private) boolean(package private) final TokenId -
Constructor Summary
ConstructorsConstructorDescriptionTokenTransfer(TokenId tokenId, AccountId accountId, long amount, boolean isApproved) Constructor.TokenTransfer(TokenId tokenId, AccountId accountId, long amount, Integer expectedDecimals, boolean isApproved) Constructor.TokenTransfer(TokenId tokenId, AccountId accountId, long amount, Integer expectedDecimals, boolean isApproved, FungibleHookCall hookCall) -
Method Summary
Modifier and TypeMethodDescription(package private) static List<TokenTransfer> fromProtobuf(TokenTransferList tokenTransferList) (package private) AccountAmountCreate the protobuf.toString()
-
Field Details
-
tokenId
-
accountId
-
expectedDecimals
-
amount
long amount -
isApproved
boolean isApproved -
hookCall
FungibleHookCall hookCall
-
-
Constructor Details
-
TokenTransfer
Constructor.- Parameters:
tokenId- the token idaccountId- the account idamount- the amountisApproved- is it approved
-
TokenTransfer
TokenTransfer(TokenId tokenId, AccountId accountId, long amount, @Nullable Integer expectedDecimals, boolean isApproved) Constructor.- Parameters:
tokenId- the token idaccountId- the account idamount- the amountexpectedDecimals- the expected decimalsisApproved- is it approved
-
TokenTransfer
TokenTransfer(TokenId tokenId, AccountId accountId, long amount, @Nullable Integer expectedDecimals, boolean isApproved, @Nullable FungibleHookCall hookCall)
-
-
Method Details
-
fromProtobuf
-
toProtobuf
AccountAmount toProtobuf()Create the protobuf.- Returns:
- an account amount protobuf
-
toString
-