@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.
@@ -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', configWithoutEncoding);
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,
@@ -10185,6 +10203,7 @@ const InfoString = type({
10185
10203
  name: string(),
10186
10204
  website: optional(string()),
10187
10205
  details: optional(string()),
10206
+ iconUrl: optional(string()),
10188
10207
  keybaseUsername: optional(string())
10189
10208
  });
10190
10209