@solana/web3.js 1.64.0 → 1.66.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.cjs.js +25 -1
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +25 -1
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +25 -1
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +15 -1
- package/lib/index.esm.js +25 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +25 -1
- 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/lib/index.native.js +25 -1
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +30 -0
- package/src/publickey.ts +2 -1
package/lib/index.browser.esm.js
CHANGED
|
@@ -163,7 +163,8 @@ class PublicKey extends Struct {
|
|
|
163
163
|
return new PublicKey(key.toBuffer());
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
|
-
* Default public key value. (
|
|
166
|
+
* Default public key value. The base58-encoded string representation is all ones (as seen below)
|
|
167
|
+
* The underlying BN number is 32 bytes that are all zeros
|
|
167
168
|
*/
|
|
168
169
|
|
|
169
170
|
|
|
@@ -5027,6 +5028,29 @@ class Connection {
|
|
|
5027
5028
|
*/
|
|
5028
5029
|
|
|
5029
5030
|
|
|
5031
|
+
async getMultipleParsedAccounts(publicKeys, rawConfig) {
|
|
5032
|
+
const {
|
|
5033
|
+
commitment,
|
|
5034
|
+
config
|
|
5035
|
+
} = extractCommitmentFromConfig(rawConfig);
|
|
5036
|
+
const keys = publicKeys.map(key => key.toBase58());
|
|
5037
|
+
|
|
5038
|
+
const args = this._buildArgs([keys], commitment, 'jsonParsed', config);
|
|
5039
|
+
|
|
5040
|
+
const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
|
|
5041
|
+
const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))));
|
|
5042
|
+
|
|
5043
|
+
if ('error' in res) {
|
|
5044
|
+
throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);
|
|
5045
|
+
}
|
|
5046
|
+
|
|
5047
|
+
return res.result;
|
|
5048
|
+
}
|
|
5049
|
+
/**
|
|
5050
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
5051
|
+
*/
|
|
5052
|
+
|
|
5053
|
+
|
|
5030
5054
|
async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {
|
|
5031
5055
|
const {
|
|
5032
5056
|
commitment,
|