@solana/web3.js 1.71.0 → 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 +30 -0
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +30 -0
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +30 -0
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +14 -0
- package/lib/index.esm.js +30 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +30 -0
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -1
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +30 -0
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +38 -0
package/lib/index.iife.js
CHANGED
|
@@ -17442,6 +17442,16 @@ var solanaWeb3 = (function (exports) {
|
|
|
17442
17442
|
amount: number(),
|
|
17443
17443
|
postBalance: number()
|
|
17444
17444
|
}))));
|
|
17445
|
+
|
|
17446
|
+
/**
|
|
17447
|
+
* Expected JSON RPC response for the "getInflationRate" message
|
|
17448
|
+
*/
|
|
17449
|
+
const GetInflationRateResult = type({
|
|
17450
|
+
total: number(),
|
|
17451
|
+
validator: number(),
|
|
17452
|
+
foundation: number(),
|
|
17453
|
+
epoch: number()
|
|
17454
|
+
});
|
|
17445
17455
|
/**
|
|
17446
17456
|
* Information about the current epoch
|
|
17447
17457
|
*/
|
|
@@ -17645,6 +17655,11 @@ var solanaWeb3 = (function (exports) {
|
|
|
17645
17655
|
|
|
17646
17656
|
|
|
17647
17657
|
const GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);
|
|
17658
|
+
/**
|
|
17659
|
+
* Expected JSON RPC response for the "getInflationRate" message
|
|
17660
|
+
*/
|
|
17661
|
+
|
|
17662
|
+
const GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);
|
|
17648
17663
|
/**
|
|
17649
17664
|
* Expected JSON RPC response for the "getEpochInfo" message
|
|
17650
17665
|
*/
|
|
@@ -19595,6 +19610,21 @@ var solanaWeb3 = (function (exports) {
|
|
|
19595
19610
|
|
|
19596
19611
|
return res.result;
|
|
19597
19612
|
}
|
|
19613
|
+
/**
|
|
19614
|
+
* Fetch the specific inflation values for the current epoch
|
|
19615
|
+
*/
|
|
19616
|
+
|
|
19617
|
+
|
|
19618
|
+
async getInflationRate() {
|
|
19619
|
+
const unsafeRes = await this._rpcRequest('getInflationRate', []);
|
|
19620
|
+
const res = create(unsafeRes, GetInflationRateRpcResult);
|
|
19621
|
+
|
|
19622
|
+
if ('error' in res) {
|
|
19623
|
+
throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');
|
|
19624
|
+
}
|
|
19625
|
+
|
|
19626
|
+
return res.result;
|
|
19627
|
+
}
|
|
19598
19628
|
/**
|
|
19599
19629
|
* Fetch the Epoch Info parameters
|
|
19600
19630
|
*/
|