@ensnode/ensnode-sdk 0.0.0-next-20260601084304 → 0.0.0-next-20260601140021

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/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ENSNamespaceId, DatasourceName } from '@ensnode/datasources';
2
2
  export { ENSNamespaceId, ENSNamespaceIds, getENSRootChainId } from '@ensnode/datasources';
3
- import { E as EnsRainbowPublicConfig, a as EnsIndexerPublicConfig, b as EnsIndexerVersionInfo, T as TheGraphFallback, U as Unvalidated, B as BlockNumber, c as BlockRef, L as LabelSetId, d as LabelSetVersion, e as EnsRainbowClientLabelSet, f as EnsRainbowServerLabelSet, P as PluginName, m as makeErrorResponseSchema, R as RegistrarAction, S as SerializedRegistrarAction, D as Datetime, g as PriceDai, h as PriceEnsTokens, i as PriceEth, j as PriceUsdc, k as Price, l as SerializedPrice, n as SerializedPriceDai, o as SerializedPriceEnsTokens, p as SerializedPriceEth, q as SerializedPriceUsdc } from './namespace-specific-value-CPvcFpGI.cjs';
4
- export { C as CurrencyAmount, r as CurrencyId, s as CurrencyIds, t as CurrencyInfo, u as DeepPartial, v as ENCODED_REFERRER_BYTE_LENGTH, w as ENCODED_REFERRER_BYTE_OFFSET, x as ENSIndexerPublicConfig, y as ENSIndexerVersionInfo, z as EXPECTED_ENCODED_REFERRER_PADDING, A as EncodedReferrer, F as EnsRainbowVersionInfo, N as NamespaceSpecificValue, G as RegistrarActionEventId, H as RegistrarActionPricing, I as RegistrarActionPricingAvailable, J as RegistrarActionPricingUnknown, K as RegistrarActionReferral, M as RegistrarActionReferralAvailable, O as RegistrarActionReferralNotApplicable, Q as RegistrarActionType, V as RegistrarActionTypes, W as RegistrationLifecycle, X as RegistrationLifecycleStage, Y as RequiredAndNotNull, Z as RequiredAndNull, _ as RpcUrl, $ as SerializedCurrencyAmount, a0 as SerializedRegistrarActionPricing, a1 as SerializedRegistrarActionPricingAvailable, a2 as SerializedRegistrarActionPricingUnknown, a3 as Subregistry, a4 as TheGraphCannotFallbackReason, a5 as TheGraphCannotFallbackReasonSchema, a6 as TheGraphFallbackSchema, a7 as ZERO_ENCODED_REFERRER, a8 as addPrices, a9 as buildEncodedReferrer, aa as decodeEncodedReferrer, ab as getCurrencyInfo, ac as getNamespaceSpecificValue, ad as interpretAddress, ae as interpretAddressRecordValue, af as interpretContenthashValue, ag as interpretDnszonehashValue, ah as interpretNameRecordValue, ai as interpretPubkeyValue, aj as interpretTextRecordKey, ak as interpretTextRecordValue, al as isPriceCurrencyEqual, am as isPriceEqual, an as isRegistrarActionPricingAvailable, ao as isRegistrarActionReferralAvailable, ap as makeENSApiPublicConfigSchema, aq as makeEnsApiPublicConfigSchema, ar as makeSerializedEnsApiPublicConfigSchema, as as maxPrice, at as minPrice, au as parseDai, av as parseEnsTokens, aw as parseEth, ax as parseUsdc, ay as priceDai, az as priceEnsTokens, aA as priceEth, aB as priceUsdc, aC as scalePrice, aD as serializeRegistrarAction, aE as serializeRegistrarActionPricing, aF as subtractPrice } from './namespace-specific-value-CPvcFpGI.cjs';
3
+ import { E as EnsRainbowPublicConfig, a as EnsIndexerPublicConfig, b as EnsIndexerVersionInfo, T as TheGraphFallback, U as Unvalidated, B as BlockNumber, c as BlockRef, L as LabelSetId, d as LabelSetVersion, e as EnsRainbowClientLabelSet, f as EnsRainbowServerLabelSet, P as PluginName, m as makeErrorResponseSchema, R as RegistrarAction, S as SerializedRegistrarAction, D as Datetime, g as PriceDai, h as PriceEnsTokens, i as PriceEth, j as PriceUsdc, k as Price, l as SerializedPrice, n as SerializedPriceDai, o as SerializedPriceEnsTokens, p as SerializedPriceEth, q as SerializedPriceUsdc } from './namespace-specific-value-BGuLucNQ.cjs';
4
+ export { C as CurrencyAmount, r as CurrencyId, s as CurrencyIds, t as CurrencyInfo, u as DeepPartial, v as ENCODED_REFERRER_BYTE_LENGTH, w as ENCODED_REFERRER_BYTE_OFFSET, x as ENSIndexerPublicConfig, y as ENSIndexerVersionInfo, z as EXPECTED_ENCODED_REFERRER_PADDING, A as EncodedReferrer, F as EnsRainbowVersionInfo, N as NamespaceSpecificValue, G as RegistrarActionEventId, H as RegistrarActionPricing, I as RegistrarActionPricingAvailable, J as RegistrarActionPricingUnknown, K as RegistrarActionReferral, M as RegistrarActionReferralAvailable, O as RegistrarActionReferralNotApplicable, Q as RegistrarActionType, V as RegistrarActionTypes, W as RegistrationLifecycle, X as RegistrationLifecycleStage, Y as RequiredAndNotNull, Z as RequiredAndNull, _ as RpcUrl, $ as SerializedCurrencyAmount, a0 as SerializedRegistrarActionPricing, a1 as SerializedRegistrarActionPricingAvailable, a2 as SerializedRegistrarActionPricingUnknown, a3 as Subregistry, a4 as TheGraphCannotFallbackReason, a5 as TheGraphCannotFallbackReasonSchema, a6 as TheGraphFallbackSchema, a7 as ZERO_ENCODED_REFERRER, a8 as addPrices, a9 as buildEncodedReferrer, aa as decodeEncodedReferrer, ab as getCurrencyInfo, ac as getNamespaceSpecificValue, ad as interpretAddress, ae as interpretAddressRecordValue, af as interpretContenthashValue, ag as interpretDnszonehashValue, ah as interpretNameRecordValue, ai as interpretPubkeyValue, aj as interpretTextRecordKey, ak as interpretTextRecordValue, al as isPriceCurrencyEqual, am as isPriceEqual, an as isRegistrarActionPricingAvailable, ao as isRegistrarActionReferralAvailable, ap as makeENSApiPublicConfigSchema, aq as makeEnsApiPublicConfigSchema, ar as makeSerializedEnsApiPublicConfigSchema, as as maxPrice, at as minPrice, au as parseDai, av as parseEnsTokens, aw as parseEth, ax as parseUsdc, ay as priceDai, az as priceEnsTokens, aA as priceEth, aB as priceUsdc, aC as scalePrice, aD as serializeRegistrarAction, aE as serializeRegistrarActionPricing, aF as subtractPrice } from './namespace-specific-value-BGuLucNQ.cjs';
5
5
  import * as enssdk from 'enssdk';
