getLeaderSchedule

All the specifications for getLeaderSchedule RPC Method on Solana

Returns the leader schedule for an epoch.

Parameters required for this RPC call

  • Fetch the leader schedule for the epoch that corresponds to the provided slot. If unspecified, the leader schedule for the current epoch is fetched. This is an optional parameter.

  • configuration : This contains the following parameters, all are optional fields.

    • commitment: The commitment describes how finalized a block is at that point in time. processed, confirmed and finalized are supported.

    • identity: Only return results for this validator identity (base-58 encoded)

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": "getLeaderSchedule",
     "params": [
       null,
       {
         "commitment": "processed",
         "identity": "dv2eQHeP4RFrJZ6UeiZWoc3XTtmtZCUKxxCApCDcRNV"
       }
     ]
   }
 '

Returns null if requested epoch is not found, otherwise returns an object where:

  • Keys are validator identities (as base-58 encoded strings)

  • Values are arrays of leader slot indices relative to the first slot in the requested epoch

Last updated

Was this helpful?