@solana/web3.js 1.93.4 → 1.94.0
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/lib/index.browser.cjs.js +21 -1
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +21 -1
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +21 -1
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.esm.js +21 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +21 -1
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -1
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +21 -1
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +46 -0
package/lib/index.browser.esm.js
CHANGED
|
@@ -4067,6 +4067,16 @@ const VersionResult = type({
|
|
|
4067
4067
|
'solana-core': string(),
|
|
4068
4068
|
'feature-set': optional(number())
|
|
4069
4069
|
});
|
|
4070
|
+
const ParsedInstructionStruct = type({
|
|
4071
|
+
program: string(),
|
|
4072
|
+
programId: PublicKeyFromString,
|
|
4073
|
+
parsed: unknown()
|
|
4074
|
+
});
|
|
4075
|
+
const PartiallyDecodedInstructionStruct = type({
|
|
4076
|
+
programId: PublicKeyFromString,
|
|
4077
|
+
accounts: array(PublicKeyFromString),
|
|
4078
|
+
data: string()
|
|
4079
|
+
});
|
|
4070
4080
|
const SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({
|
|
4071
4081
|
err: nullable(union([type({}), string()])),
|
|
4072
4082
|
logs: nullable(array(string())),
|
|
@@ -4081,7 +4091,11 @@ const SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({
|
|
|
4081
4091
|
returnData: optional(nullable(type({
|
|
4082
4092
|
programId: string(),
|
|
4083
4093
|
data: tuple([string(), literal('base64')])
|
|
4084
|
-
})))
|
|
4094
|
+
}))),
|
|
4095
|
+
innerInstructions: optional(nullable(array(type({
|
|
4096
|
+
index: number(),
|
|
4097
|
+
instructions: array(union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))
|
|
4098
|
+
}))))
|
|
4085
4099
|
}));
|
|
4086
4100
|
|
|
4087
4101
|
/**
|
|
@@ -7194,6 +7208,9 @@ class Connection {
|
|
|
7194
7208
|
if (!('commitment' in config)) {
|
|
7195
7209
|
config.commitment = this.commitment;
|
|
7196
7210
|
}
|
|
7211
|
+
if (configOrSigners && typeof configOrSigners === 'object' && 'innerInstructions' in configOrSigners) {
|
|
7212
|
+
config.innerInstructions = configOrSigners.innerInstructions;
|
|
7213
|
+
}
|
|
7197
7214
|
const args = [encodedTransaction, config];
|
|
7198
7215
|
const unsafeRes = await this._rpcRequest('simulateTransaction', args);
|
|
7199
7216
|
const res = create(unsafeRes, SimulatedTransactionResponseStruct);
|
|
@@ -7265,6 +7282,9 @@ class Connection {
|
|
|
7265
7282
|
if (signers) {
|
|
7266
7283
|
config.sigVerify = true;
|
|
7267
7284
|
}
|
|
7285
|
+
if (configOrSigners && typeof configOrSigners === 'object' && 'innerInstructions' in configOrSigners) {
|
|
7286
|
+
config.innerInstructions = configOrSigners.innerInstructions;
|
|
7287
|
+
}
|
|
7268
7288
|
const args = [encodedTransaction, config];
|
|
7269
7289
|
const unsafeRes = await this._rpcRequest('simulateTransaction', args);
|
|
7270
7290
|
const res = create(unsafeRes, SimulatedTransactionResponseStruct);
|