getIdentity

The getIdentity method returns the identity public key of the current RPC node. This public key uniquely identifies the validator or RPC node you're connected to and serves as its permanent identity within the Solana cluster.

Every Solana validator and RPC node has a unique identity keypair. The public key from this keypair serves as the node's identifier in all cluster communications, validator voting, and consensus operations. For validators, this identity is associated with their stake accounts and voting history. For RPC nodes, it helps operators track which specific node is serving requests, which is valuable for monitoring, debugging, and load balancing.

This method is useful for applications that need to track which nodes they're interacting with, implement node-specific logic, verify they're connected to intended infrastructure, or maintain logs of RPC node usage. It's particularly valuable for multi-node setups, monitoring dashboards, and applications that need to implement node affinity or avoid specific nodes.


Parameters

parameter
type
description
config
object
Optional configuration object (currently no config options are available)
Return Object
field
type
description
identity
string
The identity public key of the node as a base-58 encoded string
Request Example
Request
Response Example
Response

Tip: Use this identity to cross-reference with getClusterNodes to verify node characteristics, check validator performance in getBlockProduction, or implement node-specific request routing. This is constant for a node's lifetime unless the operator changes the identity keypair.


Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?