Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
Class CryptoTransferTransactionBody.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<CryptoTransferTransactionBody,CryptoTransferTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<CryptoTransferTransactionBody,CryptoTransferTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.CryptoTransferTransactionBody.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,CryptoTransferTransactionBodyOrBuilder,Cloneable
- Enclosing class:
CryptoTransferTransactionBody
public static final class CryptoTransferTransactionBody.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<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 Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllTokenTransfers(Iterable<? extends TokenTransferList> values) * One or more lists of token transfers.addTokenTransfers(int index, TokenTransferList value) * One or more lists of token transfers.addTokenTransfers(int index, TokenTransferList.Builder builderForValue) * One or more lists of token transfers.* One or more lists of token transfers.addTokenTransfers(TokenTransferList.Builder builderForValue) * One or more lists of token transfers.* One or more lists of token transfers.* A list of HBAR transfers.getTokenTransfers(int index) * One or more lists of token transfers.int* One or more lists of token transfers.* One or more lists of token transfers.* A list of HBAR transfers.boolean* A list of HBAR transfers.mergeTransfers(TransferList value) * A list of HBAR transfers.removeTokenTransfers(int index) * One or more lists of token transfers.setTokenTransfers(int index, TokenTransferList value) * One or more lists of token transfers.setTokenTransfers(int index, TokenTransferList.Builder builderForValue) * One or more lists of token transfers.setTransfers(TransferList value) * A list of HBAR transfers.setTransfers(TransferList.Builder builderForValue) * A list of HBAR transfers.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
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:
hasTransfersin interfaceCryptoTransferTransactionBodyOrBuilder- Returns:
- Whether the transfers field is set.
-
getTransfers
* A list of HBAR transfers. <p> Each transfer in this list MUST be denominated in tinybar.
.proto.TransferList transfers = 1;- Specified by:
getTransfersin interfaceCryptoTransferTransactionBodyOrBuilder- Returns:
- The transfers.
-
setTransfers
* A list of HBAR transfers. <p> Each transfer in this list MUST be denominated in tinybar.
.proto.TransferList transfers = 1; -
setTransfers
* A list of HBAR transfers. <p> Each transfer in this list MUST be denominated in tinybar.
.proto.TransferList transfers = 1; -
mergeTransfers
* A list of HBAR transfers. <p> Each transfer in this list MUST be denominated in tinybar.
.proto.TransferList transfers = 1; -
clearTransfers
* A list of HBAR transfers. <p> Each transfer in this list MUST be denominated in tinybar.
.proto.TransferList transfers = 1; -
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:
getTokenTransfersListin interfaceCryptoTransferTransactionBodyOrBuilder
-
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:
getTokenTransfersCountin interfaceCryptoTransferTransactionBodyOrBuilder
-
getTokenTransfers
* 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:
getTokenTransfersin interfaceCryptoTransferTransactionBodyOrBuilder
-
setTokenTransfers
* 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; -
setTokenTransfers
public CryptoTransferTransactionBody.Builder setTokenTransfers(int index, TokenTransferList.Builder builderForValue) * 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; -
addTokenTransfers
* 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; -
addTokenTransfers
* 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; -
addTokenTransfers
public CryptoTransferTransactionBody.Builder addTokenTransfers(TokenTransferList.Builder builderForValue) * 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; -
addTokenTransfers
public CryptoTransferTransactionBody.Builder addTokenTransfers(int index, TokenTransferList.Builder builderForValue) * 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; -
addAllTokenTransfers
public CryptoTransferTransactionBody.Builder addAllTokenTransfers(Iterable<? extends TokenTransferList> values) * 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; -
clearTokenTransfers
* 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; -
removeTokenTransfers
* 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;
-