@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.
@@ -1866,12 +1866,14 @@ class Transaction {
1866
1866
  this.signatures[index].signature = buffer.Buffer.from(signature);
1867
1867
  }
1868
1868
  /**
1869
- * Verify signatures of a complete, signed Transaction
1869
+ * Verify signatures of a Transaction
1870
+ * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.
1871
+ * If no boolean is provided, we expect a fully signed Transaction by default.
1870
1872
  */
1871
1873
 
1872
1874
 
1873
- verifySignatures() {
1874
- return this._verifySignatures(this.serializeMessage(), true);
1875
+ verifySignatures(requireAllSignatures) {
1876
+ return this._verifySignatures(this.serializeMessage(), requireAllSignatures === undefined ? true : requireAllSignatures);
1875
1877
  }
1876
1878
  /**
1877
1879
  * @internal
@@ -3817,6 +3819,16 @@ const GetInflationRewardResult = jsonRpcResult(superstruct.array(superstruct.nul
3817
3819
  amount: superstruct.number(),
3818
3820
  postBalance: superstruct.number()
3819
3821
  }))));
3822
+
3823
+ /**
3824
+ * Expected JSON RPC response for the "getInflationRate" message
3825
+ */
3826
+ const GetInflationRateResult = superstruct.type({
3827
+ total: superstruct.number(),
3828
+ validator: superstruct.number(),
3829
+ foundation: superstruct.number(),
3830
+ epoch: superstruct.number()
3831
+ });
3820
3832
  /**
3821
3833
  * Information about the current epoch
3822
3834
  */
@@ -4020,6 +4032,11 @@ function createRpcBatchRequest(client) {
4020
4032
 
4021
4033
 
4022
4034
  const GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);
4035
+ /**
4036
+ * Expected JSON RPC response for the "getInflationRate" message
4037
+ */
4038
+
4039
+ const GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);
4023
4040
  /**
4024
4041
  * Expected JSON RPC response for the "getEpochInfo" message
4025
4042
  */
@@ -5970,6 +5987,21 @@ class Connection {
5970
5987
 
5971
5988
  return res.result;
5972
5989
  }
5990
+ /**
5991
+ * Fetch the specific inflation values for the current epoch
5992
+ */
5993
+
5994
+
5995
+ async getInflationRate() {
5996
+ const unsafeRes = await this._rpcRequest('getInflationRate', []);
5997
+ const res = superstruct.create(unsafeRes, GetInflationRateRpcResult);
5998
+
5999
+ if ('error' in res) {
6000
+ throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');
6001
+ }
6002
+
6003
+ return res.result;
6004
+ }
5973
6005
  /**
5974
6006
  * Fetch the Epoch Info parameters
5975
6007
  */