java.lang.Object
com.hedera.hashgraph.sdk.TokenNftTransfer
- All Implemented Interfaces:
Comparable<TokenNftTransfer>
Internal utility class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIf true then the transfer is expected to be an approved allowance and the sender is expected to be the owner.final AccountIdThe accountID of the receiver(package private) NftHookCallfinal AccountIdThe accountID of the sender(package private) NftHookCallfinal longThe serial number of the NFTfinal TokenIdThe ID of the token -
Constructor Summary
ConstructorsConstructorDescriptionTokenNftTransfer(TokenId tokenId, AccountId sender, AccountId receiver, long serial, boolean isApproved) Constructor.TokenNftTransfer(TokenId tokenId, AccountId sender, AccountId receiver, long serial, boolean isApproved, NftHookCall senderHookCall, NftHookCall receiverHookCall) -
Method Summary
Modifier and TypeMethodDescriptionintbooleanstatic TokenNftTransferfromBytes(byte[] bytes) Deprecated.(package private) static List<TokenNftTransfer> fromProtobuf(TokenTransferList tokenTransferList) inthashCode()byte[]toBytes()Deprecated.(package private) NftTransferCreate the protobuf.toString()
-
Field Details
-
tokenId
The ID of the token -
sender
The accountID of the sender -
receiver
The accountID of the receiver -
serial
public final long serialThe serial number of the NFT -
isApproved
public boolean isApprovedIf true then the transfer is expected to be an approved allowance and the sender is expected to be the owner. The default is false. -
senderHookCall
NftHookCall senderHookCall -
receiverHookCall
NftHookCall receiverHookCall
-
-
Constructor Details
-
TokenNftTransfer
TokenNftTransfer(TokenId tokenId, AccountId sender, AccountId receiver, long serial, boolean isApproved) Constructor.- Parameters:
tokenId- the token idsender- the sender account idreceiver- the receiver account idserial- the serial numberisApproved- is it approved
-
TokenNftTransfer
TokenNftTransfer(TokenId tokenId, AccountId sender, AccountId receiver, long serial, boolean isApproved, @Nullable NftHookCall senderHookCall, @Nullable NftHookCall receiverHookCall)
-
-
Method Details
-
fromProtobuf
-
fromBytes
@Deprecated public static TokenNftTransfer fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException Deprecated.Convert a byte array to a token NFT transfer object.- Parameters:
bytes- the byte array- Returns:
- the converted token nft transfer object
- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
toProtobuf
NftTransfer toProtobuf()Create the protobuf.- Returns:
- the protobuf representation
-
toString
-
toBytes
Deprecated.Convert the token NFT transfer object to a byte array.- Returns:
- the converted token NFT transfer object
-
compareTo
- Specified by:
compareToin interfaceComparable<TokenNftTransfer>
-
equals
-
hashCode
public int hashCode()
-