@solana/web3.js 1.35.2 → 1.36.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.esm.js +14 -17
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +14 -17
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +9 -2
- package/lib/index.esm.js +14 -17
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +14 -17
- 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/module.flow.js +10 -2
- package/package.json +2 -2
- package/src/connection.ts +21 -20
package/lib/index.iife.js
CHANGED
|
@@ -21029,35 +21029,32 @@ var solanaWeb3 = (function (exports) {
|
|
|
21029
21029
|
}
|
|
21030
21030
|
}
|
|
21031
21031
|
/**
|
|
21032
|
-
* Fetch all the account info for multiple accounts specified by an array of public keys
|
|
21032
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
21033
21033
|
*/
|
|
21034
21034
|
|
|
21035
21035
|
|
|
21036
|
-
async
|
|
21036
|
+
async getMultipleAccountsInfoAndContext(publicKeys, commitment) {
|
|
21037
21037
|
const keys = publicKeys.map(key => key.toBase58());
|
|
21038
|
-
let commitment;
|
|
21039
|
-
let encoding = 'base64';
|
|
21040
21038
|
|
|
21041
|
-
|
|
21042
|
-
if (typeof configOrCommitment === 'string') {
|
|
21043
|
-
commitment = configOrCommitment;
|
|
21044
|
-
encoding = 'base64';
|
|
21045
|
-
} else {
|
|
21046
|
-
commitment = configOrCommitment.commitment;
|
|
21047
|
-
encoding = configOrCommitment.encoding || 'base64';
|
|
21048
|
-
}
|
|
21049
|
-
}
|
|
21050
|
-
|
|
21051
|
-
const args = this._buildArgs([keys], commitment, encoding);
|
|
21039
|
+
const args = this._buildArgs([keys], commitment, 'base64');
|
|
21052
21040
|
|
|
21053
21041
|
const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
|
|
21054
|
-
const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(
|
|
21042
|
+
const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(AccountInfoResult))));
|
|
21055
21043
|
|
|
21056
21044
|
if ('error' in res) {
|
|
21057
21045
|
throw new Error('failed to get info for accounts ' + keys + ': ' + res.error.message);
|
|
21058
21046
|
}
|
|
21059
21047
|
|
|
21060
|
-
return res.result
|
|
21048
|
+
return res.result;
|
|
21049
|
+
}
|
|
21050
|
+
/**
|
|
21051
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys
|
|
21052
|
+
*/
|
|
21053
|
+
|
|
21054
|
+
|
|
21055
|
+
async getMultipleAccountsInfo(publicKeys, commitment) {
|
|
21056
|
+
const res = await this.getMultipleAccountsInfoAndContext(publicKeys, commitment);
|
|
21057
|
+
return res.value;
|
|
21061
21058
|
}
|
|
21062
21059
|
/**
|
|
21063
21060
|
* Returns epoch activation information for a stake account that has been delegated
|