@solana/web3.js 1.21.1 → 1.22.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.iife.js CHANGED
@@ -18826,6 +18826,25 @@ var solanaWeb3 = (function (exports) {
18826
18826
  throw new Error('failed to get info about account ' + publicKey.toBase58() + ': ' + e);
18827
18827
  }
18828
18828
  }
18829
+ /**
18830
+ * Fetch all the account info for multiple accounts specified by an array of public keys
18831
+ */
18832
+
18833
+
18834
+ async getMultipleAccountsInfo(publicKeys, commitment) {
18835
+ const keys = publicKeys.map(key => key.toBase58());
18836
+
18837
+ const args = this._buildArgs([keys], commitment, 'base64');
18838
+
18839
+ const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
18840
+ const res = create(unsafeRes, jsonRpcResultAndContext(nullable(array(AccountInfoResult))));
18841
+
18842
+ if ('error' in res) {
18843
+ throw new Error('failed to get info for accounts ' + keys + ': ' + res.error.message);
18844
+ }
18845
+
18846
+ return res.result.value;
18847
+ }
18829
18848
  /**
18830
18849
  * Returns epoch activation information for a stake account that has been delegated
18831
18850
  */