@solana/web3.js 1.35.1 → 1.36.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.iife.js CHANGED
@@ -21000,35 +21000,32 @@ var solanaWeb3 = (function (exports) {
21000
21000
  }
21001
21001
  }
21002
21002
  /**
21003
- * Fetch all the account info for multiple accounts specified by an array of public keys
21003
+ * Fetch all the account info for multiple accounts specified by an array of public keys, return with context
21004
21004
  */
21005
21005
 
21006
21006
 
21007
- async getMultipleAccountsInfo(publicKeys, configOrCommitment) {
21007
+ async getMultipleAccountsInfoAndContext(publicKeys, commitment) {
21008
21008
  const keys = publicKeys.map(key => key.toBase58());
21009
- let commitment;
21010
- let encoding = 'base64';
21011
21009
 
21012
- if (configOrCommitment) {
21013
- if (typeof configOrCommitment === 'string') {
21014
- commitment = configOrCommitment;
21015
- encoding = 'base64';
21016
- } else {
21017
- commitment = configOrCommitment.commitment;
21018
- encoding = configOrCommitment.encoding || 'base64';
21019
- }
21020
- }
21021
-
21022
- const args = this._buildArgs([keys], commitment, encoding);
21010
+ const args = this._buildArgs([keys], commitment, 'base64');
21023
21011
 
21024
21012
  const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
21025
- const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))));
21013
+ const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(AccountInfoResult))));
21026
21014
 
21027
21015
  if ('error' in res) {
21028
21016
  throw new Error('failed to get info for accounts ' + keys + ': ' + res.error.message);
21029
21017
  }
21030
21018
 
21031
- return res.result.value;
21019
+ return res.result;
21020
+ }
21021
+ /**
21022
+ * Fetch all the account info for multiple accounts specified by an array of public keys
21023
+ */
21024
+
21025
+
21026
+ async getMultipleAccountsInfo(publicKeys, commitment) {
21027
+ const res = await this.getMultipleAccountsInfoAndContext(publicKeys, commitment);
21028
+ return res.value;
21032
21029
  }
21033
21030
  /**
21034
21031
  * Returns epoch activation information for a stake account that has been delegated