@ensnode/ensnode-sdk 0.0.0-next-20260107161855 → 0.0.0-preview-test-preview-release-20260106001812

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.cjs CHANGED
@@ -54,7 +54,6 @@ __export(index_exports, {
54
54
  LruCache: () => LruCache,
55
55
  NFTMintStatuses: () => NFTMintStatuses,
56
56
  NFTTransferTypes: () => NFTTransferTypes,
57
- NODE_ANY: () => NODE_ANY,
58
57
  NameTokenOwnershipTypes: () => NameTokenOwnershipTypes,
59
58
  NameTokensResponseCodes: () => NameTokensResponseCodes,
60
59
  NameTokensResponseErrorCodes: () => NameTokensResponseErrorCodes,
@@ -64,7 +63,6 @@ __export(index_exports, {
64
63
  RECORDS_PER_PAGE_DEFAULT: () => RECORDS_PER_PAGE_DEFAULT,
65
64
  RECORDS_PER_PAGE_MAX: () => RECORDS_PER_PAGE_MAX,
66
65
  ROOT_NODE: () => ROOT_NODE,
67
- ROOT_RESOURCE: () => ROOT_RESOURCE,
68
66
  ReferrerDetailResponseCodes: () => ReferrerDetailResponseCodes,
69
67
  ReferrerLeaderboardPageResponseCodes: () => ReferrerLeaderboardPageResponseCodes,
70
68
  RegistrarActionTypes: () => RegistrarActionTypes,
@@ -128,20 +126,15 @@ __export(index_exports, {
128
126
  deserializedNameTokensResponse: () => deserializedNameTokensResponse,
129
127
  durationBetween: () => durationBetween,
130
128
  encodeLabelHash: () => encodeLabelHash,
131
- encodedLabelToLabelhash: () => encodedLabelToLabelhash,
132
129
  evmChainIdToCoinType: () => evmChainIdToCoinType,
133
130
  formatAccountId: () => formatAccountId,
134
131
  formatAssetId: () => formatAssetId,
135
132
  formatNFTTransferEventMetadata: () => formatNFTTransferEventMetadata,
136
133
  getBasenamesSubregistryId: () => getBasenamesSubregistryId,
137
134
  getBasenamesSubregistryManagedName: () => getBasenamesSubregistryManagedName,
138
- getCanonicalId: () => getCanonicalId,
139
135
  getCurrencyInfo: () => getCurrencyInfo,
140
136
  getDatasourceContract: () => getDatasourceContract,
141
137
  getENSRootChainId: () => import_datasources2.getENSRootChainId,
142
- getENSv1Registry: () => getENSv1Registry,
143
- getENSv2RootRegistry: () => getENSv2RootRegistry,
144
- getENSv2RootRegistryId: () => getENSv2RootRegistryId,
145
138
  getEthnamesSubregistryId: () => getEthnamesSubregistryId,
146
139
  getEthnamesSubregistryManagedName: () => getEthnamesSubregistryManagedName,
147
140
  getLatestIndexedBlockRef: () => getLatestIndexedBlockRef,
@@ -158,33 +151,16 @@ __export(index_exports, {
158
151
  getTimestampForHighestOmnichainKnownBlock: () => getTimestampForHighestOmnichainKnownBlock,
159
152
  getTimestampForLowestOmnichainStartBlock: () => getTimestampForLowestOmnichainStartBlock,
160
153
  hasNullByte: () => hasNullByte,
161
- interpretAddress: () => interpretAddress,
162
- interpretAddressRecordValue: () => interpretAddressRecordValue,
163
- interpretNameRecordValue: () => interpretNameRecordValue,
164
- interpretTextRecordKey: () => interpretTextRecordKey,
165
- interpretTextRecordValue: () => interpretTextRecordValue,
166
- interpretTokenIdAsLabelHash: () => interpretTokenIdAsLabelHash,
167
- interpretTokenIdAsNode: () => interpretTokenIdAsNode,
168
154
  interpretedLabelsToInterpretedName: () => interpretedLabelsToInterpretedName,
169
- interpretedNameToInterpretedLabels: () => interpretedNameToInterpretedLabels,
170
- interpretedNameToLabelHashPath: () => interpretedNameToLabelHashPath,
171
- isENSv1Registry: () => isENSv1Registry,
172
- isENSv2RootRegistry: () => isENSv2RootRegistry,
173
155
  isEncodedLabelHash: () => isEncodedLabelHash,
174
156
  isHttpProtocol: () => isHttpProtocol,
175
- isInterpetedLabel: () => isInterpetedLabel,
176
- isInterpretedName: () => isInterpretedName,
177
157
  isLabelHash: () => isLabelHash,
178
158
  isNormalizedLabel: () => isNormalizedLabel,
179
159
  isNormalizedName: () => isNormalizedName,
180
- isPccFuseSet: () => isPccFuseSet,
181
160
  isPriceCurrencyEqual: () => isPriceCurrencyEqual,
182
161
  isPriceEqual: () => isPriceEqual,
183
162
  isRegistrarActionPricingAvailable: () => isRegistrarActionPricingAvailable,
184
163
  isRegistrarActionReferralAvailable: () => isRegistrarActionReferralAvailable,
185
- isRegistrationExpired: () => isRegistrationExpired,
186
- isRegistrationFullyExpired: () => isRegistrationFullyExpired,
187
- isRegistrationInGracePeriod: () => isRegistrationInGracePeriod,
188
164
  isResolvedIdentity: () => isResolvedIdentity,
189
165
  isSelectionEmpty: () => isSelectionEmpty,
190
166
  isSubgraphCompatible: () => isSubgraphCompatible,
@@ -194,20 +170,7 @@ __export(index_exports, {
194
170
  literalLabelToInterpretedLabel: () => literalLabelToInterpretedLabel,
195
171
  literalLabelsToInterpretedName: () => literalLabelsToInterpretedName,
196
172
  literalLabelsToLiteralName: () => literalLabelsToLiteralName,
197
- makeContractMatcher: () => makeContractMatcher,
198
173
  makeENSApiPublicConfigSchema: () => makeENSApiPublicConfigSchema,
199
- makeENSv1DomainId: () => makeENSv1DomainId,
200
- makeENSv2DomainId: () => makeENSv2DomainId,
201
- makeLatestRegistrationId: () => makeLatestRegistrationId,
202
- makeLatestRenewalId: () => makeLatestRenewalId,
203
- makePermissionsId: () => makePermissionsId,
204
- makePermissionsResourceId: () => makePermissionsResourceId,
205
- makePermissionsUserId: () => makePermissionsUserId,
206
- makeRegistrationId: () => makeRegistrationId,
207
- makeRegistryId: () => makeRegistryId,
208
- makeRenewalId: () => makeRenewalId,
209
- makeResolverId: () => makeResolverId,
210
- makeResolverRecordsId: () => makeResolverRecordsId,
211
174
  makeSubdomainNode: () => makeSubdomainNode,
212
175
  maybeGetDatasourceContract: () => maybeGetDatasourceContract,
213
176
  nameTokensPrerequisites: () => nameTokensPrerequisites,
@@ -262,7 +225,7 @@ var import_v46 = require("zod/v4");
262
225
  var import_v45 = require("zod/v4");
263
226
 
264
227
  // src/ensindexer/config/zod-schemas.ts
265
- var import_v43 = require("zod/v4");
228
+ var import_v43 = __toESM(require("zod/v4"), 1);
266
229
 
267
230
  // src/shared/account-id.ts
268
231
  var import_viem = require("viem");
@@ -334,7 +297,7 @@ var import_v42 = require("zod/v4");
334
297
  // src/shared/zod-schemas.ts
335
298
  var import_caip = require("caip");
336
299
  var import_viem8 = require("viem");
337
- var import_v4 = require("zod/v4");
300
+ var import_v4 = __toESM(require("zod/v4"), 1);
338
301
 
339
302
  // src/ens/index.ts
340
303
  var import_datasources2 = require("@ensnode/datasources");
@@ -366,8 +329,6 @@ var ETH_NODE = (0, import_viem2.namehash)("eth");
366
329
  var BASENAMES_NODE = (0, import_viem2.namehash)("base.eth");
367
330
  var LINEANAMES_NODE = (0, import_viem2.namehash)("linea.eth");
368
331
  var ADDR_REVERSE_NODE = (0, import_viem2.namehash)("addr.reverse");
369
- var NODE_ANY = import_viem2.zeroHash;
370
- var ROOT_RESOURCE = 0n;
371
332
 
372
333
  // src/ens/dns-encoded-name.ts
373
334
  var import_viem3 = require("viem");
@@ -416,10 +377,6 @@ function isEncodedLabelHash(maybeEncodedLabelHash) {
416
377
  return expectedFormatting && includesLabelHash;
417
378
  }
418
379
 
419
- // src/ens/fuses.ts
420
- var PARENT_CANNOT_CONTROL = 65536;
421
- var isPccFuseSet = (fuses) => (fuses & PARENT_CANNOT_CONTROL) === PARENT_CANNOT_CONTROL;
422
-
423
380
  // src/ens/is-normalized.ts
424
381
  var import_ens = require("viem/ens");
425
382
  function isNormalizedName(name) {
@@ -590,7 +547,7 @@ function addPrices(...prices) {
590
547
  );
591
548
  }
592
549
 
593
- // src/shared/interpretation/reinterpretation.ts
550
+ // src/shared/reinterpretation.ts
594
551
  var import_viem7 = require("viem");
595
552
  function reinterpretLabel(label) {
596
553
  if (label === "") {
@@ -611,14 +568,14 @@ function reinterpretName(name) {
611
568
  }
612
569
 
613
570
  // src/shared/zod-schemas.ts
614
- var makeFiniteNonNegativeNumberSchema = (valueLabel = "Value") => import_v4.z.number({
571
+ var makeFiniteNonNegativeNumberSchema = (valueLabel = "Value") => import_v4.default.number({
615
572
  // NOTE: Zod's implementation of `number` automatically rejects NaN and Infinity values.
616
573
  // and therefore the finite check is implicit.
617
574
  error: `${valueLabel} must be a finite number.`
618
575
  }).nonnegative({
619
576
  error: `${valueLabel} must be a non-negative number (>=0).`
620
577
  });
621
- var makeIntegerSchema = (valueLabel = "Value") => import_v4.z.int({
578
+ var makeIntegerSchema = (valueLabel = "Value") => import_v4.default.int({
622
579
  error: `${valueLabel} must be an integer.`
623
580
  });
624
581
  var makePositiveIntegerSchema = (valueLabel = "Value") => makeIntegerSchema(valueLabel).positive({
@@ -627,12 +584,12 @@ var makePositiveIntegerSchema = (valueLabel = "Value") => makeIntegerSchema(valu
627
584
  var makeNonNegativeIntegerSchema = (valueLabel = "Value") => makeIntegerSchema(valueLabel).nonnegative({
628
585
  error: `${valueLabel} must be a non-negative integer (>=0).`
629
586
  });
630
- var makeDurationSchema = (valueLabel = "Value") => import_v4.z.coerce.number({
587
+ var makeDurationSchema = (valueLabel = "Value") => import_v4.default.coerce.number({
631
588
  error: `${valueLabel} must be a number.`
632
589
  }).pipe(makeNonNegativeIntegerSchema(valueLabel));
633
590
  var makeChainIdSchema = (valueLabel = "Chain ID") => makePositiveIntegerSchema(valueLabel).transform((val) => val);
634
- var makeChainIdStringSchema = (valueLabel = "Chain ID String") => import_v4.z.string({ error: `${valueLabel} must be a string representing a chain ID.` }).pipe(import_v4.z.coerce.number({ error: `${valueLabel} must represent a positive integer (>0).` })).pipe(makeChainIdSchema(`The numeric value represented by ${valueLabel}`));
635
- var makeLowercaseAddressSchema = (valueLabel = "EVM address") => import_v4.z.string().check((ctx) => {
591
+ var makeChainIdStringSchema = (valueLabel = "Chain ID String") => import_v4.default.string({ error: `${valueLabel} must be a string representing a chain ID.` }).pipe(import_v4.default.coerce.number({ error: `${valueLabel} must represent a positive integer (>0).` })).pipe(makeChainIdSchema(`The numeric value represented by ${valueLabel}`));
592
+ var makeLowercaseAddressSchema = (valueLabel = "EVM address") => import_v4.default.string().check((ctx) => {
636
593
  if (!(0, import_viem8.isAddress)(ctx.value)) {
637
594
  ctx.issues.push({
638
595
  code: "custom",
@@ -641,14 +598,14 @@ var makeLowercaseAddressSchema = (valueLabel = "EVM address") => import_v4.z.str
641
598
  });
642
599
  }
643
600
  }).transform((val) => asLowerCaseAddress(val));
644
- var makeDatetimeSchema = (valueLabel = "Datetime string") => import_v4.z.iso.datetime({ error: `${valueLabel} must be a string in ISO 8601 format.` }).transform((v) => new Date(v));
601
+ var makeDatetimeSchema = (valueLabel = "Datetime string") => import_v4.default.iso.datetime({ error: `${valueLabel} must be a string in ISO 8601 format.` }).transform((v) => new Date(v));
645
602
  var makeUnixTimestampSchema = (valueLabel = "Timestamp") => makeIntegerSchema(valueLabel);
646
- var makeUrlSchema = (valueLabel = "Value") => import_v4.z.url({
603
+ var makeUrlSchema = (valueLabel = "Value") => import_v4.default.url({
647
604
  error: `${valueLabel} must be a valid URL string (e.g., http://localhost:8080 or https://example.com).`,
648
605
  abort: true
649
606
  }).transform((v) => new URL(v));
650
607
  var makeBlockNumberSchema = (valueLabel = "Block number") => makeNonNegativeIntegerSchema(valueLabel);
651
- var makeBlockrangeSchema = (valueLabel = "Value") => import_v4.z.strictObject(
608
+ var makeBlockrangeSchema = (valueLabel = "Value") => import_v4.default.strictObject(
652
609
  {
653
610
  startBlock: makeBlockNumberSchema(`${valueLabel}.startBlock`).optional(),
654
611
  endBlock: makeBlockNumberSchema(`${valueLabel}.endBlock`).optional()
@@ -665,7 +622,7 @@ var makeBlockrangeSchema = (valueLabel = "Value") => import_v4.z.strictObject(
665
622
  },
666
623
  { error: `${valueLabel}: startBlock must be before or equal to endBlock` }
667
624
  );
668
- var makeBlockRefSchema = (valueLabel = "Value") => import_v4.z.strictObject(
625
+ var makeBlockRefSchema = (valueLabel = "Value") => import_v4.default.strictObject(
669
626
  {
670
627
  timestamp: makeUnixTimestampSchema(`${valueLabel}.timestamp`),
671
628
  number: makeBlockNumberSchema(`${valueLabel}.number`)
@@ -674,35 +631,35 @@ var makeBlockRefSchema = (valueLabel = "Value") => import_v4.z.strictObject(
674
631
  error: `${valueLabel} must be a valid BlockRef object.`
675
632
  }
676
633
  );
677
- var makeENSNamespaceIdSchema = (valueLabel = "ENSNamespaceId") => import_v4.z.enum(import_datasources.ENSNamespaceIds, {
634
+ var makeENSNamespaceIdSchema = (valueLabel = "ENSNamespaceId") => import_v4.default.enum(import_datasources.ENSNamespaceIds, {
678
635
  error() {
679
636
  return `Invalid ${valueLabel}. Supported ENS namespace IDs are: ${Object.keys(import_datasources.ENSNamespaceIds).join(", ")}`;
680
637
  }
681
638
  });
682
- var makePriceAmountSchema = (valueLabel = "Amount") => import_v4.z.coerce.bigint({
639
+ var makePriceAmountSchema = (valueLabel = "Amount") => import_v4.default.coerce.bigint({
683
640
  error: `${valueLabel} must represent a bigint.`
684
641
  }).nonnegative({
685
642
  error: `${valueLabel} must not be negative.`
686
643
  });
687
- var makePriceCurrencySchema = (currency, valueLabel = "Price Currency") => import_v4.z.strictObject({
644
+ var makePriceCurrencySchema = (currency, valueLabel = "Price Currency") => import_v4.default.strictObject({
688
645
  amount: makePriceAmountSchema(`${valueLabel} amount`),
689
- currency: import_v4.z.literal(currency, {
646
+ currency: import_v4.default.literal(currency, {
690
647
  error: `${valueLabel} currency must be set to '${currency}'.`
691
648
  })
692
649
  });
693
650
  var makePriceEthSchema = (valueLabel = "Price ETH") => makePriceCurrencySchema(CurrencyIds.ETH, valueLabel).transform((v) => v);
694
- var makeAccountIdSchema = (valueLabel = "AccountId") => import_v4.z.strictObject({
651
+ var makeAccountIdSchema = (valueLabel = "AccountId") => import_v4.default.strictObject({
695
652
  chainId: makeChainIdSchema(`${valueLabel} chain ID`),
696
653
  address: makeLowercaseAddressSchema(`${valueLabel} address`)
697
654
  });
698
- var makeAccountIdStringSchema = (valueLabel = "Account ID String") => import_v4.z.coerce.string().transform((v) => {
655
+ var makeAccountIdStringSchema = (valueLabel = "Account ID String") => import_v4.default.coerce.string().transform((v) => {
699
656
  const result = new import_caip.AccountId(v);
700
657
  return {
701
658
  chainId: Number(result.chainId.reference),
702
659
  address: result.address
703
660
  };
704
661
  }).pipe(makeAccountIdSchema(valueLabel));
705
- var makeHexStringSchema = (options, valueLabel = "String representation of bytes array") => import_v4.z.string().check(function invariant_isHexEncoded(ctx) {
662
+ var makeHexStringSchema = (options, valueLabel = "String representation of bytes array") => import_v4.default.string().check(function invariant_isHexEncoded(ctx) {
706
663
  if (!(0, import_viem8.isHex)(ctx.value)) {
707
664
  ctx.issues.push({
708
665
  code: "custom",
@@ -723,7 +680,7 @@ var makeHexStringSchema = (options, valueLabel = "String representation of bytes
723
680
  });
724
681
  var makeNodeSchema = (valueLabel = "Node") => makeHexStringSchema({ bytesCount: 32 }, valueLabel);
725
682
  var makeTransactionHashSchema = (valueLabel = "Transaction hash") => makeHexStringSchema({ bytesCount: 32 }, valueLabel);
726
- var makeReinterpretedNameSchema = (valueLabel = "Reinterpreted Name") => import_v4.z.string().transform((v) => v).check((ctx) => {
683
+ var makeReinterpretedNameSchema = (valueLabel = "Reinterpreted Name") => import_v4.default.string().transform((v) => v).check((ctx) => {
727
684
  try {
728
685
  reinterpretName(ctx.value);
729
686
  } catch (error) {
@@ -986,60 +943,12 @@ var getDatasourceContract = (namespaceId, datasourceName, contractName) => {
986
943
  }
987
944
  return contract;
988
945
  };
989
- var makeContractMatcher = (namespace, b) => (datasourceName, contractName) => {
990
- const a = maybeGetDatasourceContract(namespace, datasourceName, contractName);
991
- return a && accountIdEqual(a, b);
992
- };
993
-
994
- // src/shared/interpretation/interpret-address.ts
995
- var import_viem9 = require("viem");
996
- var interpretAddress = (owner) => (0, import_viem9.isAddressEqual)(import_viem9.zeroAddress, owner) ? null : owner;
997
-
998
- // src/shared/interpretation/interpret-record-values.ts
999
- var import_viem10 = require("viem");
1000
-
1001
- // src/shared/null-bytes.ts
1002
- var hasNullByte = (value) => value.indexOf("\0") !== -1;
1003
- var stripNullBytes = (value) => value.replaceAll("\0", "");
1004
-
1005
- // src/shared/interpretation/interpret-record-values.ts
1006
- function interpretNameRecordValue(value) {
1007
- if (value === "") return null;
1008
- if (!isNormalizedName(value)) return null;
1009
- return value;
1010
- }
1011
- function interpretAddressRecordValue(value) {
1012
- if (hasNullByte(value)) return null;
1013
- if (value === "") return null;
1014
- if (value === "0x") return null;
1015
- if (!(0, import_viem10.isAddress)(value)) return value;
1016
- if ((0, import_viem10.isAddressEqual)(value, import_viem10.zeroAddress)) return null;
1017
- return asLowerCaseAddress(value);
1018
- }
1019
- function interpretTextRecordKey(key) {
1020
- if (hasNullByte(key)) return null;
1021
- if (key === "") return null;
1022
- return key;
1023
- }
1024
- function interpretTextRecordValue(value) {
1025
- if (hasNullByte(value)) return null;
1026
- if (value === "") return null;
1027
- return value;
1028
- }
1029
-
1030
- // src/shared/interpretation/interpret-tokenid.ts
1031
- var interpretTokenIdAsLabelHash = (tokenId) => uint256ToHex32(tokenId);
1032
- var interpretTokenIdAsNode = (tokenId) => uint256ToHex32(tokenId);
1033
-
1034
- // src/shared/interpretation/interpreted-names-and-labels.ts
1035
- var import_viem12 = require("viem");
1036
- var import_ens5 = require("viem/ens");
1037
946
 
1038
947
  // src/shared/labelhash.ts
1039
- var import_viem11 = require("viem");
1040
- var labelhashLiteralLabel = (label) => (0, import_viem11.keccak256)((0, import_viem11.stringToBytes)(label));
948
+ var import_viem9 = require("viem");
949
+ var labelhashLiteralLabel = (label) => (0, import_viem9.keccak256)((0, import_viem9.stringToBytes)(label));
1041
950
 
1042
- // src/shared/interpretation/interpreted-names-and-labels.ts
951
+ // src/shared/interpretation.ts
1043
952
  function literalLabelToInterpretedLabel(label) {
1044
953
  if (isNormalizedLabel(label)) return label;
1045
954
  return encodeLabelHash(labelhashLiteralLabel(label));
@@ -1053,39 +962,10 @@ function interpretedLabelsToInterpretedName(labels) {
1053
962
  function literalLabelsToLiteralName(labels) {
1054
963
  return labels.join(".");
1055
964
  }
1056
- function interpretedNameToInterpretedLabels(name) {
1057
- return name.split(".");
1058
- }
1059
- function encodedLabelToLabelhash(label) {
1060
- if (label.length !== 66) return null;
1061
- if (label.indexOf("[") !== 0) return null;
1062
- if (label.indexOf("]") !== 65) return null;
1063
- const hash = `0x${label.slice(1, 65)}`;
1064
- if (!(0, import_viem12.isHex)(hash)) return null;
1065
- return hash;
1066
- }
1067
- function isInterpetedLabel(label) {
1068
- if (label.startsWith("[")) {
1069
- const labelHash = encodedLabelToLabelhash(label);
1070
- if (labelHash === null) return false;
1071
- }
1072
- return isNormalizedLabel(label);
1073
- }
1074
- function isInterpretedName(name) {
1075
- return name.split(".").every(isInterpetedLabel);
1076
- }
1077
- function interpretedNameToLabelHashPath(name) {
1078
- return interpretedNameToInterpretedLabels(name).map((label) => {
1079
- if (!isInterpetedLabel(label)) {
1080
- throw new Error(
1081
- `Invariant(interpretedNameToLabelHashPath): Expected InterpretedLabel, received '${label}'.`
1082
- );
1083
- }
1084
- const maybeLabelHash = encodedLabelToLabelhash(label);
1085
- if (maybeLabelHash !== null) return maybeLabelHash;
1086
- return (0, import_ens5.labelhash)(label);
1087
- }).toReversed();
1088
- }
965
+
966
+ // src/shared/null-bytes.ts
967
+ var hasNullByte = (value) => value.indexOf("\0") !== -1;
968
+ var stripNullBytes = (value) => value.replaceAll("\0", "");
1089
969
 
1090
970
  // src/shared/numbers.ts
1091
971
  function bigIntToNumber(n) {
@@ -1102,14 +982,6 @@ function bigIntToNumber(n) {
1102
982
  return Number(n);
1103
983
  }
1104
984
 
1105
- // src/shared/root-registry.ts
1106
- var import_datasources4 = require("@ensnode/datasources");
1107
- var getENSv1Registry = (namespace) => getDatasourceContract(namespace, import_datasources4.DatasourceNames.ENSRoot, "ENSv1Registry");
1108
- var isENSv1Registry = (namespace, contract) => accountIdEqual(getENSv1Registry(namespace), contract);
1109
- var getENSv2RootRegistry = (namespace) => getDatasourceContract(namespace, import_datasources4.DatasourceNames.ENSRoot, "RootRegistry");
1110
- var getENSv2RootRegistryId = (namespace) => makeRegistryId(getENSv2RootRegistry(namespace));
1111
- var isENSv2RootRegistry = (namespace, contract) => accountIdEqual(getENSv2RootRegistry(namespace), contract);
1112
-
1113
985
  // src/shared/serialize.ts
1114
986
  var import_caip2 = require("caip");
1115
987
  function serializeChainId(chainId) {
@@ -1136,23 +1008,6 @@ function formatAccountId(accountId) {
1136
1008
  address: accountId.address
1137
1009
  }).toLowerCase();
1138
1010
  }
1139
- function formatAssetId({
1140
- assetNamespace,
1141
- contract: { chainId, address },
1142
- tokenId
1143
- }) {
1144
- return import_caip2.AssetId.format({
1145
- chainId: { namespace: "eip155", reference: chainId.toString() },
1146
- assetName: { namespace: assetNamespace, reference: address },
1147
- tokenId: uint256ToHex32(tokenId)
1148
- }).toLowerCase();
1149
- }
1150
-
1151
- // src/shared/types.ts
1152
- var AssetNamespaces = {
1153
- ERC721: "erc721",
1154
- ERC1155: "erc1155"
1155
- };
1156
1011
 
1157
1012
  // src/shared/url.ts
1158
1013
  function isHttpProtocol(url) {
@@ -1163,7 +1018,7 @@ function isWebSocketProtocol(url) {
1163
1018
  }
1164
1019
 
1165
1020
  // src/ensindexer/config/is-subgraph-compatible.ts
1166
- var import_datasources5 = require("@ensnode/datasources");
1021
+ var import_datasources4 = require("@ensnode/datasources");
1167
1022
 
1168
1023
  // src/ensindexer/config/types.ts
1169
1024
  var PluginName = /* @__PURE__ */ ((PluginName2) => {
@@ -1174,7 +1029,6 @@ var PluginName = /* @__PURE__ */ ((PluginName2) => {
1174
1029
  PluginName2["ProtocolAcceleration"] = "protocol-acceleration";
1175
1030
  PluginName2["Registrars"] = "registrars";
1176
1031
  PluginName2["TokenScope"] = "tokenscope";
1177
- PluginName2["ENSv2"] = "ensv2";
1178
1032
  return PluginName2;
1179
1033
  })(PluginName || {});
1180
1034
 
@@ -1183,7 +1037,7 @@ function isSubgraphCompatible(config) {
1183
1037
  const onlySubgraphPluginActivated = config.plugins.length === 1 && config.plugins[0] === "subgraph" /* Subgraph */;
1184
1038
  const isSubgraphLabelSet = config.labelSet.labelSetId === "subgraph" && config.labelSet.labelSetVersion === 0;
1185
1039
  const isEnsTestEnvLabelSet = config.labelSet.labelSetId === "ens-test-env" && config.labelSet.labelSetVersion === 0;
1186
- const labelSetIsSubgraphCompatible = isSubgraphLabelSet || config.namespace === import_datasources5.ENSNamespaceIds.EnsTestEnv && isEnsTestEnvLabelSet;
1040
+ const labelSetIsSubgraphCompatible = isSubgraphLabelSet || config.namespace === import_datasources4.ENSNamespaceIds.EnsTestEnv && isEnsTestEnvLabelSet;
1187
1041
  return onlySubgraphPluginActivated && labelSetIsSubgraphCompatible;
1188
1042
  }
1189
1043
 
@@ -1200,26 +1054,26 @@ function invariant_ensDbVersionIsSameAsEnsIndexerVersion(ctx) {
1200
1054
  }
1201
1055
 
1202
1056
  // src/ensindexer/config/zod-schemas.ts
1203
- var makeIndexedChainIdsSchema = (valueLabel = "Indexed Chain IDs") => import_v43.z.array(makeChainIdSchema(valueLabel), {
1057
+ var makeIndexedChainIdsSchema = (valueLabel = "Indexed Chain IDs") => import_v43.default.array(makeChainIdSchema(valueLabel), {
1204
1058
  error: `${valueLabel} must be an array.`
1205
1059
  }).min(1, { error: `${valueLabel} list must include at least one element.` }).transform((v) => new Set(v));
1206
- var makePluginsListSchema = (valueLabel = "Plugins") => import_v43.z.array(import_v43.z.string(), {
1060
+ var makePluginsListSchema = (valueLabel = "Plugins") => import_v43.default.array(import_v43.default.string(), {
1207
1061
  error: `${valueLabel} must be a list of strings.`
1208
1062
  }).min(1, {
1209
1063
  error: `${valueLabel} must be a list of strings with at least one string value`
1210
1064
  }).refine((arr) => arr.length === uniq(arr).length, {
1211
1065
  error: `${valueLabel} cannot contain duplicate values.`
1212
1066
  });
1213
- var makeDatabaseSchemaNameSchema = (valueLabel = "Database schema name") => import_v43.z.string({ error: `${valueLabel} must be a string` }).trim().nonempty({
1067
+ var makeDatabaseSchemaNameSchema = (valueLabel = "Database schema name") => import_v43.default.string({ error: `${valueLabel} must be a string` }).trim().nonempty({
1214
1068
  error: `${valueLabel} is required and must be a non-empty string.`
1215
1069
  });
1216
1070
  var makeLabelSetIdSchema = (valueLabel) => {
1217
- return import_v43.z.string({ error: `${valueLabel} must be a string` }).min(1, { error: `${valueLabel} must be 1-50 characters long` }).max(50, { error: `${valueLabel} must be 1-50 characters long` }).regex(/^[a-z-]+$/, {
1071
+ return import_v43.default.string({ error: `${valueLabel} must be a string` }).min(1, { error: `${valueLabel} must be 1-50 characters long` }).max(50, { error: `${valueLabel} must be 1-50 characters long` }).regex(/^[a-z-]+$/, {
1218
1072
  error: `${valueLabel} can only contain lowercase letters (a-z) and hyphens (-)`
1219
1073
  });
1220
1074
  };
1221
1075
  var makeLabelSetVersionSchema = (valueLabel) => {
1222
- return import_v43.z.coerce.number({ error: `${valueLabel} must be an integer.` }).pipe(makeNonNegativeIntegerSchema(valueLabel));
1076
+ return import_v43.default.coerce.number({ error: `${valueLabel} must be an integer.` }).pipe(makeNonNegativeIntegerSchema(valueLabel));
1223
1077
  };
1224
1078
  var makeFullyPinnedLabelSetSchema = (valueLabel = "Label set") => {
1225
1079
  let valueLabelLabelSetId = valueLabel;
@@ -1231,13 +1085,13 @@ var makeFullyPinnedLabelSetSchema = (valueLabel = "Label set") => {
1231
1085
  valueLabelLabelSetId = `${valueLabel}.labelSetId`;
1232
1086
  valueLabelLabelSetVersion = `${valueLabel}.labelSetVersion`;
1233
1087
  }
1234
- return import_v43.z.object({
1088
+ return import_v43.default.object({
1235
1089
  labelSetId: makeLabelSetIdSchema(valueLabelLabelSetId),
1236
1090
  labelSetVersion: makeLabelSetVersionSchema(valueLabelLabelSetVersion)
1237
1091
  });
1238
1092
  };
1239
- var makeNonEmptyStringSchema = (valueLabel = "Value") => import_v43.z.string().nonempty({ error: `${valueLabel} must be a non-empty string.` });
1240
- var makeENSIndexerVersionInfoSchema = (valueLabel = "Value") => import_v43.z.strictObject(
1093
+ var makeNonEmptyStringSchema = (valueLabel = "Value") => import_v43.default.string().nonempty({ error: `${valueLabel} must be a non-empty string.` });
1094
+ var makeENSIndexerVersionInfoSchema = (valueLabel = "Value") => import_v43.default.strictObject(
1241
1095
  {
1242
1096
  nodejs: makeNonEmptyStringSchema(),
1243
1097
  ponder: makeNonEmptyStringSchema(),
@@ -1261,10 +1115,10 @@ function invariant_isSubgraphCompatibleRequirements(ctx) {
1261
1115
  });
1262
1116
  }
1263
1117
  }
1264
- var makeENSIndexerPublicConfigSchema = (valueLabel = "ENSIndexerPublicConfig") => import_v43.z.object({
1118
+ var makeENSIndexerPublicConfigSchema = (valueLabel = "ENSIndexerPublicConfig") => import_v43.default.object({
1265
1119
  labelSet: makeFullyPinnedLabelSetSchema(`${valueLabel}.labelSet`),
1266
1120
  indexedChainIds: makeIndexedChainIdsSchema(`${valueLabel}.indexedChainIds`),
1267
- isSubgraphCompatible: import_v43.z.boolean({ error: `${valueLabel}.isSubgraphCompatible` }),
1121
+ isSubgraphCompatible: import_v43.default.boolean({ error: `${valueLabel}.isSubgraphCompatible` }),
1268
1122
  namespace: makeENSNamespaceIdSchema(`${valueLabel}.namespace`),
1269
1123
  plugins: makePluginsListSchema(`${valueLabel}.plugins`),
1270
1124
  databaseSchemaName: makeDatabaseSchemaNameSchema(`${valueLabel}.databaseSchemaName`),
@@ -1328,7 +1182,7 @@ ${(0, import_v47.prettifyError)(parsed.error)}
1328
1182
  }
1329
1183
 
1330
1184
  // src/ensindexer/config/label-utils.ts
1331
- var import_viem13 = require("viem");
1185
+ var import_viem10 = require("viem");
1332
1186
  function labelHashToBytes(labelHash) {
1333
1187
  try {
1334
1188
  if (labelHash.length !== 66) {
@@ -1340,7 +1194,7 @@ function labelHashToBytes(labelHash) {
1340
1194
  if (!labelHash.startsWith("0x")) {
1341
1195
  throw new Error("Labelhash must be 0x-prefixed");
1342
1196
  }
1343
- const bytes = (0, import_viem13.hexToBytes)(labelHash);
1197
+ const bytes = (0, import_viem10.hexToBytes)(labelHash);
1344
1198
  if (bytes.length !== 32) {
1345
1199
  throw new Error(`Invalid labelHash length ${bytes.length} bytes (expected 32)`);
1346
1200
  }
@@ -1436,7 +1290,7 @@ function serializeENSIndexerPublicConfig(config) {
1436
1290
  var import_v49 = require("zod/v4");
1437
1291
 
1438
1292
  // src/ensindexer/indexing-status/zod-schemas.ts
1439
- var import_v48 = require("zod/v4");
1293
+ var import_v48 = __toESM(require("zod/v4"), 1);
1440
1294
 
1441
1295
  // src/ensindexer/indexing-status/types.ts
1442
1296
  var ChainIndexingConfigTypeIds = {
@@ -1862,7 +1716,7 @@ function invariant_snapshotTimeIsTheHighestKnownBlockTimestamp(ctx) {
1862
1716
  ctx.issues.push({
1863
1717
  code: "custom",
1864
1718
  input: ctx.value,
1865
- message: `'snapshotTime' (${snapshotTime}) must be greater than or equal to the "highest known block timestamp" (${highestKnownBlockTimestamp})`
1719
+ message: `'snapshotTime' must be greater than or equal to the "highest known block timestamp" (${highestKnownBlockTimestamp})`
1866
1720
  });
1867
1721
  }
1868
1722
  }
@@ -1892,52 +1746,52 @@ function invariant_realtimeIndexingStatusProjectionWorstCaseDistanceIsCorrect(ct
1892
1746
  }
1893
1747
 
1894
1748
  // src/ensindexer/indexing-status/zod-schemas.ts
1895
- var makeChainIndexingConfigSchema = (valueLabel = "Value") => import_v48.z.discriminatedUnion("configType", [
1896
- import_v48.z.strictObject({
1897
- configType: import_v48.z.literal(ChainIndexingConfigTypeIds.Indefinite),
1749
+ var makeChainIndexingConfigSchema = (valueLabel = "Value") => import_v48.default.discriminatedUnion("configType", [
1750
+ import_v48.default.strictObject({
1751
+ configType: import_v48.default.literal(ChainIndexingConfigTypeIds.Indefinite),
1898
1752
  startBlock: makeBlockRefSchema(valueLabel)
1899
1753
  }),
1900
- import_v48.z.strictObject({
1901
- configType: import_v48.z.literal(ChainIndexingConfigTypeIds.Definite),
1754
+ import_v48.default.strictObject({
1755
+ configType: import_v48.default.literal(ChainIndexingConfigTypeIds.Definite),
1902
1756
  startBlock: makeBlockRefSchema(valueLabel),
1903
1757
  endBlock: makeBlockRefSchema(valueLabel)
1904
1758
  })
1905
1759
  ]);
1906
- var makeChainIndexingStatusSnapshotQueuedSchema = (valueLabel = "Value") => import_v48.z.strictObject({
1907
- chainStatus: import_v48.z.literal(ChainIndexingStatusIds.Queued),
1760
+ var makeChainIndexingStatusSnapshotQueuedSchema = (valueLabel = "Value") => import_v48.default.strictObject({
1761
+ chainStatus: import_v48.default.literal(ChainIndexingStatusIds.Queued),
1908
1762
  config: makeChainIndexingConfigSchema(valueLabel)
1909
1763
  }).check(invariant_chainSnapshotQueuedBlocks);
1910
- var makeChainIndexingStatusSnapshotBackfillSchema = (valueLabel = "Value") => import_v48.z.strictObject({
1911
- chainStatus: import_v48.z.literal(ChainIndexingStatusIds.Backfill),
1764
+ var makeChainIndexingStatusSnapshotBackfillSchema = (valueLabel = "Value") => import_v48.default.strictObject({
1765
+ chainStatus: import_v48.default.literal(ChainIndexingStatusIds.Backfill),
1912
1766
  config: makeChainIndexingConfigSchema(valueLabel),
1913
1767
  latestIndexedBlock: makeBlockRefSchema(valueLabel),
1914
1768
  backfillEndBlock: makeBlockRefSchema(valueLabel)
1915
1769
  }).check(invariant_chainSnapshotBackfillBlocks);
1916
- var makeChainIndexingStatusSnapshotCompletedSchema = (valueLabel = "Value") => import_v48.z.strictObject({
1917
- chainStatus: import_v48.z.literal(ChainIndexingStatusIds.Completed),
1918
- config: import_v48.z.strictObject({
1919
- configType: import_v48.z.literal(ChainIndexingConfigTypeIds.Definite),
1770
+ var makeChainIndexingStatusSnapshotCompletedSchema = (valueLabel = "Value") => import_v48.default.strictObject({
1771
+ chainStatus: import_v48.default.literal(ChainIndexingStatusIds.Completed),
1772
+ config: import_v48.default.strictObject({
1773
+ configType: import_v48.default.literal(ChainIndexingConfigTypeIds.Definite),
1920
1774
  startBlock: makeBlockRefSchema(valueLabel),
1921
1775
  endBlock: makeBlockRefSchema(valueLabel)
1922
1776
  }),
1923
1777
  latestIndexedBlock: makeBlockRefSchema(valueLabel)
1924
1778
  }).check(invariant_chainSnapshotCompletedBlocks);
1925
- var makeChainIndexingStatusSnapshotFollowingSchema = (valueLabel = "Value") => import_v48.z.strictObject({
1926
- chainStatus: import_v48.z.literal(ChainIndexingStatusIds.Following),
1927
- config: import_v48.z.strictObject({
1928
- configType: import_v48.z.literal(ChainIndexingConfigTypeIds.Indefinite),
1779
+ var makeChainIndexingStatusSnapshotFollowingSchema = (valueLabel = "Value") => import_v48.default.strictObject({
1780
+ chainStatus: import_v48.default.literal(ChainIndexingStatusIds.Following),
1781
+ config: import_v48.default.strictObject({
1782
+ configType: import_v48.default.literal(ChainIndexingConfigTypeIds.Indefinite),
1929
1783
  startBlock: makeBlockRefSchema(valueLabel)
1930
1784
  }),
1931
1785
  latestIndexedBlock: makeBlockRefSchema(valueLabel),
1932
1786
  latestKnownBlock: makeBlockRefSchema(valueLabel)
1933
1787
  }).check(invariant_chainSnapshotFollowingBlocks);
1934
- var makeChainIndexingStatusSnapshotSchema = (valueLabel = "Value") => import_v48.z.discriminatedUnion("chainStatus", [
1788
+ var makeChainIndexingStatusSnapshotSchema = (valueLabel = "Value") => import_v48.default.discriminatedUnion("chainStatus", [
1935
1789
  makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
1936
1790
  makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
1937
1791
  makeChainIndexingStatusSnapshotCompletedSchema(valueLabel),
1938
1792
  makeChainIndexingStatusSnapshotFollowingSchema(valueLabel)
1939
1793
  ]);
1940
- var makeChainIndexingStatusesSchema = (valueLabel = "Value") => import_v48.z.record(makeChainIdStringSchema(), makeChainIndexingStatusSnapshotSchema(valueLabel), {
1794
+ var makeChainIndexingStatusesSchema = (valueLabel = "Value") => import_v48.default.record(makeChainIdStringSchema(), makeChainIndexingStatusSnapshotSchema(valueLabel), {
1941
1795
  error: "Chains indexing statuses must be an object mapping valid chain IDs to their indexing status snapshots."
1942
1796
  }).transform((serializedChainsIndexingStatus) => {
1943
1797
  const chainsIndexingStatus = /* @__PURE__ */ new Map();
@@ -1946,29 +1800,29 @@ var makeChainIndexingStatusesSchema = (valueLabel = "Value") => import_v48.z.rec
1946
1800
  }
1947
1801
  return chainsIndexingStatus;
1948
1802
  });
1949
- var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_v48.z.strictObject({
1950
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Unstarted),
1803
+ var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_v48.default.strictObject({
1804
+ omnichainStatus: import_v48.default.literal(OmnichainIndexingStatusIds.Unstarted),
1951
1805
  chains: makeChainIndexingStatusesSchema(valueLabel).check(invariant_omnichainSnapshotUnstartedHasValidChains).transform((chains) => chains),
1952
1806
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1953
1807
  });
1954
- var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v48.z.strictObject({
1955
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Backfill),
1808
+ var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v48.default.strictObject({
1809
+ omnichainStatus: import_v48.default.literal(OmnichainIndexingStatusIds.Backfill),
1956
1810
  chains: makeChainIndexingStatusesSchema(valueLabel).check(invariant_omnichainStatusSnapshotBackfillHasValidChains).transform(
1957
1811
  (chains) => chains
1958
1812
  ),
1959
1813
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1960
1814
  });
1961
- var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_v48.z.strictObject({
1962
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Completed),
1815
+ var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_v48.default.strictObject({
1816
+ omnichainStatus: import_v48.default.literal(OmnichainIndexingStatusIds.Completed),
1963
1817
  chains: makeChainIndexingStatusesSchema(valueLabel).check(invariant_omnichainStatusSnapshotCompletedHasValidChains).transform((chains) => chains),
1964
1818
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1965
1819
  });
1966
- var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_v48.z.strictObject({
1967
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Following),
1820
+ var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_v48.default.strictObject({
1821
+ omnichainStatus: import_v48.default.literal(OmnichainIndexingStatusIds.Following),
1968
1822
  chains: makeChainIndexingStatusesSchema(valueLabel),
1969
1823
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1970
1824
  });
1971
- var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexing Snapshot") => import_v48.z.discriminatedUnion("omnichainStatus", [
1825
+ var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexing Snapshot") => import_v48.default.discriminatedUnion("omnichainStatus", [
1972
1826
  makeOmnichainIndexingStatusSnapshotUnstartedSchema(valueLabel),
1973
1827
  makeOmnichainIndexingStatusSnapshotBackfillSchema(valueLabel),
1974
1828
  makeOmnichainIndexingStatusSnapshotCompletedSchema(valueLabel),
@@ -1976,16 +1830,16 @@ var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexin
1976
1830
  ]).check(invariant_omnichainSnapshotStatusIsConsistentWithChainSnapshot).check(invariant_omnichainIndexingCursorLowerThanEarliestStartBlockAcrossQueuedChains).check(
1977
1831
  invariant_omnichainIndexingCursorLowerThanOrEqualToLatestBackfillEndBlockAcrossBackfillChains
1978
1832
  ).check(invariant_omnichainIndexingCursorIsEqualToHighestLatestIndexedBlockAcrossIndexedChain);
1979
- var makeCrossChainIndexingStatusSnapshotOmnichainSchema = (valueLabel = "Cross-chain Indexing Status Snapshot Omnichain") => import_v48.z.strictObject({
1980
- strategy: import_v48.z.literal(CrossChainIndexingStrategyIds.Omnichain),
1833
+ var makeCrossChainIndexingStatusSnapshotOmnichainSchema = (valueLabel = "Cross-chain Indexing Status Snapshot Omnichain") => import_v48.default.strictObject({
1834
+ strategy: import_v48.default.literal(CrossChainIndexingStrategyIds.Omnichain),
1981
1835
  slowestChainIndexingCursor: makeUnixTimestampSchema(valueLabel),
1982
1836
  snapshotTime: makeUnixTimestampSchema(valueLabel),
1983
1837
  omnichainSnapshot: makeOmnichainIndexingStatusSnapshotSchema(valueLabel)
1984
1838
  }).check(invariant_slowestChainEqualsToOmnichainSnapshotTime).check(invariant_snapshotTimeIsTheHighestKnownBlockTimestamp);
1985
- var makeCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Cross-chain Indexing Status Snapshot") => import_v48.z.discriminatedUnion("strategy", [
1839
+ var makeCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Cross-chain Indexing Status Snapshot") => import_v48.default.discriminatedUnion("strategy", [
1986
1840
  makeCrossChainIndexingStatusSnapshotOmnichainSchema(valueLabel)
1987
1841
  ]);
1988
- var makeRealtimeIndexingStatusProjectionSchema = (valueLabel = "Realtime Indexing Status Projection") => import_v48.z.strictObject({
1842
+ var makeRealtimeIndexingStatusProjectionSchema = (valueLabel = "Realtime Indexing Status Projection") => import_v48.default.strictObject({
1989
1843
  projectedAt: makeUnixTimestampSchema(valueLabel),
1990
1844
  worstCaseDistance: makeDurationSchema(valueLabel),
1991
1845
  snapshot: makeCrossChainIndexingStatusSnapshotSchema(valueLabel)
@@ -2188,21 +2042,22 @@ function serializeIndexingStatusResponse(response) {
2188
2042
  var import_v416 = require("zod/v4");
2189
2043
 
2190
2044
  // src/api/name-tokens/zod-schemas.ts
2191
- var import_viem17 = require("viem");
2045
+ var import_viem14 = require("viem");
2192
2046
  var import_v415 = __toESM(require("zod/v4"), 1);
2193
2047
 
2194
2048
  // src/tokenscope/assets.ts
2195
- var import_viem16 = require("viem");
2049
+ var import_caip4 = require("caip");
2050
+ var import_viem13 = require("viem");
2196
2051
  var import_v413 = require("zod/v4");
2197
2052
 
2198
2053
  // src/tokenscope/zod-schemas.ts
2199
2054
  var import_caip3 = require("caip");
2200
- var import_viem15 = require("viem");
2055
+ var import_viem12 = require("viem");
2201
2056
  var import_v412 = __toESM(require("zod/v4"), 1);
2202
2057
 
2203
2058
  // src/tokenscope/name-token.ts
2204
- var import_viem14 = require("viem");
2205
- var import_datasources6 = require("@ensnode/datasources");
2059
+ var import_viem11 = require("viem");
2060
+ var import_datasources5 = require("@ensnode/datasources");
2206
2061
  var NameTokenOwnershipTypes = {
2207
2062
  /**
2208
2063
  * Name Token is owned by NameWrapper account.
@@ -2233,12 +2088,12 @@ function serializeNameToken(nameToken) {
2233
2088
  function getNameWrapperAccounts(namespaceId) {
2234
2089
  const ethnamesNameWrapperAccount = getDatasourceContract(
2235
2090
  namespaceId,
2236
- import_datasources6.DatasourceNames.ENSRoot,
2091
+ import_datasources5.DatasourceNames.ENSRoot,
2237
2092
  "NameWrapper"
2238
2093
  );
2239
2094
  const lineanamesNameWrapperAccount = maybeGetDatasourceContract(
2240
2095
  namespaceId,
2241
- import_datasources6.DatasourceNames.Lineanames,
2096
+ import_datasources5.DatasourceNames.Lineanames,
2242
2097
  "NameWrapper"
2243
2098
  );
2244
2099
  const nameWrapperAccounts = [
@@ -2261,7 +2116,7 @@ function getNameTokenOwnership(namespaceId, name, owner) {
2261
2116
  owner
2262
2117
  };
2263
2118
  }
2264
- if ((0, import_viem14.isAddressEqual)(owner.address, import_viem14.zeroAddress)) {
2119
+ if ((0, import_viem11.isAddressEqual)(owner.address, import_viem11.zeroAddress)) {
2265
2120
  return {
2266
2121
  ownershipType: NameTokenOwnershipTypes.Burned,
2267
2122
  owner
@@ -2316,7 +2171,7 @@ var makeAssetIdStringSchema = (valueLabel = "Asset ID String Schema") => import_
2316
2171
  }, makeAssetIdSchema(valueLabel));
2317
2172
  function invariant_nameTokenOwnershipHasNonZeroAddressOwner(ctx) {
2318
2173
  const ownership = ctx.value;
2319
- if (ctx.value.owner.address === import_viem15.zeroAddress) {
2174
+ if (ctx.value.owner.address === import_viem12.zeroAddress) {
2320
2175
  ctx.issues.push({
2321
2176
  code: "custom",
2322
2177
  input: ctx.value,
@@ -2342,7 +2197,7 @@ var makeNameTokenOwnershipUnknownSchema = (valueLabel = "Name Token Ownership Un
2342
2197
  }).check(invariant_nameTokenOwnershipHasNonZeroAddressOwner);
2343
2198
  function invariant_nameTokenOwnershipHasZeroAddressOwner(ctx) {
2344
2199
  const ownership = ctx.value;
2345
- if (ctx.value.owner.address !== import_viem15.zeroAddress) {
2200
+ if (ctx.value.owner.address !== import_viem12.zeroAddress) {
2346
2201
  ctx.issues.push({
2347
2202
  code: "custom",
2348
2203
  input: ctx.value,
@@ -2363,6 +2218,10 @@ var makeNameTokenSchema = (valueLabel = "Name Token Schema", serializable) => im
2363
2218
  });
2364
2219
 
2365
2220
  // src/tokenscope/assets.ts
2221
+ var AssetNamespaces = {
2222
+ ERC721: "erc721",
2223
+ ERC1155: "erc1155"
2224
+ };
2366
2225
  function serializeAssetId(assetId) {
2367
2226
  return {
2368
2227
  assetNamespace: assetId.assetNamespace,
@@ -2380,6 +2239,14 @@ ${(0, import_v413.prettifyError)(parsed.error)}
2380
2239
  }
2381
2240
  return parsed.data;
2382
2241
  }
2242
+ function formatAssetId(assetId) {
2243
+ const { assetNamespace, contract, tokenId } = serializeAssetId(assetId);
2244
+ return import_caip4.AssetId.format({
2245
+ chainId: { namespace: "eip155", reference: contract.chainId.toString() },
2246
+ assetName: { namespace: assetNamespace, reference: contract.address },
2247
+ tokenId
2248
+ }).toLowerCase();
2249
+ }
2383
2250
  function parseAssetId(maybeAssetId, valueLabel) {
2384
2251
  const schema = makeAssetIdStringSchema(valueLabel);
2385
2252
  const parsed = schema.safeParse(maybeAssetId);
@@ -2408,13 +2275,13 @@ var NFTMintStatuses = {
2408
2275
  Burned: "burned"
2409
2276
  };
2410
2277
  var formatNFTTransferEventMetadata = (metadata) => {
2411
- const assetIdString = formatAssetId(metadata.nft);
2278
+ const serializedAssetId = serializeAssetId(metadata.nft);
2412
2279
  return [
2413
2280
  `Event: ${metadata.eventHandlerName}`,
2414
2281
  `Chain ID: ${metadata.chainId}`,
2415
2282
  `Block Number: ${metadata.blockNumber}`,
2416
2283
  `Transaction Hash: ${metadata.transactionHash}`,
2417
- `NFT: ${assetIdString}`
2284
+ `NFT: ${serializedAssetId}`
2418
2285
  ].map((line) => ` - ${line}`).join("\n");
2419
2286
  };
2420
2287
  var NFTTransferTypes = {
@@ -2520,11 +2387,11 @@ var NFTTransferTypes = {
2520
2387
  };
2521
2388
  var getNFTTransferType = (from, to, allowMintedRemint, metadata, currentlyIndexedOwner) => {
2522
2389
  const isIndexed = currentlyIndexedOwner !== void 0;
2523
- const isIndexedAsMinted = isIndexed && !(0, import_viem16.isAddressEqual)(currentlyIndexedOwner, import_viem16.zeroAddress);
2524
- const isMint = (0, import_viem16.isAddressEqual)(from, import_viem16.zeroAddress);
2525
- const isBurn = (0, import_viem16.isAddressEqual)(to, import_viem16.zeroAddress);
2526
- const isSelfTransfer = (0, import_viem16.isAddressEqual)(from, to);
2527
- if (isIndexed && !(0, import_viem16.isAddressEqual)(currentlyIndexedOwner, from)) {
2390
+ const isIndexedAsMinted = isIndexed && !(0, import_viem13.isAddressEqual)(currentlyIndexedOwner, import_viem13.zeroAddress);
2391
+ const isMint = (0, import_viem13.isAddressEqual)(from, import_viem13.zeroAddress);
2392
+ const isBurn = (0, import_viem13.isAddressEqual)(to, import_viem13.zeroAddress);
2393
+ const isSelfTransfer = (0, import_viem13.isAddressEqual)(from, to);
2394
+ if (isIndexed && !(0, import_viem13.isAddressEqual)(currentlyIndexedOwner, from)) {
2528
2395
  if (isMint && allowMintedRemint) {
2529
2396
  } else {
2530
2397
  throw new Error(
@@ -2657,7 +2524,7 @@ var makeRegisteredNameTokenSchema = (valueLabel = "Registered Name Token", seria
2657
2524
  accurateAsOf: makeUnixTimestampSchema(`${valueLabel}.accurateAsOf`)
2658
2525
  }).check(function invariant_nameIsAssociatedWithDomainId(ctx) {
2659
2526
  const { name, domainId } = ctx.value;
2660
- if ((0, import_viem17.namehash)(name) !== domainId) {
2527
+ if ((0, import_viem14.namehash)(name) !== domainId) {
2661
2528
  ctx.issues.push({
2662
2529
  code: "custom",
2663
2530
  input: ctx.value,
@@ -2809,37 +2676,37 @@ function serializeNameTokensResponse(response) {
2809
2676
  var import_v420 = require("zod/v4");
2810
2677
 
2811
2678
  // src/api/registrar-actions/zod-schemas.ts
2812
- var import_ens10 = require("viem/ens");
2679
+ var import_ens7 = require("viem/ens");
2813
2680
  var import_v419 = __toESM(require("zod/v4"), 1);
2814
2681
 
2815
2682
  // ../ens-referrals/src/address.ts
2816
- var import_viem18 = require("viem");
2683
+ var import_viem15 = require("viem");
2817
2684
 
2818
2685
  // ../ens-referrals/src/encoding.ts
2819
- var import_viem19 = require("viem");
2686
+ var import_viem16 = require("viem");
2820
2687
  var ENCODED_REFERRER_BYTE_OFFSET = 12;
2821
2688
  var ENCODED_REFERRER_BYTE_LENGTH = 32;
2822
- var EXPECTED_ENCODED_REFERRER_PADDING = (0, import_viem19.pad)("0x", {
2689
+ var EXPECTED_ENCODED_REFERRER_PADDING = (0, import_viem16.pad)("0x", {
2823
2690
  size: ENCODED_REFERRER_BYTE_OFFSET,
2824
2691
  dir: "left"
2825
2692
  });
2826
- var ZERO_ENCODED_REFERRER = (0, import_viem19.pad)("0x", {
2693
+ var ZERO_ENCODED_REFERRER = (0, import_viem16.pad)("0x", {
2827
2694
  size: ENCODED_REFERRER_BYTE_LENGTH,
2828
2695
  dir: "left"
2829
2696
  });
2830
2697
  function decodeEncodedReferrer(encodedReferrer) {
2831
- if ((0, import_viem19.size)(encodedReferrer) !== ENCODED_REFERRER_BYTE_LENGTH) {
2698
+ if ((0, import_viem16.size)(encodedReferrer) !== ENCODED_REFERRER_BYTE_LENGTH) {
2832
2699
  throw new Error(
2833
2700
  `Encoded referrer value must be represented by ${ENCODED_REFERRER_BYTE_LENGTH} bytes.`
2834
2701
  );
2835
2702
  }
2836
- const padding = (0, import_viem19.slice)(encodedReferrer, 0, ENCODED_REFERRER_BYTE_OFFSET);
2703
+ const padding = (0, import_viem16.slice)(encodedReferrer, 0, ENCODED_REFERRER_BYTE_OFFSET);
2837
2704
  if (padding !== EXPECTED_ENCODED_REFERRER_PADDING) {
2838
- return import_viem19.zeroAddress;
2705
+ return import_viem16.zeroAddress;
2839
2706
  }
2840
- const decodedReferrer = (0, import_viem19.slice)(encodedReferrer, ENCODED_REFERRER_BYTE_OFFSET);
2707
+ const decodedReferrer = (0, import_viem16.slice)(encodedReferrer, ENCODED_REFERRER_BYTE_OFFSET);
2841
2708
  try {
2842
- return (0, import_viem19.getAddress)(decodedReferrer);
2709
+ return (0, import_viem16.getAddress)(decodedReferrer);
2843
2710
  } catch {
2844
2711
  throw new Error(`Decoded referrer value must be a valid EVM address.`);
2845
2712
  }
@@ -2849,7 +2716,7 @@ function decodeEncodedReferrer(encodedReferrer) {
2849
2716
  var REFERRERS_PER_LEADERBOARD_PAGE_MAX = 100;
2850
2717
 
2851
2718
  // ../ens-referrals/src/link.ts
2852
- var import_viem20 = require("viem");
2719
+ var import_viem17 = require("viem");
2853
2720
 
2854
2721
  // ../ens-referrals/src/referrer-detail.ts
2855
2722
  var ReferrerDetailTypeIds = {
@@ -2864,7 +2731,7 @@ var ReferrerDetailTypeIds = {
2864
2731
  };
2865
2732
 
2866
2733
  // src/registrars/zod-schemas.ts
2867
- var import_v417 = require("zod/v4");
2734
+ var import_v417 = __toESM(require("zod/v4"), 1);
2868
2735
 
2869
2736
  // src/registrars/registrar-action.ts
2870
2737
  var RegistrarActionTypes = {
@@ -2905,11 +2772,11 @@ function serializeRegistrarAction(registrarAction) {
2905
2772
  }
2906
2773
 
2907
2774
  // src/registrars/zod-schemas.ts
2908
- var makeSubregistrySchema = (valueLabel = "Subregistry") => import_v417.z.object({
2775
+ var makeSubregistrySchema = (valueLabel = "Subregistry") => import_v417.default.object({
2909
2776
  subregistryId: makeAccountIdSchema(`${valueLabel} Subregistry ID`),
2910
2777
  node: makeNodeSchema(`${valueLabel} Node`)
2911
2778
  });
2912
- var makeRegistrationLifecycleSchema = (valueLabel = "Registration Lifecycle") => import_v417.z.object({
2779
+ var makeRegistrationLifecycleSchema = (valueLabel = "Registration Lifecycle") => import_v417.default.object({
2913
2780
  subregistry: makeSubregistrySchema(`${valueLabel} Subregistry`),
2914
2781
  node: makeNodeSchema(`${valueLabel} Node`),
2915
2782
  expiresAt: makeUnixTimestampSchema(`${valueLabel} Expires at`)
@@ -2925,18 +2792,18 @@ function invariant_registrarActionPricingTotalIsSumOfBaseCostAndPremium(ctx) {
2925
2792
  });
2926
2793
  }
2927
2794
  }
2928
- var makeRegistrarActionPricingSchema = (valueLabel = "Registrar Action Pricing") => import_v417.z.union([
2795
+ var makeRegistrarActionPricingSchema = (valueLabel = "Registrar Action Pricing") => import_v417.default.union([
2929
2796
  // pricing available
2930
- import_v417.z.object({
2797
+ import_v417.default.object({
2931
2798
  baseCost: makePriceEthSchema(`${valueLabel} Base Cost`),
2932
2799
  premium: makePriceEthSchema(`${valueLabel} Premium`),
2933
2800
  total: makePriceEthSchema(`${valueLabel} Total`)
2934
2801
  }).check(invariant_registrarActionPricingTotalIsSumOfBaseCostAndPremium).transform((v) => v),
2935
2802
  // pricing unknown
2936
- import_v417.z.object({
2937
- baseCost: import_v417.z.null(),
2938
- premium: import_v417.z.null(),
2939
- total: import_v417.z.null()
2803
+ import_v417.default.object({
2804
+ baseCost: import_v417.default.null(),
2805
+ premium: import_v417.default.null(),
2806
+ total: import_v417.default.null()
2940
2807
  }).transform((v) => v)
2941
2808
  ]);
2942
2809
  function invariant_registrarActionDecodedReferrerBasedOnRawReferrer(ctx) {
@@ -2959,9 +2826,9 @@ function invariant_registrarActionDecodedReferrerBasedOnRawReferrer(ctx) {
2959
2826
  });
2960
2827
  }
2961
2828
  }
2962
- var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral") => import_v417.z.union([
2829
+ var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral") => import_v417.default.union([
2963
2830
  // referral available
2964
- import_v417.z.object({
2831
+ import_v417.default.object({
2965
2832
  encodedReferrer: makeHexStringSchema(
2966
2833
  { bytesCount: ENCODED_REFERRER_BYTE_LENGTH },
2967
2834
  `${valueLabel} Encoded Referrer`
@@ -2969,9 +2836,9 @@ var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral
2969
2836
  decodedReferrer: makeLowercaseAddressSchema(`${valueLabel} Decoded Referrer`)
2970
2837
  }).check(invariant_registrarActionDecodedReferrerBasedOnRawReferrer),
2971
2838
  // referral not applicable
2972
- import_v417.z.object({
2973
- encodedReferrer: import_v417.z.null(),
2974
- decodedReferrer: import_v417.z.null()
2839
+ import_v417.default.object({
2840
+ encodedReferrer: import_v417.default.null(),
2841
+ decodedReferrer: import_v417.default.null()
2975
2842
  })
2976
2843
  ]);
2977
2844
  function invariant_eventIdsInitialElementIsTheActionId(ctx) {
@@ -2984,9 +2851,9 @@ function invariant_eventIdsInitialElementIsTheActionId(ctx) {
2984
2851
  });
2985
2852
  }
2986
2853
  }
2987
- var EventIdSchema = import_v417.z.string().nonempty();
2988
- var EventIdsSchema = import_v417.z.array(EventIdSchema).min(1).transform((v) => v);
2989
- var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") => import_v417.z.object({
2854
+ var EventIdSchema = import_v417.default.string().nonempty();
2855
+ var EventIdsSchema = import_v417.default.array(EventIdSchema).min(1).transform((v) => v);
2856
+ var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") => import_v417.default.object({
2990
2857
  id: EventIdSchema,
2991
2858
  incrementalDuration: makeDurationSchema(`${valueLabel} Incremental Duration`),
2992
2859
  registrant: makeLowercaseAddressSchema(`${valueLabel} Registrant`),
@@ -3000,12 +2867,12 @@ var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") => im
3000
2867
  eventIds: EventIdsSchema
3001
2868
  }).check(invariant_eventIdsInitialElementIsTheActionId);
3002
2869
  var makeRegistrarActionRegistrationSchema = (valueLabel = "Registration ") => makeBaseRegistrarActionSchema(valueLabel).extend({
3003
- type: import_v417.z.literal(RegistrarActionTypes.Registration)
2870
+ type: import_v417.default.literal(RegistrarActionTypes.Registration)
3004
2871
  });
3005
2872
  var makeRegistrarActionRenewalSchema = (valueLabel = "Renewal") => makeBaseRegistrarActionSchema(valueLabel).extend({
3006
- type: import_v417.z.literal(RegistrarActionTypes.Renewal)
2873
+ type: import_v417.default.literal(RegistrarActionTypes.Renewal)
3007
2874
  });
3008
- var makeRegistrarActionSchema = (valueLabel = "Registrar Action") => import_v417.z.discriminatedUnion("type", [
2875
+ var makeRegistrarActionSchema = (valueLabel = "Registrar Action") => import_v417.default.discriminatedUnion("type", [
3009
2876
  makeRegistrarActionRegistrationSchema(`${valueLabel} Registration`),
3010
2877
  makeRegistrarActionRenewalSchema(`${valueLabel} Renewal`)
3011
2878
  ]);
@@ -3095,7 +2962,7 @@ var RegistrarActionsResponseCodes = {
3095
2962
  function invariant_registrationLifecycleNodeMatchesName(ctx) {
3096
2963
  const { name, action } = ctx.value;
3097
2964
  const expectedNode = action.registrationLifecycle.node;
3098
- const actualNode = (0, import_ens10.namehash)(name);
2965
+ const actualNode = (0, import_ens7.namehash)(name);
3099
2966
  if (actualNode !== expectedNode) {
3100
2967
  ctx.issues.push({
3101
2968
  code: "custom",
@@ -3251,11 +3118,11 @@ var registrarActionsPrerequisites = Object.freeze({
3251
3118
  });
3252
3119
 
3253
3120
  // src/registrars/basenames-subregistry.ts
3254
- var import_datasources7 = require("@ensnode/datasources");
3121
+ var import_datasources6 = require("@ensnode/datasources");
3255
3122
  function getBasenamesSubregistryId(namespace) {
3256
- const datasource = (0, import_datasources7.maybeGetDatasource)(namespace, import_datasources7.DatasourceNames.Basenames);
3123
+ const datasource = (0, import_datasources6.maybeGetDatasource)(namespace, import_datasources6.DatasourceNames.Basenames);
3257
3124
  if (!datasource) {
3258
- throw new Error(`Datasource not found for ${namespace} ${import_datasources7.DatasourceNames.Basenames}`);
3125
+ throw new Error(`Datasource not found for ${namespace} ${import_datasources6.DatasourceNames.Basenames}`);
3259
3126
  }
3260
3127
  const address = datasource.contracts.BaseRegistrar?.address;
3261
3128
  if (address === void 0 || Array.isArray(address)) {
@@ -3268,11 +3135,12 @@ function getBasenamesSubregistryId(namespace) {
3268
3135
  }
3269
3136
  function getBasenamesSubregistryManagedName(namespaceId) {
3270
3137
  switch (namespaceId) {
3271
- case import_datasources7.ENSNamespaceIds.Mainnet:
3138
+ case import_datasources6.ENSNamespaceIds.Mainnet:
3272
3139
  return "base.eth";
3273
- case import_datasources7.ENSNamespaceIds.Sepolia:
3140
+ case import_datasources6.ENSNamespaceIds.Sepolia:
3274
3141
  return "basetest.eth";
3275
- case import_datasources7.ENSNamespaceIds.EnsTestEnv:
3142
+ case import_datasources6.ENSNamespaceIds.Holesky:
3143
+ case import_datasources6.ENSNamespaceIds.EnsTestEnv:
3276
3144
  throw new Error(
3277
3145
  `No registrar managed name is known for the 'basenames' subregistry within the "${namespaceId}" namespace.`
3278
3146
  );
@@ -3280,11 +3148,11 @@ function getBasenamesSubregistryManagedName(namespaceId) {
3280
3148
  }
3281
3149
 
3282
3150
  // src/registrars/ethnames-subregistry.ts
3283
- var import_datasources8 = require("@ensnode/datasources");
3151
+ var import_datasources7 = require("@ensnode/datasources");
3284
3152
  function getEthnamesSubregistryId(namespace) {
3285
- const datasource = (0, import_datasources8.maybeGetDatasource)(namespace, import_datasources8.DatasourceNames.ENSRoot);
3153
+ const datasource = (0, import_datasources7.maybeGetDatasource)(namespace, import_datasources7.DatasourceNames.ENSRoot);
3286
3154
  if (!datasource) {
3287
- throw new Error(`Datasource not found for ${namespace} ${import_datasources8.DatasourceNames.ENSRoot}`);
3155
+ throw new Error(`Datasource not found for ${namespace} ${import_datasources7.DatasourceNames.ENSRoot}`);
3288
3156
  }
3289
3157
  const address = datasource.contracts.BaseRegistrar?.address;
3290
3158
  if (address === void 0 || Array.isArray(address)) {
@@ -3297,19 +3165,20 @@ function getEthnamesSubregistryId(namespace) {
3297
3165
  }
3298
3166
  function getEthnamesSubregistryManagedName(namespaceId) {
3299
3167
  switch (namespaceId) {
3300
- case import_datasources8.ENSNamespaceIds.Mainnet:
3301
- case import_datasources8.ENSNamespaceIds.Sepolia:
3302
- case import_datasources8.ENSNamespaceIds.EnsTestEnv:
3168
+ case import_datasources7.ENSNamespaceIds.Mainnet:
3169
+ case import_datasources7.ENSNamespaceIds.Sepolia:
3170
+ case import_datasources7.ENSNamespaceIds.Holesky:
3171
+ case import_datasources7.ENSNamespaceIds.EnsTestEnv:
3303
3172
  return "eth";
3304
3173
  }
3305
3174
  }
3306
3175
 
3307
3176
  // src/registrars/lineanames-subregistry.ts
3308
- var import_datasources9 = require("@ensnode/datasources");
3177
+ var import_datasources8 = require("@ensnode/datasources");
3309
3178
  function getLineanamesSubregistryId(namespace) {
3310
- const datasource = (0, import_datasources9.maybeGetDatasource)(namespace, import_datasources9.DatasourceNames.Lineanames);
3179
+ const datasource = (0, import_datasources8.maybeGetDatasource)(namespace, import_datasources8.DatasourceNames.Lineanames);
3311
3180
  if (!datasource) {
3312
- throw new Error(`Datasource not found for ${namespace} ${import_datasources9.DatasourceNames.Lineanames}`);
3181
+ throw new Error(`Datasource not found for ${namespace} ${import_datasources8.DatasourceNames.Lineanames}`);
3313
3182
  }
3314
3183
  const address = datasource.contracts.BaseRegistrar?.address;
3315
3184
  if (address === void 0 || Array.isArray(address)) {
@@ -3322,32 +3191,18 @@ function getLineanamesSubregistryId(namespace) {
3322
3191
  }
3323
3192
  function getLineanamesSubregistryManagedName(namespaceId) {
3324
3193
  switch (namespaceId) {
3325
- case import_datasources9.ENSNamespaceIds.Mainnet:
3194
+ case import_datasources8.ENSNamespaceIds.Mainnet:
3326
3195
  return "linea.eth";
3327
- case import_datasources9.ENSNamespaceIds.Sepolia:
3196
+ case import_datasources8.ENSNamespaceIds.Sepolia:
3328
3197
  return "linea-sepolia.eth";
3329
- case import_datasources9.ENSNamespaceIds.EnsTestEnv:
3198
+ case import_datasources8.ENSNamespaceIds.Holesky:
3199
+ case import_datasources8.ENSNamespaceIds.EnsTestEnv:
3330
3200
  throw new Error(
3331
3201
  `No registrar managed name is known for the 'Lineanames' subregistry within the "${namespaceId}" namespace.`
3332
3202
  );
3333
3203
  }
3334
3204
  }
3335
3205
 
3336
- // src/registrars/registration-expiration.ts
3337
- function isRegistrationExpired(info, now) {
3338
- if (info.expiry == null) return false;
3339
- return info.expiry <= now;
3340
- }
3341
- function isRegistrationFullyExpired(info, now) {
3342
- if (info.expiry == null) return false;
3343
- return now >= info.expiry + (info.gracePeriod ?? 0n);
3344
- }
3345
- function isRegistrationInGracePeriod(info, now) {
3346
- if (info.expiry == null) return false;
3347
- if (info.gracePeriod == null) return false;
3348
- return info.expiry <= now && info.expiry + info.gracePeriod > now;
3349
- }
3350
-
3351
3206
  // src/api/registrar-actions/serialize.ts
3352
3207
  function serializeNamedRegistrarAction({
3353
3208
  action,
@@ -4459,32 +4314,8 @@ var ENSNodeClient = class _ENSNodeClient {
4459
4314
  }
4460
4315
  };
4461
4316
 
4462
- // src/ensv2/ids-lib.ts
4463
- var import_viem21 = require("viem");
4464
- var makeRegistryId = (accountId) => formatAccountId(accountId);
4465
- var makeENSv1DomainId = (node) => node;
4466
- var makeENSv2DomainId = (registry, canonicalId) => formatAssetId({
4467
- assetNamespace: AssetNamespaces.ERC1155,
4468
- contract: registry,
4469
- tokenId: canonicalId
4470
- });
4471
- var maskLower32Bits = (num) => num ^ num & 0xffffffffn;
4472
- var getCanonicalId = (input) => {
4473
- if (typeof input === "bigint") return maskLower32Bits(input);
4474
- return getCanonicalId((0, import_viem21.hexToBigInt)(input));
4475
- };
4476
- var makePermissionsId = (contract) => formatAccountId(contract);
4477
- var makePermissionsResourceId = (contract, resource) => `${makePermissionsId(contract)}/${resource}`;
4478
- var makePermissionsUserId = (contract, resource, user) => `${makePermissionsId(contract)}/${resource}/${user}`;
4479
- var makeResolverId = (contract) => formatAccountId(contract);
4480
- var makeResolverRecordsId = (resolver, node) => `${makeResolverId(resolver)}/${node}`;
4481
- var makeLatestRegistrationId = (domainId) => `${domainId}/latest`;
4482
- var makeRegistrationId = (domainId, index = 0) => `${domainId}/${index}`;
4483
- var makeLatestRenewalId = (domainId, registrationIndex) => `${makeRegistrationId(domainId, registrationIndex)}/latest`;
4484
- var makeRenewalId = (domainId, registrationIndex, index = 0) => `${makeRegistrationId(domainId, registrationIndex)}/${index}`;
4485
-
4486
4317
  // src/identity/identity.ts
4487
- var import_datasources10 = require("@ensnode/datasources");
4318
+ var import_datasources9 = require("@ensnode/datasources");
4488
4319
 
4489
4320
  // src/identity/types.ts
4490
4321
  var ResolutionStatusIds = {
@@ -4511,7 +4342,7 @@ var ResolutionStatusIds = {
4511
4342
  function buildUnresolvedIdentity(address, namespaceId, chainId) {
4512
4343
  return {
4513
4344
  resolutionStatus: ResolutionStatusIds.Unresolved,
4514
- chainId: chainId ?? (0, import_datasources10.getENSRootChainId)(namespaceId),
4345
+ chainId: chainId ?? (0, import_datasources9.getENSRootChainId)(namespaceId),
4515
4346
  address
4516
4347
  };
4517
4348
  }
@@ -4521,13 +4352,13 @@ function isResolvedIdentity(identity) {
4521
4352
 
4522
4353
  // src/resolution/ensip19-chainid.ts
4523
4354
  var import_chains = require("viem/chains");
4524
- var import_datasources11 = require("@ensnode/datasources");
4355
+ var import_datasources10 = require("@ensnode/datasources");
4525
4356
  var getResolvePrimaryNameChainIdParam = (chainId, namespaceId) => {
4526
- const ensRootChainId = (0, import_datasources11.getENSRootChainId)(namespaceId);
4357
+ const ensRootChainId = (0, import_datasources10.getENSRootChainId)(namespaceId);
4527
4358
  return chainId === ensRootChainId ? import_chains.mainnet.id : chainId;
4528
4359
  };
4529
4360
  var translateDefaultableChainIdToChainId = (chainId, namespaceId) => {
4530
- return chainId === DEFAULT_EVM_CHAIN_ID ? (0, import_datasources11.getENSRootChainId)(namespaceId) : chainId;
4361
+ return chainId === DEFAULT_EVM_CHAIN_ID ? (0, import_datasources10.getENSRootChainId)(namespaceId) : chainId;
4531
4362
  };
4532
4363
 
4533
4364
  // src/resolution/resolver-records-selection.ts