@solana/web3.js 1.97.0 → 1.98.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 +21 -19
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +21 -19
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +21 -19
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +21 -19
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +21 -19
- 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 +21 -19
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +23 -21
package/package.json
CHANGED
package/src/connection.ts
CHANGED
|
@@ -2599,20 +2599,6 @@ const GetParsedTransactionRpcResult = jsonRpcResult(
|
|
|
2599
2599
|
),
|
|
2600
2600
|
);
|
|
2601
2601
|
|
|
2602
|
-
/**
|
|
2603
|
-
* Expected JSON RPC response for the "getRecentBlockhash" message
|
|
2604
|
-
*
|
|
2605
|
-
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.
|
|
2606
|
-
*/
|
|
2607
|
-
const GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(
|
|
2608
|
-
pick({
|
|
2609
|
-
blockhash: string(),
|
|
2610
|
-
feeCalculator: pick({
|
|
2611
|
-
lamportsPerSignature: number(),
|
|
2612
|
-
}),
|
|
2613
|
-
}),
|
|
2614
|
-
);
|
|
2615
|
-
|
|
2616
2602
|
/**
|
|
2617
2603
|
* Expected JSON RPC response for the "getLatestBlockhash" message
|
|
2618
2604
|
*/
|
|
@@ -4567,13 +4553,29 @@ export class Connection {
|
|
|
4567
4553
|
feeCalculator: FeeCalculator;
|
|
4568
4554
|
}>
|
|
4569
4555
|
> {
|
|
4570
|
-
const
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4556
|
+
const {
|
|
4557
|
+
context,
|
|
4558
|
+
value: {blockhash},
|
|
4559
|
+
} = await this.getLatestBlockhashAndContext(commitment);
|
|
4560
|
+
const feeCalculator = {
|
|
4561
|
+
get lamportsPerSignature(): number {
|
|
4562
|
+
throw new Error(
|
|
4563
|
+
'The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is ' +
|
|
4564
|
+
'no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee ' +
|
|
4565
|
+
'for a given message.',
|
|
4566
|
+
);
|
|
4567
|
+
},
|
|
4568
|
+
toJSON() {
|
|
4569
|
+
return {};
|
|
4570
|
+
},
|
|
4571
|
+
};
|
|
4572
|
+
return {
|
|
4573
|
+
context,
|
|
4574
|
+
value: {
|
|
4575
|
+
blockhash,
|
|
4576
|
+
feeCalculator,
|
|
4577
|
+
},
|
|
4578
|
+
};
|
|
4577
4579
|
}
|
|
4578
4580
|
|
|
4579
4581
|
/**
|