Class CryptoTransferTransactionBody

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

@Generated public final class CryptoTransferTransactionBody extends com.google.protobuf.GeneratedMessageLite<CryptoTransferTransactionBody,CryptoTransferTransactionBody.Builder> implements CryptoTransferTransactionBodyOrBuilder
 *
 Transfer HBAR and/or other tokens among two or more accounts and/or smart
 contracts.

 Transfers of HBAR or fungible/common tokens in this transaction are
 structured as a "double-entry" transfer list which debits one or more
 accounts, and separately credits one or more accounts. Each such transfer
 list may specify up to 10 individual credits or debits.<br/>
 Transfers of non-fungible/unique tokens in this transaction are
 structured as a "single-entry" transfer list, which both debits one account
 and credits another account in a single entry.

 At least one transfer MUST be present, this MAY be an HBAR transfer in
 `transfers`, or MAY be a token transfer in `tokenTransfers`.<br/>
 Either `transfers` or `tokenTransfers` MAY be unset, provided the other
 is set and not empty.<br/>
 If any one account with a debit in any transfer list holds insufficient
 balance to complete the transfer, the entire transaction SHALL fail, and
 all transfers SHALL NOT be completed.<br/>
 If any one account that is _sending_ an individual non-fungible/unique (NFT)
 token does not currently hold that unique NFT, the entire transaction SHALL
 FAIL, and all transfers SHALL NOT be completed.
 The transaction fee SHALL be charged for a transaction that fails due to
 insufficient balance or not holding the NFT to be transferred.<br/>
 Each account with any debit amounts in any transfer list MUST sign this
 transaction.<br/>
 Each account with any credit amounts in any transfer list that also has the
 `receiverSigRequired` flag set MUST sign this transaction.

 ### Block Stream Effects
 All debits and credits completed by this transaction SHALL be included in
 the transaction result transfer list.<br/>
 Multiple fungible/common debits from one account, or credits to one account,
 MAY be consolidated to a single debit or credit entry in the
 transaction result.<br/>
 Multiple non-fungible/unique transfers SHALL NOT be consolidated in the
 transaction result.
 
Protobuf type proto.CryptoTransferTransactionBody
  • Field Details

    • TRANSFERS_FIELD_NUMBER

      public static final int TRANSFERS_FIELD_NUMBER
      See Also:
    • TOKENTRANSFERS_FIELD_NUMBER

      public static final int TOKENTRANSFERS_FIELD_NUMBER
      See Also:
  • Method Details

    • hasTransfers

      public boolean hasTransfers()
       *
       A list of HBAR transfers.
       <p>
       Each transfer in this list MUST be denominated in tinybar.
       
      .proto.TransferList transfers = 1;
      Specified by:
      hasTransfers in interface CryptoTransferTransactionBodyOrBuilder
      Returns:
      Whether the transfers field is set.
    • getTransfers

      public TransferList getTransfers()
       *
       A list of HBAR transfers.
       <p>
       Each transfer in this list MUST be denominated in tinybar.
       
      .proto.TransferList transfers = 1;
      Specified by:
      getTransfers in interface CryptoTransferTransactionBodyOrBuilder
      Returns:
      The transfers.
    • getTokenTransfersList

      public List<TokenTransferList> getTokenTransfersList()
       *
       One or more lists of token transfers.
       <p>
       This list MUST NOT contain more than 10 entries.<br/>
       If custom fees must be charged, the fee SHALL be assessed against the
       effective "payer" for this transaction.<br/>
       If the effective "payer" for this transaction lacks sufficient balance
       to pay custom fees assessed, the entire transaction SHALL fail with a
       response code `INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE`.
       
      repeated .proto.TokenTransferList tokenTransfers = 2;
      Specified by:
      getTokenTransfersList in interface CryptoTransferTransactionBodyOrBuilder
    • getTokenTransfersOrBuilderList

      public List<? extends TokenTransferListOrBuilder> getTokenTransfersOrBuilderList()
       *
       One or more lists of token transfers.
       <p>
       This list MUST NOT contain more than 10 entries.<br/>
       If custom fees must be charged, the fee SHALL be assessed against the
       effective "payer" for this transaction.<br/>
       If the effective "payer" for this transaction lacks sufficient balance
       to pay custom fees assessed, the entire transaction SHALL fail with a
       response code `INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE`.
       
      repeated .proto.TokenTransferList tokenTransfers = 2;
    • getTokenTransfersCount

      public int getTokenTransfersCount()
       *
       One or more lists of token transfers.
       <p>
       This list MUST NOT contain more than 10 entries.<br/>
       If custom fees must be charged, the fee SHALL be assessed against the
       effective "payer" for this transaction.<br/>
       If the effective "payer" for this transaction lacks sufficient balance
       to pay custom fees assessed, the entire transaction SHALL fail with a
       response code `INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE`.
       
      repeated .proto.TokenTransferList tokenTransfers = 2;
      Specified by:
      getTokenTransfersCount in interface CryptoTransferTransactionBodyOrBuilder
    • getTokenTransfers

      public TokenTransferList getTokenTransfers(int index)
       *
       One or more lists of token transfers.
       <p>
       This list MUST NOT contain more than 10 entries.<br/>
       If custom fees must be charged, the fee SHALL be assessed against the
       effective "payer" for this transaction.<br/>
       If the effective "payer" for this transaction lacks sufficient balance
       to pay custom fees assessed, the entire transaction SHALL fail with a
       response code `INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE`.
       
      repeated .proto.TokenTransferList tokenTransfers = 2;
      Specified by:
      getTokenTransfers in interface CryptoTransferTransactionBodyOrBuilder
    • getTokenTransfersOrBuilder

      public TokenTransferListOrBuilder getTokenTransfersOrBuilder(int index)
       *
       One or more lists of token transfers.
       <p>
       This list MUST NOT contain more than 10 entries.<br/>
       If custom fees must be charged, the fee SHALL be assessed against the
       effective "payer" for this transaction.<br/>
       If the effective "payer" for this transaction lacks sufficient balance
       to pay custom fees assessed, the entire transaction SHALL fail with a
       response code `INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE`.
       
      repeated .proto.TokenTransferList tokenTransfers = 2;
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static CryptoTransferTransactionBody.Builder newBuilder()
    • newBuilder

    • dynamicMethod

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

      public static CryptoTransferTransactionBody getDefaultInstance()
    • parser

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