getClusterNodes
All the specifications for getClusterNodes RPC Method on Solana
Parameters required for this RPC call
curl https://rpc.shyft.to?api_key=YOUR-API-KEY -s -X \
POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getClusterNodes"
}
'import { Connection, PublicKey, clusterApiUrl } from "@solana/web3.js";
const connection = new Connection("https://rpc.shyft.to?api_key=YOUR-API-KEY", "confirmed");
let nodes = await connection.getClusterNodes();
console.log(nodes);{
"jsonrpc": "2.0",
"result": [
{
"featureSet": 3073396398, //unique identifier of the node's feature set
"gossip": "10.239.6.48:8001", //Gossip network address for the node
"pubkey": "9QzsJf7LPLj8GkXbYT3LFDKqsj2hHG7TA3xinJHu8epQ", //Node public key, as base-58 encoded string
"rpc": "10.239.6.48:8899", //JSON RPC network address for the node, or null if the JSON RPC service is not enabled
"shredVersion": 2405, //The shred version the node has been configured to use
"tpu": "10.239.6.48:8856", //TPU network address for the node
"version": "1.0.0 c375ce1f"
}
],
"id": 1
}Last updated