@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.native.js
CHANGED
|
@@ -5005,18 +5005,6 @@ const GetParsedTransactionRpcResult = jsonRpcResult(superstruct.nullable(superst
|
|
|
5005
5005
|
version: superstruct.optional(TransactionVersionStruct)
|
|
5006
5006
|
})));
|
|
5007
5007
|
|
|
5008
|
-
/**
|
|
5009
|
-
* Expected JSON RPC response for the "getRecentBlockhash" message
|
|
5010
|
-
*
|
|
5011
|
-
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.
|
|
5012
|
-
*/
|
|
5013
|
-
const GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(superstruct.type({
|
|
5014
|
-
blockhash: superstruct.string(),
|
|
5015
|
-
feeCalculator: superstruct.type({
|
|
5016
|
-
lamportsPerSignature: superstruct.number()
|
|
5017
|
-
})
|
|
5018
|
-
}));
|
|
5019
|
-
|
|
5020
5008
|
/**
|
|
5021
5009
|
* Expected JSON RPC response for the "getLatestBlockhash" message
|
|
5022
5010
|
*/
|
|
@@ -6394,13 +6382,27 @@ class Connection {
|
|
|
6394
6382
|
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.
|
|
6395
6383
|
*/
|
|
6396
6384
|
async getRecentBlockhashAndContext(commitment) {
|
|
6397
|
-
const
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
}
|
|
6403
|
-
|
|
6385
|
+
const {
|
|
6386
|
+
context,
|
|
6387
|
+
value: {
|
|
6388
|
+
blockhash
|
|
6389
|
+
}
|
|
6390
|
+
} = await this.getLatestBlockhashAndContext(commitment);
|
|
6391
|
+
const feeCalculator = {
|
|
6392
|
+
get lamportsPerSignature() {
|
|
6393
|
+
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.');
|
|
6394
|
+
},
|
|
6395
|
+
toJSON() {
|
|
6396
|
+
return {};
|
|
6397
|
+
}
|
|
6398
|
+
};
|
|
6399
|
+
return {
|
|
6400
|
+
context,
|
|
6401
|
+
value: {
|
|
6402
|
+
blockhash,
|
|
6403
|
+
feeCalculator
|
|
6404
|
+
}
|
|
6405
|
+
};
|
|
6404
6406
|
}
|
|
6405
6407
|
|
|
6406
6408
|
/**
|