Solana
Solana
Solana
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
getLeaderSchedule is a Solana JSON-RPC method that returns the leader schedule for an epoch — the deterministic plan that says which validator produces blocks in each slot of the chain that settles SOL. The result maps every leading validator's identity pubkey to the list of slot indexes it owns within the epoch, or null if the schedule is unavailable. Pass any slot in the target epoch (or omit it for the current epoch) and an optional config with commitment or identity to filter to a single validator. Send it as a JSON-RPC 2.0 POST with positional params to https://solana.therpc.io/YOUR_API_KEY.
identity option to one validator to size how many leader slots it holds this epoch.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | slot | integer | 否 | Any slot in the target epoch (defaults to the current epoch). |
| 2 | config | object | 否 | Options: commitment, identity (filter to one validator). |
| 类型 | 描述 |
|---|---|
| object | { validatorIdentity: [slotIndexes] } or null. |
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | Invalid params | A param is missing, of the wrong type, or malformed (e.g. a non-base58 pubkey or a bad config field). |
-32603 | Internal error | The node hit an internal error serving the request — retry, and reduce the requested range/encoding if it persists. |