@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/lib/index.esm.js
CHANGED
|
@@ -5724,18 +5724,6 @@ const GetParsedTransactionRpcResult = jsonRpcResult(nullable(type({
|
|
|
5724
5724
|
version: optional(TransactionVersionStruct)
|
|
5725
5725
|
})));
|
|
5726
5726
|
|
|
5727
|
-
/**
|
|
5728
|
-
* Expected JSON RPC response for the "getRecentBlockhash" message
|
|
5729
|
-
*
|
|
5730
|
-
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.
|
|
5731
|
-
*/
|
|
5732
|
-
const GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(type({
|
|
5733
|
-
blockhash: string(),
|
|
5734
|
-
feeCalculator: type({
|
|
5735
|
-
lamportsPerSignature: number()
|
|
5736
|
-
})
|
|
5737
|
-
}));
|
|
5738
|
-
|
|
5739
5727
|
/**
|
|
5740
5728
|
* Expected JSON RPC response for the "getLatestBlockhash" message
|
|
5741
5729
|
*/
|
|
@@ -7113,13 +7101,27 @@ class Connection {
|
|
|
7113
7101
|
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.
|
|
7114
7102
|
*/
|
|
7115
7103
|
async getRecentBlockhashAndContext(commitment) {
|
|
7116
|
-
const
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
}
|
|
7122
|
-
|
|
7104
|
+
const {
|
|
7105
|
+
context,
|
|
7106
|
+
value: {
|
|
7107
|
+
blockhash
|
|
7108
|
+
}
|
|
7109
|
+
} = await this.getLatestBlockhashAndContext(commitment);
|
|
7110
|
+
const feeCalculator = {
|
|
7111
|
+
get lamportsPerSignature() {
|
|
7112
|
+
throw new Error('The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is ' + 'no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee ' + 'for a given message.');
|
|
7113
|
+
},
|
|
7114
|
+
toJSON() {
|
|
7115
|
+
return {};
|
|
7116
|
+
}
|
|
7117
|
+
};
|
|
7118
|
+
return {
|
|
7119
|
+
context,
|
|
7120
|
+
value: {
|
|
7121
|
+
blockhash,
|
|
7122
|
+
feeCalculator
|
|
7123
|
+
}
|
|
7124
|
+
};
|
|
7123
7125
|
}
|
|
7124
7126
|
|
|
7125
7127
|
/**
|