Optionalprops: ClientConfigurationGet the global gRPC deadline for all requests.
Maximum time in milliseconds for a single gRPC request
Get logger if set
Gets the maximum number of nodes that a transaction or query will attempt to execute against.
The current maximum nodes per transaction setting. Returns -1 if no limit is set (uses network defaults).
Get the total request timeout for complete operations.
Maximum time in milliseconds for complete Transaction/Query operations
Close the client: the consensus and mirror gRPC channels, the scheduled network update, and the mirror HTTP transport this client built for itself, which is given a 5 s grace period for reads in flight before being torn down. A transport the application injected is never closed. Mirror REST calls still running start no new attempt.
The mirror node HTTP configuration as supplied, never as resolved:
transport stays null even after the SDK has built its own, so
inspecting a client never constructs one and
setMirrorNodeHttpConfig(getMirrorNodeHttpConfig()) is a no-op.
Probe the liveness of the node with the given account ID by sending a
CryptoService/getAccountInfo query for account <shard>.<realm>.2
with ResponseType = COST_ANSWER — the node answers with the query fee
without executing the query, so no HBAR is charged and no operator is
required. A cost response means success; a gRPC failure propagates.
Enable or disable receipt query failover to other nodes when the submitting node is unresponsive. When enabled, receipt queries will start with the submitting node but can fail over to other nodes in the network if needed.
Default is false to preserve existing behavior where receipt queries are pinned
to the submitting node only.
Tradeoff: Enabling this improves availability for high-throughput/relay use cases, but in rare cases only the submitting node may have the final failure information.
Set the maximum payment allowable for queries.
Set if a new transaction ID should be generated when a TRANSACTION_EXPIRED status
is returned.
Set the global gRPC deadline for all requests.
Maximum time in milliseconds for a single gRPC request
Available only for NodeClient Legacy method maintained for backward compatibility. This method now calls setGrpcDeadline internally to ensure proper validation.
Sets the maximum number of nodes that a transaction or query will execute against.
Maximum nodes per transaction. Set to 0 to disable.
The client instance for method chaining
Replace the mirror node HTTP configuration: the transport the mirror
REST queries use (or null to let the SDK build one), how the SDK
builds it, the retry policy, and the caller headers.
The whole value is replaced, not merged, so derive from the current one to change a single field:
const cfg = client.getMirrorNodeHttpConfig();
client.setMirrorNodeHttpConfig({
...cfg,
retryPolicy: { ...cfg.retryPolicy, maxAttempts: 3 },
});
A transport set here is owned by the application and never closed by
the SDK; it is used from the next mirror REST call on. The
transportConfiguration applies only to a transport the SDK builds,
which happens once, on the first mirror REST call.
Set the account that will, by default, pay for transactions and queries built with this client. NOTE: When using string for private key, the string needs to contain DER headers
Set the total request timeout for complete operations.
Maximum time in milliseconds for complete Transaction/Query operations
Update the network address book.
Static_extractExtracts shard and realm values from a network configuration. Note: This method assumes the network is consistent (all nodes in same shard/realm). Use validateNetworkConsistency() first to ensure this.
Static_validateValidates that all nodes in a network are in the same shard and realm.
StaticforConstruct a Hedera client pre-configured for local-node access.
Optionalprops: { scheduleNetworkUpdate?: boolean } = ...StaticforConstruct a Hedera client pre-configured for Mainnet access.
Optionalprops: { scheduleNetworkUpdate?: boolean } = {}StaticforConstruct a Hedera client pre-configured for Mainnet access with network update.
Optionalprops: { scheduleNetworkUpdate?: boolean } = {}StaticforStaticforOptionalprops: { scheduleNetworkUpdate?: boolean } = {}StaticforConstruct a client for a specific network with optional network update. Updates network only if the network is not "local-node".
Optionalprops: { scheduleNetworkUpdate?: boolean } = {}StaticforConstruct a client for a specific network.
It is the responsibility of the caller to ensure that all nodes in the map are part of the same Hedera network. Failure to do so will result in undefined behavior.
The client will load balance all requests to Hedera using a simple round-robin scheme to chose nodes to send transactions to. For one transaction, at most 1/3 of the nodes will be tried.
Optionalprops: ClientConfigurationStaticforConstruct a Hedera client pre-configured for Previewnet access.
Optionalprops: { scheduleNetworkUpdate?: boolean } = {}StaticforConstruct a Hedera client pre-configured for Previewnet access with network update.
Optionalprops: { scheduleNetworkUpdate?: boolean } = {}StaticforConstruct a Hedera client pre-configured for Testnet access.
Optionalprops: { scheduleNetworkUpdate?: boolean } = {}StaticforConstruct a Hedera client pre-configured for Testnet access with network update.
Optionalprops: { scheduleNetworkUpdate?: boolean } = {}StaticfromStaticfrom
Logger