@solana/web3.js 1.95.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 +20 -2
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +20 -2
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +20 -2
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +7 -1
- package/lib/index.esm.js +20 -2
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +20 -2
- 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 +20 -2
- package/lib/index.native.js.map +1 -1
- package/package.json +3 -3
- package/src/connection.ts +42 -5
package/lib/index.browser.esm.js
CHANGED
|
@@ -3778,6 +3778,19 @@ function extractCommitmentFromConfig(commitmentOrConfig) {
|
|
|
3778
3778
|
};
|
|
3779
3779
|
}
|
|
3780
3780
|
|
|
3781
|
+
/**
|
|
3782
|
+
* @internal
|
|
3783
|
+
*/
|
|
3784
|
+
function applyDefaultMemcmpEncodingToFilters(filters) {
|
|
3785
|
+
return filters.map(filter => 'memcmp' in filter ? {
|
|
3786
|
+
...filter,
|
|
3787
|
+
memcmp: {
|
|
3788
|
+
...filter.memcmp,
|
|
3789
|
+
encoding: filter.memcmp.encoding ?? 'base58'
|
|
3790
|
+
}
|
|
3791
|
+
} : filter);
|
|
3792
|
+
}
|
|
3793
|
+
|
|
3781
3794
|
/**
|
|
3782
3795
|
* @internal
|
|
3783
3796
|
*/
|
|
@@ -5685,7 +5698,12 @@ class Connection {
|
|
|
5685
5698
|
encoding,
|
|
5686
5699
|
...configWithoutEncoding
|
|
5687
5700
|
} = config || {};
|
|
5688
|
-
const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64',
|
|
5701
|
+
const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64', {
|
|
5702
|
+
...configWithoutEncoding,
|
|
5703
|
+
...(configWithoutEncoding.filters ? {
|
|
5704
|
+
filters: applyDefaultMemcmpEncodingToFilters(configWithoutEncoding.filters)
|
|
5705
|
+
} : null)
|
|
5706
|
+
});
|
|
5689
5707
|
const unsafeRes = await this._rpcRequest('getProgramAccounts', args);
|
|
5690
5708
|
const baseSchema = array(KeyedAccountInfoResult);
|
|
5691
5709
|
const res = configWithoutEncoding.withContext === true ? create(unsafeRes, jsonRpcResultAndContext(baseSchema)) : create(unsafeRes, jsonRpcResult(baseSchema));
|
|
@@ -7834,7 +7852,7 @@ class Connection {
|
|
|
7834
7852
|
const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',
|
|
7835
7853
|
// Apply connection/server default.
|
|
7836
7854
|
'base64' /* encoding */, config ? config : maybeFilters ? {
|
|
7837
|
-
filters: maybeFilters
|
|
7855
|
+
filters: applyDefaultMemcmpEncodingToFilters(maybeFilters)
|
|
7838
7856
|
} : undefined /* extra */);
|
|
7839
7857
|
return this._makeSubscription({
|
|
7840
7858
|
callback,
|