@solana/web3.js 1.65.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/web3.js",
3
- "version": "1.65.0",
3
+ "version": "1.66.0",
4
4
  "description": "Solana Javascript API",
5
5
  "keywords": [
6
6
  "api",
package/src/connection.ts CHANGED
@@ -3170,6 +3170,32 @@ export class Connection {
3170
3170
  }
3171
3171
  }
3172
3172
 
3173
+ /**
3174
+ * Fetch all the account info for multiple accounts specified by an array of public keys, return with context
3175
+ */
3176
+ async getMultipleParsedAccounts(
3177
+ publicKeys: PublicKey[],
3178
+ rawConfig?: GetMultipleAccountsConfig,
3179
+ ): Promise<
3180
+ RpcResponseAndContext<(AccountInfo<Buffer | ParsedAccountData> | null)[]>
3181
+ > {
3182
+ const {commitment, config} = extractCommitmentFromConfig(rawConfig);
3183
+ const keys = publicKeys.map(key => key.toBase58());
3184
+ const args = this._buildArgs([keys], commitment, 'jsonParsed', config);
3185
+ const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
3186
+ const res = create(
3187
+ unsafeRes,
3188
+ jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),
3189
+ );
3190
+ if ('error' in res) {
3191
+ throw new SolanaJSONRPCError(
3192
+ res.error,
3193
+ `failed to get info for accounts ${keys}`,
3194
+ );
3195
+ }
3196
+ return res.result;
3197
+ }
3198
+
3173
3199
  /**
3174
3200
  * Fetch all the account info for multiple accounts specified by an array of public keys, return with context
3175
3201
  */