@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.browser.esm.js
CHANGED
|
@@ -4979,18 +4979,6 @@ const GetParsedTransactionRpcResult = jsonRpcResult(nullable(type({
|
|
|
4979
4979
|
version: optional(TransactionVersionStruct)
|
|
4980
4980
|
})));
|
|
4981
4981
|
|
|
4982
|
-
/**
|
|
4983
|
-
* Expected JSON RPC response for the "getRecentBlockhash" message
|
|
4984
|
-
*
|
|
4985
|
-
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.
|
|
4986
|
-
*/
|
|
4987
|
-
const GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(type({
|
|
4988
|
-
blockhash: string(),
|
|
4989
|
-
feeCalculator: type({
|
|
4990
|
-
lamportsPerSignature: number()
|
|
4991
|
-
})
|
|
4992
|
-
}));
|
|
4993
|
-
|
|
4994
4982
|
/**
|
|
4995
4983
|
* Expected JSON RPC response for the "getLatestBlockhash" message
|
|
4996
4984
|
*/
|
|
@@ -6368,13 +6356,27 @@ class Connection {
|
|
|
6368
6356
|
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.
|
|
6369
6357
|
*/
|
|
6370
6358
|
async getRecentBlockhashAndContext(commitment) {
|
|
6371
|
-
const
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
}
|
|
6377
|
-
|
|
6359
|
+
const {
|
|
6360
|
+
context,
|
|
6361
|
+
value: {
|
|
6362
|
+
blockhash
|
|
6363
|
+
}
|
|
6364
|
+
} = await this.getLatestBlockhashAndContext(commitment);
|
|
6365
|
+
const feeCalculator = {
|
|
6366
|
+
get lamportsPerSignature() {
|
|
6367
|
+
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.');
|
|
6368
|
+
},
|
|
6369
|
+
toJSON() {
|
|
6370
|
+
return {};
|
|
6371
|
+
}
|
|
6372
|
+
};
|
|
6373
|
+
return {
|
|
6374
|
+
context,
|
|
6375
|
+
value: {
|
|
6376
|
+
blockhash,
|
|
6377
|
+
feeCalculator
|
|
6378
|
+
}
|
|
6379
|
+
};
|
|
6378
6380
|
}
|
|
6379
6381
|
|
|
6380
6382
|
/**
|