diff --git a/.changeset/fast-cars-knock.md b/.changeset/fast-cars-knock.md new file mode 100644 index 000000000000..a929f42677eb --- /dev/null +++ b/.changeset/fast-cars-knock.md @@ -0,0 +1,5 @@ +--- +'@solana/rpc-api': patch +--- + +Fixed a TypeScript error where the return value of `simulateTransaction` claimed there was an `accounts` property at the top level when it is in fact `value.accounts` diff --git a/packages/rpc-api/src/simulateTransaction.ts b/packages/rpc-api/src/simulateTransaction.ts index 6c1da83aa2a2..9e25cce729c0 100644 --- a/packages/rpc-api/src/simulateTransaction.ts +++ b/packages/rpc-api/src/simulateTransaction.ts @@ -127,7 +127,7 @@ export interface SimulateTransactionApi extends RpcApiMethods { simulateTransaction( base58EncodedWireTransaction: Base58EncodedBytes, config?: SigVerifyAndReplaceRecentBlockhashConfig & SimulateTransactionConfigBase, - ): SimulateTransactionApiResponseBase & { accounts: null }; + ): SimulateTransactionApiResponseBase & SolanaRpcResponse<{ readonly accounts: null }>; /** Simulate sending a transaction */ simulateTransaction( @@ -160,5 +160,5 @@ export interface SimulateTransactionApi extends RpcApiMethods { simulateTransaction( base64EncodedWireTransaction: Base64EncodedWireTransaction, config: SigVerifyAndReplaceRecentBlockhashConfig & SimulateTransactionConfigBase & { encoding: 'base64' }, - ): SimulateTransactionApiResponseBase & { accounts: null }; + ): SimulateTransactionApiResponseBase & SolanaRpcResponse<{ readonly accounts: null }>; }