@ensnode/ensnode-sdk 0.0.0-next-20260401114816 → 0.0.0-next-20260401164207

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
@@ -17,6 +17,7 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
21
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
22
  // If the importer is in node compatibility mode or this is not an ESM
22
23
  // file that has been converted to a CommonJS file using a Babel-
@@ -34,7 +35,6 @@ __export(index_exports, {
34
35
  ATTR_PROTOCOL_NAME: () => ATTR_PROTOCOL_NAME,
35
36
  ATTR_PROTOCOL_STEP: () => ATTR_PROTOCOL_STEP,
36
37
  ATTR_PROTOCOL_STEP_RESULT: () => ATTR_PROTOCOL_STEP_RESULT,
37
- AssetNamespaces: () => AssetNamespaces,
38
38
  BASENAMES_NODE: () => BASENAMES_NODE,
39
39
  ChainIndexingStatusIds: () => ChainIndexingStatusIds,
40
40
  ClientError: () => ClientError,
@@ -46,7 +46,7 @@ __export(index_exports, {
46
46
  DEFAULT_EVM_COIN_TYPE: () => DEFAULT_EVM_COIN_TYPE,
47
47
  ENCODED_REFERRER_BYTE_LENGTH: () => ENCODED_REFERRER_BYTE_LENGTH,
48
48
  ENCODED_REFERRER_BYTE_OFFSET: () => ENCODED_REFERRER_BYTE_OFFSET,
49
- ENSNamespaceIds: () => import_datasources.ENSNamespaceIds,
49
+ ENSNamespaceIds: () => import_datasources13.ENSNamespaceIds,
50
50
  ENSNodeClient: () => ENSNodeClient,
51
51
  ENS_ROOT: () => ENS_ROOT,
52
52
  ETH_COIN_TYPE: () => ETH_COIN_TYPE,
@@ -159,11 +159,10 @@ __export(index_exports, {
159
159
  formatNFTTransferEventMetadata: () => formatNFTTransferEventMetadata,
160
160
  getBasenamesSubregistryId: () => getBasenamesSubregistryId,
161
161
  getBasenamesSubregistryManagedName: () => getBasenamesSubregistryManagedName,
162
- getCanonicalId: () => getCanonicalId,
163
162
  getCurrencyInfo: () => getCurrencyInfo,
164
163
  getDatasourceContract: () => getDatasourceContract,
165
164
  getDefaultEnsNodeUrl: () => getDefaultEnsNodeUrl,
166
- getENSRootChainId: () => import_datasources2.getENSRootChainId,
165
+ getENSRootChainId: () => import_datasources.getENSRootChainId,
167
166
  getENSv1Registry: () => getENSv1Registry,
168
167
  getENSv2RootRegistry: () => getENSv2RootRegistry,
169
168
  getENSv2RootRegistryId: () => getENSv2RootRegistryId,
@@ -182,10 +181,11 @@ __export(index_exports, {
182
181
  getOmnichainIndexingStatus: () => getOmnichainIndexingStatus,
183
182
  getParentNameFQDN: () => getParentNameFQDN,
184
183
  getResolvePrimaryNameChainIdParam: () => getResolvePrimaryNameChainIdParam,
184
+ getStorageId: () => getStorageId,
185
185
  getTimestampForHighestOmnichainKnownBlock: () => getTimestampForHighestOmnichainKnownBlock,
186
186
  getTimestampForLowestOmnichainStartBlock: () => getTimestampForLowestOmnichainStartBlock,
187
- hasGraphqlApiConfigSupport: () => hasGraphqlApiConfigSupport,
188
187
  hasNullByte: () => hasNullByte,
188
+ hasOmnigraphApiConfigSupport: () => hasOmnigraphApiConfigSupport,
189
189
  hasRegistrarActionsConfigSupport: () => hasRegistrarActionsConfigSupport,
190
190
  hasRegistrarActionsIndexingStatusSupport: () => hasRegistrarActionsIndexingStatusSupport,
191
191
  hasSubgraphApiConfigSupport: () => hasSubgraphApiConfigSupport,
@@ -311,9 +311,50 @@ __export(index_exports, {
311
311
  validateSupportedLabelSetAndVersion: () => validateSupportedLabelSetAndVersion
312
312
  });
313
313
  module.exports = __toCommonJS(index_exports);
314
+ var import_datasources13 = require("@ensnode/datasources");
314
315
 
315
316
  // src/ens/index.ts
316
- var import_datasources2 = require("@ensnode/datasources");
317
+ var ens_exports = {};
318
+ __export(ens_exports, {
319
+ ADDR_REVERSE_NODE: () => ADDR_REVERSE_NODE,
320
+ BASENAMES_NODE: () => BASENAMES_NODE,
321
+ DEFAULT_EVM_CHAIN_ID: () => DEFAULT_EVM_CHAIN_ID,
322
+ DEFAULT_EVM_COIN_TYPE: () => DEFAULT_EVM_COIN_TYPE,
323
+ ENSNamespaceIds: () => import_datasources.ENSNamespaceIds,
324
+ ENS_ROOT: () => ENS_ROOT,
325
+ ETH_COIN_TYPE: () => ETH_COIN_TYPE,
326
+ ETH_NODE: () => ETH_NODE,
327
+ LINEANAMES_NODE: () => LINEANAMES_NODE,
328
+ NODE_ANY: () => NODE_ANY,
329
+ ROOT_NODE: () => ROOT_NODE,
330
+ ROOT_RESOURCE: () => ROOT_RESOURCE,
331
+ addrReverseLabel: () => addrReverseLabel,
332
+ beautifyName: () => beautifyName,
333
+ bigintToCoinType: () => bigintToCoinType,
334
+ coinTypeReverseLabel: () => coinTypeReverseLabel,
335
+ coinTypeToEvmChainId: () => coinTypeToEvmChainId,
336
+ decodeDNSEncodedLiteralName: () => decodeDNSEncodedLiteralName,
337
+ decodeDNSEncodedName: () => decodeDNSEncodedName,
338
+ encodeLabelHash: () => encodeLabelHash,
339
+ evmChainIdToCoinType: () => evmChainIdToCoinType,
340
+ getENSRootChainId: () => import_datasources.getENSRootChainId,
341
+ getNameHierarchy: () => getNameHierarchy,
342
+ getParentNameFQDN: () => getParentNameFQDN,
343
+ isEncodedLabelHash: () => isEncodedLabelHash,
344
+ isLabelHash: () => isLabelHash,
345
+ isNormalizedLabel: () => isNormalizedLabel,
346
+ isNormalizedName: () => isNormalizedName,
347
+ isPccFuseSet: () => isPccFuseSet,
348
+ makeSubdomainNode: () => makeSubdomainNode,
349
+ parseEncodedLabelHash: () => parseEncodedLabelHash,
350
+ parseLabelHash: () => parseLabelHash,
351
+ parseLabelHashOrEncodedLabelHash: () => parseLabelHashOrEncodedLabelHash,
352
+ parseReverseName: () => parseReverseName,
353
+ reverseName: () => reverseName,
354
+ uint256ToHex32: () => uint256ToHex32
355
+ });
356
+ __reExport(ens_exports, require("enssdk"));
357
+ var import_datasources = require("@ensnode/datasources");
317
358
 
318
359
  // src/ens/coin-type.ts
319
360
  var import_utils = require("@ensdomains/address-encoder/utils");
@@ -531,8 +572,8 @@ var import_viem6 = require("viem");
531
572
  var makeSubdomainNode = (labelHash, node) => (0, import_viem6.keccak256)((0, import_viem6.concat)([node, labelHash]));
532
573
  var uint256ToHex32 = (num) => (0, import_viem6.toHex)(num, { size: 32 });
533
574
 
534
- // src/ens/types.ts
535
- var import_datasources = require("@ensnode/datasources");
575
+ // src/index.ts
576
+ __reExport(index_exports, ens_exports, module.exports);
536
577
 
537
578
  // src/ensapi/config/deserialize.ts
538
579
  var import_v47 = require("zod/v4");
@@ -851,7 +892,7 @@ var makeEnsRainbowPublicConfigSchema = (valueLabel = "EnsRainbowPublicConfig") =
851
892
  var uniq = (arr) => [...new Set(arr)];
852
893
 
853
894
  // src/ensindexer/config/is-subgraph-compatible.ts
854
- var import_datasources3 = require("@ensnode/datasources");
895
+ var import_datasources2 = require("@ensnode/datasources");
855
896
 
856
897
  // src/ensindexer/config/types.ts
857
898
  var PluginName = /* @__PURE__ */ ((PluginName2) => {
@@ -871,7 +912,7 @@ function isSubgraphCompatible(config) {
871
912
  const onlySubgraphPluginActivated = config.plugins.length === 1 && config.plugins[0] === "subgraph" /* Subgraph */;
872
913
  const isSubgraphLabelSet = config.labelSet.labelSetId === "subgraph" && config.labelSet.labelSetVersion === 0;
873
914
  const isEnsTestEnvLabelSet = config.labelSet.labelSetId === "ens-test-env" && config.labelSet.labelSetVersion === 0;
874
- const labelSetIsSubgraphCompatible = isSubgraphLabelSet || config.namespace === import_datasources3.ENSNamespaceIds.EnsTestEnv && isEnsTestEnvLabelSet;
915
+ const labelSetIsSubgraphCompatible = isSubgraphLabelSet || config.namespace === import_datasources2.ENSNamespaceIds.EnsTestEnv && isEnsTestEnvLabelSet;
875
916
  return onlySubgraphPluginActivated && labelSetIsSubgraphCompatible;
876
917
  }
877
918
 
@@ -1055,23 +1096,27 @@ var TheGraphFallbackSchema = import_v45.z.discriminatedUnion("canFallback", [
1055
1096
  ]);
1056
1097
 
1057
1098
  // src/ensapi/config/zod-schemas.ts
1099
+ var makeEnsApiVersionInfoSchema = (valueLabel = "ENS API version info") => import_v46.z.object({
1100
+ ensApi: import_v46.z.string().nonempty(`${valueLabel}.ensApi must be a non-empty string`),
1101
+ ensNormalize: import_v46.z.string().nonempty(`${valueLabel}.ensNormalize must be a non-empty string`)
1102
+ });
1058
1103
  function makeEnsApiPublicConfigSchema(valueLabel) {
1059
1104
  const label = valueLabel ?? "ENSApiPublicConfig";
1060
1105
  return import_v46.z.object({
1061
- version: import_v46.z.string().min(1, `${label}.version must be a non-empty string`),
1062
1106
  theGraphFallback: TheGraphFallbackSchema,
1063
- ensIndexerPublicConfig: makeEnsIndexerPublicConfigSchema(`${label}.ensIndexerPublicConfig`)
1107
+ ensIndexerPublicConfig: makeEnsIndexerPublicConfigSchema(`${label}.ensIndexerPublicConfig`),
1108
+ versionInfo: makeEnsApiVersionInfoSchema(`${label}.versionInfo`)
1064
1109
  });
1065
1110
  }
1066
1111
  var makeENSApiPublicConfigSchema = makeEnsApiPublicConfigSchema;
1067
1112
  function makeSerializedEnsApiPublicConfigSchema(valueLabel) {
1068
1113
  const label = valueLabel ?? "ENSApiPublicConfig";
1069
1114
  return import_v46.z.object({
1070
- version: import_v46.z.string().min(1, `${label}.version must be a non-empty string`),
1071
- theGraphFallback: TheGraphFallbackSchema,
1072
1115
  ensIndexerPublicConfig: makeSerializedEnsIndexerPublicConfigSchema(
1073
1116
  `${label}.ensIndexerPublicConfig`
1074
- )
1117
+ ),
1118
+ theGraphFallback: TheGraphFallbackSchema,
1119
+ versionInfo: makeEnsApiVersionInfoSchema(`${label}.versionInfo`)
1075
1120
  });
1076
1121
  }
1077
1122
 
@@ -1131,11 +1176,11 @@ var serializeENSIndexerPublicConfig = serializeEnsIndexerPublicConfig;
1131
1176
 
1132
1177
  // src/ensapi/config/serialize.ts
1133
1178
  function serializeEnsApiPublicConfig(config) {
1134
- const { version, theGraphFallback, ensIndexerPublicConfig } = config;
1179
+ const { ensIndexerPublicConfig, theGraphFallback, versionInfo } = config;
1135
1180
  return {
1136
- version,
1181
+ ensIndexerPublicConfig: serializeEnsIndexerPublicConfig(ensIndexerPublicConfig),
1137
1182
  theGraphFallback,
1138
- ensIndexerPublicConfig: serializeEnsIndexerPublicConfig(ensIndexerPublicConfig)
1183
+ versionInfo
1139
1184
  };
1140
1185
  }
1141
1186
  var serializeENSApiPublicConfig = serializeEnsApiPublicConfig;
@@ -2270,7 +2315,7 @@ var import_v422 = require("zod/v4");
2270
2315
 
2271
2316
  // src/tokenscope/name-token.ts
2272
2317
  var import_viem13 = require("viem");
2273
- var import_datasources5 = require("@ensnode/datasources");
2318
+ var import_datasources4 = require("@ensnode/datasources");
2274
2319
 
2275
2320
  // src/shared/account-id.ts
2276
2321
  var import_viem10 = require("viem");
@@ -2279,9 +2324,9 @@ var accountIdEqual = (a, b) => {
2279
2324
  };
2280
2325
 
2281
2326
  // src/shared/datasource-contract.ts
2282
- var import_datasources4 = require("@ensnode/datasources");
2327
+ var import_datasources3 = require("@ensnode/datasources");
2283
2328
  var maybeGetDatasourceContract = (namespaceId, datasourceName, contractName) => {
2284
- const datasource = (0, import_datasources4.maybeGetDatasource)(namespaceId, datasourceName);
2329
+ const datasource = (0, import_datasources3.maybeGetDatasource)(namespaceId, datasourceName);
2285
2330
  if (!datasource) return void 0;
2286
2331
  const address = datasource.contracts[contractName]?.address;
2287
2332
  if (address === void 0 || Array.isArray(address)) return void 0;
@@ -2310,16 +2355,9 @@ var import_v420 = require("zod/v4");
2310
2355
 
2311
2356
  // src/tokenscope/zod-schemas.ts
2312
2357
  var import_caip3 = require("caip");
2358
+ var import_enssdk = require("enssdk");
2313
2359
  var import_viem11 = require("viem");
2314
2360
  var import_v419 = require("zod/v4");
2315
-
2316
- // src/shared/types.ts
2317
- var AssetNamespaces = {
2318
- ERC721: "erc721",
2319
- ERC1155: "erc1155"
2320
- };
2321
-
2322
- // src/tokenscope/zod-schemas.ts
2323
2361
  var tokenIdSchemaSerializable = import_v419.z.string();
2324
2362
  var tokenIdSchemaNative = import_v419.z.preprocess(
2325
2363
  (v) => typeof v === "string" ? BigInt(v) : v,
@@ -2334,7 +2372,7 @@ function makeTokenIdSchema(_valueLabel = "Token ID Schema", serializable = false
2334
2372
  }
2335
2373
  var makeAssetIdSchema = (valueLabel = "Asset ID Schema", serializable) => {
2336
2374
  return import_v419.z.object({
2337
- assetNamespace: import_v419.z.enum(AssetNamespaces),
2375
+ assetNamespace: import_v419.z.enum(import_enssdk.AssetNamespaces),
2338
2376
  contract: makeAccountIdSchema(valueLabel),
2339
2377
  tokenId: makeTokenIdSchema(valueLabel, serializable ?? false)
2340
2378
  });
@@ -2676,12 +2714,12 @@ function serializeNameToken(nameToken) {
2676
2714
  function getNameWrapperAccounts(namespaceId) {
2677
2715
  const ethnamesNameWrapperAccount = getDatasourceContract(
2678
2716
  namespaceId,
2679
- import_datasources5.DatasourceNames.ENSRoot,
2717
+ import_datasources4.DatasourceNames.ENSRoot,
2680
2718
  "NameWrapper"
2681
2719
  );
2682
2720
  const lineanamesNameWrapperAccount = maybeGetDatasourceContract(
2683
2721
  namespaceId,
2684
- import_datasources5.DatasourceNames.Lineanames,
2722
+ import_datasources4.DatasourceNames.Lineanames,
2685
2723
  "NameWrapper"
2686
2724
  );
2687
2725
  const nameWrapperAccounts = [
@@ -3426,15 +3464,15 @@ var ClientError = class _ClientError extends Error {
3426
3464
  };
3427
3465
 
3428
3466
  // src/ensapi/deployments.ts
3429
- var import_datasources6 = require("@ensnode/datasources");
3467
+ var import_datasources5 = require("@ensnode/datasources");
3430
3468
  var DEFAULT_ENSNODE_API_URL_MAINNET = "https://api.alpha.ensnode.io";
3431
3469
  var DEFAULT_ENSNODE_API_URL_SEPOLIA = "https://api.alpha-sepolia.ensnode.io";
3432
3470
  var getDefaultEnsNodeUrl = (namespace) => {
3433
- const effectiveNamespace = namespace ?? import_datasources6.ENSNamespaceIds.Mainnet;
3471
+ const effectiveNamespace = namespace ?? import_datasources5.ENSNamespaceIds.Mainnet;
3434
3472
  switch (effectiveNamespace) {
3435
- case import_datasources6.ENSNamespaceIds.Mainnet:
3473
+ case import_datasources5.ENSNamespaceIds.Mainnet:
3436
3474
  return new URL(DEFAULT_ENSNODE_API_URL_MAINNET);
3437
- case import_datasources6.ENSNamespaceIds.Sepolia:
3475
+ case import_datasources5.ENSNamespaceIds.Sepolia:
3438
3476
  return new URL(DEFAULT_ENSNODE_API_URL_SEPOLIA);
3439
3477
  default:
3440
3478
  throw new Error(
@@ -4224,18 +4262,19 @@ function validateEnsIndexerVersionInfo(unvalidatedVersionInfo) {
4224
4262
  }
4225
4263
 
4226
4264
  // src/ensv2/ids-lib.ts
4265
+ var import_enssdk2 = require("enssdk");
4227
4266
  var import_viem17 = require("viem");
4228
4267
  var makeRegistryId = (accountId) => formatAccountId(accountId);
4229
4268
  var makeENSv1DomainId = (node) => node;
4230
- var makeENSv2DomainId = (registry, canonicalId) => formatAssetId({
4231
- assetNamespace: AssetNamespaces.ERC1155,
4269
+ var makeENSv2DomainId = (registry, storageId) => formatAssetId({
4270
+ assetNamespace: import_enssdk2.AssetNamespaces.ERC1155,
4232
4271
  contract: registry,
4233
- tokenId: canonicalId
4272
+ tokenId: storageId
4234
4273
  });
4235
4274
  var maskLower32Bits = (num) => num ^ num & 0xffffffffn;
4236
- var getCanonicalId = (input) => {
4275
+ var getStorageId = (input) => {
4237
4276
  if (typeof input === "bigint") return maskLower32Bits(input);
4238
- return getCanonicalId((0, import_viem17.hexToBigInt)(input));
4277
+ return getStorageId((0, import_viem17.hexToBigInt)(input));
4239
4278
  };
4240
4279
  var makePermissionsId = (contract) => formatAccountId(contract);
4241
4280
  var makePermissionsResourceId = (contract, resource) => `${makePermissionsId(contract)}/${resource}`;
@@ -4245,18 +4284,8 @@ var makeResolverRecordsId = (resolver, node) => `${makeResolverId(resolver)}/${n
4245
4284
  var makeRegistrationId = (domainId, index) => `${domainId}/${index}`;
4246
4285
  var makeRenewalId = (domainId, registrationIndex, index) => `${makeRegistrationId(domainId, registrationIndex)}/${index}`;
4247
4286
 
4248
- // src/graphql-api/prerequisites.ts
4249
- function hasGraphqlApiConfigSupport(config) {
4250
- const supported = config.plugins.includes("ensv2" /* ENSv2 */);
4251
- if (supported) return { supported };
4252
- return {
4253
- supported: false,
4254
- reason: `The connected ENSNode's Config must have the '${"ensv2" /* ENSv2 */}' plugin enabled.`
4255
- };
4256
- }
4257
-
4258
4287
  // src/identity/identity.ts
4259
- var import_datasources7 = require("@ensnode/datasources");
4288
+ var import_datasources6 = require("@ensnode/datasources");
4260
4289
 
4261
4290
  // src/identity/types.ts
4262
4291
  var ResolutionStatusIds = {
@@ -4283,7 +4312,7 @@ var ResolutionStatusIds = {
4283
4312
  function buildUnresolvedIdentity(address, namespaceId, chainId) {
4284
4313
  return {
4285
4314
  resolutionStatus: ResolutionStatusIds.Unresolved,
4286
- chainId: chainId ?? (0, import_datasources7.getENSRootChainId)(namespaceId),
4315
+ chainId: chainId ?? (0, import_datasources6.getENSRootChainId)(namespaceId),
4287
4316
  address
4288
4317
  };
4289
4318
  }
@@ -4342,12 +4371,22 @@ ${(0, import_v437.prettifyError)(parsed.error)}
4342
4371
  return parsed.data;
4343
4372
  }
4344
4373
 
4374
+ // src/omnigraph-api/prerequisites.ts
4375
+ function hasOmnigraphApiConfigSupport(config) {
4376
+ const supported = config.plugins.includes("ensv2" /* ENSv2 */);
4377
+ if (supported) return { supported };
4378
+ return {
4379
+ supported: false,
4380
+ reason: `The connected ENSNode's Config must have the '${"ensv2" /* ENSv2 */}' plugin enabled.`
4381
+ };
4382
+ }
4383
+
4345
4384
  // src/registrars/basenames-subregistry.ts
4346
- var import_datasources8 = require("@ensnode/datasources");
4385
+ var import_datasources7 = require("@ensnode/datasources");
4347
4386
  function getBasenamesSubregistryId(namespace) {
4348
- const datasource = (0, import_datasources8.maybeGetDatasource)(namespace, import_datasources8.DatasourceNames.Basenames);
4387
+ const datasource = (0, import_datasources7.maybeGetDatasource)(namespace, import_datasources7.DatasourceNames.Basenames);
4349
4388
  if (!datasource) {
4350
- throw new Error(`Datasource not found for ${namespace} ${import_datasources8.DatasourceNames.Basenames}`);
4389
+ throw new Error(`Datasource not found for ${namespace} ${import_datasources7.DatasourceNames.Basenames}`);
4351
4390
  }
4352
4391
  const address = datasource.contracts.BaseRegistrar?.address;
4353
4392
  if (address === void 0 || Array.isArray(address)) {
@@ -4360,12 +4399,12 @@ function getBasenamesSubregistryId(namespace) {
4360
4399
  }
4361
4400
  function getBasenamesSubregistryManagedName(namespaceId) {
4362
4401
  switch (namespaceId) {
4363
- case import_datasources8.ENSNamespaceIds.Mainnet:
4402
+ case import_datasources7.ENSNamespaceIds.Mainnet:
4364
4403
  return "base.eth";
4365
- case import_datasources8.ENSNamespaceIds.Sepolia:
4366
- case import_datasources8.ENSNamespaceIds.SepoliaV2:
4404
+ case import_datasources7.ENSNamespaceIds.Sepolia:
4405
+ case import_datasources7.ENSNamespaceIds.SepoliaV2:
4367
4406
  return "basetest.eth";
4368
- case import_datasources8.ENSNamespaceIds.EnsTestEnv:
4407
+ case import_datasources7.ENSNamespaceIds.EnsTestEnv:
4369
4408
  throw new Error(
4370
4409
  `No registrar managed name is known for the 'basenames' subregistry within the "${namespaceId}" namespace.`
4371
4410
  );
@@ -4373,11 +4412,11 @@ function getBasenamesSubregistryManagedName(namespaceId) {
4373
4412
  }
4374
4413
 
4375
4414
  // src/registrars/ethnames-subregistry.ts
4376
- var import_datasources9 = require("@ensnode/datasources");
4415
+ var import_datasources8 = require("@ensnode/datasources");
4377
4416
  function getEthnamesSubregistryId(namespace) {
4378
- const datasource = (0, import_datasources9.maybeGetDatasource)(namespace, import_datasources9.DatasourceNames.ENSRoot);
4417
+ const datasource = (0, import_datasources8.maybeGetDatasource)(namespace, import_datasources8.DatasourceNames.ENSRoot);
4379
4418
  if (!datasource) {
4380
- throw new Error(`Datasource not found for ${namespace} ${import_datasources9.DatasourceNames.ENSRoot}`);
4419
+ throw new Error(`Datasource not found for ${namespace} ${import_datasources8.DatasourceNames.ENSRoot}`);
4381
4420
  }
4382
4421
  const address = datasource.contracts.BaseRegistrar?.address;
4383
4422
  if (address === void 0 || Array.isArray(address)) {
@@ -4390,20 +4429,20 @@ function getEthnamesSubregistryId(namespace) {
4390
4429
  }
4391
4430
  function getEthnamesSubregistryManagedName(namespaceId) {
4392
4431
  switch (namespaceId) {
4393
- case import_datasources9.ENSNamespaceIds.Mainnet:
4394
- case import_datasources9.ENSNamespaceIds.Sepolia:
4395
- case import_datasources9.ENSNamespaceIds.SepoliaV2:
4396
- case import_datasources9.ENSNamespaceIds.EnsTestEnv:
4432
+ case import_datasources8.ENSNamespaceIds.Mainnet:
4433
+ case import_datasources8.ENSNamespaceIds.Sepolia:
4434
+ case import_datasources8.ENSNamespaceIds.SepoliaV2:
4435
+ case import_datasources8.ENSNamespaceIds.EnsTestEnv:
4397
4436
  return "eth";
4398
4437
  }
4399
4438
  }
4400
4439
 
4401
4440
  // src/registrars/lineanames-subregistry.ts
4402
- var import_datasources10 = require("@ensnode/datasources");
4441
+ var import_datasources9 = require("@ensnode/datasources");
4403
4442
  function getLineanamesSubregistryId(namespace) {
4404
- const datasource = (0, import_datasources10.maybeGetDatasource)(namespace, import_datasources10.DatasourceNames.Lineanames);
4443
+ const datasource = (0, import_datasources9.maybeGetDatasource)(namespace, import_datasources9.DatasourceNames.Lineanames);
4405
4444
  if (!datasource) {
4406
- throw new Error(`Datasource not found for ${namespace} ${import_datasources10.DatasourceNames.Lineanames}`);
4445
+ throw new Error(`Datasource not found for ${namespace} ${import_datasources9.DatasourceNames.Lineanames}`);
4407
4446
  }
4408
4447
  const address = datasource.contracts.BaseRegistrar?.address;
4409
4448
  if (address === void 0 || Array.isArray(address)) {
@@ -4416,12 +4455,12 @@ function getLineanamesSubregistryId(namespace) {
4416
4455
  }
4417
4456
  function getLineanamesSubregistryManagedName(namespaceId) {
4418
4457
  switch (namespaceId) {
4419
- case import_datasources10.ENSNamespaceIds.Mainnet:
4458
+ case import_datasources9.ENSNamespaceIds.Mainnet:
4420
4459
  return "linea.eth";
4421
- case import_datasources10.ENSNamespaceIds.Sepolia:
4422
- case import_datasources10.ENSNamespaceIds.SepoliaV2:
4460
+ case import_datasources9.ENSNamespaceIds.Sepolia:
4461
+ case import_datasources9.ENSNamespaceIds.SepoliaV2:
4423
4462
  return "linea-sepolia.eth";
4424
- case import_datasources10.ENSNamespaceIds.EnsTestEnv:
4463
+ case import_datasources9.ENSNamespaceIds.EnsTestEnv:
4425
4464
  throw new Error(
4426
4465
  `No registrar managed name is known for the 'Lineanames' subregistry within the "${namespaceId}" namespace.`
4427
4466
  );
@@ -4445,13 +4484,13 @@ function isRegistrationInGracePeriod(info, now) {
4445
4484
 
4446
4485
  // src/resolution/ensip19-chainid.ts
4447
4486
  var import_chains = require("viem/chains");
4448
- var import_datasources11 = require("@ensnode/datasources");
4487
+ var import_datasources10 = require("@ensnode/datasources");
4449
4488
  var getResolvePrimaryNameChainIdParam = (chainId, namespaceId) => {
4450
- const ensRootChainId = (0, import_datasources11.getENSRootChainId)(namespaceId);
4489
+ const ensRootChainId = (0, import_datasources10.getENSRootChainId)(namespaceId);
4451
4490
  return chainId === ensRootChainId ? import_chains.mainnet.id : chainId;
4452
4491
  };
4453
4492
  var translateDefaultableChainIdToChainId = (chainId, namespaceId) => {
4454
- return chainId === DEFAULT_EVM_CHAIN_ID ? (0, import_datasources11.getENSRootChainId)(namespaceId) : chainId;
4493
+ return chainId === DEFAULT_EVM_CHAIN_ID ? (0, import_datasources10.getENSRootChainId)(namespaceId) : chainId;
4455
4494
  };
4456
4495
 
4457
4496
  // src/resolution/resolver-records-selection.ts
@@ -4772,12 +4811,12 @@ var TtlCache = class {
4772
4811
  };
4773
4812
 
4774
4813
  // src/shared/config/indexed-blockranges.ts
4775
- var import_datasources12 = require("@ensnode/datasources");
4814
+ var import_datasources11 = require("@ensnode/datasources");
4776
4815
  function buildIndexedBlockranges(namespace, pluginsDatasourceNames) {
4777
4816
  const indexedBlockranges = /* @__PURE__ */ new Map();
4778
4817
  for (const [, datasourceNames] of pluginsDatasourceNames) {
4779
4818
  for (const datasourceName of datasourceNames) {
4780
- const datasource = (0, import_datasources12.maybeGetDatasource)(namespace, datasourceName);
4819
+ const datasource = (0, import_datasources11.maybeGetDatasource)(namespace, datasourceName);
4781
4820
  if (!datasource) continue;
4782
4821
  const datasourceChainId = datasource.chain.id;
4783
4822
  const datasourceContracts = Object.values(datasource.contracts);
@@ -4921,13 +4960,13 @@ function getNamespaceSpecificValue(namespace, value) {
4921
4960
  }
4922
4961
 
4923
4962
  // src/shared/root-registry.ts
4924
- var import_datasources13 = require("@ensnode/datasources");
4925
- var getENSv1Registry = (namespace) => getDatasourceContract(namespace, import_datasources13.DatasourceNames.ENSRoot, "ENSv1Registry");
4963
+ var import_datasources12 = require("@ensnode/datasources");
4964
+ var getENSv1Registry = (namespace) => getDatasourceContract(namespace, import_datasources12.DatasourceNames.ENSRoot, "ENSv1Registry");
4926
4965
  var isENSv1Registry = (namespace, contract) => accountIdEqual(getENSv1Registry(namespace), contract);
4927
- var getENSv2RootRegistry = (namespace) => getDatasourceContract(namespace, import_datasources13.DatasourceNames.ENSv2Root, "RootRegistry");
4966
+ var getENSv2RootRegistry = (namespace) => getDatasourceContract(namespace, import_datasources12.DatasourceNames.ENSv2Root, "RootRegistry");
4928
4967
  var getENSv2RootRegistryId = (namespace) => makeRegistryId(getENSv2RootRegistry(namespace));
4929
4968
  var isENSv2RootRegistry = (namespace, contract) => accountIdEqual(getENSv2RootRegistry(namespace), contract);
4930
- var maybeGetENSv2RootRegistry = (namespace) => maybeGetDatasourceContract(namespace, import_datasources13.DatasourceNames.ENSv2Root, "RootRegistry");
4969
+ var maybeGetENSv2RootRegistry = (namespace) => maybeGetDatasourceContract(namespace, import_datasources12.DatasourceNames.ENSv2Root, "RootRegistry");
4931
4970
  var maybeGetENSv2RootRegistryId = (namespace) => {
4932
4971
  const root = maybeGetENSv2RootRegistry(namespace);
4933
4972
  if (!root) return void 0;