> ## Documentation Index
> Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# getLeaderSchedule

> 指定されたエポックのSolanaリーダースケジュールを返します。各スロットでブロックを生成するように割り当てられたバリデーターで、リーダー対応のトランザクションルーティングとバリデーターの監視に使用されます。

## リクエストパラメーター

<ParamField body="slot" type="number" required>
  リーダースケジュールを取得するエポックまたはスロット番号。省略した場合、現在のエポックのスケジュールを返します。
</ParamField>

<ParamField body="commitment" type="string">
  リクエストのコミットメントレベル。

  * `confirmed`
  * `finalized`
  * `processed`
</ParamField>

<ParamField body="identity" type="string">
  特定のバリデーターのスケジュールのみをフィルタリングするための、任意のバリデーターアイデンティティの公開鍵。
</ParamField>


## OpenAPI

````yaml ja/openapi/rpc-http/getLeaderSchedule.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    特定のエポックのスロット中にどのバリデーターがブロックを生成するかを決定する、Solanaのリーダーローテーションシーケンスを取得するためのバリデーター・スケジューリングAPI。
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: メインネットRPCエンドポイント
  - url: https://devnet.helius-rpc.com
    description: Devnet RPCエンドポイント
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getLeaderSchedule
      description: >-
        Solanaのエポック全体のバリデーター回転スケジュールを取得します。
        このコンセンサスAPIは、エポックを通じてスロットリーダーとして割り当てられたバリデータノードの詳細なマッピングを提供し、各バリデーターがどのスロットでブロックを生産する責任を持つかを正確に示します。
        リーダースケジュールは、ステーク重み付き選択に基づく検証可能なランダム関数を使用して決定的に導出されます。
        今後のブロック生産責任を監視するバリデーターオペレーター、バリデーターの参加機会を分析するステーキングアプリケーション、コンセンサスパターンを可視化するネットワーク監視ツール、ネットワーク全体でのブロック生産のタイミングと分配を予測または分析する必要があるアプリケーションにとって重要です。
      operationId: getLeaderSchedule
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
              properties:
                jsonrpc:
                  type: string
                  description: JSON-RPCプロトコルバージョン。
                  enum:
                    - '2.0'
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: リクエストの一意な識別子。
                  example: '1'
                  default: '1'
                method:
                  type: string
                  description: 呼び出すRPCメソッドの名前。
                  enum:
                    - getLeaderSchedule
                  example: getLeaderSchedule
                  default: getLeaderSchedule
                params:
                  type: array
                  description: メソッドのパラメーター。
                  items:
                    oneOf:
                      - type: integer
                        description: >-
                          リーダースケジュールを取得するためのエポックまたはスロット番号。
                          省略された場合、現在のエポックのスケジュールが返されます。
                        example: null
                      - type: object
                        description: 追加オプションを含む設定オブジェクト。
                        properties:
                          commitment:
                            type: string
                            description: リクエストのコミットメントレベル。
                            enum:
                              - confirmed
                              - finalized
                              - processed
                            example: finalized
                          identity:
                            type: string
                            description: >-
                              特定のバリデーターのスケジュールのみをフィルタリングするためのオプションのバリデーター・アイデンティティの公開鍵。
                            example: 4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F
      responses:
        '200':
          description: リーダースケジュールの取得に成功しました。
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPCプロトコルバージョン。
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: リクエストに一致する識別子。
                    example: '1'
                  result:
                    oneOf:
                      - type: 'null'
                        description: 要求されたエポックが見つからない場合はNull。
                      - type: object
                        description: このエポック内でバリデーター・アイデンティティをリーダースロットに割り当てたマッピング。
                        additionalProperties:
                          type: array
                          description: このバリデーターがブロックを生産するためにスケジュールされているエポック内のスロットインデックスの配列。
                          items:
                            type: integer
                            example: 0
        '400':
          description: Bad Request - 無効なリクエストパラメーターまたは不正な形式のリクエスト。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
        '401':
          description: Unauthorized - 無効または不足しているAPIキー。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: Too Many Requests - レート制限を超過しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: Internal Server Error - サーバーでエラーが発生しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: Service Unavailable - サービスが一時的に利用できません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: Gateway Timeout - リクエストがタイムアウトしました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Gateway timeout
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: JSON-RPCプロトコルバージョン。
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: エラーコード。
              example: -32602
            message:
              type: string
              description: エラーメッセージ。
            data:
              type: object
              description: エラーに関する追加データ。
        id:
          type: string
          description: リクエストに一致する識別子。
          example: '1'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: HeliusのAPIキー。ダッシュボードで無料で取得できます。

````