Documentation index

getIdentity

Returns the identity public key of the current node. This is the validator's unique identifier on the network, used for voting, block production, and gossip communication. This method is useful for verifying which validator you are connected to, building monitoring dashboards, and confirming node configuration after deployment.

Parameters

This method does not accept any parameters.

Response

Returns an object:

FieldTypeDescription
identitystringBase-58 encoded identity public key of the node

Code Examples

cURL

Terminal
curl http://88.216.36.108:7999 -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getIdentity",
  "params": []
}'

TypeScript

TypeScript
const response = await fetch("http://88.216.36.108:7999", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "getIdentity",
    params: []
  }),
});
const { result } = await response.json();
console.log("Node identity:", result.identity);

Python

Python
import requests

response = requests.post("http://88.216.36.108:7999", json={
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getIdentity",
    "params": []
})
result = response.json()["result"]
print(f"Node identity: {result['identity']}")

Rust

Rust
use reqwest::Client;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    let res = client.post("http://88.216.36.108:7999")
        .json(&json!({
            "jsonrpc": "2.0",
            "id": 1,
            "method": "getIdentity",
            "params": []
        }))
        .send().await?
        .text().await?;
    println!("{}", res);
    Ok(())
}

Example Response

JSON
{
  "jsonrpc": "2.0",
  "result": {
    "identity": "2r1F4iWqVcb8M1DbAjQuFpebkQHY9hcVU4WuW2DJBppN"
  },
  "id": 1
}