返回当前节点的身份 Pubkey
显示 result fields
curl http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "id": 1, "method": "getIdentity" }'
import { Connection } from '@solana/web3.js'; const connection = new Connection('http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY'); const identity = await connection.getIdentity(); console.log(identity);
from solana.rpc.api import Client client = Client("http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY") response = client.get_identity() print(response)
此页面对您有帮助吗?