Source
get_slot_leaderParameters
config
Configuration object containing the following fields:
Result
result
Node identity Pubkey as base-58 encoded string
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
RPC methods
CLI reference
Network constants
curl https://api.devnet.solana.com -s -X POST \
-H "Content-Type: application/json" \
-d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getSlotLeader",
"params": [
{
"commitment": "finalized"
}
]
}
'
import { createSolanaRpc } from "@solana/kit";
const rpc_url = "https://api.devnet.solana.com";
const rpc = createSolanaRpc(rpc_url);
let slotLeader = await rpc.getSlotLeader().send();
console.log(slotLeader);
import { Connection, clusterApiUrl } from "@solana/web3.js";
const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
let slotLeader = await connection.getSlotLeader();
console.log(slotLeader);
{
"jsonrpc": "2.0",
"result": "ENvAW7JScgYq6o4zKZwewtkzzJgDzuJAFxYasvmEQdpS",
"id": 1
}
Returns the validator identity scheduled to produce the slot at the requested commitment.
curl https://api.devnet.solana.com -s -X POST \
-H "Content-Type: application/json" \
-d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getSlotLeader",
"params": [
{
"commitment": "finalized"
}
]
}
'
import { createSolanaRpc } from "@solana/kit";
const rpc_url = "https://api.devnet.solana.com";
const rpc = createSolanaRpc(rpc_url);
let slotLeader = await rpc.getSlotLeader().send();
console.log(slotLeader);
import { Connection, clusterApiUrl } from "@solana/web3.js";
const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
let slotLeader = await connection.getSlotLeader();
console.log(slotLeader);
{
"jsonrpc": "2.0",
"result": "ENvAW7JScgYq6o4zKZwewtkzzJgDzuJAFxYasvmEQdpS",
"id": 1
}
get_slot_leaderShow propertiesHide properties
processed, confirmed, finalizedSolana RPC uses the following commitment levels:| Value | Description |
|---|---|
processed | Return data from the highest slot this node has processed. This is the newest view, but the block can still be skipped. |
confirmed | Return data from the same slot as finalized. Kept for compatibility and planned for removal in a later release. |
finalized | Return data from the highest slot with a finalization certificate, from votes by 80% of stake in one round or 60% of stake in each of two rounds. This is the strongest commitment level. |
{ "minContextSlot": 341197000 }