@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.
@@ -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);