helius_get_leader_schedule
Retrieve the leader schedule for a specific Solana blockchain epoch to identify validator nodes responsible for block production.
Instructions
Get the leader schedule for an epoch
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slot | No | ||
| commitment | No |
Implementation Reference
- src/handlers/helius.ts:291-299 (handler)The handler function that implements the core logic for the 'helius_get_leader_schedule' tool by calling the Solana RPC getLeaderSchedule method via the Helius client.export const getLeaderScheduleHandler = async (input: GetLeaderScheduleInput): Promise<ToolResultSchema> => { try { // getLeaderSchedule doesn't accept parameters in the real SDK const leaderSchedule = await (helius as any as Helius).connection.getLeaderSchedule(); return createSuccessResponse(`Leader schedule: ${JSON.stringify(leaderSchedule, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting leader schedule: ${error instanceof Error ? error.message : String(error)}`); } }
- src/tools.ts:242-253 (schema)The input schema definition for the 'helius_get_leader_schedule' tool, specifying optional slot and commitment parameters.{ name: "helius_get_leader_schedule", description: "Get the leader schedule for an epoch", inputSchema: { type: "object", properties: { slot: { type: "number" }, commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: [] } },
- src/tools.ts:568-568 (registration)The registration of the tool name to its handler function in the handlers dictionary."helius_get_leader_schedule": getLeaderScheduleHandler,