@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.cjs.js
CHANGED
|
@@ -199,7 +199,8 @@ class PublicKey extends Struct {
|
|
|
199
199
|
return new PublicKey(key.toBuffer());
|
|
200
200
|
}
|
|
201
201
|
/**
|
|
202
|
-
* Default public key value. (
|
|
202
|
+
* Default public key value. The base58-encoded string representation is all ones (as seen below)
|
|
203
|
+
* The underlying BN number is 32 bytes that are all zeros
|
|
203
204
|
*/
|
|
204
205
|
|
|
205
206
|
|
|
@@ -5123,6 +5124,29 @@ class Connection {
|
|
|
5123
5124
|
*/
|
|
5124
5125
|
|
|
5125
5126
|
|
|
5127
|
+
async getMultipleParsedAccounts(publicKeys, rawConfig) {
|
|
5128
|
+
const {
|
|
5129
|
+
commitment,
|
|
5130
|
+
config
|
|
5131
|
+
} = extractCommitmentFromConfig(rawConfig);
|
|
5132
|
+
const keys = publicKeys.map(key => key.toBase58());
|
|
5133
|
+
|
|
5134
|
+
const args = this._buildArgs([keys], commitment, 'jsonParsed', config);
|
|
5135
|
+
|
|
5136
|
+
const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
|
|
5137
|
+
const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.array(superstruct.nullable(ParsedAccountInfoResult))));
|
|
5138
|
+
|
|
5139
|
+
if ('error' in res) {
|
|
5140
|
+
throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);
|
|
5141
|
+
}
|
|
5142
|
+
|
|
5143
|
+
return res.result;
|
|
5144
|
+
}
|
|
5145
|
+
/**
|
|
5146
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
5147
|
+
*/
|
|
5148
|
+
|
|
5149
|
+
|
|
5126
5150
|
async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {
|
|
5127
5151
|
const {
|
|
5128
5152
|
commitment,
|