> ## 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.

# simulateBundle

> JITO バンドルをブロックチェーン上で実行せずにシミュレーションします。

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

<ParamField body="params[0]" type="object" required>
  最初の設定オブジェクト。シミュレーション用のエンコードされたトランザクションを含みます。
</ParamField>

<ParamField body="params[0].encodedTransactions" type="array">
  シミュレーション用にエンコードおよびシリアル化されたトランザクションの配列です。エンコーディングは `transactionEncoding` フィールドで決定されます（デフォルトは base-64）。
</ParamField>

<ParamField body="params[1]" type="object">
  2 番目の設定オブジェクト。オプションです。
</ParamField>

<ParamField body="params[1].preExecutionAccountsConfigs" type="array" required>
  シミュレーション中にキャプチャするアカウントを指定します。

  これは、トランザクションが実行される*前*のアカウント状態をキャプチャします。

  配列要素は、そのインデックスで同じインデックスのトランザクションを設定します。

  バンドルの各トランザクションに対して:

  * アカウント状態を返さない場合は `null` を渡します。
  * もしくは、返すアカウントを記述したオブジェクトを提供します。

  配列の長さはバンドル内のトランザクション数と同じである必要があります。
</ParamField>

<ParamField body="params[1].postExecutionAccountsConfigs" type="array" required>
  シミュレーション中にキャプチャするアカウントを指定します。

  これは、トランザクションが実行された*後*のアカウント状態をキャプチャします。

  配列要素は、そのインデックスで同じインデックスのトランザクションを設定します。

  バンドルの各トランザクションに対して:

  * アカウント状態を返さない場合は `null` を渡します。
  * もしくは、返すアカウントを記述したオブジェクトを提供します。

  配列の長さはバンドル内のトランザクション数と同じである必要があります。
</ParamField>

<ParamField body="params[1].transactionEncoding" type="string" default="base64">
  `encodedTransactions` で使用されるトランザクションエンコーディング。

  * `base64`
  * `base58`
</ParamField>

<ParamField body="params[1].simulationBank" type="any">
  シミュレーションを実行する銀行を指定します。先端、スロット、またはコミットメントレベルのいずれかです。
</ParamField>

<ParamField body="params[1].skipSigVerify" type="boolean" default="false">
  シミュレーション前に署名の検証をスキップするかどうか。
</ParamField>

<ParamField body="params[1].replaceRecentBlockhash" type="boolean" default="false">
  シミュレーションされたトランザクションの最近のブロックハッシュを最新のブロックハッシュに置き換えるかどうか。
</ParamField>


## OpenAPI

