@solana/web3.js 1.71.0 → 1.73.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.iife.js CHANGED
@@ -17440,8 +17440,19 @@ var solanaWeb3 = (function (exports) {
17440
17440
  epoch: number(),
17441
17441
  effectiveSlot: number(),
17442
17442
  amount: number(),
17443
- postBalance: number()
17443
+ postBalance: number(),
17444
+ commission: optional(nullable(number()))
17444
17445
  }))));
17446
+
17447
+ /**
17448
+ * Expected JSON RPC response for the "getInflationRate" message
17449
+ */
17450
+ const GetInflationRateResult = type({
17451
+ total: number(),
17452
+ validator: number(),
17453
+ foundation: number(),
17454
+ epoch: number()
17455
+ });
17445
17456
  /**
17446
17457
  * Information about the current epoch
17447
17458
  */
@@ -17645,6 +17656,11 @@ var solanaWeb3 = (function (exports) {
17645
17656
 
17646
17657
 
17647
17658
  const GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);
17659
+ /**
17660
+ * Expected JSON RPC response for the "getInflationRate" message
17661
+ */
17662
+
17663
+ const GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);
17648
17664
  /**
17649
17665
  * Expected JSON RPC response for the "getEpochInfo" message
17650
17666
  */
@@ -18104,7 +18120,8 @@ var solanaWeb3 = (function (exports) {
18104
18120
  pubkey: string(),
18105
18121
  lamports: number(),
18106
18122
  postBalance: nullable(number()),
18107
- rewardType: nullable(string())
18123
+ rewardType: nullable(string()),
18124
+ commission: optional(nullable(number()))
18108
18125
  });
18109
18126
  /**
18110
18127
  * Expected JSON RPC response for the "getBlock" message
@@ -19595,6 +19612,21 @@ var solanaWeb3 = (function (exports) {
19595
19612
 
19596
19613
  return res.result;
19597
19614
  }
19615
+ /**
19616
+ * Fetch the specific inflation values for the current epoch
19617
+ */
19618
+
19619
+
19620
+ async getInflationRate() {
19621
+ const unsafeRes = await this._rpcRequest('getInflationRate', []);
19622
+ const res = create(unsafeRes, GetInflationRateRpcResult);
19623
+
19624
+ if ('error' in res) {
19625
+ throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');
19626
+ }
19627
+
19628
+ return res.result;
19629
+ }
19598
19630
  /**
19599
19631
  * Fetch the Epoch Info parameters
19600
19632
  */