java.lang.Object
com.google.protobuf.AbstractMessageLite<TransactionID,TransactionID.Builder>
com.google.protobuf.GeneratedMessageLite<TransactionID,TransactionID.Builder>
com.hedera.hashgraph.sdk.proto.TransactionID
- All Implemented Interfaces:
com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,TransactionIDOrBuilder
@Generated
public final class TransactionID
extends com.google.protobuf.GeneratedMessageLite<TransactionID,TransactionID.Builder>
implements TransactionIDOrBuilder
* A transaction identifier.<br/> This is used for retrieving receipts and records for a transaction and internally by the network for detecting when duplicate transactions are submitted. A transaction may be processed more reliably by submitting it to several nodes, each with a different node account, but all with the same TransactionID. Then, the transaction will take effect when the first of all those nodes submits the transaction and it reaches consensus. The other transactions SHALL NOT be executed (and SHALL result in a `DUPLICATE_TRANSACTION` response).<br/> Multiple submission increase reliability on the assumption that an error in, for example, network connectivity will not affect all nodes equally. Latency might be slightly lower, if one node is handling intake significantly slower than others, for example. The base transaction fee is required for each submission, however, so the total fees charged are significantly higher when using this approach. ### Requirements Each transaction identifier MUST be unique.<br/> Multiple transactions MAY be submitted with the same transaction identifier, but all except the first SHALL be rejected as duplicate transactions.<br/> An identifier MUST specify a `payer` account to be charged all fees associated with the transaction.<br/> The `payer` account MUST exist and MUST have sufficient HBAR to pay all transaction fees.<br/> An identifier MUST specify a "valid start time".<br/> The "valid start time" MUST be strictly _earlier_ than the current network consensus time when submitted.<br/> The "valid start time" MUST NOT be more than `transaction.maxValidDuration` seconds before the current network consensus time when submitted.<br/> A client-submitted transaction MUST NOT set the `scheduled` flag. ### Additional Notes Additional items applicable to Scheduled Transactions: - The ID of a Scheduled Transaction, once executed, SHALL inherit both `transactionValidStart` and `accountID` from the `ScheduleCreate` transaction that created the schedule. - The `scheduled` property SHALL be set for Scheduled Transactions.Protobuf type
proto.TransactionID-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class* A transaction identifier.<br/> This is used for retrieving receipts and records for a transaction and internally by the network for detecting when duplicate transactions are submitted.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 intstatic 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) * An Account identifier.static TransactionIDintgetNonce()* An identifier for an internal transaction.<br/> An internal transaction is one that was spawned as part of handling a user transaction.boolean* A scheduled transaction flag.<br/> If set, this transaction represents the execution of a Schedule after all necessary signatures are gathered.* A timestamp for the transaction start time.<br/> This is the earliest expected start time for this transaction.boolean* An Account identifier.boolean* A timestamp for the transaction start time.<br/> This is the earliest expected start time for this transaction.static TransactionID.Builderstatic TransactionID.BuildernewBuilder(TransactionID prototype) static TransactionIDparseDelimitedFrom(InputStream input) static TransactionIDparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionIDparseFrom(byte[] data) static TransactionIDparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionIDparseFrom(com.google.protobuf.ByteString data) static TransactionIDparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionIDparseFrom(com.google.protobuf.CodedInputStream input) static TransactionIDparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionIDparseFrom(InputStream input) static TransactionIDparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TransactionIDparseFrom(ByteBuffer data) static TransactionIDparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<TransactionID> 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
-
TRANSACTIONVALIDSTART_FIELD_NUMBER
public static final int TRANSACTIONVALIDSTART_FIELD_NUMBER- See Also:
-
ACCOUNTID_FIELD_NUMBER
public static final int ACCOUNTID_FIELD_NUMBER- See Also:
-
SCHEDULED_FIELD_NUMBER
public static final int SCHEDULED_FIELD_NUMBER- See Also:
-
NONCE_FIELD_NUMBER
public static final int NONCE_FIELD_NUMBER- See Also:
-
-
Method Details
-
hasTransactionValidStart
public boolean hasTransactionValidStart()* A timestamp for the transaction start time.<br/> This is the earliest expected start time for this transaction. <p> This value MUST be strictly less than `consensusTimestamp` when the transaction is submitted.
.proto.Timestamp transactionValidStart = 1;- Specified by:
hasTransactionValidStartin interfaceTransactionIDOrBuilder- Returns:
- Whether the transactionValidStart field is set.
-
getTransactionValidStart
* A timestamp for the transaction start time.<br/> This is the earliest expected start time for this transaction. <p> This value MUST be strictly less than `consensusTimestamp` when the transaction is submitted.
.proto.Timestamp transactionValidStart = 1;- Specified by:
getTransactionValidStartin interfaceTransactionIDOrBuilder- Returns:
- The transactionValidStart.
-
hasAccountID
public boolean hasAccountID()* An Account identifier. <p> The identified account SHALL pay transaction fees for this transaction.
.proto.AccountID accountID = 2;- Specified by:
hasAccountIDin interfaceTransactionIDOrBuilder- Returns:
- Whether the accountID field is set.
-
getAccountID
* An Account identifier. <p> The identified account SHALL pay transaction fees for this transaction.
.proto.AccountID accountID = 2;- Specified by:
getAccountIDin interfaceTransactionIDOrBuilder- Returns:
- The accountID.
-
getScheduled
public boolean getScheduled()* A scheduled transaction flag.<br/> If set, this transaction represents the execution of a Schedule after all necessary signatures are gathered. <p> This flag MUST NOT be set in a user-submitted transaction.
bool scheduled = 3;- Specified by:
getScheduledin interfaceTransactionIDOrBuilder- Returns:
- The scheduled.
-
getNonce
public int getNonce()* An identifier for an internal transaction.<br/> An internal transaction is one that was spawned as part of handling a user transaction. These internal transactions share the transactionValidStart and accountID of the user transaction, so a nonce is necessary to give them a unique TransactionID. <p> An example is when a "parent" ContractCreate or ContractCall transaction calls one or more HTS precompiled contracts; each of the "child" transactions spawned for a precompile has a transaction id with a different nonce. <p> This value MUST be unset for user-submitted transactions.
int32 nonce = 4;- Specified by:
getNoncein interfaceTransactionIDOrBuilder- Returns:
- The nonce.
-
parseFrom
public static TransactionID parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionID parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionID parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionID parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionID parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TransactionID parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static TransactionID parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static TransactionID parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static TransactionID parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static TransactionID parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<TransactionID,TransactionID.Builder>
-
getDefaultInstance
-
parser
-