````yaml ja/openapi/rpc-http/simulateBundle.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    JITOバンドルシミュレーションAPIは、JITOバリデータを介してSolanaネットワークに提出する前にバンドル実行をテストおよび検証するためのものです。
  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: デブネットRPCエンドポイント
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: simulateBundle
      description: >-
        JITOバンドルをブロックチェーンで実行せずにシミュレートします。このメソッドは、開発者がバンドルの実行をテストし、バンドル内のトランザクションの動作を確認し、計算ユニットの消費量を見積もり、エラーを検出し、バンドル実行前後のアカウント状態の変化をプレビューすることを可能にします。JITO-Solanaバリデータ専用で、MEV戦略の開発やバンドルの最適化に不可欠です。
      operationId: simulateBundle
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: JSON-RPCプロトコルバージョン。
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: リクエストの一意の識別子。
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - simulateBundle
                  description: 呼び出すRPCメソッドの名前。
                  example: simulateBundle
                  default: simulateBundle
                params:
                  type: array
                  description: JITOバンドルをシミュレートするためのパラメータ。
                  default:
                    - encodedTransactions:
                        - >-
                          AUpZwml/cvAaQoRINPCXI/+Zp1bEG31TsbQ7YkESdUqtoGHrGSlZWLGh7qsa54Pon3RCx46Z6l+IlAgV8GNmbgcBAAED48eIT6fA5gQUuhts6qDwJ8rp6qemton7jK+tSNA6uiM3FVSCTsdmSMNKqTIUrKARpzIIQabdGWwDk74PLnrd/QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASgbUMGWXPNjQAwed9kPYG5gXZsBq9jrSuVNeTuC4o0IBAgIAAQwCAAAA6AMAAAAAAAA=
                    - preExecutionAccountsConfigs:
                        - null
                      postExecutionAccountsConfigs:
                        - null
                      skipSigVerify: true
                      transactionEncoding: base64
                      replaceRecentBlockhash: true
                  items:
                    type: object
                    description: バンドルシミュレーション設定オブジェクト。
                    required:
                      - params[0]
                    properties:
                      params[0]:
                        type: object
                        description: 最初の設定オブジェクト。シミュレーションのためのエンコードされたトランザクションを含みます。
                        properties:
                          encodedTransactions:
                            type: array
                            description: >-
                              シミュレーションのためのエンコードされた、シリアライズされたトランザクションの配列。エンコーディングは`transactionEncoding`フィールドによって決定されます（デフォルトはbase-64）。
                            items:
                              type: string
                              description: エンコードされたシリアライズトランザクション。
                              example: >-
                                5rqF8aHfs9JyEtKTvND6z8RgBtYxQwZLndS1kzHxV7D3kWm9VoYRzFtsP3qra5bM8rGhCv82LYo8fZpQoyQmtN1D9vxG2uEsMhV7jB4KdADRgxMXn5kRJzLZPt2LrPSmcUhfEmeQa7XrKeR9FHdKcXxZ1Hdq68oBr2AaPpTMuL85KDCt
                      params[1]:
                        type: object
                        description: 2番目の設定オブジェクト。オプションです。
                        required:
                          - preExecutionAccountsConfigs
                          - postExecutionAccountsConfigs
                        properties:
                          preExecutionAccountsConfigs:
                            type: array
                            description: |
                              シミュレーション中にキャプチャするアカウントを指定します。

                              これはトランザクションが実行される*前の*アカウント状態をキャプチャします。

                              配列要素は、バンドル内の同じインデックスにあるトランザクションを設定します。

                              バンドル内の各トランザクションに対して：
                                - 返すアカウント状態がない場合は`null`を渡します。
                                - または、返すアカウントを説明するオブジェクトを提供します。

                              配列の長さは、バンドル内のトランザクション数と同じでなければなりません。
                            items:
                              type:
                                - object
                                - 'null'
                              required:
                                - addresses
                              properties:
                                addresses:
                                  type: array
                                  description: 状態がキャプチャされるbase-58でエンコードされたアカウントアドレスのリスト。
                                  items:
                                    type: string
                                    description: base-58でエンコードされたアカウントアドレス。
                                    example: >-
                                      TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                                encoding:
                                  type: string
                                  description: |
                                    キャプチャされたアカウントデータが返されるエンコーディング。
                                  default: base64
                                  enum:
                                    - binary
                                    - base58
                                    - base64
                                    - jsonParsed
                                    - base64+zstd
                                  example: base64
                          postExecutionAccountsConfigs:
                            type: array
                            description: |
                              シミュレーション中にキャプチャするアカウントを指定します。

                              これはトランザクションが実行された*後の*アカウント状態をキャプチャします。

                              配列要素は、バンドル内の同じインデックスにあるトランザクションを設定します。

                              バンドル内の各トランザクションに対して：
                                - 返すアカウント状態がない場合は`null`を渡します。
                                - または、返すアカウントを説明するオブジェクトを提供します。

                              配列の長さは、バンドル内のトランザクション数と同じでなければなりません。
                            items:
                              type:
                                - object
                                - 'null'
                              required:
                                - addresses
                              properties:
                                addresses:
                                  type: array
                                  description: 状態がキャプチャされるbase-58でエンコードされたアカウントアドレスのリスト。
                                  items:
                                    type: string
                                    description: base-58でエンコードされたアカウントアドレス。
                                    example: >-
                                      TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                                encoding:
                                  type: string
                                  description: |
                                    キャプチャされたアカウントデータが返されるエンコーディング。
                                  default: base64
                                  enum:
                                    - binary
                                    - base58
                                    - base64
                                    - jsonParsed
                                    - base64+zstd
                                  example: base64
                          transactionEncoding:
                            type: string
                            description: '`encodedTransactions`で使用されるトランザクションエンコーディング。'
                            enum:
                              - base64
                              - base58
                            default: base64
                          simulationBank:
                            description: >
                              シミュレーションを実行するバンクを指定します。tip、スロット、またはコミットメントレベルである可能性があります。
                            oneOf:
                              - type: string
                                description: RPCの最も高いスロットのバンク、つまり動作中のバンクを使用します。
                                example: tip
                              - type: object
                                description: 指定されたスロットのバンクでシミュレーションします（利用できないことがあります）。
                                properties:
                                  slot:
                                    type: integer
                                    example: 373976835
                                required:
                                  - slot
                              - type: object
                                description: シミュレーションに対して定義するコミットメントレベル。
                                properties:
                                  commitment:
                                    type: object
                                    properties:
                                      commitment:
                                        type: string
                                        enum:
                                          - processed
                                          - confirmed
                                          - finalized
                                        description: シミュレーションに対するコミットメントレベル。
                                        example: processed
                                    required:
                                      - commitment
                                required:
                                  - commitment
                          skipSigVerify:
                            type: boolean
                            description: シミュレーションの前に署名検証をスキップするかどうか。
                            default: false
                          replaceRecentBlockhash:
                            type: boolean
                            description: >-
                              シミュレーションされたトランザクションの最新のブロックハッシュを最新のブロックハッシュに置き換えるかどうか。
                            default: false
      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:
                    type: object
                    description: シミュレートされたバンドルの結果。
                    properties:
                      context:
                        type: object
                        description: シミュレーションレスポンスのコンテキスト。
                        properties:
                          apiVersion:
                            type: string
                            description: APIバージョン。
                            example: 2.30.10
                          slot:
                            type: integer
                            description: データが処理されたスロット。
                            example: 373999891
                      value:
                        type: object
                        description: シミュレートされたバンドル結果の詳細。
                        properties:
                          summary:
                            description: >
                              バンドルシミュレーション結果の要約。


                              シミュレーションが成功した場合、これは`"succeeded"`に設定されます。


                              シミュレーションが失敗した場合、これは1つのフィールド`failed`がその失敗の詳細を含むオブジェクトに設定されます。
                            oneOf:
                              - type: string
                                example: succeeded
                              - type: object
                                required:
                                  - failed
                                properties:
                                  failed:
                                    type: object
                                    required:
                                      - error
                                    properties:
                                      error:
                                        description: エラーの詳細を含む値。構造は異なる場合があります。
                                      tx_signature:
                                        type: string
                                        description: >-
                                          base58形式の失敗したトランザクションのシグネチャ。該当しない場合は`null`である可能性があります。
                          transactionResults:
                            type: array
                            description: バンドル内の各トランザクションの結果の配列。エラーがあった場合は空になる可能性があります。
                            items:
                              type: object
                              properties:
                                err:
                                  type:
                                    - object
                                    - 'null'
                                  description: トランザクションが失敗した場合のエラー、成功した場合は`null`。
                                logs:
                                  type:
                                    - array
                                    - 'null'
                                  description: トランザクション実行中のログメッセージの配列。
                                  items:
                                    type: string
                                    example: >-
                                      Program
                                      4Nd1mFvxhG1DQMLUKhMzrZ7yG1UrjC9xXH6kvvZtcg9R
                                      invoke [1]
                                preExecutionAccounts:
                                  type:
                                    - array
                                    - 'null'
                                  description: トランザクションの実行前のアカウント状態。
                                  items:
                                    type: object
                                    properties:
                                      data:
                                        type: string
                                        description: アカウントに関連付けられたデータ。
                                      executable:
                                        type: boolean
                                        description: アカウントがプログラムを含んでいるかどうか。
                                        example: false
                                      lamports:
                                        type: integer
                                        description: このアカウントに割り当てられたlamportsの数。
                                        example: 1500000000
                                      owner:
                                        type: string
                                        description: このアカウントを所有するプログラムのアドレス。
                                        example: >-
                                          4Nd1mFvxhG1DQMLUKhMzrZ7yG1UrjC9xXH6kvvZtcg9R
                                      rentEpoch:
                                        type: integer
                                        description: このアカウントが次に家賃を支払うべきエポック。
                                        example: 324
                                      space:
                                        type: integer
                                        description: アカウントのデータサイズ。
                                        example: 1024
                                postExecutionAccounts:
                                  type:
                                    - array
                                    - 'null'
                                  description: トランザクションの実行後のアカウント状態。
                                  items:
                                    type: object
                                    properties:
                                      data:
                                        type: string
                                        description: アカウントに関連付けられたデータ。
                                      executable:
                                        type: boolean
                                        description: アカウントがプログラムを含んでいるかどうか。
                                        example: false
                                      lamports:
                                        type: integer
                                        description: このアカウントに割り当てられたlamportsの数。
                                        example: 1500000000
                                      owner:
                                        type: string
                                        description: このアカウントを所有するプログラムのアドレス。
                                        example: >-
                                          4Nd1mFvxhG1DQMLUKhMzrZ7yG1UrjC9xXH6kvvZtcg9R
                                      rentEpoch:
                                        type: integer
                                        description: このアカウントが次に家賃を支払うべきエポック。
                                        example: 324
                                      space:
                                        type: integer
                                        description: アカウントのデータサイズ。
                                        example: 1024
                                unitsConsumed:
                                  type: integer
                                  description: 処理中に消費されたコンピュート予算ユニットの数。
                                  example: 200000
                                returnData:
                                  type:
                                    - object
                                    - 'null'
                                  description: 命令によって生成された最新のリターンデータ。
                                  properties:
                                    programId:
                                      type: string
                                      description: リターンデータを生成したプログラム。
                                      example: >-
                                        Fx9Hp1gLzYj6Ryc4GaVoq2v6t4NxWg3GT1kP7quzZbVQ
                                    data:
                                      type: string
                                      description: リターンデータをbase-64エンコードされたバイナリデータとして。
                                      example: >-
                                        AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASjD8=
              example:
                jsonrpc: '2.0'
                id: '1'
                result:
                  context:
                    apiVersion: 2.30.10
                    slot: 373999891
                  value:
                    summary: succeeded
                    transactionResults:
                      - err: null
                        logs:
                          - >-
                            Program ComputeBudget111111111111111111111111111111
                            invoke [1]
                          - >-
                            Program ComputeBudget111111111111111111111111111111
                            success
                          - >-
                            Program ComputeBudget111111111111111111111111111111
                            invoke [1]
                          - >-
                            Program ComputeBudget111111111111111111111111111111
                            success
                          - Program 11111111111111111111111111111111 invoke [1]
                          - Program 11111111111111111111111111111111 success
                        preExecutionAccounts:
                          - data:
                              - ''
                              - base64
                            executable: true
                            lamports: 5299606121
                            owner: BPFLoader2111111111111111111111111111111111
                            rentEpoch: 324
                            space: 134080
                        postExecutionAccounts:
                          - data:
                              - ''
                              - base64
                            executable: true
                            lamports: 5299606121
                            owner: BPFLoader2111111111111111111111111111111111
                            rentEpoch: 324
                            space: 134080
                        returnData:
                          programId: Fx9Hp1gLzYj6Ryc4GaVoq2v6t4NxWg3GT1kP7quzZbVQ
                          data: AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASjD8=
                        unitsConsumed: 450
                      - err: null
                        logs:
                          - >-
                            Program ComputeBudget111111111111111111111111111111
                            invoke [1]
                          - >-
                            Program ComputeBudget111111111111111111111111111111
                            success
                          - >-
                            Program ComputeBudget111111111111111111111111111111
                            invoke [1]
                          - >-
                            Program ComputeBudget111111111111111111111111111111
                            success
                          - Program 11111111111111111111111111111111 invoke [1]
                          - Program 11111111111111111111111111111111 success
                        postExecutionAccounts: null
                        preExecutionAccounts: null
                        returnData: null
                        unitsConsumed: 450
        '400':
          description: 不正なリクエスト - 無効なリクエストパラメータまたは不正なリクエスト形式。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
                id: '1'
        '401':
          description: 認証されていない - 無効または欠落したAPIキー。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: リクエスト数超過 - レート制限を超過しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: 内部サーバーエラー - サーバーでエラーが発生しました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: サービス利用不可 - サービスは一時的に利用不可です。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: ゲートウェイタイムアウト - リクエストがタイムアウトしました。
          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キー。無料で[ダッシュボード](https://dashboard.helius.dev/api-keys)から取得できます。

````