@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.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.browser.esm.js
CHANGED
|
@@ -5973,35 +5973,32 @@ class Connection {
|
|
|
5973
5973
|
}
|
|
5974
5974
|
}
|
|
5975
5975
|
/**
|
|
5976
|
-
* Fetch all the account info for multiple accounts specified by an array of public keys
|
|
5976
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
5977
5977
|
*/
|
|
5978
5978
|
|
|
5979
5979
|
|
|
5980
|
-
async
|
|
5980
|
+
async getMultipleAccountsInfoAndContext(publicKeys, commitment) {
|
|
5981
5981
|
const keys = publicKeys.map(key => key.toBase58());
|
|
5982
|
-
let commitment;
|
|
5983
|
-
let encoding = 'base64';
|
|
5984
5982
|
|
|
5985
|
-
|
|
5986
|
-
if (typeof configOrCommitment === 'string') {
|
|
5987
|
-
commitment = configOrCommitment;
|
|
5988
|
-
encoding = 'base64';
|
|
5989
|
-
} else {
|
|
5990
|
-
commitment = configOrCommitment.commitment;
|
|
5991
|
-
encoding = configOrCommitment.encoding || 'base64';
|
|
5992
|
-
}
|
|
5993
|
-
}
|
|
5994
|
-
|
|
5995
|
-
const args = this._buildArgs([keys], commitment, encoding);
|
|
5983
|
+
const args = this._buildArgs([keys], commitment, 'base64');
|
|
5996
5984
|
|
|
5997
5985
|
const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
|
|
5998
|
-
const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(
|
|
5986
|
+
const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(AccountInfoResult))));
|
|
5999
5987
|
|
|
6000
5988
|
if ('error' in res) {
|
|
6001
5989
|
throw new Error('failed to get info for accounts ' + keys + ': ' + res.error.message);
|
|
6002
5990
|
}
|
|
6003
5991
|
|
|
6004
|
-
return res.result
|
|
5992
|
+
return res.result;
|
|
5993
|
+
}
|
|
5994
|
+
/**
|
|
5995
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys
|
|
5996
|
+
*/
|
|
5997
|
+
|
|
5998
|
+
|
|
5999
|
+
async getMultipleAccountsInfo(publicKeys, commitment) {
|
|
6000
|
+
const res = await this.getMultipleAccountsInfoAndContext(publicKeys, commitment);
|
|
6001
|
+
return res.value;
|
|
6005
6002
|
}
|
|
6006
6003
|
/**
|
|
6007
6004
|
* Returns epoch activation information for a stake account that has been delegated
|