Parameters

This method does not require any parameters.

Response

result
object

Code Examples

Basic Request

curl http://rpc.orbitflare.com -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getIdentity"
}'

Using web3.js

import { Connection } from '@solana/web3.js';

const connection = new Connection('http://rpc.orbitflare.com');
const identity = await connection.getIdentity();
console.log(identity);

Using Python

from solana.rpc.api import Client

client = Client("http://rpc.orbitflare.com")
response = client.get_identity()
print(response)

Notes

  1. Returns the identity public key of the validator node you’re connected to
  2. Useful for identifying which node you’re communicating with
  3. The response is immediate as it reads from the node’s configuration
  4. Can be used to verify you’re connected to the expected node

Best Practices

  1. Use this method when troubleshooting node connectivity issues
  2. Compare returned identity with expected node identity for validation
  3. Handle network errors and retry when appropriate