Show / Hide Table of Contents

Class ConsensusNodeReceipt

The receipt returned from a successful Create Node transaction, containing the newly assigned node identifier.

Inheritance
object
TransactionReceipt
ConsensusNodeReceipt
Implements
IEquatable<TransactionReceipt>
IEquatable<ConsensusNodeReceipt>
Inherited Members
TransactionReceipt.TransactionId
TransactionReceipt.Status
TransactionReceipt.CurrentExchangeRate
TransactionReceipt.NextExchangeRate
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record ConsensusNodeReceipt : TransactionReceipt, IEquatable<TransactionReceipt>, IEquatable<ConsensusNodeReceipt>
Remarks

Best-effort when inferred. Methods that derive a receipt's type from the network's response — GetReceiptAsync(ConsensusClient, TransactionId, CancellationToken, Action<IConsensusContext>?) and GetAllReceiptsAsync(ConsensusClient, TransactionId, CancellationToken, Action<IConsensusContext>?) — cannot recognise the node whose identifier is 0. The network reports node_id as a presence-less uint64 and protobuf omits zero from the wire, so creating node 0 — the first node of a new network — is indistinguishable from a transaction that created no node. Such a receipt arrives as a plain TransactionReceipt instead. Established networks are unaffected, since node 0 has long existed and new nodes are assigned higher identifiers.

No value is lost to this: the substitution happens only when the identifier is zero. Test rather than cast:

ulong nodeId = receipt is ConsensusNodeReceipt node ? node.NodeId : 0;

Receipts returned directly by the operation that produced them — such as CreateNodeAsync — are typed explicitly and are always correct.

Properties

| Edit this page View Source

NodeId

The identifier assigned to the newly created consensus node. This value is unique within the network and will not be reused even if the node is later deleted.

Declaration
public ulong NodeId { get; }
Property Value
Type Description
ulong

Implements

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