@solana/web3.js 1.65.0 → 1.66.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.cjs.js +24 -1
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +24 -1
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +24 -1
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +9 -0
- package/lib/index.esm.js +24 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +24 -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 +24 -1
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +28 -1
package/lib/index.iife.js
CHANGED
|
@@ -18681,6 +18681,29 @@ var solanaWeb3 = (function (exports) {
|
|
|
18681
18681
|
*/
|
|
18682
18682
|
|
|
18683
18683
|
|
|
18684
|
+
async getMultipleParsedAccounts(publicKeys, rawConfig) {
|
|
18685
|
+
const {
|
|
18686
|
+
commitment,
|
|
18687
|
+
config
|
|
18688
|
+
} = extractCommitmentFromConfig(rawConfig);
|
|
18689
|
+
const keys = publicKeys.map(key => key.toBase58());
|
|
18690
|
+
|
|
18691
|
+
const args = this._buildArgs([keys], commitment, 'jsonParsed', config);
|
|
18692
|
+
|
|
18693
|
+
const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
|
|
18694
|
+
const res = create(unsafeRes, jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))));
|
|
18695
|
+
|
|
18696
|
+
if ('error' in res) {
|
|
18697
|
+
throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);
|
|
18698
|
+
}
|
|
18699
|
+
|
|
18700
|
+
return res.result;
|
|
18701
|
+
}
|
|
18702
|
+
/**
|
|
18703
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
18704
|
+
*/
|
|
18705
|
+
|
|
18706
|
+
|
|
18684
18707
|
async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {
|
|
18685
18708
|
const {
|
|
18686
18709
|
commitment,
|
|
@@ -20378,7 +20401,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20378
20401
|
|
|
20379
20402
|
_wsOnClose(code) {
|
|
20380
20403
|
this._rpcWebSocketConnected = false;
|
|
20381
|
-
this._rpcWebSocketGeneration
|
|
20404
|
+
this._rpcWebSocketGeneration = (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;
|
|
20382
20405
|
|
|
20383
20406
|
if (this._rpcWebSocketIdleTimeout) {
|
|
20384
20407
|
clearTimeout(this._rpcWebSocketIdleTimeout);
|