Class TransactionID

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 Classes
    Modifier and Type
    Class
    Description
    static 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

    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)
     
    * An Account identifier.
     
    int
    * 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.
     
     
     
    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<TransactionID>
     

    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

    • 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:
      hasTransactionValidStart in interface TransactionIDOrBuilder
      Returns:
      Whether the transactionValidStart field is set.
    • getTransactionValidStart

      public Timestamp 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:
      getTransactionValidStart in interface TransactionIDOrBuilder
      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:
      hasAccountID in interface TransactionIDOrBuilder
      Returns:
      Whether the accountID field is set.
    • getAccountID

      public AccountID getAccountID()
       *
       An Account identifier.
       <p>
       The identified account SHALL pay transaction fees for this transaction.
       
      .proto.AccountID accountID = 2;
      Specified by:
      getAccountID in interface TransactionIDOrBuilder
      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:
      getScheduled in interface TransactionIDOrBuilder
      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:
      getNonce in interface TransactionIDOrBuilder
      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

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

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

      public static TransactionID parseDelimitedFrom(InputStream input) throws IOException
      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

      public static TransactionID.Builder newBuilder()
    • newBuilder

      public static TransactionID.Builder newBuilder(TransactionID 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<TransactionID,TransactionID.Builder>
    • getDefaultInstance

      public static TransactionID getDefaultInstance()
    • parser

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