@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.
@@ -5028,6 +5028,29 @@ class Connection {
5028
5028
  */
5029
5029
 
5030
5030
 
5031
+ async getMultipleParsedAccounts(publicKeys, rawConfig) {
5032
+ const {
5033
+ commitment,
5034
+ config
5035
+ } = extractCommitmentFromConfig(rawConfig);
5036
+ const keys = publicKeys.map(key => key.toBase58());
5037
+
5038
+ const args = this._buildArgs([keys], commitment, 'jsonParsed', config);
5039
+
5040
+ const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
5041
+ const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))));
5042
+
5043
+ if ('error' in res) {
5044
+ throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);
5045
+ }
5046
+
5047
+ return res.result;
5048
+ }
5049
+ /**
5050
+ * Fetch all the account info for multiple accounts specified by an array of public keys, return with context
5051
+ */
5052
+
5053
+
5031
5054
  async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {
5032
5055
  const {
5033
5056
  commitment,
@@ -6725,7 +6748,7 @@ class Connection {
6725
6748
 
6726
6749
  _wsOnClose(code) {
6727
6750
  this._rpcWebSocketConnected = false;
6728
- this._rpcWebSocketGeneration++;
6751
+ this._rpcWebSocketGeneration = (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;
6729
6752
 
6730
6753
  if (this._rpcWebSocketIdleTimeout) {
6731
6754
  clearTimeout(this._rpcWebSocketIdleTimeout);