Show / Hide Table of Contents

Class TransactionId

Represents the transaction id associated with a network request.
This is generated by the library automatically for each request.

TransactionId

implements the equitable interface and can be compared to other transaction ids returned from the library.

Inheritance
object
TransactionId
Implements
IEquatable<TransactionId>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record TransactionId : IEquatable<TransactionId>

Constructors

| Edit this page View Source

TransactionId(EntityId, DateTime, bool, int)

Convenience constructor converting the
entered 
DateTime

object into the proper seconds and nanoseconds since the Epoch for use by the network.

Declaration
public TransactionId(EntityId payer, DateTime dateTime, bool scheduled = false, int childNonce = 0)
Parameters
Type Name Description
EntityId payer

The account that is both associated with and pays the transaction fees for this transaction.

DateTime dateTime

The date and time stamp for this transaction. Represents the earliest point in time the network will consider the transaction valid.

bool scheduled

Flag indicating that this transaction ID represents a scheduled transaction and not the transaction that scheduled it. Useful retrieving receipts and records, but cannot be set to true for creating new transactions (via setting it in the context).

int childNonce

When non-zero, indicates that this transaction is a child transaction spawned as a part of a larger user-initiated transaction, such as an implicit account creation (pay to alias) or side effects of a contract method invocation. It will have the payer and timestamp matching the transaction that initiated the original ledger state change.

| Edit this page View Source

TransactionId(EntityId, long, int, bool, int)

Public constructor.

Declaration
public TransactionId(EntityId payer, long seconds, int nanos, bool scheduled = false, int childNonce = 0)
Parameters
Type Name Description
EntityId payer

The account that is both associated with and pays the transaction fees for this transaction.

long seconds

The total number of seconds elapsed since the Epoch. Represents the earliest point in time the network will consider the transaction valid.

int nanos

The number of nanoseconds elapsed past the seconds portion of the time period identified in the seconds parameter.

bool scheduled

Flag indicating that this transaction ID represents a scheduled transaction and not the transaction that scheduled it. Useful retrieving receipts and records, but cannot be set to true for creating new transactions (via setting it in the context).

int childNonce

When non-zero, indicates that this transaction is a child transaction spawned as a part of a larger user-initiated transaction, such as an implicit account creation (pay to alias) or side effects of a contract method invocation. It will have the payer and timestamp matching the transaction that initiated the original ledger state change.

Properties

| Edit this page View Source

ChildNonce

When non-zero, indicates that this transaction is a child transaction spawned as a part of a larger user-initiated transaction, such as an implicit account creation (pay to key alias) or side effects of a contract method invocation. It will have the payer and timestamp matching the parent transaction that initiated the original ledger state change.

Declaration
public int ChildNonce { get; }
Property Value
Type Description
int
| Edit this page View Source

None

A special designation of a transaction id that can't be created. It represents the absence of a transaction id.

Declaration
public static TransactionId None { get; }
Property Value
Type Description
TransactionId
| Edit this page View Source

Payer

The account paying the transaction processing fee.

Declaration
public EntityId Payer { get; }
Property Value
Type Description
EntityId
| Edit this page View Source

Scheduled

This transaction ID represents a scheduled transaction that may or may not have been executed. The flag should be set to true when interacting with scheduled transactions.

Declaration
public bool Scheduled { get; }
Property Value
Type Description
bool
| Edit this page View Source

ValidStartNanos

The number of nanoseconds added to the ValidStartSeconds value to produce the total amount of time since the Epoch.

Declaration
public int ValidStartNanos { get; }
Property Value
Type Description
int
Remarks

Unfortunately the native .net DateTime class does not represent time at the resolution of nano-seconds. Therefore it is necessary to represent the date time in this manner.

| Edit this page View Source

ValidStartSeconds

The number of whole seconds since the Epoch.

Declaration
public long ValidStartSeconds { get; }
Property Value
Type Description
long

Methods

| Edit this page View Source

ToString()

Returns a string representation of the transaction id.

Declaration
public override string ToString()
Returns
Type Description
string

Notional string representation of the transaction id.

Overrides
object.ToString()

Implements

IEquatable<T>
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph