Class AddConsensusNodeParams
Transaction Parameters for adding a new consensus node to the network address book.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class AddConsensusNodeParams : TransactionParams<ConsensusNodeReceipt>
Remarks
This is a privileged transaction requiring Hedera governing council authorization. The node will be added to network state but will not participate in consensus until the next network upgrade (freeze with PREPARE_UPGRADE).
Examples
Register a new node. The receipt carries the network-assigned NodeId which every later UpdateConsensusNode/RemoveConsensusNode call needs:
// Register a new consensus node in the network address book. Only
// a council-privileged payer can invoke this. The receipt carries
// the network-assigned NodeId which is required by all later
// UpdateConsensusNode / RemoveConsensusNode calls.
var receipt = await client.AddConsensusNodeAsync(new AddConsensusNodeParams
{
Account = newNodeAccount,
Description = "Regional operator node",
GossipEndpoints = new[] { new Uri("tcp://10.0.0.1:50111") },
ServiceEndpoints = new[] { new Uri("https://rpc.example.com:50211") },
GossipCaCertificate = gossipCaCert,
AdminKey = nodeAdminKey,
DeclineReward = false
});
Console.WriteLine($"Assigned NodeId: {receipt.NodeId}");
Properties
| Edit this page View SourceAccount
The account identifier to associate with this node. This field is REQUIRED.
Declaration
public EntityId Account { get; set; }
Property Value
| Type | Description |
|---|---|
| EntityId |
AdminKey
An administrative key controlled by the node operator. This key must sign this transaction and all future node update transactions. This field is REQUIRED.
Declaration
public Endorsement AdminKey { get; set; }
Property Value
| Type | Description |
|---|---|
| Endorsement |
CancellationToken
Optional cancellation token to interrupt the submission process.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
DeclineReward
When true, the node operator declines to receive node rewards. Defaults to false.
Declaration
public bool DeclineReward { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Description
A short description of the node. Must not exceed 100 bytes when encoded as UTF-8. This field is OPTIONAL.
Declaration
public string? Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
GossipCaCertificate
The DER-encoded gossip CA certificate used to sign gossip events. This field is REQUIRED and must not be empty.
Declaration
public ReadOnlyMemory<byte> GossipCaCertificate { get; set; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyMemory<byte> |
GossipEndpoints
Service endpoints for gossip communication with other consensus nodes. Must contain between 1 and 10 entries. This field is REQUIRED.
Declaration
public IEnumerable<Uri> GossipEndpoints { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<Uri> |
GrpcCertificateHash
A SHA-384 hash of the node's gRPC TLS certificate in PEM format. This field is OPTIONAL.
Declaration
public ReadOnlyMemory<byte>? GrpcCertificateHash { get; set; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyMemory<byte>? |
GrpcProxyEndpoint
An optional gRPC-Web proxy endpoint for non-gRPC (e.g. browser) clients. Must be an FQDN using HTTPS. This field is OPTIONAL.
Declaration
public Uri? GrpcProxyEndpoint { get; set; }
Property Value
| Type | Description |
|---|---|
| Uri |
ServiceEndpoints
Service endpoints for gRPC client connections. Must contain between 1 and 8 entries. This field is REQUIRED.
Declaration
public IEnumerable<Uri> ServiceEndpoints { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<Uri> |
Signatory
Additional private key, keys or signing callback method required to authorize this transaction. Must include the key matching AdminKey and governing council keys.
Declaration
public Signatory? Signatory { get; set; }
Property Value
| Type | Description |
|---|---|
| Signatory |