Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
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-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class* Transfer HBAR and/or other tokens among two or more accounts and/or smart contracts.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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) 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.getTokenTransfersOrBuilder(int index) * One or more lists of token transfers.List<? extends TokenTransferListOrBuilder> * One or more lists of token transfers.* A list of HBAR transfers.boolean* A list of HBAR transfers.newBuilder(CryptoTransferTransactionBody prototype) parseDelimitedFrom(InputStream input) 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) parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(ByteBuffer data) parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<CryptoTransferTransactionBody> parser()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, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
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:
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.
-
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
-
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:
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
-
getTokenTransfersOrBuilder
* 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
- 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
-
newBuilder
public static CryptoTransferTransactionBody.Builder newBuilder(CryptoTransferTransactionBody prototype) -
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<CryptoTransferTransactionBody,CryptoTransferTransactionBody.Builder>
-
getDefaultInstance
-
parser
-