@solana/web3.js 1.70.3 → 1.72.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.cjs.js CHANGED
@@ -1882,12 +1882,14 @@ class Transaction {
1882
1882
  this.signatures[index].signature = buffer.Buffer.from(signature);
1883
1883
  }
1884
1884
  /**
1885
- * Verify signatures of a complete, signed Transaction
1885
+ * Verify signatures of a Transaction
1886
+ * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.
1887
+ * If no boolean is provided, we expect a fully signed Transaction by default.
1886
1888
  */
1887
1889
 
1888
1890
 
1889
- verifySignatures() {
1890
- return this._verifySignatures(this.serializeMessage(), true);
1891
+ verifySignatures(requireAllSignatures) {
1892
+ return this._verifySignatures(this.serializeMessage(), requireAllSignatures === undefined ? true : requireAllSignatures);
1891
1893
  }
1892
1894
  /**
1893
1895
  * @internal
@@ -6251,6 +6253,16 @@ const GetInflationRewardResult = jsonRpcResult(superstruct.array(superstruct.nul
6251
6253
  amount: superstruct.number(),
6252
6254
  postBalance: superstruct.number()
6253
6255
  }))));
6256
+
6257
+ /**
6258
+ * Expected JSON RPC response for the "getInflationRate" message
6259
+ */
6260
+ const GetInflationRateResult = superstruct.type({
6261
+ total: superstruct.number(),
6262
+ validator: superstruct.number(),
6263
+ foundation: superstruct.number(),
6264
+ epoch: superstruct.number()
6265
+ });
6254
6266
  /**
6255
6267
  * Information about the current epoch
6256
6268
  */
@@ -6480,6 +6492,11 @@ function createRpcBatchRequest(client) {
6480
6492
 
6481
6493
 
6482
6494
  const GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);
6495
+ /**
6496
+ * Expected JSON RPC response for the "getInflationRate" message
6497
+ */
6498
+
6499
+ const GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);
6483
6500
  /**
6484
6501
  * Expected JSON RPC response for the "getEpochInfo" message
6485
6502
  */
@@ -8430,6 +8447,21 @@ class Connection {
8430
8447
 
8431
8448
  return res.result;
8432
8449
  }
8450
+ /**
8451
+ * Fetch the specific inflation values for the current epoch
8452
+ */
8453
+
8454
+
8455
+ async getInflationRate() {
8456
+ const unsafeRes = await this._rpcRequest('getInflationRate', []);
8457
+ const res = superstruct.create(unsafeRes, GetInflationRateRpcResult);
8458
+
8459
+ if ('error' in res) {
8460
+ throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');
8461
+ }
8462
+
8463
+ return res.result;
8464
+ }
8433
8465
  /**
8434
8466
  * Fetch the Epoch Info parameters
8435
8467
  */