@solana/web3.js 1.74.1 → 1.75.1

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.
@@ -3556,6 +3556,13 @@ const GetInflationRewardResult = jsonRpcResult(superstruct.array(superstruct.nul
3556
3556
  postBalance: superstruct.number(),
3557
3557
  commission: superstruct.optional(superstruct.nullable(superstruct.number()))
3558
3558
  }))));
3559
+ /**
3560
+ * Expected JSON RPC response for the "getRecentPrioritizationFees" message
3561
+ */
3562
+ const GetRecentPrioritizationFeesResult = superstruct.array(superstruct.type({
3563
+ slot: superstruct.number(),
3564
+ prioritizationFee: superstruct.number()
3565
+ }));
3559
3566
  /**
3560
3567
  * Expected JSON RPC response for the "getInflationRate" message
3561
3568
  */
@@ -3757,6 +3764,11 @@ const GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);
3757
3764
  */
3758
3765
  const GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);
3759
3766
 
3767
+ /**
3768
+ * Expected JSON RPC response for the "getRecentPrioritizationFees" message
3769
+ */
3770
+ const GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);
3771
+
3760
3772
  /**
3761
3773
  * Expected JSON RPC response for the "getEpochInfo" message
3762
3774
  */
@@ -4448,7 +4460,7 @@ const LogsNotificationResult = superstruct.type({
4448
4460
 
4449
4461
  /** @internal */
4450
4462
  const COMMON_HTTP_HEADERS = {
4451
- 'solana-client': `js/${"1.74.1" }`
4463
+ 'solana-client': `js/${"1.75.1" }`
4452
4464
  };
4453
4465
 
4454
4466
  /**
@@ -5654,6 +5666,19 @@ class Connection {
5654
5666
  return res.result;
5655
5667
  }
5656
5668
 
5669
+ /**
5670
+ * Fetch a list of prioritization fees from recent blocks.
5671
+ */
5672
+ async getRecentPrioritizationFees(config) {
5673
+ const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());
5674
+ const args = this._buildArgs(accounts?.length ? [accounts] : []);
5675
+ const unsafeRes = await this._rpcRequest('getRecentPrioritizationFees', args);
5676
+ const res = superstruct.create(unsafeRes, GetRecentPrioritizationFeesRpcResult);
5677
+ if ('error' in res) {
5678
+ throw new SolanaJSONRPCError(res.error, 'failed to get recent prioritization fees');
5679
+ }
5680
+ return res.result;
5681
+ }
5657
5682
  /**
5658
5683
  * Fetch a recent blockhash from the cluster
5659
5684
  * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}