@solana/web3.js 1.42.0 → 1.43.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.
@@ -2828,8 +2828,6 @@ class Transaction {
2828
2828
  const message = this._compile();
2829
2829
 
2830
2830
  this._partialSign(message, ...uniqueSigners);
2831
-
2832
- this._verifySignatures(message.serialize(), true);
2833
2831
  }
2834
2832
  /**
2835
2833
  * Partially sign a transaction with the specified accounts. All accounts must
@@ -4187,6 +4185,34 @@ class ComputeBudgetInstruction {
4187
4185
  bytes
4188
4186
  };
4189
4187
  }
4188
+ /**
4189
+ * Decode set compute unit limit compute budget instruction and retrieve the instruction params.
4190
+ */
4191
+
4192
+
4193
+ static decodeSetComputeUnitLimit(instruction) {
4194
+ this.checkProgramId(instruction.programId);
4195
+ const {
4196
+ units
4197
+ } = decodeData(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit, instruction.data);
4198
+ return {
4199
+ units
4200
+ };
4201
+ }
4202
+ /**
4203
+ * Decode set compute unit price compute budget instruction and retrieve the instruction params.
4204
+ */
4205
+
4206
+
4207
+ static decodeSetComputeUnitPrice(instruction) {
4208
+ this.checkProgramId(instruction.programId);
4209
+ const {
4210
+ microLamports
4211
+ } = decodeData(COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice, instruction.data);
4212
+ return {
4213
+ microLamports
4214
+ };
4215
+ }
4190
4216
  /**
4191
4217
  * @internal
4192
4218
  */
@@ -4215,6 +4241,14 @@ const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze({
4215
4241
  RequestHeapFrame: {
4216
4242
  index: 1,
4217
4243
  layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8('instruction'), BufferLayout__namespace.u32('bytes')])
4244
+ },
4245
+ SetComputeUnitLimit: {
4246
+ index: 2,
4247
+ layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8('instruction'), BufferLayout__namespace.u32('units')])
4248
+ },
4249
+ SetComputeUnitPrice: {
4250
+ index: 3,
4251
+ layout: BufferLayout__namespace.struct([BufferLayout__namespace.u8('instruction'), bufferLayoutUtils.u64('microLamports')])
4218
4252
  }
4219
4253
  });
4220
4254
  /**
@@ -4251,6 +4285,28 @@ class ComputeBudgetProgram {
4251
4285
  });
4252
4286
  }
4253
4287
 
4288
+ static setComputeUnitLimit(params) {
4289
+ const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;
4290
+ const data = encodeData(type, params);
4291
+ return new TransactionInstruction({
4292
+ keys: [],
4293
+ programId: this.programId,
4294
+ data
4295
+ });
4296
+ }
4297
+
4298
+ static setComputeUnitPrice(params) {
4299
+ const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;
4300
+ const data = encodeData(type, {
4301
+ microLamports: BigInt(params.microLamports)
4302
+ });
4303
+ return new TransactionInstruction({
4304
+ keys: [],
4305
+ programId: this.programId,
4306
+ data
4307
+ });
4308
+ }
4309
+
4254
4310
  }
4255
4311
  ComputeBudgetProgram.programId = new PublicKey('ComputeBudget111111111111111111111111111111');
4256
4312
 
@@ -10198,7 +10254,7 @@ VoteProgram.space = 3731;
10198
10254
  *
10199
10255
  * @param {Connection} connection
10200
10256
  * @param {Buffer} rawTransaction
10201
- * @param {BlockheightBasedTransactionConfimationStrategy} confirmationStrategy
10257
+ * @param {BlockheightBasedTransactionConfirmationStrategy} confirmationStrategy
10202
10258
  * @param {ConfirmOptions} [options]
10203
10259
  * @returns {Promise<TransactionSignature>}
10204
10260
  */