Solana RPC
Archive Method
Only on the full archive nodes. Complex queries might take longer and incur additional cost
How to Use It
// yarn add @tatumio/tatum
import { TatumSDK, Solana, Network } from '@tatumio/tatum'
const tatum = (await TatumSDK.init) < Solana > { network: Network.SOLANA }
const res = await tatum.rpc.getIdentity()
await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
Overview
The getIdentity
method is used to retrieve the identity pubkey for the current node. This pubkey represents a unique identifier for the node in the Solana network.
Use cases for this method might include retrieving the identity of a node for tracking or monitoring purposes, or validating the identity of a node in scenarios where only certain nodes are trusted for certain operations.
Parameters
This method does not require any parameters.
Return Object
The result field will be a JSON object with the following fields:
identity
: The identity pubkey of the current node as a base-58 encoded string.
JSON-RPC Request Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "getIdentity"
}
JSON-RPC Response Example
{
"jsonrpc": "2.0",
"result": {
"identity": "2r1F4iWqVcb8M1DbAjQuFpebkQHY9hcVU4WuW2DJBppN"
},
"id": 1
}