@solana/web3.js 1.65.0 → 1.66.1
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 +24 -1
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +24 -1
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +24 -1
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +9 -0
- package/lib/index.esm.js +24 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +24 -1
- 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 +24 -1
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +28 -1
package/lib/index.native.js
CHANGED
|
@@ -5058,6 +5058,29 @@ class Connection {
|
|
|
5058
5058
|
*/
|
|
5059
5059
|
|
|
5060
5060
|
|
|
5061
|
+
async getMultipleParsedAccounts(publicKeys, rawConfig) {
|
|
5062
|
+
const {
|
|
5063
|
+
commitment,
|
|
5064
|
+
config
|
|
5065
|
+
} = extractCommitmentFromConfig(rawConfig);
|
|
5066
|
+
const keys = publicKeys.map(key => key.toBase58());
|
|
5067
|
+
|
|
5068
|
+
const args = this._buildArgs([keys], commitment, 'jsonParsed', config);
|
|
5069
|
+
|
|
5070
|
+
const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
|
|
5071
|
+
const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.array(superstruct.nullable(ParsedAccountInfoResult))));
|
|
5072
|
+
|
|
5073
|
+
if ('error' in res) {
|
|
5074
|
+
throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);
|
|
5075
|
+
}
|
|
5076
|
+
|
|
5077
|
+
return res.result;
|
|
5078
|
+
}
|
|
5079
|
+
/**
|
|
5080
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
5081
|
+
*/
|
|
5082
|
+
|
|
5083
|
+
|
|
5061
5084
|
async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {
|
|
5062
5085
|
const {
|
|
5063
5086
|
commitment,
|
|
@@ -6755,7 +6778,7 @@ class Connection {
|
|
|
6755
6778
|
|
|
6756
6779
|
_wsOnClose(code) {
|
|
6757
6780
|
this._rpcWebSocketConnected = false;
|
|
6758
|
-
this._rpcWebSocketGeneration
|
|
6781
|
+
this._rpcWebSocketGeneration = (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;
|
|
6759
6782
|
|
|
6760
6783
|
if (this._rpcWebSocketIdleTimeout) {
|
|
6761
6784
|
clearTimeout(this._rpcWebSocketIdleTimeout);
|