diff --git a/packages/rpc-api/src/simulateTransaction.ts b/packages/rpc-api/src/simulateTransaction.ts index c4e90675bde5..760fac1f6a9d 100644 --- a/packages/rpc-api/src/simulateTransaction.ts +++ b/packages/rpc-api/src/simulateTransaction.ts @@ -7,6 +7,7 @@ import type { AccountInfoWithJsonData, Base58EncodedBytes, Base64EncodedDataResponse, + Blockhash, Commitment, Slot, SolanaRpcResponse, @@ -91,6 +92,11 @@ type SimulateTransactionApiResponseBase = SolanaRpcResponse<{ err: TransactionError | null; /** Array of log messages the transaction instructions output during execution, null if simulation failed before the transaction was able to execute (for example due to an invalid blockhash or signature verification failure) */ logs: string[] | null; + // TODO(https://github.com/solana-labs/solana-web3.js/issues/2869): Make it so that + // `replacementBlockhash` only appears on the return type when `replaceRecentBlockhash` is set + // to `true` in the call to `simulateTransaction`. + /** The blockhash that was used to simulate the transaction when `replaceRecentBlockhash` is `true` */ + replacementBlockhash?: Blockhash; /** The most-recent return data generated by an instruction in the transaction */ returnData: Readonly<{ /** The return data itself, as base-64 encoded binary data */