diff --git a/fern/api-reference/pricing-resources/pricing/compute-unit-costs.mdx b/fern/api-reference/pricing-resources/pricing/compute-unit-costs.mdx index 4c4029101..e28bf2b65 100644 --- a/fern/api-reference/pricing-resources/pricing/compute-unit-costs.mdx +++ b/fern/api-reference/pricing-resources/pricing/compute-unit-costs.mdx @@ -112,6 +112,7 @@ For more details, please check out the [Compute Units](/reference/compute-units# | minimumLedgerSlot | 20 | | getBlockHeight | 20 | | simulateTransaction | 20 | +| simulateBundle | 20 | | getFeeCalculatorForBlockhash | 11 | | getSignatureStatuses | 20 | | getRecentBlockhash | 10 | diff --git a/fern/api-reference/solana/solana-api-overview.mdx b/fern/api-reference/solana/solana-api-overview.mdx index 1f197fc00..364fa71bb 100644 --- a/fern/api-reference/solana/solana-api-overview.mdx +++ b/fern/api-reference/solana/solana-api-overview.mdx @@ -37,4 +37,4 @@ slug: docs/solana/solana-api-overview | [`getVersion`](/docs/chains/solana/solana-api-endpoints/get-version) | [`getVoteAccounts`](/docs/chains/solana/solana-api-endpoints/get-vote-accounts) | | [`isBlockhashValid`](/docs/chains/solana/solana-api-endpoints/is-blockhash-valid) | [`minimumLedgerSlot`](/docs/chains/solana/solana-api-endpoints/minimum-ledger-slot) | | [`requestAirdrop`](/docs/chains/solana/solana-api-endpoints/request-airdrop) | [`sendTransaction`](/docs/chains/solana/solana-api-endpoints/send-transaction) | -| [`simulateTransaction`](/docs/chains/solana/solana-api-endpoints/simulate-transaction) | | +| [`simulateTransaction`](/docs/chains/solana/solana-api-endpoints/simulate-transaction) | [`simulateBundle`](/docs/chains/solana/solana-api-endpoints/simulate-bundle) | diff --git a/src/openrpc/chains/_components/solana/methods.yaml b/src/openrpc/chains/_components/solana/methods.yaml index 6d2ec8e6f..b7cdd6d26 100644 --- a/src/openrpc/chains/_components/solana/methods.yaml +++ b/src/openrpc/chains/_components/solana/methods.yaml @@ -859,6 +859,26 @@ components: schema: $ref: "./transaction.yaml#/components/schemas/SimulatedTransactionResult" + simulateBundle: + name: simulateBundle + description: Simulates sending a Jito bundle of transactions. + params: + - name: Bundle + required: true + description: Encoded, serialized transactions to simulate in a bundle. + schema: + $ref: "./transaction.yaml#/components/schemas/SimulateBundleParams" + - name: Configuration + required: false + description: Optional configuration object containing additional options. + schema: + $ref: "./transaction.yaml#/components/schemas/SimulateBundleConfig" + result: + name: Simulated bundle result + description: The result of simulating the bundle. + schema: + $ref: "./transaction.yaml#/components/schemas/SimulatedBundleResult" + getSignaturesForAddress: name: getSignaturesForAddress description: Returns signatures for confirmed transactions that include the given address. diff --git a/src/openrpc/chains/_components/solana/transaction.yaml b/src/openrpc/chains/_components/solana/transaction.yaml index 757fb70c7..5223e7472 100644 --- a/src/openrpc/chains/_components/solana/transaction.yaml +++ b/src/openrpc/chains/_components/solana/transaction.yaml @@ -100,6 +100,115 @@ components: type: object nullable: true description: Inner instructions if `innerInstructions` is true. + SimulateBundleParams: + title: SimulateBundle Parameters + type: object + properties: + encodedTransactions: + type: array + items: + type: string + description: Array of encoded, serialized transactions to simulate. + required: + - encodedTransactions + SimulateBundleConfig: + title: SimulateBundle Configuration + type: object + properties: + preExecutionAccountsConfigs: + type: array + description: >- + Account capture configs for each transaction before execution. Array + length must equal the number of transactions in the bundle. Use null + for entries where no account state is requested. + items: + oneOf: + - $ref: "#/components/schemas/SimulateBundleAccountsConfig" + - type: "null" + postExecutionAccountsConfigs: + type: array + description: >- + Account capture configs for each transaction after execution. Array + length must equal the number of transactions in the bundle. Use null + for entries where no account state is requested. + items: + oneOf: + - $ref: "#/components/schemas/SimulateBundleAccountsConfig" + - type: "null" + transactionEncoding: + type: string + description: Encoding used for the transactions in `encodedTransactions`. + enum: + - base64 + - base58 + default: base64 + simulationBank: + type: string + description: Bank to simulate against. + skipSigVerify: + type: boolean + description: If true, signature verification is skipped before simulation. + default: false + replaceRecentBlockhash: + type: boolean + description: If true, replaces recent blockhash with the most recent one. + default: false + SimulateBundleAccountsConfig: + title: SimulateBundle Accounts Configuration + type: object + properties: + addresses: + type: array + items: + $ref: "./base-types.yaml#/components/schemas/Pubkey" + description: Base-58 encoded account addresses to capture. + encoding: + $ref: "./base-types.yaml#/components/schemas/Encoding" + description: Encoding used for returned account data. + default: base64 + SimulatedBundleTransactionResult: + title: Simulated Bundle Transaction Result + type: object + properties: + err: + type: object + nullable: true + description: Error if the transaction failed, null if succeeded. + logs: + type: array + nullable: true + items: + type: string + description: Log messages output during execution. + preExecutionAccounts: + type: array + nullable: true + items: + $ref: "./account.yaml#/components/schemas/AccountInfo" + description: Account states before execution. + postExecutionAccounts: + type: array + nullable: true + items: + $ref: "./account.yaml#/components/schemas/AccountInfo" + description: Account states after execution. + unitsConsumed: + type: integer + description: Compute budget units consumed. + returnData: + $ref: "#/components/schemas/ReturnData" + SimulatedBundleResult: + title: Simulated Bundle Result + type: object + properties: + summary: + type: string + description: Summary of the bundle simulation result. + transactionResults: + type: array + description: Result details for each transaction in the bundle. + items: + $ref: "#/components/schemas/SimulatedBundleTransactionResult" ReturnData: title: Return Data type: object diff --git a/src/openrpc/chains/solana/solana.yaml b/src/openrpc/chains/solana/solana.yaml index 03464fd1f..7ad697ad7 100644 --- a/src/openrpc/chains/solana/solana.yaml +++ b/src/openrpc/chains/solana/solana.yaml @@ -80,6 +80,7 @@ methods: - $ref: ../_components/solana/methods.yaml#/components/methods/requestAirdrop - $ref: ../_components/solana/methods.yaml#/components/methods/sendTransaction - $ref: ../_components/solana/methods.yaml#/components/methods/simulateTransaction + - $ref: ../_components/solana/methods.yaml#/components/methods/simulateBundle x-bot-ignore: - getAsset - getAssetProof