6
6
  import { ChainId, UnixTimestamp, Duration, ChainIdString, LabelHash, Node, Name, AssetId, Hex, AccountId, TokenId, AssetNamespace, Address, AssetIdString, InterpretedName, DefaultableChainId, CoinType, ContentType, InterfaceId, RecordVersion, UrlString, RegistryId, DatetimeISO8601 } from 'enssdk';
7
7
  import { ByteArray } from 'viem';
@@ -2523,11 +2523,10 @@ type ResolverRecordsResponseBase = {
2523
2523
  * Address records, keyed by CoinType.
2524
2524
  * Value is null if no record for the specified CoinType is set.
2525
2525
  *
2526
- * NOTE: ENS resolver address records can store arbitrary string values,
2527
- * including non-EVM addresses always validate the record value against
2528
- * the format your application expects.
2526
+ * Values are the "raw" resolved address record as hex. May be a hex value representing 0 or more bytes.
2527
+ * There is no guarantee that an EVM coinType returns an address value of any particular byte length.
2529
2528
  */
2530
- addresses: Record<CoinType, string | null>;
2529
+ addresses: Record<CoinType, Hex | null>;
2531
2530
  /**
2532
2531
  * Text records, keyed by key.
2533
2532
  * Value is null if no record for the specified key is set.
@@ -2585,13 +2584,13 @@ type ResolverRecordsResponseBase = {
2585
2584
  * // results in the following type
2586
2585
  * type Response = {
2587
2586
  * readonly name: Name | null;
2588
- * readonly addresses: Record<"60", string | null>;
2587
+ * readonly addresses: Record<"60", Hex | null>;
2589
2588
  * readonly texts: Record<"avatar" | "com.twitter", string | null>;
2590
2589
  * }
2591
2590
  * ```
2592
2591
  */
2593
2592
  type ResolverRecordsResponse<T extends ResolverRecordsSelection = ResolverRecordsSelection> = {
2594
- [K in keyof T as T[K] extends true | readonly any[] | bigint ? K : never]: K extends "addresses" ? Record<`${T["addresses"] extends readonly CoinType[] ? T["addresses"][number] : never}`, string | null> : K extends "texts" ? Record<T["texts"] extends readonly string[] ? T["texts"][number] : never, string | null> : K extends "interfaces" ? Record<T["interfaces"] extends readonly InterfaceId[] ? T["interfaces"][number] : never, Address | null> : ResolverRecordsResponseBase[K & keyof ResolverRecordsResponseBase];
2593
+ [K in keyof T as T[K] extends true | readonly any[] | bigint ? K : never]: K extends "addresses" ? Record<`${T["addresses"] extends readonly CoinType[] ? T["addresses"][number] : never}`, Hex | null> : K extends "texts" ? Record<T["texts"] extends readonly string[] ? T["texts"][number] : never, string | null> : K extends "interfaces" ? Record<T["interfaces"] extends readonly InterfaceId[] ? T["interfaces"][number] : never, Address | null> : ResolverRecordsResponseBase[K & keyof ResolverRecordsResponseBase];
2595
2594
  };
2596
2595
 
2597
2596
  /**
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ENSNamespaceId, DatasourceName } from '@ensnode/datasources';
2
2
  export { ENSNamespaceId, ENSNamespaceIds, getENSRootChainId } from '@ensnode/datasources';
3
- import { E as EnsRainbowPublicConfig, a as EnsIndexerPublicConfig, b as EnsIndexerVersionInfo, T as TheGraphFallback, U as Unvalidated, B as BlockNumber, c as BlockRef, L as LabelSetId, d as LabelSetVersion, e as EnsRainbowClientLabelSet, f as EnsRainbowServerLabelSet, P as PluginName, m as makeErrorResponseSchema, R as RegistrarAction, S as SerializedRegistrarAction, D as Datetime, g as PriceDai, h as PriceEnsTokens, i as PriceEth, j as PriceUsdc, k as Price, l as SerializedPrice, n as SerializedPriceDai, o as SerializedPriceEnsTokens, p as SerializedPriceEth, q as SerializedPriceUsdc } from './namespace-specific-value-CPvcFpGI.js';
4
- export { C as CurrencyAmount, r as CurrencyId, s as CurrencyIds, t as CurrencyInfo, u as DeepPartial, v as ENCODED_REFERRER_BYTE_LENGTH, w as ENCODED_REFERRER_BYTE_OFFSET, x as ENSIndexerPublicConfig, y as ENSIndexerVersionInfo, z as EXPECTED_ENCODED_REFERRER_PADDING, A as EncodedReferrer, F as EnsRainbowVersionInfo, N as NamespaceSpecificValue, G as RegistrarActionEventId, H as RegistrarActionPricing, I as RegistrarActionPricingAvailable, J as RegistrarActionPricingUnknown, K as RegistrarActionReferral, M as RegistrarActionReferralAvailable, O as RegistrarActionReferralNotApplicable, Q as RegistrarActionType, V as RegistrarActionTypes, W as RegistrationLifecycle, X as RegistrationLifecycleStage, Y as RequiredAndNotNull, Z as RequiredAndNull, _ as RpcUrl, $ as SerializedCurrencyAmount, a0 as SerializedRegistrarActionPricing, a1 as SerializedRegistrarActionPricingAvailable, a2 as SerializedRegistrarActionPricingUnknown, a3 as Subregistry, a4 as TheGraphCannotFallbackReason, a5 as TheGraphCannotFallbackReasonSchema, a6 as TheGraphFallbackSchema, a7 as ZERO_ENCODED_REFERRER, a8 as addPrices, a9 as buildEncodedReferrer, aa as decodeEncodedReferrer, ab as getCurrencyInfo, ac as getNamespaceSpecificValue, ad as interpretAddress, ae as interpretAddressRecordValue, af as interpretContenthashValue, ag as interpretDnszonehashValue, ah as interpretNameRecordValue, ai as interpretPubkeyValue, aj as interpretTextRecordKey, ak as interpretTextRecordValue, al as isPriceCurrencyEqual, am as isPriceEqual, an as isRegistrarActionPricingAvailable, ao as isRegistrarActionReferralAvailable, ap as makeENSApiPublicConfigSchema, aq as makeEnsApiPublicConfigSchema, ar as makeSerializedEnsApiPublicConfigSchema, as as maxPrice, at as minPrice, au as parseDai, av as parseEnsTokens, aw as parseEth, ax as parseUsdc, ay as priceDai, az as priceEnsTokens, aA as priceEth, aB as priceUsdc, aC as scalePrice, aD as serializeRegistrarAction, aE as serializeRegistrarActionPricing, aF as subtractPrice } from './namespace-specific-value-CPvcFpGI.js';
3
+ import { E as EnsRainbowPublicConfig, a as EnsIndexerPublicConfig, b as EnsIndexerVersionInfo, T as TheGraphFallback, U as Unvalidated, B as BlockNumber, c as BlockRef, L as LabelSetId, d as LabelSetVersion, e as EnsRainbowClientLabelSet, f as EnsRainbowServerLabelSet, P as PluginName, m as makeErrorResponseSchema, R as RegistrarAction, S as SerializedRegistrarAction, D as Datetime, g as PriceDai, h as PriceEnsTokens, i as PriceEth, j as PriceUsdc, k as Price, l as SerializedPrice, n as SerializedPriceDai, o as SerializedPriceEnsTokens, p as SerializedPriceEth, q as SerializedPriceUsdc } from './namespace-specific-value-BGuLucNQ.js';
4
+ export { C as CurrencyAmount, r as CurrencyId, s as CurrencyIds, t as CurrencyInfo, u as DeepPartial, v as ENCODED_REFERRER_BYTE_LENGTH, w as ENCODED_REFERRER_BYTE_OFFSET, x as ENSIndexerPublicConfig, y as ENSIndexerVersionInfo, z as EXPECTED_ENCODED_REFERRER_PADDING, A as EncodedReferrer, F as EnsRainbowVersionInfo, N as NamespaceSpecificValue, G as RegistrarActionEventId, H as RegistrarActionPricing, I as RegistrarActionPricingAvailable, J as RegistrarActionPricingUnknown, K as RegistrarActionReferral, M as RegistrarActionReferralAvailable, O as RegistrarActionReferralNotApplicable, Q as RegistrarActionType, V as RegistrarActionTypes, W as RegistrationLifecycle, X as RegistrationLifecycleStage, Y as RequiredAndNotNull, Z as RequiredAndNull, _ as RpcUrl, $ as SerializedCurrencyAmount, a0 as SerializedRegistrarActionPricing, a1 as SerializedRegistrarActionPricingAvailable, a2 as SerializedRegistrarActionPricingUnknown, a3 as Subregistry, a4 as TheGraphCannotFallbackReason, a5 as TheGraphCannotFallbackReasonSchema, a6 as TheGraphFallbackSchema, a7 as ZERO_ENCODED_REFERRER, a8 as addPrices, a9 as buildEncodedReferrer, aa as decodeEncodedReferrer, ab as getCurrencyInfo, ac as getNamespaceSpecificValue, ad as interpretAddress, ae as interpretAddressRecordValue, af as interpretContenthashValue, ag as interpretDnszonehashValue, ah as interpretNameRecordValue, ai as interpretPubkeyValue, aj as interpretTextRecordKey, ak as interpretTextRecordValue, al as isPriceCurrencyEqual, am as isPriceEqual, an as isRegistrarActionPricingAvailable, ao as isRegistrarActionReferralAvailable, ap as makeENSApiPublicConfigSchema, aq as makeEnsApiPublicConfigSchema, ar as makeSerializedEnsApiPublicConfigSchema, as as maxPrice, at as minPrice, au as parseDai, av as parseEnsTokens, aw as parseEth, ax as parseUsdc, ay as priceDai, az as priceEnsTokens, aA as priceEth, aB as priceUsdc, aC as scalePrice, aD as serializeRegistrarAction, aE as serializeRegistrarActionPricing, aF as subtractPrice } from './namespace-specific-value-BGuLucNQ.js';
5
5
  import * as enssdk from 'enssdk';
6
6
  import { ChainId, UnixTimestamp, Duration, ChainIdString, LabelHash, Node, Name, AssetId, Hex, AccountId, TokenId, AssetNamespace, Address, AssetIdString, InterpretedName, DefaultableChainId, CoinType, ContentType, InterfaceId, RecordVersion, UrlString, RegistryId, DatetimeISO8601 } from 'enssdk';
7
7
  import { ByteArray } from 'viem';
@@ -2523,11 +2523,10 @@ type ResolverRecordsResponseBase = {
2523
2523
  * Address records, keyed by CoinType.
2524
2524
  * Value is null if no record for the specified CoinType is set.
2525
2525
  *
2526
- * NOTE: ENS resolver address records can store arbitrary string values,
2527
- * including non-EVM addresses always validate the record value against
2528
- * the format your application expects.
2526
+ * Values are the "raw" resolved address record as hex. May be a hex value representing 0 or more bytes.
2527
+ * There is no guarantee that an EVM coinType returns an address value of any particular byte length.
2529
2528
  */
2530
- addresses: Record<CoinType, string | null>;
2529
+ addresses: Record<CoinType, Hex | null>;
2531
2530
  /**
2532
2531
  * Text records, keyed by key.
2533
2532
  * Value is null if no record for the specified key is set.
@@ -2585,13 +2584,13 @@ type ResolverRecordsResponseBase = {
2585
2584
  * // results in the following type
2586
2585
  * type Response = {
2587
2586
  * readonly name: Name | null;
2588
- * readonly addresses: Record<"60", string | null>;
2587
+ * readonly addresses: Record<"60", Hex | null>;
2589
2588
  * readonly texts: Record<"avatar" | "com.twitter", string | null>;
2590
2589
  * }
2591
2590
  * ```
2592
2591
  */
2593
2592
  type ResolverRecordsResponse<T extends ResolverRecordsSelection = ResolverRecordsSelection> = {
2594
- [K in keyof T as T[K] extends true | readonly any[] | bigint ? K : never]: K extends "addresses" ? Record<`${T["addresses"] extends readonly CoinType[] ? T["addresses"][number] : never}`, string | null> : K extends "texts" ? Record<T["texts"] extends readonly string[] ? T["texts"][number] : never, string | null> : K extends "interfaces" ? Record<T["interfaces"] extends readonly InterfaceId[] ? T["interfaces"][number] : never, Address | null> : ResolverRecordsResponseBase[K & keyof ResolverRecordsResponseBase];
2593
+ [K in keyof T as T[K] extends true | readonly any[] | bigint ? K : never]: K extends "addresses" ? Record<`${T["addresses"] extends readonly CoinType[] ? T["addresses"][number] : never}`, Hex | null> : K extends "texts" ? Record<T["texts"] extends readonly string[] ? T["texts"][number] : never, string | null> : K extends "interfaces" ? Record<T["interfaces"] extends readonly InterfaceId[] ? T["interfaces"][number] : never, Address | null> : ResolverRecordsResponseBase[K & keyof ResolverRecordsResponseBase];
2595
2594
  };
2596
2595
 
2597
2596
  /**
package/dist/index.js CHANGED
@@ -4579,8 +4579,8 @@ import { isAddressEqual as isAddressEqual4, zeroAddress as zeroAddress5 } from "
4579
4579
  var interpretAddress = (owner) => isAddressEqual4(zeroAddress5, owner) ? null : owner;
4580
4580
 
4581
4581
  // src/shared/interpretation/interpret-record-values.ts
4582
- import { isInterpretedName, toNormalizedAddress as toNormalizedAddress3 } from "enssdk";
4583
- import { isAddress as isAddress2, isAddressEqual as isAddressEqual5, zeroAddress as zeroAddress6 } from "viem";
4582
+ import { isInterpretedName } from "enssdk";
4583
+ import { isAddress as isAddress2, isAddressEqual as isAddressEqual5, isHex as isHex2, zeroAddress as zeroAddress6 } from "viem";
4584
4584
 
4585
4585
  // src/shared/null-bytes.ts
4586
4586
  var hasNullByte = (value) => value.indexOf("\0") !== -1;
@@ -4596,9 +4596,10 @@ function interpretAddressRecordValue(value) {
4596
4596
  if (hasNullByte(value)) return null;
4597
4597
  if (value === "") return null;
4598
4598
  if (value === "0x") return null;
4599
- if (!isAddress2(value, { strict: false })) return value;
4600
- if (isAddressEqual5(value, zeroAddress6)) return null;
4601
- return toNormalizedAddress3(value);
4599
+ if (!isHex2(value)) return null;
4600
+ const hex = value.toLowerCase();
4601
+ if (isAddress2(hex, { strict: false }) && isAddressEqual5(hex, zeroAddress6)) return null;
4602
+ return hex;
4602
4603
  }
4603
4604
  function interpretTextRecordKey(key) {
4604
4605
  if (hasNullByte(key)) return null;