Class ConsensusNodeReceipt
The receipt returned from a successful Create Node transaction, containing the newly assigned node identifier.
Inherited Members
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 SourceNodeId
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 |