@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.
package/lib/index.iife.js CHANGED
@@ -17357,6 +17357,13 @@ var solanaWeb3 = (function (exports) {
17357
17357
  postBalance: number(),
17358
17358
  commission: optional(nullable(number()))
17359
17359
  }))));
17360
+ /**
17361
+ * Expected JSON RPC response for the "getRecentPrioritizationFees" message
17362
+ */
17363
+ const GetRecentPrioritizationFeesResult = array(type({
17364
+ slot: number(),
17365
+ prioritizationFee: number()
17366
+ }));
17360
17367
  /**
17361
17368
  * Expected JSON RPC response for the "getInflationRate" message
17362
17369
  */
@@ -17558,6 +17565,11 @@ var solanaWeb3 = (function (exports) {
17558
17565
  */
17559
17566
  const GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);
17560
17567
 
17568
+ /**
17569
+ * Expected JSON RPC response for the "getRecentPrioritizationFees" message
17570
+ */
17571
+ const GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);
17572
+
17561
17573
  /**
17562
17574
  * Expected JSON RPC response for the "getEpochInfo" message
17563
17575
  */
@@ -18249,7 +18261,7 @@ var solanaWeb3 = (function (exports) {
18249
18261
 
18250
18262
  /** @internal */
18251
18263
  const COMMON_HTTP_HEADERS = {
18252
- 'solana-client': `js/${"1.74.1" }`
18264
+ 'solana-client': `js/${"1.75.1" }`
18253
18265
  };
18254
18266
 
18255
18267
  /**
@@ -19455,6 +19467,19 @@ var solanaWeb3 = (function (exports) {
19455
19467
  return res.result;
19456
19468
  }
19457
19469
 
19470
+ /**
19471
+ * Fetch a list of prioritization fees from recent blocks.
19472
+ */
19473
+ async getRecentPrioritizationFees(config) {
19474
+ const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());
19475
+ const args = this._buildArgs(accounts?.length ? [accounts] : []);
19476
+ const unsafeRes = await this._rpcRequest('getRecentPrioritizationFees', args);
19477
+ const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);
19478
+ if ('error' in res) {
19479
+ throw new SolanaJSONRPCError(res.error, 'failed to get recent prioritization fees');
19480
+ }
19481
+ return res.result;
19482
+ }
19458
19483
  /**
19459
19484
  * Fetch a recent blockhash from the cluster
19460
19485
  * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}