@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.browser.cjs.js
CHANGED
|
@@ -3804,6 +3804,19 @@ function extractCommitmentFromConfig(commitmentOrConfig) {
|
|
|
3804
3804
|
};
|
|
3805
3805
|
}
|
|
3806
3806
|
|
|
3807
|
+
/**
|
|
3808
|
+
* @internal
|
|
3809
|
+
*/
|
|
3810
|
+
function applyDefaultMemcmpEncodingToFilters(filters) {
|
|
3811
|
+
return filters.map(filter => 'memcmp' in filter ? {
|
|
3812
|
+
...filter,
|
|
3813
|
+
memcmp: {
|
|
3814
|
+
...filter.memcmp,
|
|
3815
|
+
encoding: filter.memcmp.encoding ?? 'base58'
|
|
3816
|
+
}
|
|
3817
|
+
} : filter);
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3807
3820
|
/**
|
|
3808
3821
|
* @internal
|
|
3809
3822
|
*/
|
|
@@ -5711,7 +5724,12 @@ class Connection {
|
|
|
5711
5724
|
encoding,
|
|
5712
5725
|
...configWithoutEncoding
|
|
5713
5726
|
} = config || {};
|
|
5714
|
-
const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64',
|
|
5727
|
+
const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64', {
|
|
5728
|
+
...configWithoutEncoding,
|
|
5729
|
+
...(configWithoutEncoding.filters ? {
|
|
5730
|
+
filters: applyDefaultMemcmpEncodingToFilters(configWithoutEncoding.filters)
|
|
5731
|
+
} : null)
|
|
5732
|
+
});
|
|
5715
5733
|
const unsafeRes = await this._rpcRequest('getProgramAccounts', args);
|
|
5716
5734
|
const baseSchema = superstruct.array(KeyedAccountInfoResult);
|
|
5717
5735
|
const res = configWithoutEncoding.withContext === true ? superstruct.create(unsafeRes, jsonRpcResultAndContext(baseSchema)) : superstruct.create(unsafeRes, jsonRpcResult(baseSchema));
|
|
@@ -7860,7 +7878,7 @@ class Connection {
|
|
|
7860
7878
|
const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',
|
|
7861
7879
|
// Apply connection/server default.
|
|
7862
7880
|
'base64' /* encoding */, config ? config : maybeFilters ? {
|
|
7863
|
-
filters: maybeFilters
|
|
7881
|
+
filters: applyDefaultMemcmpEncodingToFilters(maybeFilters)
|
|
7864
7882
|
} : undefined /* extra */);
|
|
7865
7883
|
return this._makeSubscription({
|
|
7866
7884
|
callback,
|
|
@@ -10211,6 +10229,7 @@ const InfoString = superstruct.type({
|
|
|
10211
10229
|
name: superstruct.string(),
|
|
10212
10230
|
website: superstruct.optional(superstruct.string()),
|
|
10213
10231
|
details: superstruct.optional(superstruct.string()),
|
|
10232
|
+
iconUrl: superstruct.optional(superstruct.string()),
|
|
10214
10233
|
keybaseUsername: superstruct.optional(superstruct.string())
|
|
10215
10234
|
});
|
|
10216
10235
|
|