@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.cjs.js
CHANGED
|
@@ -5754,18 +5754,6 @@ const GetParsedTransactionRpcResult = jsonRpcResult(superstruct.nullable(superst
|
|
|
5754
5754
|
version: superstruct.optional(TransactionVersionStruct)
|
|
5755
5755
|
})));
|
|
5756
5756
|
|
|
5757
|
-
/**
|
|
5758
|
-
* Expected JSON RPC response for the "getRecentBlockhash" message
|
|
5759
|
-
*
|
|
5760
|
-
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.
|
|
5761
|
-
*/
|
|
5762
|
-
const GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(superstruct.type({
|
|
5763
|
-
blockhash: superstruct.string(),
|
|
5764
|
-
feeCalculator: superstruct.type({
|
|
5765
|
-
lamportsPerSignature: superstruct.number()
|
|
5766
|
-
})
|
|
5767
|
-
}));
|
|
5768
|
-
|
|
5769
5757
|
/**
|
|
5770
5758
|
* Expected JSON RPC response for the "getLatestBlockhash" message
|
|
5771
5759
|
*/
|
|
@@ -7143,13 +7131,27 @@ class Connection {
|
|
|
7143
7131
|
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.
|
|
7144
7132
|
*/
|
|
7145
7133
|
async getRecentBlockhashAndContext(commitment) {
|
|
7146
|
-
const
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
}
|
|
7152
|
-
|
|
7134
|
+
const {
|
|
7135
|
+
context,
|
|
7136
|
+
value: {
|
|
7137
|
+
blockhash
|
|
7138
|
+
}
|
|
7139
|
+
} = await this.getLatestBlockhashAndContext(commitment);
|
|
7140
|
+
const feeCalculator = {
|
|
7141
|
+
get lamportsPerSignature() {
|
|
7142
|
+
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.');
|
|
7143
|
+
},
|
|
7144
|
+
toJSON() {
|
|
7145
|
+
return {};
|
|
7146
|
+
}
|
|
7147
|
+
};
|
|
7148
|
+
return {
|
|
7149
|
+
context,
|
|
7150
|
+
value: {
|
|
7151
|
+
blockhash,
|
|
7152
|
+
feeCalculator
|
|
7153
|
+
}
|
|
7154
|
+
};
|
|
7153
7155
|
}
|
|
7154
7156
|
|
|
7155
7157
|
/**
|