@solana/web3.js 1.74.0 → 1.75.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 +25 -0
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +25 -0
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +25 -0
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +20 -0
- package/lib/index.esm.js +25 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +25 -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 +25 -0
- package/lib/index.native.js.map +1 -1
- package/package.json +4 -4
- package/src/connection.ts +56 -0
package/lib/index.iife.js
CHANGED
|
@@ -17337,6 +17337,13 @@ var solanaWeb3 = (function (exports) {
|
|
|
17337
17337
|
postBalance: number(),
|
|
17338
17338
|
commission: optional(nullable(number()))
|
|
17339
17339
|
}))));
|
|
17340
|
+
/**
|
|
17341
|
+
* Expected JSON RPC response for the "getRecentPrioritizationFees" message
|
|
17342
|
+
*/
|
|
17343
|
+
const GetRecentPrioritizationFeesResult = array(type({
|
|
17344
|
+
slot: number(),
|
|
17345
|
+
prioritizationFee: number()
|
|
17346
|
+
}));
|
|
17340
17347
|
/**
|
|
17341
17348
|
* Expected JSON RPC response for the "getInflationRate" message
|
|
17342
17349
|
*/
|
|
@@ -17538,6 +17545,11 @@ var solanaWeb3 = (function (exports) {
|
|
|
17538
17545
|
*/
|
|
17539
17546
|
const GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);
|
|
17540
17547
|
|
|
17548
|
+
/**
|
|
17549
|
+
* Expected JSON RPC response for the "getRecentPrioritizationFees" message
|
|
17550
|
+
*/
|
|
17551
|
+
const GetRecentPrioritizationFeesRpcResult = jsonRpcResult(GetRecentPrioritizationFeesResult);
|
|
17552
|
+
|
|
17541
17553
|
/**
|
|
17542
17554
|
* Expected JSON RPC response for the "getEpochInfo" message
|
|
17543
17555
|
*/
|
|
@@ -19435,6 +19447,19 @@ var solanaWeb3 = (function (exports) {
|
|
|
19435
19447
|
return res.result;
|
|
19436
19448
|
}
|
|
19437
19449
|
|
|
19450
|
+
/**
|
|
19451
|
+
* Fetch a list of prioritization fees from recent blocks.
|
|
19452
|
+
*/
|
|
19453
|
+
async getRecentPrioritizationFees(config) {
|
|
19454
|
+
const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());
|
|
19455
|
+
const args = this._buildArgs(accounts?.length ? [accounts] : []);
|
|
19456
|
+
const unsafeRes = await this._rpcRequest('getRecentPrioritizationFees', args);
|
|
19457
|
+
const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);
|
|
19458
|
+
if ('error' in res) {
|
|
19459
|
+
throw new SolanaJSONRPCError(res.error, 'failed to get recent prioritization fees');
|
|
19460
|
+
}
|
|
19461
|
+
return res.result;
|
|
19462
|
+
}
|
|
19438
19463
|
/**
|
|
19439
19464
|
* Fetch a recent blockhash from the cluster
|
|
19440
19465
|
* @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}
|