@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.cjs.js
CHANGED
|
@@ -5124,6 +5124,29 @@ class Connection {
|
|
|
5124
5124
|
*/
|
|
5125
5125
|
|
|
5126
5126
|
|
|
5127
|
+
async getMultipleParsedAccounts(publicKeys, rawConfig) {
|
|
5128
|
+
const {
|
|
5129
|
+
commitment,
|
|
5130
|
+
config
|
|
5131
|
+
} = extractCommitmentFromConfig(rawConfig);
|
|
5132
|
+
const keys = publicKeys.map(key => key.toBase58());
|
|
5133
|
+
|
|
5134
|
+
const args = this._buildArgs([keys], commitment, 'jsonParsed', config);
|
|
5135
|
+
|
|
5136
|
+
const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
|
|
5137
|
+
const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.array(superstruct.nullable(ParsedAccountInfoResult))));
|
|
5138
|
+
|
|
5139
|
+
if ('error' in res) {
|
|
5140
|
+
throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);
|
|
5141
|
+
}
|
|
5142
|
+
|
|
5143
|
+
return res.result;
|
|
5144
|
+
}
|
|
5145
|
+
/**
|
|
5146
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
5147
|
+
*/
|
|
5148
|
+
|
|
5149
|
+
|
|
5127
5150
|
async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {
|
|
5128
5151
|
const {
|
|
5129
5152
|
commitment,
|
|
@@ -6821,7 +6844,7 @@ class Connection {
|
|
|
6821
6844
|
|
|
6822
6845
|
_wsOnClose(code) {
|
|
6823
6846
|
this._rpcWebSocketConnected = false;
|
|
6824
|
-
this._rpcWebSocketGeneration
|
|
6847
|
+
this._rpcWebSocketGeneration = (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;
|
|
6825
6848
|
|
|
6826
6849
|
if (this._rpcWebSocketIdleTimeout) {
|
|
6827
6850
|
clearTimeout(this._rpcWebSocketIdleTimeout);
|