@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.browser.cjs.js +35 -3
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +35 -3
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +35 -3
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +18 -2
- package/lib/index.esm.js +35 -3
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +35 -3
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +2 -2
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +35 -3
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +38 -0
- package/src/transaction/legacy.ts +9 -4
package/lib/index.browser.esm.js
CHANGED
|
@@ -1836,12 +1836,14 @@ class Transaction {
|
|
|
1836
1836
|
this.signatures[index].signature = Buffer.from(signature);
|
|
1837
1837
|
}
|
|
1838
1838
|
/**
|
|
1839
|
-
* Verify signatures of a
|
|
1839
|
+
* Verify signatures of a Transaction
|
|
1840
|
+
* Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.
|
|
1841
|
+
* If no boolean is provided, we expect a fully signed Transaction by default.
|
|
1840
1842
|
*/
|
|
1841
1843
|
|
|
1842
1844
|
|
|
1843
|
-
verifySignatures() {
|
|
1844
|
-
return this._verifySignatures(this.serializeMessage(), true);
|
|
1845
|
+
verifySignatures(requireAllSignatures) {
|
|
1846
|
+
return this._verifySignatures(this.serializeMessage(), requireAllSignatures === undefined ? true : requireAllSignatures);
|
|
1845
1847
|
}
|
|
1846
1848
|
/**
|
|
1847
1849
|
* @internal
|
|
@@ -3787,6 +3789,16 @@ const GetInflationRewardResult = jsonRpcResult(array(nullable(type({
|
|
|
3787
3789
|
amount: number(),
|
|
3788
3790
|
postBalance: number()
|
|
3789
3791
|
}))));
|
|
3792
|
+
|
|
3793
|
+
/**
|
|
3794
|
+
* Expected JSON RPC response for the "getInflationRate" message
|
|
3795
|
+
*/
|
|
3796
|
+
const GetInflationRateResult = type({
|
|
3797
|
+
total: number(),
|
|
3798
|
+
validator: number(),
|
|
3799
|
+
foundation: number(),
|
|
3800
|
+
epoch: number()
|
|
3801
|
+
});
|
|
3790
3802
|
/**
|
|
3791
3803
|
* Information about the current epoch
|
|
3792
3804
|
*/
|
|
@@ -3990,6 +4002,11 @@ function createRpcBatchRequest(client) {
|
|
|
3990
4002
|
|
|
3991
4003
|
|
|
3992
4004
|
const GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);
|
|
4005
|
+
/**
|
|
4006
|
+
* Expected JSON RPC response for the "getInflationRate" message
|
|
4007
|
+
*/
|
|
4008
|
+
|
|
4009
|
+
const GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);
|
|
3993
4010
|
/**
|
|
3994
4011
|
* Expected JSON RPC response for the "getEpochInfo" message
|
|
3995
4012
|
*/
|
|
@@ -5940,6 +5957,21 @@ class Connection {
|
|
|
5940
5957
|
|
|
5941
5958
|
return res.result;
|
|
5942
5959
|
}
|
|
5960
|
+
/**
|
|
5961
|
+
* Fetch the specific inflation values for the current epoch
|
|
5962
|
+
*/
|
|
5963
|
+
|
|
5964
|
+
|
|
5965
|
+
async getInflationRate() {
|
|
5966
|
+
const unsafeRes = await this._rpcRequest('getInflationRate', []);
|
|
5967
|
+
const res = create(unsafeRes, GetInflationRateRpcResult);
|
|
5968
|
+
|
|
5969
|
+
if ('error' in res) {
|
|
5970
|
+
throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');
|
|
5971
|
+
}
|
|
5972
|
+
|
|
5973
|
+
return res.result;
|
|
5974
|
+
}
|
|
5943
5975
|
/**
|
|
5944
5976
|
* Fetch the Epoch Info parameters
|
|
5945
5977
|
*/
|