@solana/rpc-api 6.3.1 → 6.3.2-canary-20260313112147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +14 -13
- package/src/getAccountInfo.ts +145 -0
- package/src/getBalance.ts +31 -0
- package/src/getBlock.ts +552 -0
- package/src/getBlockCommitment.ts +20 -0
- package/src/getBlockHeight.ts +29 -0
- package/src/getBlockProduction.ts +83 -0
- package/src/getBlockTime.ts +21 -0
- package/src/getBlocks.ts +34 -0
- package/src/getBlocksWithLimit.ts +33 -0
- package/src/getClusterNodes.ts +49 -0
- package/src/getEpochInfo.ts +43 -0
- package/src/getEpochSchedule.ts +29 -0
- package/src/getFeeForMessage.ts +35 -0
- package/src/getFirstAvailableBlock.ts +17 -0
- package/src/getGenesisHash.ts +13 -0
- package/src/getHealth.ts +17 -0
- package/src/getHighestSnapshotSlot.ts +23 -0
- package/src/getIdentity.ts +14 -0
- package/src/getInflationGovernor.ts +39 -0
- package/src/getInflationRate.ts +21 -0
- package/src/getInflationReward.ts +53 -0
- package/src/getLargestAccounts.ts +42 -0
- package/src/getLatestBlockhash.ts +40 -0
- package/src/getLeaderSchedule.ts +103 -0
- package/src/getMaxRetransmitSlot.ts +12 -0
- package/src/getMaxShredInsertSlot.ts +12 -0
- package/src/getMinimumBalanceForRentExemption.ts +32 -0
- package/src/getMultipleAccounts.ts +156 -0
- package/src/getProgramAccounts.ts +264 -0
- package/src/getRecentPerformanceSamples.ts +29 -0
- package/src/getRecentPrioritizationFees.ts +28 -0
- package/src/getSignatureStatuses.ts +62 -0
- package/src/getSignaturesForAddress.ts +88 -0
- package/src/getSlot.ts +29 -0
- package/src/getSlotLeader.ts +32 -0
- package/src/getSlotLeaders.ts +21 -0
- package/src/getStakeMinimumDelegation.ts +26 -0
- package/src/getSupply.ts +66 -0
- package/src/getTokenAccountBalance.ts +26 -0
- package/src/getTokenAccountsByDelegate.ts +196 -0
- package/src/getTokenAccountsByOwner.ts +190 -0
- package/src/getTokenLargestAccounts.ts +29 -0
- package/src/getTokenSupply.ts +26 -0
- package/src/getTransaction.ts +437 -0
- package/src/getTransactionCount.ts +30 -0
- package/src/getVersion.ts +21 -0
- package/src/getVoteAccounts.ts +80 -0
- package/src/index.ts +353 -0
- package/src/isBlockhashValid.ts +35 -0
- package/src/minimumLedgerSlot.ts +16 -0
- package/src/requestAirdrop.ts +34 -0
- package/src/sendTransaction.ts +80 -0
- package/src/simulateTransaction.ts +727 -0
|
@@ -0,0 +1,727 @@
|
|
|
1
|
+
import type { Address } from '@solana/addresses';
|
|
2
|
+
import type {
|
|
3
|
+
AccountInfoBase,
|
|
4
|
+
AccountInfoWithBase64EncodedData,
|
|
5
|
+
AccountInfoWithBase64EncodedZStdCompressedData,
|
|
6
|
+
AccountInfoWithJsonData,
|
|
7
|
+
Base58EncodedBytes,
|
|
8
|
+
Base64EncodedDataResponse,
|
|
9
|
+
Commitment,
|
|
10
|
+
Slot,
|
|
11
|
+
SolanaRpcResponse,
|
|
12
|
+
TransactionError,
|
|
13
|
+
TransactionForFullMetaInnerInstructionsParsed,
|
|
14
|
+
TransactionForFullMetaInnerInstructionsUnparsed,
|
|
15
|
+
} from '@solana/rpc-types';
|
|
16
|
+
import type { Base64EncodedWireTransaction, TransactionBlockhashLifetime } from '@solana/transactions';
|
|
17
|
+
|
|
18
|
+
type SimulateTransactionConfigBase = Readonly<{
|
|
19
|
+
/**
|
|
20
|
+
* Simulate the transaction as of the highest slot that has reached this level of commitment.
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue Whichever default is applied by the underlying {@link RpcApi} in use. For
|
|
23
|
+
* example, when using an API created by a `createSolanaRpc*()` helper, the default commitment
|
|
24
|
+
* is `"confirmed"` unless configured otherwise. Unmitigated by an API layer on the client, the
|
|
25
|
+
* default commitment applied by the server is `"finalized"`.
|
|
26
|
+
*/
|
|
27
|
+
commitment?: Commitment;
|
|
28
|
+
/**
|
|
29
|
+
* If `true` the response will include inner instructions. These inner instructions will be
|
|
30
|
+
* `jsonParsed` where possible, otherwise `json`.
|
|
31
|
+
* @defaultValue false
|
|
32
|
+
*/
|
|
33
|
+
innerInstructions?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Prevents accessing stale data by enforcing that the RPC node has processed transactions up to
|
|
36
|
+
* this slot
|
|
37
|
+
*/
|
|
38
|
+
minContextSlot?: Slot;
|
|
39
|
+
}>;
|
|
40
|
+
|
|
41
|
+
// Both are optional booleans, but conflict - so cannot both be true
|
|
42
|
+
type SigVerifyAndReplaceRecentBlockhashConfig<TReplaceBlockhash extends boolean | undefined = false | undefined> =
|
|
43
|
+
TReplaceBlockhash extends true
|
|
44
|
+
? Readonly<{
|
|
45
|
+
/** if `true` the transaction recent blockhash will be replaced with the most recent blockhash. (conflicts with `sigVerify`) */
|
|
46
|
+
replaceRecentBlockhash: true;
|
|
47
|
+
/** if `true` the transaction signatures will be verified (conflicts with `replaceRecentBlockhash`) */
|
|
48
|
+
sigVerify?: false;
|
|
49
|
+
}>
|
|
50
|
+
:
|
|
51
|
+
| Readonly<{
|
|
52
|
+
/** if `true` the transaction recent blockhash will be replaced with the most recent blockhash. (conflicts with `sigVerify`) */
|
|
53
|
+
replaceRecentBlockhash?: boolean;
|
|
54
|
+
/** if `true` the transaction signatures will be verified (conflicts with `replaceRecentBlockhash`) */
|
|
55
|
+
sigVerify?: false;
|
|
56
|
+
}>
|
|
57
|
+
| Readonly<{
|
|
58
|
+
/** if `true` the transaction recent blockhash will be replaced with the most recent blockhash. (conflicts with `sigVerify`) */
|
|
59
|
+
replaceRecentBlockhash?: false;
|
|
60
|
+
/** if `true` the transaction signatures will be verified (conflicts with `replaceRecentBlockhash`) */
|
|
61
|
+
sigVerify: true;
|
|
62
|
+
}>;
|
|
63
|
+
|
|
64
|
+
type AccountsConfigWithBase64EncodingZstdCompression = Readonly<{
|
|
65
|
+
accounts: {
|
|
66
|
+
/** An `array` of accounts to return */
|
|
67
|
+
addresses: readonly Address[];
|
|
68
|
+
/** Encoding for returned Account data */
|
|
69
|
+
encoding: 'base64+zstd';
|
|
70
|
+
};
|
|
71
|
+
}>;
|
|
72
|
+
|
|
73
|
+
type AccountsConfigWithJsonParsedEncoding = Readonly<{
|
|
74
|
+
accounts: {
|
|
75
|
+
/** An `array` of accounts to return */
|
|
76
|
+
addresses: readonly Address[];
|
|
77
|
+
/** Encoding for returned Account data */
|
|
78
|
+
encoding: 'jsonParsed';
|
|
79
|
+
};
|
|
80
|
+
}>;
|
|
81
|
+
|
|
82
|
+
type AccountsConfigWithBase64Encoding = Readonly<{
|
|
83
|
+
accounts: {
|
|
84
|
+
/** An `array` of accounts to return */
|
|
85
|
+
addresses: readonly Address[];
|
|
86
|
+
// Optional because this is the default encoding
|
|
87
|
+
/** Encoding for returned Account data */
|
|
88
|
+
encoding?: 'base64';
|
|
89
|
+
};
|
|
90
|
+
}>;
|
|
91
|
+
|
|
92
|
+
type WithInnerInstructionsConfig = Readonly<{
|
|
93
|
+
innerInstructions: true;
|
|
94
|
+
}>;
|
|
95
|
+
|
|
96
|
+
type SimulateTransactionApiResponseBase = Readonly<{
|
|
97
|
+
/** If the transaction failed, this property will contain the error */
|
|
98
|
+
err: TransactionError | null;
|
|
99
|
+
/** The number of bytes of all accounts loaded by this transaction */
|
|
100
|
+
loadedAccountsDataSize?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Array of log messages the transaction instructions output during execution, `null` if
|
|
103
|
+
* simulation failed before the transaction was able to execute (for example due to an invalid
|
|
104
|
+
* blockhash or signature verification failure)
|
|
105
|
+
*/
|
|
106
|
+
logs: string[] | null;
|
|
107
|
+
/** The most-recent return data generated by an instruction in the transaction */
|
|
108
|
+
returnData: Readonly<{
|
|
109
|
+
/** The return data itself, as base-64 encoded binary data */
|
|
110
|
+
data: Base64EncodedDataResponse;
|
|
111
|
+
/** The program that generated the return data */
|
|
112
|
+
programId: Address;
|
|
113
|
+
}> | null;
|
|
114
|
+
/** The number of compute budget units consumed during the processing of this transaction */
|
|
115
|
+
unitsConsumed?: bigint;
|
|
116
|
+
}>;
|
|
117
|
+
|
|
118
|
+
type SimulateTransactionApiResponseWithAccounts<T extends AccountInfoBase> = Readonly<{
|
|
119
|
+
/** Array of accounts with the same length as the `accounts.addresses` array in the request */
|
|
120
|
+
accounts: (T | null)[];
|
|
121
|
+
}>;
|
|
122
|
+
|
|
123
|
+
type SimulateTransactionApiResponseWithInnerInstructions = Readonly<
|
|
124
|
+
TransactionForFullMetaInnerInstructionsParsed | TransactionForFullMetaInnerInstructionsUnparsed
|
|
125
|
+
>;
|
|
126
|
+
|
|
127
|
+
type SimulateTransactionApiResponseWithReplacementBlockhash = Readonly<{
|
|
128
|
+
/**
|
|
129
|
+
* The blockhash that was used to simulate the transaction when `replaceRecentBlockhash` is
|
|
130
|
+
* `true`
|
|
131
|
+
*/
|
|
132
|
+
replacementBlockhash: TransactionBlockhashLifetime;
|
|
133
|
+
}>;
|
|
134
|
+
|
|
135
|
+
export type SimulateTransactionApi = {
|
|
136
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
137
|
+
simulateTransaction(
|
|
138
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
139
|
+
config: AccountsConfigWithBase64Encoding &
|
|
140
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
141
|
+
SimulateTransactionConfigBase &
|
|
142
|
+
WithInnerInstructionsConfig,
|
|
143
|
+
): SolanaRpcResponse<
|
|
144
|
+
SimulateTransactionApiResponseBase &
|
|
145
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedData> &
|
|
146
|
+
SimulateTransactionApiResponseWithInnerInstructions &
|
|
147
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
148
|
+
>;
|
|
149
|
+
|
|
150
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
151
|
+
simulateTransaction(
|
|
152
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
153
|
+
config: AccountsConfigWithBase64Encoding &
|
|
154
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
155
|
+
SimulateTransactionConfigBase,
|
|
156
|
+
): SolanaRpcResponse<
|
|
157
|
+
SimulateTransactionApiResponseBase &
|
|
158
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedData> &
|
|
159
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
160
|
+
>;
|
|
161
|
+
|
|
162
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
163
|
+
simulateTransaction(
|
|
164
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
165
|
+
config: AccountsConfigWithBase64EncodingZstdCompression &
|
|
166
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
167
|
+
SimulateTransactionConfigBase &
|
|
168
|
+
WithInnerInstructionsConfig,
|
|
169
|
+
): SolanaRpcResponse<
|
|
170
|
+
SimulateTransactionApiResponseBase &
|
|
171
|
+
SimulateTransactionApiResponseWithAccounts<
|
|
172
|
+
AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData
|
|
173
|
+
> &
|
|
174
|
+
SimulateTransactionApiResponseWithInnerInstructions &
|
|
175
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
176
|
+
>;
|
|
177
|
+
|
|
178
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
179
|
+
simulateTransaction(
|
|
180
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
181
|
+
config: AccountsConfigWithBase64EncodingZstdCompression &
|
|
182
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
183
|
+
SimulateTransactionConfigBase,
|
|
184
|
+
): SolanaRpcResponse<
|
|
185
|
+
SimulateTransactionApiResponseBase &
|
|
186
|
+
SimulateTransactionApiResponseWithAccounts<
|
|
187
|
+
AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData
|
|
188
|
+
> &
|
|
189
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
190
|
+
>;
|
|
191
|
+
|
|
192
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
193
|
+
simulateTransaction(
|
|
194
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
195
|
+
config: AccountsConfigWithJsonParsedEncoding &
|
|
196
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
197
|
+
SimulateTransactionConfigBase,
|
|
198
|
+
): SolanaRpcResponse<
|
|
199
|
+
SimulateTransactionApiResponseBase &
|
|
200
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithJsonData> &
|
|
201
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
202
|
+
>;
|
|
203
|
+
|
|
204
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
205
|
+
simulateTransaction(
|
|
206
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
207
|
+
config?: SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
208
|
+
SimulateTransactionConfigBase &
|
|
209
|
+
WithInnerInstructionsConfig,
|
|
210
|
+
): SolanaRpcResponse<
|
|
211
|
+
Readonly<{ readonly accounts: null }> &
|
|
212
|
+
SimulateTransactionApiResponseBase &
|
|
213
|
+
SimulateTransactionApiResponseWithInnerInstructions &
|
|
214
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
215
|
+
>;
|
|
216
|
+
|
|
217
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
218
|
+
simulateTransaction(
|
|
219
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
220
|
+
config?: SigVerifyAndReplaceRecentBlockhashConfig<true> & SimulateTransactionConfigBase,
|
|
221
|
+
): SolanaRpcResponse<
|
|
222
|
+
Readonly<{ readonly accounts: null }> &
|
|
223
|
+
SimulateTransactionApiResponseBase &
|
|
224
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
225
|
+
>;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state,
|
|
229
|
+
* obtain the list of inner instructions run, if any, and replace the transaction's blockhash
|
|
230
|
+
* with the most recent one.
|
|
231
|
+
*
|
|
232
|
+
* If the listed accounts have data, it will be returned in the response as a tuple whose first
|
|
233
|
+
* element is a base64-encoded string.
|
|
234
|
+
*
|
|
235
|
+
* The replacement blockhash and the blockheight until which it is valid will be returned in the
|
|
236
|
+
* response.
|
|
237
|
+
*
|
|
238
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
239
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
240
|
+
*
|
|
241
|
+
* {@label accounts-base64--with-inner-instructions--with-replacement-blockhash}
|
|
242
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
243
|
+
*/
|
|
244
|
+
simulateTransaction(
|
|
245
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
246
|
+
config: AccountsConfigWithBase64Encoding &
|
|
247
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
248
|
+
SimulateTransactionConfigBase &
|
|
249
|
+
WithInnerInstructionsConfig & { encoding: 'base64' },
|
|
250
|
+
): SolanaRpcResponse<
|
|
251
|
+
SimulateTransactionApiResponseBase &
|
|
252
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedData> &
|
|
253
|
+
SimulateTransactionApiResponseWithInnerInstructions &
|
|
254
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
255
|
+
>;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state, and
|
|
259
|
+
* replace the transaction's blockhash with the most recent one.
|
|
260
|
+
*
|
|
261
|
+
* If the listed accounts have data, it will be returned in the response as a tuple whose first
|
|
262
|
+
* element is a base64-encoded string.
|
|
263
|
+
*
|
|
264
|
+
* The replacement blockhash and the blockheight until which it is valid will be returned in the
|
|
265
|
+
* response.
|
|
266
|
+
*
|
|
267
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
268
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
269
|
+
*
|
|
270
|
+
* {@label accounts-base64--no-inner-instructions--with-replacement-blockhash}
|
|
271
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
272
|
+
*/
|
|
273
|
+
simulateTransaction(
|
|
274
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
275
|
+
config: AccountsConfigWithBase64Encoding &
|
|
276
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
277
|
+
SimulateTransactionConfigBase & { encoding: 'base64' },
|
|
278
|
+
): SolanaRpcResponse<
|
|
279
|
+
SimulateTransactionApiResponseBase &
|
|
280
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedData> &
|
|
281
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
282
|
+
>;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state,
|
|
286
|
+
* obtain the list of inner instructions run, if any, and replace the transaction's blockhash
|
|
287
|
+
* with the most recent one.
|
|
288
|
+
*
|
|
289
|
+
* If the listed accounts have data, it will first be compressed using
|
|
290
|
+
* [ZStandard](https://facebook.github.io/zstd/) and the result will be returned in the response
|
|
291
|
+
* as a tuple whose first element is a base64-encoded string.
|
|
292
|
+
*
|
|
293
|
+
* The replacement blockhash and the blockheight until which it is valid will be returned in the
|
|
294
|
+
* response.
|
|
295
|
+
*
|
|
296
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
297
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
298
|
+
*
|
|
299
|
+
* {@label accounts-base64-zstd-compressed--with-inner-instructions--with-replacement-blockhash}
|
|
300
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
301
|
+
*/
|
|
302
|
+
simulateTransaction(
|
|
303
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
304
|
+
config: AccountsConfigWithBase64EncodingZstdCompression &
|
|
305
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
306
|
+
SimulateTransactionConfigBase &
|
|
307
|
+
WithInnerInstructionsConfig & { encoding: 'base64' },
|
|
308
|
+
): SolanaRpcResponse<
|
|
309
|
+
SimulateTransactionApiResponseBase &
|
|
310
|
+
SimulateTransactionApiResponseWithAccounts<
|
|
311
|
+
AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData
|
|
312
|
+
> &
|
|
313
|
+
SimulateTransactionApiResponseWithInnerInstructions &
|
|
314
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
315
|
+
>;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state, and
|
|
319
|
+
* replace the transaction's blockhash with the most recent one.
|
|
320
|
+
*
|
|
321
|
+
* If the listed accounts have data, it will first be compressed using
|
|
322
|
+
* [ZStandard](https://facebook.github.io/zstd/) and the result will be returned in the response
|
|
323
|
+
* as a tuple whose first element is a base64-encoded string.
|
|
324
|
+
*
|
|
325
|
+
* The replacement blockhash and the blockheight until which it is valid will be returned in the
|
|
326
|
+
* response.
|
|
327
|
+
*
|
|
328
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
329
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
330
|
+
*
|
|
331
|
+
* {@label accounts-base64-zstd-compressed--no-inner-instructions--with-replacement-blockhash}
|
|
332
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
333
|
+
*/
|
|
334
|
+
simulateTransaction(
|
|
335
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
336
|
+
config: AccountsConfigWithBase64EncodingZstdCompression &
|
|
337
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
338
|
+
SimulateTransactionConfigBase & { encoding: 'base64' },
|
|
339
|
+
): SolanaRpcResponse<
|
|
340
|
+
SimulateTransactionApiResponseBase &
|
|
341
|
+
SimulateTransactionApiResponseWithAccounts<
|
|
342
|
+
AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData
|
|
343
|
+
> &
|
|
344
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
345
|
+
>;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state,
|
|
349
|
+
* obtain the list of inner instructions run, if any, and replace the transaction's blockhash
|
|
350
|
+
* with the most recent one.
|
|
351
|
+
*
|
|
352
|
+
* If the listed accounts have data, the server will attempt to process it using a parser
|
|
353
|
+
* specific to each account's owning program. If successful, the parsed data will be returned in
|
|
354
|
+
* the response as JSON. Otherwise, the raw account data will be returned in the response as a
|
|
355
|
+
* tuple whose first element is a base64-encoded string.
|
|
356
|
+
*
|
|
357
|
+
* The replacement blockhash and the blockheight until which it is valid will be returned in the
|
|
358
|
+
* response.
|
|
359
|
+
*
|
|
360
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
361
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
362
|
+
*
|
|
363
|
+
* {@label accounts-parsed--with-inner-instructions--with-replacement-blockhash}
|
|
364
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
365
|
+
*/
|
|
366
|
+
simulateTransaction(
|
|
367
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
368
|
+
config: AccountsConfigWithJsonParsedEncoding &
|
|
369
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
370
|
+
SimulateTransactionConfigBase &
|
|
371
|
+
WithInnerInstructionsConfig & { encoding: 'base64' },
|
|
372
|
+
): SolanaRpcResponse<
|
|
373
|
+
SimulateTransactionApiResponseBase &
|
|
374
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithJsonData> &
|
|
375
|
+
SimulateTransactionApiResponseWithInnerInstructions &
|
|
376
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
377
|
+
>;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state, and
|
|
381
|
+
* replace the transaction's blockhash with the most recent one.
|
|
382
|
+
*
|
|
383
|
+
* If the listed accounts have data, the server will attempt to process it using a parser
|
|
384
|
+
* specific to each account's owning program. If successful, the parsed data will be returned in
|
|
385
|
+
* the response as JSON. Otherwise, the raw account data will be returned in the response as a
|
|
386
|
+
* tuple whose first element is a base64-encoded string.
|
|
387
|
+
*
|
|
388
|
+
* The replacement blockhash and the blockheight until which it is valid will be returned in the
|
|
389
|
+
* response.
|
|
390
|
+
*
|
|
391
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
392
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
393
|
+
*
|
|
394
|
+
* {@label accounts-parsed--no-inner-instructions--with-replacement-blockhash}
|
|
395
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
396
|
+
*/
|
|
397
|
+
simulateTransaction(
|
|
398
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
399
|
+
config: AccountsConfigWithJsonParsedEncoding &
|
|
400
|
+
SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
401
|
+
SimulateTransactionConfigBase & { encoding: 'base64' },
|
|
402
|
+
): SolanaRpcResponse<
|
|
403
|
+
SimulateTransactionApiResponseBase &
|
|
404
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithJsonData> &
|
|
405
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
406
|
+
>;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Simulate sending a transaction, obtain the list of inner instructions run, if any, and
|
|
410
|
+
* replace the transaction's blockhash with the most recent one.
|
|
411
|
+
*
|
|
412
|
+
* The replacement blockhash and the blockheight until which it is valid will be returned in the
|
|
413
|
+
* response.
|
|
414
|
+
*
|
|
415
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
416
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
417
|
+
*
|
|
418
|
+
* {@label no-accounts--with-inner-instructions--with-replacement-blockhash}
|
|
419
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
420
|
+
*/
|
|
421
|
+
simulateTransaction(
|
|
422
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
423
|
+
config: SigVerifyAndReplaceRecentBlockhashConfig<true> &
|
|
424
|
+
SimulateTransactionConfigBase &
|
|
425
|
+
WithInnerInstructionsConfig & { encoding: 'base64' },
|
|
426
|
+
): SolanaRpcResponse<
|
|
427
|
+
Readonly<{ readonly accounts: null }> &
|
|
428
|
+
SimulateTransactionApiResponseBase &
|
|
429
|
+
SimulateTransactionApiResponseWithInnerInstructions &
|
|
430
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
431
|
+
>;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Simulate sending a transaction, and replace the transaction's blockhash with the most recent
|
|
435
|
+
* one.
|
|
436
|
+
*
|
|
437
|
+
* The replacement blockhash and the blockheight until which it is valid will be returned in the
|
|
438
|
+
* response.
|
|
439
|
+
*
|
|
440
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
441
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
442
|
+
*
|
|
443
|
+
* {@label no-accounts--no-inner-instructions--with-replacement-blockhash}
|
|
444
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
445
|
+
*/
|
|
446
|
+
simulateTransaction(
|
|
447
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
448
|
+
config: SigVerifyAndReplaceRecentBlockhashConfig<true> & SimulateTransactionConfigBase & { encoding: 'base64' },
|
|
449
|
+
): SolanaRpcResponse<
|
|
450
|
+
Readonly<{ readonly accounts: null }> &
|
|
451
|
+
SimulateTransactionApiResponseBase &
|
|
452
|
+
SimulateTransactionApiResponseWithReplacementBlockhash
|
|
453
|
+
>;
|
|
454
|
+
|
|
455
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
456
|
+
simulateTransaction(
|
|
457
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
458
|
+
config: AccountsConfigWithBase64Encoding &
|
|
459
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
460
|
+
SimulateTransactionConfigBase &
|
|
461
|
+
WithInnerInstructionsConfig,
|
|
462
|
+
): SolanaRpcResponse<
|
|
463
|
+
SimulateTransactionApiResponseBase &
|
|
464
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedData> &
|
|
465
|
+
SimulateTransactionApiResponseWithInnerInstructions
|
|
466
|
+
>;
|
|
467
|
+
|
|
468
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
469
|
+
simulateTransaction(
|
|
470
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
471
|
+
config: AccountsConfigWithBase64Encoding &
|
|
472
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
473
|
+
SimulateTransactionConfigBase,
|
|
474
|
+
): SolanaRpcResponse<
|
|
475
|
+
SimulateTransactionApiResponseBase &
|
|
476
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedData>
|
|
477
|
+
>;
|
|
478
|
+
|
|
479
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
480
|
+
simulateTransaction(
|
|
481
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
482
|
+
config: AccountsConfigWithBase64EncodingZstdCompression &
|
|
483
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
484
|
+
SimulateTransactionConfigBase &
|
|
485
|
+
WithInnerInstructionsConfig,
|
|
486
|
+
): SolanaRpcResponse<
|
|
487
|
+
SimulateTransactionApiResponseBase &
|
|
488
|
+
SimulateTransactionApiResponseWithAccounts<
|
|
489
|
+
AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData
|
|
490
|
+
> &
|
|
491
|
+
SimulateTransactionApiResponseWithInnerInstructions
|
|
492
|
+
>;
|
|
493
|
+
|
|
494
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
495
|
+
simulateTransaction(
|
|
496
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
497
|
+
config: AccountsConfigWithBase64EncodingZstdCompression &
|
|
498
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
499
|
+
SimulateTransactionConfigBase,
|
|
500
|
+
): SolanaRpcResponse<
|
|
501
|
+
SimulateTransactionApiResponseBase &
|
|
502
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData>
|
|
503
|
+
>;
|
|
504
|
+
|
|
505
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
506
|
+
simulateTransaction(
|
|
507
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
508
|
+
config: AccountsConfigWithJsonParsedEncoding &
|
|
509
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
510
|
+
SimulateTransactionConfigBase &
|
|
511
|
+
WithInnerInstructionsConfig,
|
|
512
|
+
): SolanaRpcResponse<
|
|
513
|
+
SimulateTransactionApiResponseBase &
|
|
514
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithJsonData> &
|
|
515
|
+
SimulateTransactionApiResponseWithInnerInstructions
|
|
516
|
+
>;
|
|
517
|
+
|
|
518
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
519
|
+
simulateTransaction(
|
|
520
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
521
|
+
config: AccountsConfigWithJsonParsedEncoding &
|
|
522
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
523
|
+
SimulateTransactionConfigBase,
|
|
524
|
+
): SolanaRpcResponse<
|
|
525
|
+
SimulateTransactionApiResponseBase &
|
|
526
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithJsonData>
|
|
527
|
+
>;
|
|
528
|
+
|
|
529
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
530
|
+
simulateTransaction(
|
|
531
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
532
|
+
config?: SigVerifyAndReplaceRecentBlockhashConfig & SimulateTransactionConfigBase & WithInnerInstructionsConfig,
|
|
533
|
+
): SolanaRpcResponse<
|
|
534
|
+
Readonly<{ readonly accounts: null }> &
|
|
535
|
+
SimulateTransactionApiResponseBase &
|
|
536
|
+
SimulateTransactionApiResponseWithInnerInstructions
|
|
537
|
+
>;
|
|
538
|
+
|
|
539
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
540
|
+
simulateTransaction(
|
|
541
|
+
base58EncodedWireTransaction: Base58EncodedBytes,
|
|
542
|
+
config?: SigVerifyAndReplaceRecentBlockhashConfig & SimulateTransactionConfigBase,
|
|
543
|
+
): SolanaRpcResponse<Readonly<{ readonly accounts: null }> & SimulateTransactionApiResponseBase>;
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state, and
|
|
547
|
+
* obtain the list of inner instructions run, if any.
|
|
548
|
+
*
|
|
549
|
+
* If the listed accounts have data, it will be returned in the response as a tuple whose first
|
|
550
|
+
* element is a base64-encoded string.
|
|
551
|
+
*
|
|
552
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
553
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
554
|
+
*
|
|
555
|
+
* {@label accounts-base64--with-inner-instructions}
|
|
556
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
557
|
+
*/
|
|
558
|
+
simulateTransaction(
|
|
559
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
560
|
+
config: AccountsConfigWithBase64Encoding &
|
|
561
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
562
|
+
SimulateTransactionConfigBase &
|
|
563
|
+
WithInnerInstructionsConfig & { encoding: 'base64' },
|
|
564
|
+
): SolanaRpcResponse<
|
|
565
|
+
SimulateTransactionApiResponseBase &
|
|
566
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedData> &
|
|
567
|
+
SimulateTransactionApiResponseWithInnerInstructions
|
|
568
|
+
>;
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state.
|
|
572
|
+
*
|
|
573
|
+
* If the listed accounts have data, it will be returned in the response as a tuple whose first
|
|
574
|
+
* element is a base64-encoded string.
|
|
575
|
+
*
|
|
576
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
577
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
578
|
+
*
|
|
579
|
+
* {@label accounts-base64--no-inner-instructions}
|
|
580
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
581
|
+
*/
|
|
582
|
+
simulateTransaction(
|
|
583
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
584
|
+
config: AccountsConfigWithBase64Encoding &
|
|
585
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
586
|
+
SimulateTransactionConfigBase & { encoding: 'base64' },
|
|
587
|
+
): SolanaRpcResponse<
|
|
588
|
+
SimulateTransactionApiResponseBase &
|
|
589
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedData>
|
|
590
|
+
>;
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state, and
|
|
594
|
+
* obtain the list of inner instructions run, if any.
|
|
595
|
+
*
|
|
596
|
+
* If the listed accounts have data, it will first be compressed using
|
|
597
|
+
* [ZStandard](https://facebook.github.io/zstd/) and the result will be returned in the response
|
|
598
|
+
* as a tuple whose first element is a base64-encoded string.
|
|
599
|
+
*
|
|
600
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
601
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
602
|
+
*
|
|
603
|
+
* {@label accounts-base64-zstd-compressed--with-inner-instructions}
|
|
604
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
605
|
+
*/
|
|
606
|
+
simulateTransaction(
|
|
607
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
608
|
+
config: AccountsConfigWithBase64EncodingZstdCompression &
|
|
609
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
610
|
+
SimulateTransactionConfigBase &
|
|
611
|
+
WithInnerInstructionsConfig & { encoding: 'base64' },
|
|
612
|
+
): SolanaRpcResponse<
|
|
613
|
+
SimulateTransactionApiResponseBase &
|
|
614
|
+
SimulateTransactionApiResponseWithAccounts<
|
|
615
|
+
AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData
|
|
616
|
+
> &
|
|
617
|
+
SimulateTransactionApiResponseWithInnerInstructions
|
|
618
|
+
>;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state.
|
|
622
|
+
*
|
|
623
|
+
* If the listed accounts have data, it will first be compressed using
|
|
624
|
+
* [ZStandard](https://facebook.github.io/zstd/) and the result will be returned in the response
|
|
625
|
+
* as a tuple whose first element is a base64-encoded string.
|
|
626
|
+
*
|
|
627
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
628
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
629
|
+
*
|
|
630
|
+
* {@label accounts-base64-zstd-compressed--no-inner-instructions}
|
|
631
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
632
|
+
*/
|
|
633
|
+
simulateTransaction(
|
|
634
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
635
|
+
config: AccountsConfigWithBase64EncodingZstdCompression &
|
|
636
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
637
|
+
SimulateTransactionConfigBase & { encoding: 'base64' },
|
|
638
|
+
): SolanaRpcResponse<
|
|
639
|
+
SimulateTransactionApiResponseBase &
|
|
640
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData>
|
|
641
|
+
>;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state, and
|
|
645
|
+
* obtain the list of inner instructions run, if any.
|
|
646
|
+
*
|
|
647
|
+
* If the listed accounts have data, the server will attempt to process it using a parser
|
|
648
|
+
* specific to each account's owning program. If successful, the parsed data will be returned in
|
|
649
|
+
* the response as JSON. Otherwise, the raw account data will be returned in the response as a
|
|
650
|
+
* tuple whose first element is a base64-encoded string.
|
|
651
|
+
*
|
|
652
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
653
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
654
|
+
*
|
|
655
|
+
* {@label accounts-parsed--with-inner-instructions}
|
|
656
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
657
|
+
*/
|
|
658
|
+
simulateTransaction(
|
|
659
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
660
|
+
config: AccountsConfigWithJsonParsedEncoding &
|
|
661
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
662
|
+
SimulateTransactionConfigBase &
|
|
663
|
+
WithInnerInstructionsConfig & { encoding: 'base64' },
|
|
664
|
+
): SolanaRpcResponse<
|
|
665
|
+
SimulateTransactionApiResponseBase &
|
|
666
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithJsonData> &
|
|
667
|
+
SimulateTransactionApiResponseWithInnerInstructions
|
|
668
|
+
>;
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* Simulate sending a transaction, fetch a list of accounts in their post-simulation state.
|
|
672
|
+
*
|
|
673
|
+
* If the listed accounts have data, the server will attempt to process it using a parser
|
|
674
|
+
* specific to each account's owning program. If successful, the parsed data will be returned in
|
|
675
|
+
* the response as JSON. Otherwise, the raw account data will be returned in the response as a
|
|
676
|
+
* tuple whose first element is a base64-encoded string.
|
|
677
|
+
*
|
|
678
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
679
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
680
|
+
*
|
|
681
|
+
* {@label accounts-parsed--no-inner-instructions}
|
|
682
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
683
|
+
*/
|
|
684
|
+
simulateTransaction(
|
|
685
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
686
|
+
config: AccountsConfigWithJsonParsedEncoding &
|
|
687
|
+
SigVerifyAndReplaceRecentBlockhashConfig &
|
|
688
|
+
SimulateTransactionConfigBase & { encoding: 'base64' },
|
|
689
|
+
): SolanaRpcResponse<
|
|
690
|
+
SimulateTransactionApiResponseBase &
|
|
691
|
+
SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithJsonData>
|
|
692
|
+
>;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Simulate sending a transaction, and obtain the list of inner instructions run, if any.
|
|
696
|
+
*
|
|
697
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
698
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
699
|
+
*
|
|
700
|
+
* {@label no-accounts--with-inner-instructions}
|
|
701
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
702
|
+
*/
|
|
703
|
+
simulateTransaction(
|
|
704
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
705
|
+
config: SigVerifyAndReplaceRecentBlockhashConfig &
|
|
706
|
+
SimulateTransactionConfigBase &
|
|
707
|
+
WithInnerInstructionsConfig & { encoding: 'base64' },
|
|
708
|
+
): SolanaRpcResponse<
|
|
709
|
+
Readonly<{ readonly accounts: null }> &
|
|
710
|
+
SimulateTransactionApiResponseBase &
|
|
711
|
+
SimulateTransactionApiResponseWithInnerInstructions
|
|
712
|
+
>;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Simulate sending a transaction.
|
|
716
|
+
*
|
|
717
|
+
* @param base64EncodedWireTransaction A fully signed transaction in wire format, as a base-64
|
|
718
|
+
* encoded string. Use {@link getBase64EncodedWireTransaction} to obtain this.
|
|
719
|
+
*
|
|
720
|
+
* {@label no-accounts--no-inner-instructions}
|
|
721
|
+
* @see https://solana.com/docs/rpc/http/simulatetransaction
|
|
722
|
+
*/
|
|
723
|
+
simulateTransaction(
|
|
724
|
+
base64EncodedWireTransaction: Base64EncodedWireTransaction,
|
|
725
|
+
config: SigVerifyAndReplaceRecentBlockhashConfig & SimulateTransactionConfigBase & { encoding: 'base64' },
|
|
726
|
+
): SolanaRpcResponse<Readonly<{ readonly accounts: null }> & SimulateTransactionApiResponseBase>;
|
|
727
|
+
};
|