Class TokenNftTransfer

java.lang.Object
com.hedera.hashgraph.sdk.TokenNftTransfer
All Implemented Interfaces:
Comparable<TokenNftTransfer>

public class TokenNftTransfer extends Object implements Comparable<TokenNftTransfer>
Internal utility class.
  • Field Details

    • tokenId

      public final TokenId tokenId
      The ID of the token
    • sender

      public final AccountId sender
      The accountID of the sender
    • receiver

      public final AccountId receiver
      The accountID of the receiver
    • serial

      public final long serial
      The serial number of the NFT
    • isApproved

      public boolean isApproved
      If 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 id
      sender - the sender account id
      receiver - the receiver account id
      serial - the serial number
      isApproved - is it approved
    • TokenNftTransfer

      TokenNftTransfer(TokenId tokenId, AccountId sender, AccountId receiver, long serial, boolean isApproved, @Nullable NftHookCall senderHookCall, @Nullable NftHookCall receiverHookCall)
  • Method Details

    • fromProtobuf

      static List<TokenNftTransfer> fromProtobuf(TokenTransferList tokenTransferList)
    • 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

      public String toString()
      Overrides:
      toString in class Object
    • toBytes

      @Deprecated public byte[] toBytes()
      Deprecated.
      Convert the token NFT transfer object to a byte array.
      Returns:
      the converted token NFT transfer object
    • compareTo

      public int compareTo(TokenNftTransfer o)
      Specified by:
      compareTo in interface Comparable<TokenNftTransfer>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object