@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.browser.esm.js
CHANGED
|
@@ -6002,35 +6002,32 @@ class Connection {
|
|
|
6002
6002
|
}
|
|
6003
6003
|
}
|
|
6004
6004
|
/**
|
|
6005
|
-
* Fetch all the account info for multiple accounts specified by an array of public keys
|
|
6005
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
6006
6006
|
*/
|
|
6007
6007
|
|
|
6008
6008
|
|
|
6009
|
-
async
|
|
6009
|
+
async getMultipleAccountsInfoAndContext(publicKeys, commitment) {
|
|
6010
6010
|
const keys = publicKeys.map(key => key.toBase58());
|
|
6011
|
-
let commitment;
|
|
6012
|
-
let encoding = 'base64';
|
|
6013
6011
|
|
|
6014
|
-
|
|
6015
|
-
if (typeof configOrCommitment === 'string') {
|
|
6016
|
-
commitment = configOrCommitment;
|
|
6017
|
-
encoding = 'base64';
|
|
6018
|
-
} else {
|
|
6019
|
-
commitment = configOrCommitment.commitment;
|
|
6020
|
-
encoding = configOrCommitment.encoding || 'base64';
|
|
6021
|
-
}
|
|
6022
|
-
}
|
|
6023
|
-
|
|
6024
|
-
const args = this._buildArgs([keys], commitment, encoding);
|
|
6012
|
+
const args = this._buildArgs([keys], commitment, 'base64');
|
|
6025
6013
|
|
|
6026
6014
|
const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
|
|
6027
|
-
const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(
|
|
6015
|
+
const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(AccountInfoResult))));
|
|
6028
6016
|
|
|
6029
6017
|
if ('error' in res) {
|
|
6030
6018
|
throw new Error('failed to get info for accounts ' + keys + ': ' + res.error.message);
|
|
6031
6019
|
}
|
|
6032
6020
|
|
|
6033
|
-
return res.result
|
|
6021
|
+
return res.result;
|
|
6022
|
+
}
|
|
6023
|
+
/**
|
|
6024
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys
|
|
6025
|
+
*/
|
|
6026
|
+
|
|
6027
|
+
|
|
6028
|
+
async getMultipleAccountsInfo(publicKeys, commitment) {
|
|
6029
|
+
const res = await this.getMultipleAccountsInfoAndContext(publicKeys, commitment);
|
|
6030
|
+
return res.value;
|
|
6034
6031
|
}
|
|
6035
6032
|
/**
|
|
6036
6033
|
* Returns epoch activation information for a stake account that has been delegated
|