@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/module.flow.js
CHANGED
|
@@ -2281,13 +2281,21 @@ account: AccountInfo<ParsedAccountData>,...
|
|
|
2281
2281
|
commitment?: Commitment
|
|
2282
2282
|
): Promise<AccountInfo<Buffer> | null>;
|
|
2283
2283
|
|
|
2284
|
+
/**
|
|
2285
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
2286
|
+
*/
|
|
2287
|
+
getMultipleAccountsInfoAndContext(
|
|
2288
|
+
publicKeys: PublicKey[],
|
|
2289
|
+
commitment?: Commitment
|
|
2290
|
+
): Promise<RpcResponseAndContext<(AccountInfo<Buffer> | null)[]>>;
|
|
2291
|
+
|
|
2284
2292
|
/**
|
|
2285
2293
|
* Fetch all the account info for multiple accounts specified by an array of public keys
|
|
2286
2294
|
*/
|
|
2287
2295
|
getMultipleAccountsInfo(
|
|
2288
2296
|
publicKeys: PublicKey[],
|
|
2289
|
-
|
|
2290
|
-
): Promise<(AccountInfo<Buffer
|
|
2297
|
+
commitment?: Commitment
|
|
2298
|
+
): Promise<(AccountInfo<Buffer> | null)[]>;
|
|
2291
2299
|
|
|
2292
2300
|
/**
|
|
2293
2301
|
* Returns epoch activation information for a stake account that has been delegated
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/web3.js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.1",
|
|
4
4
|
"description": "Solana Javascript API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"browser": {
|
|
23
|
-
"./lib/index.cjs.js": "./lib/index.browser.
|
|
23
|
+
"./lib/index.cjs.js": "./lib/index.browser.cjs.js",
|
|
24
24
|
"./lib/index.esm.js": "./lib/index.browser.esm.js"
|
|
25
25
|
},
|
|
26
26
|
"main": "lib/index.cjs.js",
|
package/src/connection.ts
CHANGED
|
@@ -2552,38 +2552,39 @@ export class Connection {
|
|
|
2552
2552
|
}
|
|
2553
2553
|
|
|
2554
2554
|
/**
|
|
2555
|
-
* Fetch all the account info for multiple accounts specified by an array of public keys
|
|
2555
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
2556
2556
|
*/
|
|
2557
|
-
async
|
|
2557
|
+
async getMultipleAccountsInfoAndContext(
|
|
2558
2558
|
publicKeys: PublicKey[],
|
|
2559
|
-
|
|
2560
|
-
): Promise<(AccountInfo<Buffer
|
|
2559
|
+
commitment?: Commitment,
|
|
2560
|
+
): Promise<RpcResponseAndContext<(AccountInfo<Buffer> | null)[]>> {
|
|
2561
2561
|
const keys = publicKeys.map(key => key.toBase58());
|
|
2562
|
-
|
|
2563
|
-
let commitment;
|
|
2564
|
-
let encoding: 'base64' | 'jsonParsed' = 'base64';
|
|
2565
|
-
if (configOrCommitment) {
|
|
2566
|
-
if (typeof configOrCommitment === 'string') {
|
|
2567
|
-
commitment = configOrCommitment;
|
|
2568
|
-
encoding = 'base64';
|
|
2569
|
-
} else {
|
|
2570
|
-
commitment = configOrCommitment.commitment;
|
|
2571
|
-
encoding = configOrCommitment.encoding || 'base64';
|
|
2572
|
-
}
|
|
2573
|
-
}
|
|
2574
|
-
|
|
2575
|
-
const args = this._buildArgs([keys], commitment, encoding);
|
|
2562
|
+
const args = this._buildArgs([keys], commitment, 'base64');
|
|
2576
2563
|
const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
|
|
2577
2564
|
const res = create(
|
|
2578
2565
|
unsafeRes,
|
|
2579
|
-
jsonRpcResultAndContext(array(nullable(
|
|
2566
|
+
jsonRpcResultAndContext(array(nullable(AccountInfoResult))),
|
|
2580
2567
|
);
|
|
2581
2568
|
if ('error' in res) {
|
|
2582
2569
|
throw new Error(
|
|
2583
2570
|
'failed to get info for accounts ' + keys + ': ' + res.error.message,
|
|
2584
2571
|
);
|
|
2585
2572
|
}
|
|
2586
|
-
return res.result
|
|
2573
|
+
return res.result;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
/**
|
|
2577
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys
|
|
2578
|
+
*/
|
|
2579
|
+
async getMultipleAccountsInfo(
|
|
2580
|
+
publicKeys: PublicKey[],
|
|
2581
|
+
commitment?: Commitment,
|
|
2582
|
+
): Promise<(AccountInfo<Buffer> | null)[]> {
|
|
2583
|
+
const res = await this.getMultipleAccountsInfoAndContext(
|
|
2584
|
+
publicKeys,
|
|
2585
|
+
commitment,
|
|
2586
|
+
);
|
|
2587
|
+
return res.value;
|
|
2587
2588
|
}
|
|
2588
2589
|
|
|
2589
2590
|
/**
|