@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.native.js
CHANGED
|
@@ -193,7 +193,8 @@ class PublicKey extends Struct {
|
|
|
193
193
|
return new PublicKey(key.toBuffer());
|
|
194
194
|
}
|
|
195
195
|
/**
|
|
196
|
-
* Default public key value. (
|
|
196
|
+
* Default public key value. The base58-encoded string representation is all ones (as seen below)
|
|
197
|
+
* The underlying BN number is 32 bytes that are all zeros
|
|
197
198
|
*/
|
|
198
199
|
|
|
199
200
|
|
|
@@ -5057,6 +5058,29 @@ class Connection {
|
|
|
5057
5058
|
*/
|
|
5058
5059
|
|
|
5059
5060
|
|
|
5061
|
+
async getMultipleParsedAccounts(publicKeys, rawConfig) {
|
|
5062
|
+
const {
|
|
5063
|
+
commitment,
|
|
5064
|
+
config
|
|
5065
|
+
} = extractCommitmentFromConfig(rawConfig);
|
|
5066
|
+
const keys = publicKeys.map(key => key.toBase58());
|
|
5067
|
+
|
|
5068
|
+
const args = this._buildArgs([keys], commitment, 'jsonParsed', config);
|
|
5069
|
+
|
|
5070
|
+
const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);
|
|
5071
|
+
const res = superstruct.create(unsafeRes, jsonRpcResultAndContext(superstruct.array(superstruct.nullable(ParsedAccountInfoResult))));
|
|
5072
|
+
|
|
5073
|
+
if ('error' in res) {
|
|
5074
|
+
throw new SolanaJSONRPCError(res.error, `failed to get info for accounts ${keys}`);
|
|
5075
|
+
}
|
|
5076
|
+
|
|
5077
|
+
return res.result;
|
|
5078
|
+
}
|
|
5079
|
+
/**
|
|
5080
|
+
* Fetch all the account info for multiple accounts specified by an array of public keys, return with context
|
|
5081
|
+
*/
|
|
5082
|
+
|
|
5083
|
+
|
|
5060
5084
|
async getMultipleAccountsInfoAndContext(publicKeys, commitmentOrConfig) {
|
|
5061
5085
|
const {
|
|
5062
5086
|
commitment,
|