@solana/web3.js 1.94.0 → 1.95.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 +21 -2
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +21 -2
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +21 -2
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +9 -1
- package/lib/index.esm.js +21 -2
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +142 -151
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +7 -7
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +21 -2
- package/lib/index.native.js.map +1 -1
- package/package.json +5 -5
- package/src/connection.ts +42 -5
- package/src/validator-info.ts +3 -0
package/lib/index.cjs.js
CHANGED
|
@@ -4478,6 +4478,19 @@ function extractCommitmentFromConfig(commitmentOrConfig) {
|
|
|
4478
4478
|
};
|
|
4479
4479
|
}
|
|
4480
4480
|
|
|
4481
|
+
/**
|
|
4482
|
+
* @internal
|
|
4483
|
+
*/
|
|
4484
|
+
function applyDefaultMemcmpEncodingToFilters(filters) {
|
|
4485
|
+
return filters.map(filter => 'memcmp' in filter ? {
|
|
4486
|
+
...filter,
|
|
4487
|
+
memcmp: {
|
|
4488
|
+
...filter.memcmp,
|
|
4489
|
+
encoding: filter.memcmp.encoding ?? 'base58'
|
|
4490
|
+
}
|
|
4491
|
+
} : filter);
|
|
4492
|
+
}
|
|
4493
|
+
|
|
4481
4494
|
/**
|
|
4482
4495
|
* @internal
|
|
4483
4496
|
*/
|
|
@@ -6408,7 +6421,12 @@ class Connection {
|
|
|
6408
6421
|
encoding,
|
|
6409
6422
|
...configWithoutEncoding
|
|
6410
6423
|
} = config || {};
|
|
6411
|
-
const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64',
|
|
6424
|
+
const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64', {
|
|
6425
|
+
...configWithoutEncoding,
|
|
6426
|
+
...(configWithoutEncoding.filters ? {
|
|
6427
|
+
filters: applyDefaultMemcmpEncodingToFilters(configWithoutEncoding.filters)
|
|
6428
|
+
} : null)
|
|
6429
|
+
});
|
|
6412
6430
|
const unsafeRes = await this._rpcRequest('getProgramAccounts', args);
|
|
6413
6431
|
const baseSchema = superstruct.array(KeyedAccountInfoResult);
|
|
6414
6432
|
const res = configWithoutEncoding.withContext === true ? superstruct.create(unsafeRes, jsonRpcResultAndContext(baseSchema)) : superstruct.create(unsafeRes, jsonRpcResult(baseSchema));
|
|
@@ -8557,7 +8575,7 @@ class Connection {
|
|
|
8557
8575
|
const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',
|
|
8558
8576
|
// Apply connection/server default.
|
|
8559
8577
|
'base64' /* encoding */, config ? config : maybeFilters ? {
|
|
8560
|
-
filters: maybeFilters
|
|
8578
|
+
filters: applyDefaultMemcmpEncodingToFilters(maybeFilters)
|
|
8561
8579
|
} : undefined /* extra */);
|
|
8562
8580
|
return this._makeSubscription({
|
|
8563
8581
|
callback,
|
|
@@ -10908,6 +10926,7 @@ const InfoString = superstruct.type({
|
|
|
10908
10926
|
name: superstruct.string(),
|
|
10909
10927
|
website: superstruct.optional(superstruct.string()),
|
|
10910
10928
|
details: superstruct.optional(superstruct.string()),
|
|
10929
|
+
iconUrl: superstruct.optional(superstruct.string()),
|
|
10911
10930
|
keybaseUsername: superstruct.optional(superstruct.string())
|
|
10912
10931
|
});
|
|
10913
10932
|
|