@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.
@@ -3524,6 +3524,13 @@ const GetInflationRewardResult = jsonRpcResult(array(nullable(type({
3524
3524
  postBalance: number(),
3525
3525
  commission: optional(nullable(number()))
3526
3526
  }))));
3527
+ /**
3528
+ * Expected JSON RPC response for the "getRecentPrioritizationFees" message
3529
+ */
3530
+ const GetRecentPrioritizationFeesResult = array(type({
3531
+ slot: number(),
3532
+ prioritizationFee: number()
3533
+ }));
3527
3534
  /**
3528
3535
  * Expected JSON RPC response for the "getInflationRate" message
3529
3536
  */
@@ -3725,6 +3732,11 @@ const GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);
3725
3732
  */
3726
3733
  const GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);
3727
3734
 
3735
+ /**
3736
+ * Expected JSON RPC response for the "getRecentPrioritizationFees" message
3737
+ */
3738
+ const GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);
3739
+
3728
3740
  /**
3729
3741
  * Expected JSON RPC response for the "getEpochInfo" message
3730
3742
  */
@@ -4416,7 +4428,7 @@ const LogsNotificationResult = type({
4416
4428
 
4417
4429
  /** @internal */
4418
4430
  const COMMON_HTTP_HEADERS = {
4419
- 'solana-client': `js/${"1.74.1" }`
4431
+ 'solana-client': `js/${"1.75.1" }`
4420
4432
  };
4421
4433
 
4422
4434
  /**
@@ -5622,6 +5634,19 @@ class Connection {
5622
5634
  return res.result;
5623
5635
  }
5624
5636
 
5637
+ /**
5638
+ * Fetch a list of prioritization fees from recent blocks.
5639
+ */
5640
+ async getRecentPrioritizationFees(config) {
5641
+ const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());
5642
+ const args = this._buildArgs(accounts?.length ? [accounts] : []);
5643
+ const unsafeRes = await this._rpcRequest('getRecentPrioritizationFees', args);
5644
+ const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);
5645
+ if ('error' in res) {
5646
+ throw new SolanaJSONRPCError(res.error, 'failed to get recent prioritization fees');
5647
+ }
5648
+ return res.result;
5649
+ }
5625
5650
  /**
5626
5651
  * Fetch a recent blockhash from the cluster
5627
5652
  * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}