Class TokenTransferList

java.lang.Object
com.google.protobuf.AbstractMessageLite<TokenTransferList,TokenTransferList.Builder>
com.google.protobuf.GeneratedMessageLite<TokenTransferList,TokenTransferList.Builder>
com.hedera.hashgraph.sdk.proto.TokenTransferList
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, TokenTransferListOrBuilder

@Generated public final class TokenTransferList extends com.google.protobuf.GeneratedMessageLite<TokenTransferList,TokenTransferList.Builder> implements TokenTransferListOrBuilder
 *
 A list of transfers for a particular (non-HBAR) token type.

 A `TokenTransferList` applies to a single token type, but may contain many
 individual transfers.<br/>
 Each transfer of a fungible/common token MUST specify an `accountID` and
 `amount`. Amount SHALL be positive when the account receives tokens, and
 SHALL be negative when the account sends tokens. The amount SHOULD NOT be
 `0`.<br/>
 In a transfer list containing fungible/common tokens in the `transfers`
 list, the sum of all such transfers MUST be zero (`0`).
 Each transfer of a unique token SHALL specify both sender and receiver, as
 well as the serial number transferred.<br/>
 A single `TokenTransferList` MUST contain `transfers` or `nftTransfers`,
 but MUST NOT contain both.
 
Protobuf type proto.TokenTransferList
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * A list of transfers for a particular (non-HBAR) token type.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

    com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageLite

    unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
     
    com.google.protobuf.UInt32Value
    * An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have.
    getNftTransfers(int index)
    * A list of NftTransfers.
    int
    * A list of NftTransfers.
    * A list of NftTransfers.
    * A list of NftTransfers.
    * A list of NftTransfers.
    * A token identifier.<br/> This is the token to be transferred.
    getTransfers(int index)
    * A list of account amounts.
    int
    * A list of account amounts.
    * A list of account amounts.
    * A list of account amounts.
    * A list of account amounts.
    boolean
    * An expected decimal precision.<br/> This is the number of decimals a fungible/common token type is _expected_ to have.
    boolean
    * A token identifier.<br/> This is the token to be transferred.
     
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<TokenTransferList>
     

    Methods inherited from class com.google.protobuf.GeneratedMessageLite

    createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Field Details

    • TOKEN_FIELD_NUMBER

      public static final int TOKEN_FIELD_NUMBER
      See Also:
    • TRANSFERS_FIELD_NUMBER

      public static final int TRANSFERS_FIELD_NUMBER
      See Also:
    • NFTTRANSFERS_FIELD_NUMBER

      public static final int NFTTRANSFERS_FIELD_NUMBER
      See Also:
    • EXPECTED_DECIMALS_FIELD_NUMBER

      public static final int EXPECTED_DECIMALS_FIELD_NUMBER
      See Also:
  • Method Details

    • hasToken

      public boolean hasToken()
       *
       A token identifier.<br/>
       This is the token to be transferred.
       
      .proto.TokenID token = 1;
      Specified by:
      hasToken in interface TokenTransferListOrBuilder
      Returns:
      Whether the token field is set.
    • getToken

      public TokenID getToken()
       *
       A token identifier.<br/>
       This is the token to be transferred.
       
      .proto.TokenID token = 1;
      Specified by:
      getToken in interface TokenTransferListOrBuilder
      Returns:
      The token.
    • getTransfersList

      public List<AccountAmount> getTransfersList()
       *
       A list of account amounts.
       <p>
       Each entry SHALL have an account and amount.<br/>
       These transfers SHALL be "double-entry" style; the credits (positive
       amount) and debits (negative amount) MUST sum to 0, unless this
       transfer list is part of a `mint` or `burn` operation.<br/>
       This SHALL be be set for fungible/common tokens and MUST be
       empty otherwise.
       
      repeated .proto.AccountAmount transfers = 2;
      Specified by:
      getTransfersList in interface TokenTransferListOrBuilder
    • getTransfersOrBuilderList

      public List<? extends AccountAmountOrBuilder> getTransfersOrBuilderList()
       *
       A list of account amounts.
       <p>
       Each entry SHALL have an account and amount.<br/>
       These transfers SHALL be "double-entry" style; the credits (positive
       amount) and debits (negative amount) MUST sum to 0, unless this
       transfer list is part of a `mint` or `burn` operation.<br/>
       This SHALL be be set for fungible/common tokens and MUST be
       empty otherwise.
       
      repeated .proto.AccountAmount transfers = 2;
    • getTransfersCount

      public int getTransfersCount()
       *
       A list of account amounts.
       <p>
       Each entry SHALL have an account and amount.<br/>
       These transfers SHALL be "double-entry" style; the credits (positive
       amount) and debits (negative amount) MUST sum to 0, unless this
       transfer list is part of a `mint` or `burn` operation.<br/>
       This SHALL be be set for fungible/common tokens and MUST be
       empty otherwise.
       
      repeated .proto.AccountAmount transfers = 2;
      Specified by:
      getTransfersCount in interface TokenTransferListOrBuilder
    • getTransfers

      public AccountAmount getTransfers(int index)
       *
       A list of account amounts.
       <p>
       Each entry SHALL have an account and amount.<br/>
       These transfers SHALL be "double-entry" style; the credits (positive
       amount) and debits (negative amount) MUST sum to 0, unless this
       transfer list is part of a `mint` or `burn` operation.<br/>
       This SHALL be be set for fungible/common tokens and MUST be
       empty otherwise.
       
      repeated .proto.AccountAmount transfers = 2;
      Specified by:
      getTransfers in interface TokenTransferListOrBuilder
    • getTransfersOrBuilder

      public AccountAmountOrBuilder getTransfersOrBuilder(int index)
       *
       A list of account amounts.
       <p>
       Each entry SHALL have an account and amount.<br/>
       These transfers SHALL be "double-entry" style; the credits (positive
       amount) and debits (negative amount) MUST sum to 0, unless this
       transfer list is part of a `mint` or `burn` operation.<br/>
       This SHALL be be set for fungible/common tokens and MUST be
       empty otherwise.
       
      repeated .proto.AccountAmount transfers = 2;
    • getNftTransfersList

      public List<NftTransfer> getNftTransfersList()
       *
       A list of NftTransfers.
       <p>
       Each entry SHALL have a sender and receiver account, and the
       serial number of the unique token to transfer.<br/>
       This SHALL be be set for non-fungible/unique tokens and SHALL be
       empty otherwise.
       
      repeated .proto.NftTransfer nftTransfers = 3;
      Specified by:
      getNftTransfersList in interface TokenTransferListOrBuilder
    • getNftTransfersOrBuilderList

      public List<? extends NftTransferOrBuilder> getNftTransfersOrBuilderList()
       *
       A list of NftTransfers.
       <p>
       Each entry SHALL have a sender and receiver account, and the
       serial number of the unique token to transfer.<br/>
       This SHALL be be set for non-fungible/unique tokens and SHALL be
       empty otherwise.
       
      repeated .proto.NftTransfer nftTransfers = 3;
    • getNftTransfersCount

      public int getNftTransfersCount()
       *
       A list of NftTransfers.
       <p>
       Each entry SHALL have a sender and receiver account, and the
       serial number of the unique token to transfer.<br/>
       This SHALL be be set for non-fungible/unique tokens and SHALL be
       empty otherwise.
       
      repeated .proto.NftTransfer nftTransfers = 3;
      Specified by:
      getNftTransfersCount in interface TokenTransferListOrBuilder
    • getNftTransfers

      public NftTransfer getNftTransfers(int index)
       *
       A list of NftTransfers.
       <p>
       Each entry SHALL have a sender and receiver account, and the
       serial number of the unique token to transfer.<br/>
       This SHALL be be set for non-fungible/unique tokens and SHALL be
       empty otherwise.
       
      repeated .proto.NftTransfer nftTransfers = 3;
      Specified by:
      getNftTransfers in interface TokenTransferListOrBuilder
    • getNftTransfersOrBuilder

      public NftTransferOrBuilder getNftTransfersOrBuilder(int index)
       *
       A list of NftTransfers.
       <p>
       Each entry SHALL have a sender and receiver account, and the
       serial number of the unique token to transfer.<br/>
       This SHALL be be set for non-fungible/unique tokens and SHALL be
       empty otherwise.
       
      repeated .proto.NftTransfer nftTransfers = 3;
    • hasExpectedDecimals

      public boolean hasExpectedDecimals()
       *
       An expected decimal precision.<br/>
       This is the number of decimals a fungible/common token type is
       _expected_ to have.
       <p>
       The transfer SHALL fail with response code `UNEXPECTED_TOKEN_DECIMALS`
       if this is set and the actual decimals specified for the `Token` differ
       from this value.<br/>
       If `nftTransfers` is set, then this value SHOULD NOT be set.
       
      .google.protobuf.UInt32Value expected_decimals = 4;
      Specified by:
      hasExpectedDecimals in interface TokenTransferListOrBuilder
      Returns:
      Whether the expectedDecimals field is set.
    • getExpectedDecimals

      public com.google.protobuf.UInt32Value getExpectedDecimals()
       *
       An expected decimal precision.<br/>
       This is the number of decimals a fungible/common token type is
       _expected_ to have.
       <p>
       The transfer SHALL fail with response code `UNEXPECTED_TOKEN_DECIMALS`
       if this is set and the actual decimals specified for the `Token` differ
       from this value.<br/>
       If `nftTransfers` is set, then this value SHOULD NOT be set.
       
      .google.protobuf.UInt32Value expected_decimals = 4;
      Specified by:
      getExpectedDecimals in interface TokenTransferListOrBuilder
      Returns:
      The expectedDecimals.
    • parseFrom

      public static TokenTransferList parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenTransferList parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenTransferList parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenTransferList parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenTransferList parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenTransferList parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TokenTransferList parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static TokenTransferList parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static TokenTransferList parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static TokenTransferList parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static TokenTransferList parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static TokenTransferList parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static TokenTransferList.Builder newBuilder()
    • newBuilder

      public static TokenTransferList.Builder newBuilder(TokenTransferList prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<TokenTransferList,TokenTransferList.Builder>
    • getDefaultInstance

      public static TokenTransferList getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<TokenTransferList> parser()