@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.d.ts CHANGED
@@ -2860,9 +2860,15 @@ type MemcmpFilter = {
2860
2860
  memcmp: {
2861
2861
  /** offset into program account data to start comparison */
2862
2862
  offset: number;
2863
+ } & ({
2864
+ encoding?: 'base58';
2863
2865
  /** data to match, as base-58 encoded string and limited to less than 129 bytes */
2864
2866
  bytes: string;
2865
- };
2867
+ } | {
2868
+ encoding: 'base64';
2869
+ /** data to match, as base-64 encoded string */
2870
+ bytes: string;
2871
+ });
2866
2872
  };
2867
2873
  /**
2868
2874
  * Data size comparison filter for getProgramAccounts
@@ -3872,6 +3878,8 @@ type Info = {
3872
3878
  website?: string;
3873
3879
  /** optional, extra information the validator chose to share */
3874
3880
  details?: string;
3881
+ /** optional, validator logo URL */
3882
+ iconUrl?: string;
3875
3883
  /** optional, used to identify validators on keybase.io */
3876
3884
  keybaseUsername?: string;
3877
3885
  };
package/lib/index.esm.js CHANGED
@@ -4448,6 +4448,19 @@ function extractCommitmentFromConfig(commitmentOrConfig) {
4448
4448
  };
4449
4449
  }
4450
4450
 
4451
+ /**
4452
+ * @internal
4453
+ */
4454
+ function applyDefaultMemcmpEncodingToFilters(filters) {
4455
+ return filters.map(filter => 'memcmp' in filter ? {
4456
+ ...filter,
4457
+ memcmp: {
4458
+ ...filter.memcmp,
4459
+ encoding: filter.memcmp.encoding ?? 'base58'
4460
+ }
4461
+ } : filter);
4462
+ }
4463
+
4451
4464
  /**
4452
4465
  * @internal
4453
4466
  */
@@ -6378,7 +6391,12 @@ class Connection {
6378
6391
  encoding,
6379
6392
  ...configWithoutEncoding
6380
6393
  } = config || {};
6381
- const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64', configWithoutEncoding);
6394
+ const args = this._buildArgs([programId.toBase58()], commitment, encoding || 'base64', {
6395
+ ...configWithoutEncoding,
6396
+ ...(configWithoutEncoding.filters ? {
6397
+ filters: applyDefaultMemcmpEncodingToFilters(configWithoutEncoding.filters)
6398
+ } : null)
6399
+ });
6382
6400
  const unsafeRes = await this._rpcRequest('getProgramAccounts', args);
6383
6401
  const baseSchema = array(KeyedAccountInfoResult);
6384
6402
  const res = configWithoutEncoding.withContext === true ? create(unsafeRes, jsonRpcResultAndContext(baseSchema)) : create(unsafeRes, jsonRpcResult(baseSchema));
@@ -8527,7 +8545,7 @@ class Connection {
8527
8545
  const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',
8528
8546
  // Apply connection/server default.
8529
8547
  'base64' /* encoding */, config ? config : maybeFilters ? {
8530
- filters: maybeFilters
8548
+ filters: applyDefaultMemcmpEncodingToFilters(maybeFilters)
8531
8549
  } : undefined /* extra */);
8532
8550
  return this._makeSubscription({
8533
8551
  callback,
@@ -10878,6 +10896,7 @@ const InfoString = type({
10878
10896
  name: string(),
10879
10897
  website: optional(string()),
10880
10898
  details: optional(string()),
10899
+ iconUrl: optional(string()),
10881
10900
  keybaseUsername: optional(string())
10882
10901
  });
10883
10902