@ensnode/ensnode-sdk 0.0.0-next-20260216164355 → 0.0.0-next-20260217102457

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
@@ -47,12 +47,14 @@ __export(index_exports, {
47
47
  DEFAULT_EVM_COIN_TYPE: () => DEFAULT_EVM_COIN_TYPE,
48
48
  ENCODED_REFERRER_BYTE_LENGTH: () => ENCODED_REFERRER_BYTE_LENGTH,
49
49
  ENCODED_REFERRER_BYTE_OFFSET: () => ENCODED_REFERRER_BYTE_OFFSET,
50
- ENSNamespaceIds: () => import_datasources2.ENSNamespaceIds,
50
+ ENSNamespaceIds: () => import_datasources.ENSNamespaceIds,
51
51
  ENSNodeClient: () => ENSNodeClient,
52
52
  ENS_ROOT: () => ENS_ROOT,
53
53
  ETH_COIN_TYPE: () => ETH_COIN_TYPE,
54
54
  ETH_NODE: () => ETH_NODE,
55
55
  EXPECTED_ENCODED_REFERRER_PADDING: () => EXPECTED_ENCODED_REFERRER_PADDING,
56
+ EnsApiClient: () => EnsApiClient,
57
+ EnsApiIndexingStatusResponseCodes: () => EnsApiIndexingStatusResponseCodes,
56
58
  ForwardResolutionProtocolStep: () => ForwardResolutionProtocolStep,
57
59
  IndexingStatusResponseCodes: () => IndexingStatusResponseCodes,
58
60
  LINEANAMES_NODE: () => LINEANAMES_NODE,
@@ -124,6 +126,10 @@ __export(index_exports, {
124
126
  deserializeDuration: () => deserializeDuration,
125
127
  deserializeENSApiPublicConfig: () => deserializeENSApiPublicConfig,
126
128
  deserializeENSIndexerPublicConfig: () => deserializeENSIndexerPublicConfig,
129
+ deserializeEnsApiConfigResponse: () => deserializeEnsApiConfigResponse,
130
+ deserializeEnsApiIndexingStatusResponse: () => deserializeEnsApiIndexingStatusResponse,
131
+ deserializeEnsApiPublicConfig: () => deserializeEnsApiPublicConfig,
132
+ deserializeEnsIndexerPublicConfig: () => deserializeEnsIndexerPublicConfig,
127
133
  deserializeErrorResponse: () => deserializeErrorResponse,
128
134
  deserializeIndexingStatusResponse: () => deserializeIndexingStatusResponse,
129
135
  deserializeOmnichainIndexingStatusSnapshot: () => deserializeOmnichainIndexingStatusSnapshot,
@@ -149,7 +155,7 @@ __export(index_exports, {
149
155
  getCurrencyInfo: () => getCurrencyInfo,
150
156
  getDatasourceContract: () => getDatasourceContract,
151
157
  getDefaultEnsNodeUrl: () => getDefaultEnsNodeUrl,
152
- getENSRootChainId: () => import_datasources3.getENSRootChainId,
158
+ getENSRootChainId: () => import_datasources2.getENSRootChainId,
153
159
  getENSv1Registry: () => getENSv1Registry,
154
160
  getENSv2RootRegistry: () => getENSv2RootRegistry,
155
161
  getENSv2RootRegistryId: () => getENSv2RootRegistryId,
@@ -209,6 +215,7 @@ __export(index_exports, {
209
215
  makeENSApiPublicConfigSchema: () => makeENSApiPublicConfigSchema,
210
216
  makeENSv1DomainId: () => makeENSv1DomainId,
211
217
  makeENSv2DomainId: () => makeENSv2DomainId,
218
+ makeEnsApiPublicConfigSchema: () => makeEnsApiPublicConfigSchema,
212
219
  makeLatestRegistrationId: () => makeLatestRegistrationId,
213
220
  makeLatestRenewalId: () => makeLatestRenewalId,
214
221
  makePermissionsId: () => makePermissionsId,
@@ -247,6 +254,10 @@ __export(index_exports, {
247
254
  serializeDomainAssetId: () => serializeDomainAssetId,
248
255
  serializeENSApiPublicConfig: () => serializeENSApiPublicConfig,
249
256
  serializeENSIndexerPublicConfig: () => serializeENSIndexerPublicConfig,
257
+ serializeEnsApiConfigResponse: () => serializeEnsApiConfigResponse,
258
+ serializeEnsApiIndexingStatusResponse: () => serializeEnsApiIndexingStatusResponse,
259
+ serializeEnsApiPublicConfig: () => serializeEnsApiPublicConfig,
260
+ serializeEnsIndexerPublicConfig: () => serializeEnsIndexerPublicConfig,
250
261
  serializeIndexedChainIds: () => serializeIndexedChainIds,
251
262
  serializeIndexingStatusResponse: () => serializeIndexingStatusResponse,
252
263
  serializeNameToken: () => serializeNameToken,
@@ -276,56 +287,8 @@ __export(index_exports, {
276
287
  });
277
288
  module.exports = __toCommonJS(index_exports);
278
289
 
279
- // src/client-error.ts
280
- var ClientError = class _ClientError extends Error {
281
- details;
282
- constructor(message, details) {
283
- super(message);
284
- this.name = "ClientError";
285
- this.details = details;
286
- }
287
- static fromErrorResponse({ message, details }) {
288
- return new _ClientError(message, details);
289
- }
290
- };
291
-
292
- // src/deployments.ts
293
- var import_datasources = require("@ensnode/datasources");
294
- var DEFAULT_ENSNODE_API_URL_MAINNET = "https://api.alpha.ensnode.io";
295
- var DEFAULT_ENSNODE_API_URL_SEPOLIA = "https://api.alpha-sepolia.ensnode.io";
296
- var getDefaultEnsNodeUrl = (namespace) => {
297
- const effectiveNamespace = namespace ?? import_datasources.ENSNamespaceIds.Mainnet;
298
- switch (effectiveNamespace) {
299
- case import_datasources.ENSNamespaceIds.Mainnet:
300
- return new URL(DEFAULT_ENSNODE_API_URL_MAINNET);
301
- case import_datasources.ENSNamespaceIds.Sepolia:
302
- return new URL(DEFAULT_ENSNODE_API_URL_SEPOLIA);
303
- default:
304
- throw new Error(
305
- `ENSNamespaceId ${effectiveNamespace} does not have a default ENSNode URL defined`
306
- );
307
- }
308
- };
309
-
310
- // src/ensapi/config/deserialize.ts
311
- var import_v45 = require("zod/v4");
312
-
313
- // src/ensapi/config/zod-schemas.ts
314
- var import_v44 = require("zod/v4");
315
-
316
- // src/ensindexer/config/zod-schemas.ts
317
- var import_v42 = require("zod/v4");
318
-
319
- // src/shared/collections.ts
320
- var uniq = (arr) => [...new Set(arr)];
321
-
322
- // src/shared/zod-schemas.ts
323
- var import_caip = require("caip");
324
- var import_viem8 = require("viem");
325
- var import_v4 = require("zod/v4");
326
-
327
290
  // src/ens/index.ts
328
- var import_datasources3 = require("@ensnode/datasources");
291
+ var import_datasources2 = require("@ensnode/datasources");
329
292
 
330
293
  // src/ens/coin-type.ts
331
294
  var import_utils = require("@ensdomains/address-encoder/utils");
@@ -514,7 +477,24 @@ var makeSubdomainNode = (labelHash, node) => (0, import_viem5.keccak256)((0, imp
514
477
  var uint256ToHex32 = (num) => (0, import_viem5.toHex)(num, { size: 32 });
515
478
 
516
479
  // src/ens/types.ts
517
- var import_datasources2 = require("@ensnode/datasources");
480
+ var import_datasources = require("@ensnode/datasources");
481
+
482
+ // src/ensapi/config/deserialize.ts
483
+ var import_v45 = require("zod/v4");
484
+
485
+ // src/ensapi/config/zod-schemas.ts
486
+ var import_v44 = require("zod/v4");
487
+
488
+ // src/ensindexer/config/zod-schemas.ts
489
+ var import_v42 = require("zod/v4");
490
+
491
+ // src/shared/collections.ts
492
+ var uniq = (arr) => [...new Set(arr)];
493
+
494
+ // src/shared/zod-schemas.ts
495
+ var import_caip = require("caip");
496
+ var import_viem8 = require("viem");
497
+ var import_v4 = require("zod/v4");
518
498
 
519
499
  // src/shared/currencies.ts
520
500
  var import_viem6 = require("viem");
@@ -745,9 +725,9 @@ var makeBlockRefSchema = (valueLabel = "Value") => import_v4.z.strictObject(
745
725
  error: `${valueLabel} must be a valid BlockRef object.`
746
726
  }
747
727
  );
748
- var makeENSNamespaceIdSchema = (valueLabel = "ENSNamespaceId") => import_v4.z.enum(import_datasources2.ENSNamespaceIds, {
728
+ var makeENSNamespaceIdSchema = (valueLabel = "ENSNamespaceId") => import_v4.z.enum(import_datasources.ENSNamespaceIds, {
749
729
  error() {
750
- return `Invalid ${valueLabel}. Supported ENS namespace IDs are: ${Object.keys(import_datasources2.ENSNamespaceIds).join(", ")}`;
730
+ return `Invalid ${valueLabel}. Supported ENS namespace IDs are: ${Object.keys(import_datasources.ENSNamespaceIds).join(", ")}`;
751
731
  }
752
732
  });
753
733
  var makePriceAmountSchema = (valueLabel = "Amount") => import_v4.z.coerce.bigint({
@@ -810,7 +790,7 @@ var makeReinterpretedNameSchema = (valueLabel = "Reinterpreted Name") => import_
810
790
  }).transform(reinterpretName);
811
791
 
812
792
  // src/ensindexer/config/is-subgraph-compatible.ts
813
- var import_datasources4 = require("@ensnode/datasources");
793
+ var import_datasources3 = require("@ensnode/datasources");
814
794
 
815
795
  // src/ensindexer/config/types.ts
816
796
  var PluginName = /* @__PURE__ */ ((PluginName2) => {
@@ -830,7 +810,7 @@ function isSubgraphCompatible(config) {
830
810
  const onlySubgraphPluginActivated = config.plugins.length === 1 && config.plugins[0] === "subgraph" /* Subgraph */;
831
811
  const isSubgraphLabelSet = config.labelSet.labelSetId === "subgraph" && config.labelSet.labelSetVersion === 0;
832
812
  const isEnsTestEnvLabelSet = config.labelSet.labelSetId === "ens-test-env" && config.labelSet.labelSetVersion === 0;
833
- const labelSetIsSubgraphCompatible = isSubgraphLabelSet || config.namespace === import_datasources4.ENSNamespaceIds.EnsTestEnv && isEnsTestEnvLabelSet;
813
+ const labelSetIsSubgraphCompatible = isSubgraphLabelSet || config.namespace === import_datasources3.ENSNamespaceIds.EnsTestEnv && isEnsTestEnvLabelSet;
834
814
  return onlySubgraphPluginActivated && labelSetIsSubgraphCompatible;
835
815
  }
836
816
 
@@ -884,7 +864,7 @@ var makeFullyPinnedLabelSetSchema = (valueLabel = "Label set") => {
884
864
  });
885
865
  };
886
866
  var makeNonEmptyStringSchema = (valueLabel = "Value") => import_v42.z.string().nonempty({ error: `${valueLabel} must be a non-empty string.` });
887
- var makeENSIndexerVersionInfoSchema = (valueLabel = "Value") => import_v42.z.strictObject(
867
+ var makeEnsIndexerVersionInfoSchema = (valueLabel = "Value") => import_v42.z.strictObject(
888
868
  {
889
869
  nodejs: makeNonEmptyStringSchema(),
890
870
  ponder: makeNonEmptyStringSchema(),
@@ -898,6 +878,7 @@ var makeENSIndexerVersionInfoSchema = (valueLabel = "Value") => import_v42.z.str
898
878
  error: `${valueLabel} must be a valid ENSIndexerVersionInfo object.`
899
879
  }
900
880
  ).check(invariant_ensDbVersionIsSameAsEnsIndexerVersion);
881
+ var makeENSIndexerVersionInfoSchema = makeEnsIndexerVersionInfoSchema;
901
882
  function invariant_isSubgraphCompatibleRequirements(ctx) {
902
883
  const { value: config } = ctx;
903
884
  if (config.isSubgraphCompatible && !isSubgraphCompatible(config)) {
@@ -908,7 +889,7 @@ function invariant_isSubgraphCompatibleRequirements(ctx) {
908
889
  });
909
890
  }
910
891
  }
911
- var makeENSIndexerPublicConfigSchema = (valueLabel = "ENSIndexerPublicConfig") => import_v42.z.object({
892
+ var makeEnsIndexerPublicConfigSchema = (valueLabel = "ENSIndexerPublicConfig") => import_v42.z.object({
912
893
  labelSet: makeFullyPinnedLabelSetSchema(`${valueLabel}.labelSet`),
913
894
  indexedChainIds: makeIndexedChainIdsSchema(`${valueLabel}.indexedChainIds`),
914
895
  isSubgraphCompatible: import_v42.z.boolean({ error: `${valueLabel}.isSubgraphCompatible` }),
@@ -937,133 +918,43 @@ var TheGraphFallbackSchema = import_v43.z.discriminatedUnion("canFallback", [
937
918
  ]);
938
919
 
939
920
  // src/ensapi/config/zod-schemas.ts
940
- function makeENSApiPublicConfigSchema(valueLabel) {
921
+ function makeEnsApiPublicConfigSchema(valueLabel) {
941
922
  const label = valueLabel ?? "ENSApiPublicConfig";
942
923
  return import_v44.z.strictObject({
943
924
  version: import_v44.z.string().min(1, `${label}.version must be a non-empty string`),
944
925
  theGraphFallback: TheGraphFallbackSchema,
945
- ensIndexerPublicConfig: makeENSIndexerPublicConfigSchema(`${label}.ensIndexerPublicConfig`)
926
+ ensIndexerPublicConfig: makeEnsIndexerPublicConfigSchema(`${label}.ensIndexerPublicConfig`)
946
927
  });
947
928
  }
929
+ var makeENSApiPublicConfigSchema = makeEnsApiPublicConfigSchema;
948
930
 
949
931
  // src/ensapi/config/deserialize.ts
950
- function deserializeENSApiPublicConfig(maybeConfig, valueLabel) {
951
- const schema = makeENSApiPublicConfigSchema(valueLabel);
932
+ function deserializeEnsApiPublicConfig(maybeConfig, valueLabel) {
933
+ const schema = makeEnsApiPublicConfigSchema(valueLabel);
952
934
  try {
953
935
  return schema.parse(maybeConfig);
954
936
  } catch (error) {
955
937
  if (error instanceof import_v45.ZodError) {
956
- throw new Error(`Cannot deserialize ENSApiPublicConfig:
938
+ throw new Error(`Cannot deserialize EnsApiPublicConfig:
957
939
  ${(0, import_v45.prettifyError)(error)}
958
940
  `);
959
941
  }
960
942
  throw error;
961
943
  }
962
944
  }
945
+ var deserializeENSApiPublicConfig = deserializeEnsApiPublicConfig;
963
946
 
964
947
  // src/ensapi/api/config/deserialize.ts
965
- function deserializeConfigResponse(serializedResponse) {
966
- return deserializeENSApiPublicConfig(serializedResponse);
967
- }
968
-
969
- // src/ensindexer/config/deserialize.ts
970
- var import_v46 = require("zod/v4");
971
- function deserializeENSIndexerPublicConfig(maybeConfig, valueLabel) {
972
- const schema = makeENSIndexerPublicConfigSchema(valueLabel);
973
- const parsed = schema.safeParse(maybeConfig);
974
- if (parsed.error) {
975
- throw new Error(`Cannot deserialize ENSIndexerPublicConfig:
976
- ${(0, import_v46.prettifyError)(parsed.error)}
977
- `);
978
- }
979
- return parsed.data;
980
- }
981
-
982
- // src/ensindexer/config/label-utils.ts
983
- var import_viem9 = require("viem");
984
- function labelHashToBytes(labelHash) {
985
- try {
986
- if (labelHash.length !== 66) {
987
- throw new Error(`Invalid labelHash length ${labelHash.length} characters (expected 66)`);
988
- }
989
- if (labelHash !== labelHash.toLowerCase()) {
990
- throw new Error("Labelhash must be in lowercase");
991
- }
992
- if (!labelHash.startsWith("0x")) {
993
- throw new Error("Labelhash must be 0x-prefixed");
994
- }
995
- const bytes = (0, import_viem9.hexToBytes)(labelHash);
996
- if (bytes.length !== 32) {
997
- throw new Error(`Invalid labelHash length ${bytes.length} bytes (expected 32)`);
998
- }
999
- return bytes;
1000
- } catch (e) {
1001
- if (e instanceof Error) {
1002
- throw e;
1003
- }
1004
- throw new Error("Invalid hex format");
1005
- }
1006
- }
1007
-
1008
- // src/ensindexer/config/labelset-utils.ts
1009
- function buildLabelSetId(maybeLabelSetId) {
1010
- return makeLabelSetIdSchema("LabelSetId").parse(maybeLabelSetId);
1011
- }
1012
- function buildLabelSetVersion(maybeLabelSetVersion) {
1013
- return makeLabelSetVersionSchema("LabelSetVersion").parse(maybeLabelSetVersion);
1014
- }
1015
- function buildEnsRainbowClientLabelSet(labelSetId, labelSetVersion) {
1016
- if (labelSetVersion !== void 0 && labelSetId === void 0) {
1017
- throw new Error("When a labelSetVersion is defined, labelSetId must also be defined.");
1018
- }
1019
- return { labelSetId, labelSetVersion };
1020
- }
1021
- function validateSupportedLabelSetAndVersion(serverSet, clientSet) {
1022
- if (clientSet.labelSetId === void 0) {
1023
- return;
1024
- }
1025
- if (serverSet.labelSetId !== clientSet.labelSetId) {
1026
- throw new Error(
1027
- `Server label set ID "${serverSet.labelSetId}" does not match client's requested label set ID "${clientSet.labelSetId}".`
1028
- );
1029
- }
1030
- if (clientSet.labelSetVersion !== void 0 && serverSet.highestLabelSetVersion < clientSet.labelSetVersion) {
1031
- throw new Error(
1032
- `Server highest label set version ${serverSet.highestLabelSetVersion} is less than client's requested version ${clientSet.labelSetVersion} for label set ID "${clientSet.labelSetId}".`
1033
- );
1034
- }
1035
- }
1036
-
1037
- // src/ensindexer/config/parsing.ts
1038
- function parseNonNegativeInteger(maybeNumber) {
1039
- const trimmed = maybeNumber.trim();
1040
- if (!trimmed) {
1041
- throw new Error("Input cannot be empty");
1042
- }
1043
- if (trimmed === "-0") {
1044
- throw new Error("Negative zero is not a valid non-negative integer");
1045
- }
1046
- const num = Number(maybeNumber);
1047
- if (Number.isNaN(num)) {
1048
- throw new Error(`"${maybeNumber}" is not a valid number`);
1049
- }
1050
- if (!Number.isFinite(num)) {
1051
- throw new Error(`"${maybeNumber}" is not a finite number`);
1052
- }
1053
- if (!Number.isInteger(num)) {
1054
- throw new Error(`"${maybeNumber}" is not an integer`);
1055
- }
1056
- if (num < 0) {
1057
- throw new Error(`"${maybeNumber}" is not a non-negative integer`);
1058
- }
1059
- return num;
948
+ function deserializeEnsApiConfigResponse(serializedResponse) {
949
+ return deserializeEnsApiPublicConfig(serializedResponse);
1060
950
  }
951
+ var deserializeConfigResponse = deserializeEnsApiConfigResponse;
1061
952
 
1062
953
  // src/ensindexer/config/serialize.ts
1063
954
  function serializeIndexedChainIds(indexedChainIds) {
1064
955
  return Array.from(indexedChainIds);
1065
956
  }
1066
- function serializeENSIndexerPublicConfig(config) {
957
+ function serializeEnsIndexerPublicConfig(config) {
1067
958
  const {
1068
959
  labelSet,
1069
960
  indexedChainIds,
@@ -1083,33 +974,36 @@ function serializeENSIndexerPublicConfig(config) {
1083
974
  versionInfo
1084
975
  };
1085
976
  }
977
+ var serializeENSIndexerPublicConfig = serializeEnsIndexerPublicConfig;
1086
978
 
1087
979
  // src/ensapi/config/serialize.ts
1088
- function serializeENSApiPublicConfig(config) {
980
+ function serializeEnsApiPublicConfig(config) {
1089
981
  const { version, theGraphFallback, ensIndexerPublicConfig } = config;
1090
982
  return {
1091
983
  version,
1092
984
  theGraphFallback,
1093
- ensIndexerPublicConfig: serializeENSIndexerPublicConfig(ensIndexerPublicConfig)
985
+ ensIndexerPublicConfig: serializeEnsIndexerPublicConfig(ensIndexerPublicConfig)
1094
986
  };
1095
987
  }
988
+ var serializeENSApiPublicConfig = serializeEnsApiPublicConfig;
1096
989
 
1097
990
  // src/ensapi/api/config/serialize.ts
1098
- function serializeConfigResponse(response) {
1099
- return serializeENSApiPublicConfig(response);
991
+ function serializeEnsApiConfigResponse(response) {
992
+ return serializeEnsApiPublicConfig(response);
1100
993
  }
994
+ var serializeConfigResponse = serializeEnsApiConfigResponse;
1101
995
 
1102
996
  // src/ensapi/api/indexing-status/deserialize.ts
1103
- var import_v415 = require("zod/v4");
997
+ var import_v414 = require("zod/v4");
1104
998
 
1105
999
  // src/indexing-status/deserialize/realtime-indexing-status-projection.ts
1106
- var import_v413 = require("zod/v4");
1000
+ var import_v412 = require("zod/v4");
1107
1001
 
1108
1002
  // src/indexing-status/zod-schema/realtime-indexing-status-projection.ts
1109
- var import_v410 = require("zod/v4");
1003
+ var import_v49 = require("zod/v4");
1110
1004
 
1111
1005
  // src/indexing-status/zod-schema/cross-chain-indexing-status-snapshot.ts
1112
- var import_v49 = require("zod/v4");
1006
+ var import_v48 = require("zod/v4");
1113
1007
 
1114
1008
  // src/indexing-status/chain-indexing-status-snapshot.ts
1115
1009
  var ChainIndexingConfigTypeIds = {
@@ -1240,7 +1134,7 @@ function getLatestIndexedBlockRef(indexingStatus, chainId) {
1240
1134
  }
1241
1135
 
1242
1136
  // src/indexing-status/zod-schema/omnichain-indexing-status-snapshot.ts
1243
- var import_v48 = require("zod/v4");
1137
+ var import_v47 = require("zod/v4");
1244
1138
 
1245
1139
  // src/indexing-status/omnichain-indexing-status-snapshot.ts
1246
1140
  var OmnichainIndexingStatusIds = {
@@ -1324,7 +1218,7 @@ function getOmnichainIndexingCursor(chains) {
1324
1218
  }
1325
1219
 
1326
1220
  // src/indexing-status/zod-schema/chain-indexing-status-snapshot.ts
1327
- var import_v47 = require("zod/v4");
1221
+ var import_v46 = require("zod/v4");
1328
1222
 
1329
1223
  // src/shared/block-ref.ts
1330
1224
  function isBefore(blockA, blockB) {
@@ -1412,46 +1306,46 @@ function invariant_chainSnapshotFollowingBlocks(ctx) {
1412
1306
  });
1413
1307
  }
1414
1308
  }
1415
- var makeChainIndexingConfigSchema = (valueLabel = "Value") => import_v47.z.discriminatedUnion("configType", [
1416
- import_v47.z.object({
1417
- configType: import_v47.z.literal(ChainIndexingConfigTypeIds.Indefinite),
1309
+ var makeChainIndexingConfigSchema = (valueLabel = "Value") => import_v46.z.discriminatedUnion("configType", [
1310
+ import_v46.z.object({
1311
+ configType: import_v46.z.literal(ChainIndexingConfigTypeIds.Indefinite),
1418
1312
  startBlock: makeBlockRefSchema(valueLabel)
1419
1313
  }),
1420
- import_v47.z.object({
1421
- configType: import_v47.z.literal(ChainIndexingConfigTypeIds.Definite),
1314
+ import_v46.z.object({
1315
+ configType: import_v46.z.literal(ChainIndexingConfigTypeIds.Definite),
1422
1316
  startBlock: makeBlockRefSchema(valueLabel),
1423
1317
  endBlock: makeBlockRefSchema(valueLabel)
1424
1318
  })
1425
1319
  ]);
1426
- var makeChainIndexingStatusSnapshotQueuedSchema = (valueLabel = "Value") => import_v47.z.object({
1427
- chainStatus: import_v47.z.literal(ChainIndexingStatusIds.Queued),
1320
+ var makeChainIndexingStatusSnapshotQueuedSchema = (valueLabel = "Value") => import_v46.z.object({
1321
+ chainStatus: import_v46.z.literal(ChainIndexingStatusIds.Queued),
1428
1322
  config: makeChainIndexingConfigSchema(valueLabel)
1429
1323
  }).check(invariant_chainSnapshotQueuedBlocks);
1430
- var makeChainIndexingStatusSnapshotBackfillSchema = (valueLabel = "Value") => import_v47.z.object({
1431
- chainStatus: import_v47.z.literal(ChainIndexingStatusIds.Backfill),
1324
+ var makeChainIndexingStatusSnapshotBackfillSchema = (valueLabel = "Value") => import_v46.z.object({
1325
+ chainStatus: import_v46.z.literal(ChainIndexingStatusIds.Backfill),
1432
1326
  config: makeChainIndexingConfigSchema(valueLabel),
1433
1327
  latestIndexedBlock: makeBlockRefSchema(valueLabel),
1434
1328
  backfillEndBlock: makeBlockRefSchema(valueLabel)
1435
1329
  }).check(invariant_chainSnapshotBackfillBlocks);
1436
- var makeChainIndexingStatusSnapshotCompletedSchema = (valueLabel = "Value") => import_v47.z.object({
1437
- chainStatus: import_v47.z.literal(ChainIndexingStatusIds.Completed),
1438
- config: import_v47.z.object({
1439
- configType: import_v47.z.literal(ChainIndexingConfigTypeIds.Definite),
1330
+ var makeChainIndexingStatusSnapshotCompletedSchema = (valueLabel = "Value") => import_v46.z.object({
1331
+ chainStatus: import_v46.z.literal(ChainIndexingStatusIds.Completed),
1332
+ config: import_v46.z.object({
1333
+ configType: import_v46.z.literal(ChainIndexingConfigTypeIds.Definite),
1440
1334
  startBlock: makeBlockRefSchema(valueLabel),
1441
1335
  endBlock: makeBlockRefSchema(valueLabel)
1442
1336
  }),
1443
1337
  latestIndexedBlock: makeBlockRefSchema(valueLabel)
1444
1338
  }).check(invariant_chainSnapshotCompletedBlocks);
1445
- var makeChainIndexingStatusSnapshotFollowingSchema = (valueLabel = "Value") => import_v47.z.object({
1446
- chainStatus: import_v47.z.literal(ChainIndexingStatusIds.Following),
1447
- config: import_v47.z.object({
1448
- configType: import_v47.z.literal(ChainIndexingConfigTypeIds.Indefinite),
1339
+ var makeChainIndexingStatusSnapshotFollowingSchema = (valueLabel = "Value") => import_v46.z.object({
1340
+ chainStatus: import_v46.z.literal(ChainIndexingStatusIds.Following),
1341
+ config: import_v46.z.object({
1342
+ configType: import_v46.z.literal(ChainIndexingConfigTypeIds.Indefinite),
1449
1343
  startBlock: makeBlockRefSchema(valueLabel)
1450
1344
  }),
1451
1345
  latestIndexedBlock: makeBlockRefSchema(valueLabel),
1452
1346
  latestKnownBlock: makeBlockRefSchema(valueLabel)
1453
1347
  }).check(invariant_chainSnapshotFollowingBlocks);
1454
- var makeChainIndexingStatusSnapshotSchema = (valueLabel = "Value") => import_v47.z.discriminatedUnion("chainStatus", [
1348
+ var makeChainIndexingStatusSnapshotSchema = (valueLabel = "Value") => import_v46.z.discriminatedUnion("chainStatus", [
1455
1349
  makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
1456
1350
  makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
1457
1351
  makeChainIndexingStatusSnapshotCompletedSchema(valueLabel),
@@ -1580,11 +1474,11 @@ function invariant_omnichainStatusSnapshotFollowingHasValidChains(ctx) {
1580
1474
  });
1581
1475
  }
1582
1476
  }
1583
- var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_v48.z.object({
1584
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Unstarted),
1585
- chains: import_v48.z.map(
1477
+ var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_v47.z.object({
1478
+ omnichainStatus: import_v47.z.literal(OmnichainIndexingStatusIds.Unstarted),
1479
+ chains: import_v47.z.map(
1586
1480
  makeChainIdSchema(),
1587
- import_v48.z.discriminatedUnion("chainStatus", [
1481
+ import_v47.z.discriminatedUnion("chainStatus", [
1588
1482
  makeChainIndexingStatusSnapshotQueuedSchema(valueLabel)
1589
1483
  ]),
1590
1484
  {
@@ -1593,11 +1487,11 @@ var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_
1593
1487
  ),
1594
1488
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1595
1489
  }).check(invariant_omnichainSnapshotUnstartedHasValidChains);
1596
- var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v48.z.object({
1597
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Backfill),
1598
- chains: import_v48.z.map(
1490
+ var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v47.z.object({
1491
+ omnichainStatus: import_v47.z.literal(OmnichainIndexingStatusIds.Backfill),
1492
+ chains: import_v47.z.map(
1599
1493
  makeChainIdSchema(),
1600
- import_v48.z.discriminatedUnion("chainStatus", [
1494
+ import_v47.z.discriminatedUnion("chainStatus", [
1601
1495
  makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
1602
1496
  makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
1603
1497
  makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
@@ -1608,11 +1502,11 @@ var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v
1608
1502
  ),
1609
1503
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1610
1504
  }).check(invariant_omnichainStatusSnapshotBackfillHasValidChains);
1611
- var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_v48.z.object({
1612
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Completed),
1613
- chains: import_v48.z.map(
1505
+ var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_v47.z.object({
1506
+ omnichainStatus: import_v47.z.literal(OmnichainIndexingStatusIds.Completed),
1507
+ chains: import_v47.z.map(
1614
1508
  makeChainIdSchema(),
1615
- import_v48.z.discriminatedUnion("chainStatus", [
1509
+ import_v47.z.discriminatedUnion("chainStatus", [
1616
1510
  makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
1617
1511
  ]),
1618
1512
  {
@@ -1621,11 +1515,11 @@ var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_
1621
1515
  ),
1622
1516
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1623
1517
  }).check(invariant_omnichainStatusSnapshotCompletedHasValidChains);
1624
- var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_v48.z.object({
1625
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Following),
1626
- chains: import_v48.z.map(
1518
+ var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_v47.z.object({
1519
+ omnichainStatus: import_v47.z.literal(OmnichainIndexingStatusIds.Following),
1520
+ chains: import_v47.z.map(
1627
1521
  makeChainIdSchema(),
1628
- import_v48.z.discriminatedUnion("chainStatus", [
1522
+ import_v47.z.discriminatedUnion("chainStatus", [
1629
1523
  makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
1630
1524
  makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
1631
1525
  makeChainIndexingStatusSnapshotFollowingSchema(valueLabel),
@@ -1637,7 +1531,7 @@ var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_
1637
1531
  ),
1638
1532
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1639
1533
  }).check(invariant_omnichainStatusSnapshotFollowingHasValidChains);
1640
- var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexing Snapshot") => import_v48.z.discriminatedUnion("omnichainStatus", [
1534
+ var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexing Snapshot") => import_v47.z.discriminatedUnion("omnichainStatus", [
1641
1535
  makeOmnichainIndexingStatusSnapshotUnstartedSchema(valueLabel),
1642
1536
  makeOmnichainIndexingStatusSnapshotBackfillSchema(valueLabel),
1643
1537
  makeOmnichainIndexingStatusSnapshotCompletedSchema(valueLabel),
@@ -1645,21 +1539,21 @@ var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexin
1645
1539
  ]).check(invariant_omnichainSnapshotStatusIsConsistentWithChainSnapshot).check(invariant_omnichainIndexingCursorLowerThanEarliestStartBlockAcrossQueuedChains).check(
1646
1540
  invariant_omnichainIndexingCursorLowerThanOrEqualToLatestBackfillEndBlockAcrossBackfillChains
1647
1541
  ).check(invariant_omnichainIndexingCursorIsEqualToHighestLatestIndexedBlockAcrossIndexedChain);
1648
- var makeSerializedOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_v48.z.object({
1649
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Unstarted),
1650
- chains: import_v48.z.record(
1542
+ var makeSerializedOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_v47.z.object({
1543
+ omnichainStatus: import_v47.z.literal(OmnichainIndexingStatusIds.Unstarted),
1544
+ chains: import_v47.z.record(
1651
1545
  makeChainIdStringSchema(),
1652
- import_v48.z.discriminatedUnion("chainStatus", [
1546
+ import_v47.z.discriminatedUnion("chainStatus", [
1653
1547
  makeChainIndexingStatusSnapshotQueuedSchema(valueLabel)
1654
1548
  ])
1655
1549
  ),
1656
1550
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1657
1551
  });
1658
- var makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v48.z.object({
1659
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Backfill),
1660
- chains: import_v48.z.record(
1552
+ var makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v47.z.object({
1553
+ omnichainStatus: import_v47.z.literal(OmnichainIndexingStatusIds.Backfill),
1554
+ chains: import_v47.z.record(
1661
1555
  makeChainIdStringSchema(),
1662
- import_v48.z.discriminatedUnion("chainStatus", [
1556
+ import_v47.z.discriminatedUnion("chainStatus", [
1663
1557
  makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
1664
1558
  makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
1665
1559
  makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
@@ -1667,21 +1561,21 @@ var makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) =
1667
1561
  ),
1668
1562
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1669
1563
  });
1670
- var makeSerializedOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_v48.z.object({
1671
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Completed),
1672
- chains: import_v48.z.record(
1564
+ var makeSerializedOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_v47.z.object({
1565
+ omnichainStatus: import_v47.z.literal(OmnichainIndexingStatusIds.Completed),
1566
+ chains: import_v47.z.record(
1673
1567
  makeChainIdStringSchema(),
1674
- import_v48.z.discriminatedUnion("chainStatus", [
1568
+ import_v47.z.discriminatedUnion("chainStatus", [
1675
1569
  makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
1676
1570
  ])
1677
1571
  ),
1678
1572
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1679
1573
  });
1680
- var makeSerializedOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_v48.z.object({
1681
- omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Following),
1682
- chains: import_v48.z.record(
1574
+ var makeSerializedOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_v47.z.object({
1575
+ omnichainStatus: import_v47.z.literal(OmnichainIndexingStatusIds.Following),
1576
+ chains: import_v47.z.record(
1683
1577
  makeChainIdStringSchema(),
1684
- import_v48.z.discriminatedUnion("chainStatus", [
1578
+ import_v47.z.discriminatedUnion("chainStatus", [
1685
1579
  makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
1686
1580
  makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
1687
1581
  makeChainIndexingStatusSnapshotFollowingSchema(valueLabel),
@@ -1690,7 +1584,7 @@ var makeSerializedOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel)
1690
1584
  ),
1691
1585
  omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
1692
1586
  });
1693
- var makeSerializedOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Value") => import_v48.z.discriminatedUnion("omnichainStatus", [
1587
+ var makeSerializedOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Value") => import_v47.z.discriminatedUnion("omnichainStatus", [
1694
1588
  makeSerializedOmnichainIndexingStatusSnapshotUnstartedSchema(valueLabel),
1695
1589
  makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema(valueLabel),
1696
1590
  makeSerializedOmnichainIndexingStatusSnapshotCompletedSchema(valueLabel),
@@ -1730,17 +1624,17 @@ function invariant_snapshotTimeIsTheHighestKnownBlockTimestamp(ctx) {
1730
1624
  });
1731
1625
  }
1732
1626
  }
1733
- var makeCrossChainIndexingStatusSnapshotOmnichainSchema = (valueLabel = "Cross-chain Indexing Status Snapshot Omnichain") => import_v49.z.object({
1734
- strategy: import_v49.z.literal(CrossChainIndexingStrategyIds.Omnichain),
1627
+ var makeCrossChainIndexingStatusSnapshotOmnichainSchema = (valueLabel = "Cross-chain Indexing Status Snapshot Omnichain") => import_v48.z.object({
1628
+ strategy: import_v48.z.literal(CrossChainIndexingStrategyIds.Omnichain),
1735
1629
  slowestChainIndexingCursor: makeUnixTimestampSchema(valueLabel),
1736
1630
  snapshotTime: makeUnixTimestampSchema(valueLabel),
1737
1631
  omnichainSnapshot: makeOmnichainIndexingStatusSnapshotSchema(valueLabel)
1738
1632
  }).check(invariant_slowestChainEqualsToOmnichainSnapshotTime).check(invariant_snapshotTimeIsTheHighestKnownBlockTimestamp);
1739
- var makeCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Cross-chain Indexing Status Snapshot") => import_v49.z.discriminatedUnion("strategy", [
1633
+ var makeCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Cross-chain Indexing Status Snapshot") => import_v48.z.discriminatedUnion("strategy", [
1740
1634
  makeCrossChainIndexingStatusSnapshotOmnichainSchema(valueLabel)
1741
1635
  ]);
1742
- var makeSerializedCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Serialized Cross-chain Indexing Status Snapshot") => import_v49.z.object({
1743
- strategy: import_v49.z.enum(CrossChainIndexingStrategyIds),
1636
+ var makeSerializedCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Serialized Cross-chain Indexing Status Snapshot") => import_v48.z.object({
1637
+ strategy: import_v48.z.enum(CrossChainIndexingStrategyIds),
1744
1638
  slowestChainIndexingCursor: makeUnixTimestampSchema(valueLabel),
1745
1639
  snapshotTime: makeUnixTimestampSchema(valueLabel),
1746
1640
  omnichainSnapshot: makeSerializedOmnichainIndexingStatusSnapshotSchema(valueLabel)
@@ -1770,22 +1664,22 @@ function invariant_realtimeIndexingStatusProjectionWorstCaseDistanceIsCorrect(ct
1770
1664
  });
1771
1665
  }
1772
1666
  }
1773
- var makeRealtimeIndexingStatusProjectionSchema = (valueLabel = "Realtime Indexing Status Projection") => import_v410.z.object({
1667
+ var makeRealtimeIndexingStatusProjectionSchema = (valueLabel = "Realtime Indexing Status Projection") => import_v49.z.object({
1774
1668
  projectedAt: makeUnixTimestampSchema(valueLabel),
1775
1669
  worstCaseDistance: makeDurationSchema(valueLabel),
1776
1670
  snapshot: makeCrossChainIndexingStatusSnapshotSchema(valueLabel)
1777
1671
  }).check(invariant_realtimeIndexingStatusProjectionProjectedAtIsAfterOrEqualToSnapshotTime).check(invariant_realtimeIndexingStatusProjectionWorstCaseDistanceIsCorrect);
1778
- var makeSerializedRealtimeIndexingStatusProjectionSchema = (valueLabel = "Value") => import_v410.z.object({
1672
+ var makeSerializedRealtimeIndexingStatusProjectionSchema = (valueLabel = "Value") => import_v49.z.object({
1779
1673
  snapshot: makeSerializedCrossChainIndexingStatusSnapshotSchema(valueLabel),
1780
1674
  projectedAt: makeUnixTimestampSchema(valueLabel),
1781
1675
  worstCaseDistance: makeDurationSchema(valueLabel)
1782
1676
  });
1783
1677
 
1784
1678
  // src/indexing-status/deserialize/cross-chain-indexing-status-snapshot.ts
1785
- var import_v412 = require("zod/v4");
1679
+ var import_v411 = require("zod/v4");
1786
1680
 
1787
1681
  // src/indexing-status/deserialize/omnichain-indexing-status-snapshot.ts
1788
- var import_v411 = require("zod/v4");
1682
+ var import_v410 = require("zod/v4");
1789
1683
  function buildUnvalidatedOmnichainIndexingStatusSnapshot(serializedSnapshot) {
1790
1684
  const chains = /* @__PURE__ */ new Map();
1791
1685
  for (const [chainIdString, chainIndexingStatusSnapshot] of Object.entries(
@@ -1806,7 +1700,7 @@ function deserializeOmnichainIndexingStatusSnapshot(data, valueLabel) {
1806
1700
  if (parsed.error) {
1807
1701
  throw new Error(
1808
1702
  `Cannot deserialize into OmnichainIndexingStatusSnapshot:
1809
- ${(0, import_v411.prettifyError)(parsed.error)}
1703
+ ${(0, import_v410.prettifyError)(parsed.error)}
1810
1704
  `
1811
1705
  );
1812
1706
  }
@@ -1828,7 +1722,7 @@ function deserializeCrossChainIndexingStatusSnapshot(maybeSnapshot, valueLabel)
1828
1722
  if (parsed.error) {
1829
1723
  throw new Error(
1830
1724
  `Cannot deserialize into CrossChainIndexingStatusSnapshot:
1831
- ${(0, import_v412.prettifyError)(parsed.error)}
1725
+ ${(0, import_v411.prettifyError)(parsed.error)}
1832
1726
  `
1833
1727
  );
1834
1728
  }
@@ -1848,7 +1742,7 @@ function deserializeRealtimeIndexingStatusProjection(maybeProjection, valueLabel
1848
1742
  if (parsed.error) {
1849
1743
  throw new Error(
1850
1744
  `Cannot deserialize into RealtimeIndexingStatusProjection:
1851
- ${(0, import_v413.prettifyError)(parsed.error)}
1745
+ ${(0, import_v412.prettifyError)(parsed.error)}
1852
1746
  `
1853
1747
  );
1854
1748
  }
@@ -1856,7 +1750,7 @@ ${(0, import_v413.prettifyError)(parsed.error)}
1856
1750
  }
1857
1751
 
1858
1752
  // src/ensapi/api/indexing-status/response.ts
1859
- var IndexingStatusResponseCodes = {
1753
+ var EnsApiIndexingStatusResponseCodes = {
1860
1754
  /**
1861
1755
  * Represents that the indexing status is available.
1862
1756
  */
@@ -1866,32 +1760,33 @@ var IndexingStatusResponseCodes = {
1866
1760
  */
1867
1761
  Error: "error"
1868
1762
  };
1763
+ var IndexingStatusResponseCodes = EnsApiIndexingStatusResponseCodes;
1869
1764
 
1870
1765
  // src/ensapi/api/indexing-status/zod-schemas.ts
1871
- var import_v414 = require("zod/v4");
1872
- var makeIndexingStatusResponseOkSchema = (valueLabel = "Indexing Status Response OK") => import_v414.z.strictObject({
1873
- responseCode: import_v414.z.literal(IndexingStatusResponseCodes.Ok),
1766
+ var import_v413 = require("zod/v4");
1767
+ var makeEnsApiIndexingStatusResponseOkSchema = (valueLabel = "Indexing Status Response OK") => import_v413.z.strictObject({
1768
+ responseCode: import_v413.z.literal(EnsApiIndexingStatusResponseCodes.Ok),
1874
1769
  realtimeProjection: makeRealtimeIndexingStatusProjectionSchema(valueLabel)
1875
1770
  });
1876
- var makeIndexingStatusResponseErrorSchema = (_valueLabel = "Indexing Status Response Error") => import_v414.z.strictObject({
1877
- responseCode: import_v414.z.literal(IndexingStatusResponseCodes.Error)
1771
+ var makeEnsApiIndexingStatusResponseErrorSchema = (_valueLabel = "Indexing Status Response Error") => import_v413.z.strictObject({
1772
+ responseCode: import_v413.z.literal(EnsApiIndexingStatusResponseCodes.Error)
1878
1773
  });
1879
- var makeIndexingStatusResponseSchema = (valueLabel = "Indexing Status Response") => import_v414.z.discriminatedUnion("responseCode", [
1880
- makeIndexingStatusResponseOkSchema(valueLabel),
1881
- makeIndexingStatusResponseErrorSchema(valueLabel)
1774
+ var makeEnsApiIndexingStatusResponseSchema = (valueLabel = "Indexing Status Response") => import_v413.z.discriminatedUnion("responseCode", [
1775
+ makeEnsApiIndexingStatusResponseOkSchema(valueLabel),
1776
+ makeEnsApiIndexingStatusResponseErrorSchema(valueLabel)
1882
1777
  ]);
1883
- var makeSerializedIndexingStatusResponseOkSchema = (valueLabel = "Serialized Indexing Status Response OK") => import_v414.z.strictObject({
1884
- responseCode: import_v414.z.literal(IndexingStatusResponseCodes.Ok),
1778
+ var makeSerializedEnsApiIndexingStatusResponseOkSchema = (valueLabel = "Serialized Indexing Status Response OK") => import_v413.z.strictObject({
1779
+ responseCode: import_v413.z.literal(EnsApiIndexingStatusResponseCodes.Ok),
1885
1780
  realtimeProjection: makeSerializedRealtimeIndexingStatusProjectionSchema(valueLabel)
1886
1781
  });
1887
- var makeSerializedIndexingStatusResponseSchema = (valueLabel = "Serialized Indexing Status Response") => import_v414.z.discriminatedUnion("responseCode", [
1888
- makeSerializedIndexingStatusResponseOkSchema(valueLabel),
1889
- makeIndexingStatusResponseErrorSchema(valueLabel)
1782
+ var makeSerializedEnsApiIndexingStatusResponseSchema = (valueLabel = "Serialized Indexing Status Response") => import_v413.z.discriminatedUnion("responseCode", [
1783
+ makeSerializedEnsApiIndexingStatusResponseOkSchema(valueLabel),
1784
+ makeEnsApiIndexingStatusResponseErrorSchema(valueLabel)
1890
1785
  ]);
1891
1786
 
1892
1787
  // src/ensapi/api/indexing-status/deserialize.ts
1893
- function buildUnvalidatedIndexingStatusResponse(serializedResponse) {
1894
- if (serializedResponse.responseCode !== IndexingStatusResponseCodes.Ok) {
1788
+ function buildUnvalidatedEnsApiIndexingStatusResponse(serializedResponse) {
1789
+ if (serializedResponse.responseCode !== EnsApiIndexingStatusResponseCodes.Ok) {
1895
1790
  return serializedResponse;
1896
1791
  }
1897
1792
  return {
@@ -1901,15 +1796,18 @@ function buildUnvalidatedIndexingStatusResponse(serializedResponse) {
1901
1796
  )
1902
1797
  };
1903
1798
  }
1904
- function deserializeIndexingStatusResponse(maybeResponse) {
1905
- const parsed = makeSerializedIndexingStatusResponseSchema().transform(buildUnvalidatedIndexingStatusResponse).pipe(makeIndexingStatusResponseSchema()).safeParse(maybeResponse);
1799
+ function deserializeEnsApiIndexingStatusResponse(maybeResponse) {
1800
+ const parsed = makeSerializedEnsApiIndexingStatusResponseSchema().transform(buildUnvalidatedEnsApiIndexingStatusResponse).pipe(makeEnsApiIndexingStatusResponseSchema()).safeParse(maybeResponse);
1906
1801
  if (parsed.error) {
1907
- throw new Error(`Cannot deserialize IndexingStatusResponse:
1908
- ${(0, import_v415.prettifyError)(parsed.error)}
1909
- `);
1802
+ throw new Error(
1803
+ `Cannot deserialize EnsApiIndexingStatusResponse:
1804
+ ${(0, import_v414.prettifyError)(parsed.error)}
1805
+ `
1806
+ );
1910
1807
  }
1911
1808
  return parsed.data;
1912
1809
  }
1810
+ var deserializeIndexingStatusResponse = deserializeEnsApiIndexingStatusResponse;
1913
1811
 
1914
1812
  // src/shared/serialize.ts
1915
1813
  var import_caip2 = require("caip");
@@ -2020,39 +1918,40 @@ function serializeRealtimeIndexingStatusProjection(indexingProjection) {
2020
1918
  }
2021
1919
 
2022
1920
  // src/ensapi/api/indexing-status/serialize.ts
2023
- function serializeIndexingStatusResponse(response) {
1921
+ function serializeEnsApiIndexingStatusResponse(response) {
2024
1922
  switch (response.responseCode) {
2025
- case IndexingStatusResponseCodes.Ok:
1923
+ case EnsApiIndexingStatusResponseCodes.Ok:
2026
1924
  return {
2027
1925
  responseCode: response.responseCode,
2028
1926
  realtimeProjection: serializeRealtimeIndexingStatusProjection(response.realtimeProjection)
2029
1927
  };
2030
- case IndexingStatusResponseCodes.Error:
1928
+ case EnsApiIndexingStatusResponseCodes.Error:
2031
1929
  return response;
2032
1930
  }
2033
1931
  }
1932
+ var serializeIndexingStatusResponse = serializeEnsApiIndexingStatusResponse;
2034
1933
 
2035
1934
  // src/ensapi/api/name-tokens/deserialize.ts
2036
- var import_v420 = require("zod/v4");
1935
+ var import_v419 = require("zod/v4");
2037
1936
 
2038
1937
  // src/ensapi/api/name-tokens/zod-schemas.ts
2039
- var import_viem14 = require("viem");
2040
- var import_v419 = require("zod/v4");
1938
+ var import_viem13 = require("viem");
1939
+ var import_v418 = require("zod/v4");
2041
1940
 
2042
1941
  // src/tokenscope/name-token.ts
2043
- var import_viem13 = require("viem");
2044
- var import_datasources6 = require("@ensnode/datasources");
1942
+ var import_viem12 = require("viem");
1943
+ var import_datasources5 = require("@ensnode/datasources");
2045
1944
 
2046
1945
  // src/shared/account-id.ts
2047
- var import_viem10 = require("viem");
1946
+ var import_viem9 = require("viem");
2048
1947
  var accountIdEqual = (a, b) => {
2049
- return a.chainId === b.chainId && (0, import_viem10.isAddressEqual)(a.address, b.address);
1948
+ return a.chainId === b.chainId && (0, import_viem9.isAddressEqual)(a.address, b.address);
2050
1949
  };
2051
1950
 
2052
1951
  // src/shared/datasource-contract.ts
2053
- var import_datasources5 = require("@ensnode/datasources");
1952
+ var import_datasources4 = require("@ensnode/datasources");
2054
1953
  var maybeGetDatasourceContract = (namespaceId, datasourceName, contractName) => {
2055
- const datasource = (0, import_datasources5.maybeGetDatasource)(namespaceId, datasourceName);
1954
+ const datasource = (0, import_datasources4.maybeGetDatasource)(namespaceId, datasourceName);
2056
1955
  if (!datasource) return void 0;
2057
1956
  const address = datasource.contracts[contractName]?.address;
2058
1957
  if (address === void 0 || Array.isArray(address)) return void 0;
@@ -2076,13 +1975,13 @@ var makeContractMatcher = (namespace, b) => (datasourceName, contractName) => {
2076
1975
  };
2077
1976
 
2078
1977
  // src/tokenscope/assets.ts
2079
- var import_viem12 = require("viem");
2080
- var import_v417 = require("zod/v4");
1978
+ var import_viem11 = require("viem");
1979
+ var import_v416 = require("zod/v4");
2081
1980
 
2082
1981
  // src/tokenscope/zod-schemas.ts
2083
1982
  var import_caip3 = require("caip");
2084
- var import_viem11 = require("viem");
2085
- var import_v416 = require("zod/v4");
1983
+ var import_viem10 = require("viem");
1984
+ var import_v415 = require("zod/v4");
2086
1985
 
2087
1986
  // src/shared/types.ts
2088
1987
  var AssetNamespaces = {
@@ -2091,10 +1990,10 @@ var AssetNamespaces = {
2091
1990
  };
2092
1991
 
2093
1992
  // src/tokenscope/zod-schemas.ts
2094
- var tokenIdSchemaSerializable = import_v416.z.string();
2095
- var tokenIdSchemaNative = import_v416.z.preprocess(
1993
+ var tokenIdSchemaSerializable = import_v415.z.string();
1994
+ var tokenIdSchemaNative = import_v415.z.preprocess(
2096
1995
  (v) => typeof v === "string" ? BigInt(v) : v,
2097
- import_v416.z.bigint().positive()
1996
+ import_v415.z.bigint().positive()
2098
1997
  );
2099
1998
  function makeTokenIdSchema(_valueLabel = "Token ID Schema", serializable = false) {
2100
1999
  if (serializable) {
@@ -2104,13 +2003,13 @@ function makeTokenIdSchema(_valueLabel = "Token ID Schema", serializable = false
2104
2003
  }
2105
2004
  }
2106
2005
  var makeAssetIdSchema = (valueLabel = "Asset ID Schema", serializable) => {
2107
- return import_v416.z.object({
2108
- assetNamespace: import_v416.z.enum(AssetNamespaces),
2006
+ return import_v415.z.object({
2007
+ assetNamespace: import_v415.z.enum(AssetNamespaces),
2109
2008
  contract: makeAccountIdSchema(valueLabel),
2110
2009
  tokenId: makeTokenIdSchema(valueLabel, serializable ?? false)
2111
2010
  });
2112
2011
  };
2113
- var makeAssetIdStringSchema = (valueLabel = "Asset ID String Schema") => import_v416.z.preprocess((v) => {
2012
+ var makeAssetIdStringSchema = (valueLabel = "Asset ID String Schema") => import_v415.z.preprocess((v) => {
2114
2013
  if (typeof v === "string") {
2115
2014
  const result = new import_caip3.AssetId(v);
2116
2015
  return {
@@ -2126,7 +2025,7 @@ var makeAssetIdStringSchema = (valueLabel = "Asset ID String Schema") => import_
2126
2025
  }, makeAssetIdSchema(valueLabel));
2127
2026
  function invariant_nameTokenOwnershipHasNonZeroAddressOwner(ctx) {
2128
2027
  const ownership = ctx.value;
2129
- if (ctx.value.owner.address === import_viem11.zeroAddress) {
2028
+ if (ctx.value.owner.address === import_viem10.zeroAddress) {
2130
2029
  ctx.issues.push({
2131
2030
  code: "custom",
2132
2031
  input: ctx.value,
@@ -2134,25 +2033,25 @@ function invariant_nameTokenOwnershipHasNonZeroAddressOwner(ctx) {
2134
2033
  });
2135
2034
  }
2136
2035
  }
2137
- var makeNameTokenOwnershipNameWrapperSchema = (valueLabel = "Name Token Ownership NameWrapper") => import_v416.z.object({
2138
- ownershipType: import_v416.z.literal(NameTokenOwnershipTypes.NameWrapper),
2036
+ var makeNameTokenOwnershipNameWrapperSchema = (valueLabel = "Name Token Ownership NameWrapper") => import_v415.z.object({
2037
+ ownershipType: import_v415.z.literal(NameTokenOwnershipTypes.NameWrapper),
2139
2038
  owner: makeAccountIdSchema(`${valueLabel}.owner`)
2140
2039
  }).check(invariant_nameTokenOwnershipHasNonZeroAddressOwner);
2141
- var makeNameTokenOwnershipFullyOnchainSchema = (valueLabel = "Name Token Ownership Fully Onchain") => import_v416.z.object({
2142
- ownershipType: import_v416.z.literal(NameTokenOwnershipTypes.FullyOnchain),
2040
+ var makeNameTokenOwnershipFullyOnchainSchema = (valueLabel = "Name Token Ownership Fully Onchain") => import_v415.z.object({
2041
+ ownershipType: import_v415.z.literal(NameTokenOwnershipTypes.FullyOnchain),
2143
2042
  owner: makeAccountIdSchema(`${valueLabel}.owner`)
2144
2043
  }).check(invariant_nameTokenOwnershipHasNonZeroAddressOwner);
2145
- var makeNameTokenOwnershipBurnedSchema = (valueLabel = "Name Token Ownership Burned") => import_v416.z.object({
2146
- ownershipType: import_v416.z.literal(NameTokenOwnershipTypes.Burned),
2044
+ var makeNameTokenOwnershipBurnedSchema = (valueLabel = "Name Token Ownership Burned") => import_v415.z.object({
2045
+ ownershipType: import_v415.z.literal(NameTokenOwnershipTypes.Burned),
2147
2046
  owner: makeAccountIdSchema(`${valueLabel}.owner`)
2148
2047
  }).check(invariant_nameTokenOwnershipHasZeroAddressOwner);
2149
- var makeNameTokenOwnershipUnknownSchema = (valueLabel = "Name Token Ownership Unknown") => import_v416.z.object({
2150
- ownershipType: import_v416.z.literal(NameTokenOwnershipTypes.Unknown),
2048
+ var makeNameTokenOwnershipUnknownSchema = (valueLabel = "Name Token Ownership Unknown") => import_v415.z.object({
2049
+ ownershipType: import_v415.z.literal(NameTokenOwnershipTypes.Unknown),
2151
2050
  owner: makeAccountIdSchema(`${valueLabel}.owner`)
2152
2051
  }).check(invariant_nameTokenOwnershipHasNonZeroAddressOwner);
2153
2052
  function invariant_nameTokenOwnershipHasZeroAddressOwner(ctx) {
2154
2053
  const ownership = ctx.value;
2155
- if (ctx.value.owner.address !== import_viem11.zeroAddress) {
2054
+ if (ctx.value.owner.address !== import_viem10.zeroAddress) {
2156
2055
  ctx.issues.push({
2157
2056
  code: "custom",
2158
2057
  input: ctx.value,
@@ -2160,16 +2059,16 @@ function invariant_nameTokenOwnershipHasZeroAddressOwner(ctx) {
2160
2059
  });
2161
2060
  }
2162
2061
  }
2163
- var makeNameTokenOwnershipSchema = (valueLabel = "Name Token Ownership") => import_v416.z.discriminatedUnion("ownershipType", [
2062
+ var makeNameTokenOwnershipSchema = (valueLabel = "Name Token Ownership") => import_v415.z.discriminatedUnion("ownershipType", [
2164
2063
  makeNameTokenOwnershipNameWrapperSchema(valueLabel),
2165
2064
  makeNameTokenOwnershipFullyOnchainSchema(valueLabel),
2166
2065
  makeNameTokenOwnershipBurnedSchema(valueLabel),
2167
2066
  makeNameTokenOwnershipUnknownSchema(valueLabel)
2168
2067
  ]);
2169
- var makeNameTokenSchema = (valueLabel = "Name Token Schema", serializable) => import_v416.z.object({
2068
+ var makeNameTokenSchema = (valueLabel = "Name Token Schema", serializable) => import_v415.z.object({
2170
2069
  token: makeAssetIdSchema(`${valueLabel}.token`, serializable),
2171
2070
  ownership: makeNameTokenOwnershipSchema(`${valueLabel}.ownership`),
2172
- mintStatus: import_v416.z.enum(NFTMintStatuses)
2071
+ mintStatus: import_v415.z.enum(NFTMintStatuses)
2173
2072
  });
2174
2073
 
2175
2074
  // src/tokenscope/assets.ts
@@ -2185,7 +2084,7 @@ function deserializeAssetId(maybeAssetId, valueLabel) {
2185
2084
  const parsed = schema.safeParse(maybeAssetId);
2186
2085
  if (parsed.error) {
2187
2086
  throw new RangeError(`Cannot deserialize AssetId:
2188
- ${(0, import_v417.prettifyError)(parsed.error)}
2087
+ ${(0, import_v416.prettifyError)(parsed.error)}
2189
2088
  `);
2190
2089
  }
2191
2090
  return parsed.data;
@@ -2195,7 +2094,7 @@ function parseAssetId(maybeAssetId, valueLabel) {
2195
2094
  const parsed = schema.safeParse(maybeAssetId);
2196
2095
  if (parsed.error) {
2197
2096
  throw new RangeError(`Cannot parse AssetId:
2198
- ${(0, import_v417.prettifyError)(parsed.error)}
2097
+ ${(0, import_v416.prettifyError)(parsed.error)}
2199
2098
  `);
2200
2099
  }
2201
2100
  return parsed.data;
@@ -2330,11 +2229,11 @@ var NFTTransferTypes = {
2330
2229
  };
2331
2230
  var getNFTTransferType = (from, to, allowMintedRemint, metadata, currentlyIndexedOwner) => {
2332
2231
  const isIndexed = currentlyIndexedOwner !== void 0;
2333
- const isIndexedAsMinted = isIndexed && !(0, import_viem12.isAddressEqual)(currentlyIndexedOwner, import_viem12.zeroAddress);
2334
- const isMint = (0, import_viem12.isAddressEqual)(from, import_viem12.zeroAddress);
2335
- const isBurn = (0, import_viem12.isAddressEqual)(to, import_viem12.zeroAddress);
2336
- const isSelfTransfer = (0, import_viem12.isAddressEqual)(from, to);
2337
- if (isIndexed && !(0, import_viem12.isAddressEqual)(currentlyIndexedOwner, from)) {
2232
+ const isIndexedAsMinted = isIndexed && !(0, import_viem11.isAddressEqual)(currentlyIndexedOwner, import_viem11.zeroAddress);
2233
+ const isMint = (0, import_viem11.isAddressEqual)(from, import_viem11.zeroAddress);
2234
+ const isBurn = (0, import_viem11.isAddressEqual)(to, import_viem11.zeroAddress);
2235
+ const isSelfTransfer = (0, import_viem11.isAddressEqual)(from, to);
2236
+ if (isIndexed && !(0, import_viem11.isAddressEqual)(currentlyIndexedOwner, from)) {
2338
2237
  if (isMint && allowMintedRemint) {
2339
2238
  } else {
2340
2239
  throw new Error(
@@ -2447,12 +2346,12 @@ function serializeNameToken(nameToken) {
2447
2346
  function getNameWrapperAccounts(namespaceId) {
2448
2347
  const ethnamesNameWrapperAccount = getDatasourceContract(
2449
2348
  namespaceId,
2450
- import_datasources6.DatasourceNames.ENSRoot,
2349
+ import_datasources5.DatasourceNames.ENSRoot,
2451
2350
  "NameWrapper"
2452
2351
  );
2453
2352
  const lineanamesNameWrapperAccount = maybeGetDatasourceContract(
2454
2353
  namespaceId,
2455
- import_datasources6.DatasourceNames.Lineanames,
2354
+ import_datasources5.DatasourceNames.Lineanames,
2456
2355
  "NameWrapper"
2457
2356
  );
2458
2357
  const nameWrapperAccounts = [
@@ -2475,7 +2374,7 @@ function getNameTokenOwnership(namespaceId, name, owner) {
2475
2374
  owner
2476
2375
  };
2477
2376
  }
2478
- if ((0, import_viem13.isAddressEqual)(owner.address, import_viem13.zeroAddress)) {
2377
+ if ((0, import_viem12.isAddressEqual)(owner.address, import_viem12.zeroAddress)) {
2479
2378
  return {
2480
2379
  ownershipType: NameTokenOwnershipTypes.Burned,
2481
2380
  owner
@@ -2495,10 +2394,10 @@ function getNameTokenOwnership(namespaceId, name, owner) {
2495
2394
  }
2496
2395
 
2497
2396
  // src/ensapi/api/shared/errors/zod-schemas.ts
2498
- var import_v418 = require("zod/v4");
2499
- var ErrorResponseSchema = import_v418.z.object({
2500
- message: import_v418.z.string(),
2501
- details: import_v418.z.optional(import_v418.z.unknown())
2397
+ var import_v417 = require("zod/v4");
2398
+ var ErrorResponseSchema = import_v417.z.object({
2399
+ message: import_v417.z.string(),
2400
+ details: import_v417.z.optional(import_v417.z.unknown())
2502
2401
  });
2503
2402
 
2504
2403
  // src/ensapi/api/name-tokens/response.ts
@@ -2537,15 +2436,15 @@ var NameTokensResponseErrorCodes = {
2537
2436
  };
2538
2437
 
2539
2438
  // src/ensapi/api/name-tokens/zod-schemas.ts
2540
- var makeRegisteredNameTokenSchema = (valueLabel = "Registered Name Token", serializable) => import_v419.z.object({
2439
+ var makeRegisteredNameTokenSchema = (valueLabel = "Registered Name Token", serializable) => import_v418.z.object({
2541
2440
  domainId: makeNodeSchema(`${valueLabel}.domainId`),
2542
2441
  name: makeReinterpretedNameSchema(valueLabel),
2543
- tokens: import_v419.z.array(makeNameTokenSchema(`${valueLabel}.tokens`, serializable)).nonempty(),
2442
+ tokens: import_v418.z.array(makeNameTokenSchema(`${valueLabel}.tokens`, serializable)).nonempty(),
2544
2443
  expiresAt: makeUnixTimestampSchema(`${valueLabel}.expiresAt`),
2545
2444
  accurateAsOf: makeUnixTimestampSchema(`${valueLabel}.accurateAsOf`)
2546
2445
  }).check(function invariant_nameIsAssociatedWithDomainId(ctx) {
2547
2446
  const { name, domainId } = ctx.value;
2548
- if ((0, import_viem14.namehash)(name) !== domainId) {
2447
+ if ((0, import_viem13.namehash)(name) !== domainId) {
2549
2448
  ctx.issues.push({
2550
2449
  code: "custom",
2551
2450
  input: ctx.value,
@@ -2582,32 +2481,32 @@ var makeRegisteredNameTokenSchema = (valueLabel = "Registered Name Token", seria
2582
2481
  });
2583
2482
  }
2584
2483
  });
2585
- var makeNameTokensResponseOkSchema = (valueLabel = "Name Tokens Response OK", serializable) => import_v419.z.strictObject({
2586
- responseCode: import_v419.z.literal(NameTokensResponseCodes.Ok),
2484
+ var makeNameTokensResponseOkSchema = (valueLabel = "Name Tokens Response OK", serializable) => import_v418.z.strictObject({
2485
+ responseCode: import_v418.z.literal(NameTokensResponseCodes.Ok),
2587
2486
  registeredNameTokens: makeRegisteredNameTokenSchema(`${valueLabel}.nameTokens`, serializable)
2588
2487
  });
2589
- var makeNameTokensResponseErrorNameTokensNotIndexedSchema = (_valueLabel = "Name Tokens Response Error Name Not Indexed") => import_v419.z.strictObject({
2590
- responseCode: import_v419.z.literal(NameTokensResponseCodes.Error),
2591
- errorCode: import_v419.z.literal(NameTokensResponseErrorCodes.NameTokensNotIndexed),
2488
+ var makeNameTokensResponseErrorNameTokensNotIndexedSchema = (_valueLabel = "Name Tokens Response Error Name Not Indexed") => import_v418.z.strictObject({
2489
+ responseCode: import_v418.z.literal(NameTokensResponseCodes.Error),
2490
+ errorCode: import_v418.z.literal(NameTokensResponseErrorCodes.NameTokensNotIndexed),
2592
2491
  error: ErrorResponseSchema
2593
2492
  });
2594
- var makeNameTokensResponseErrorEnsIndexerConfigUnsupported = (_valueLabel = "Name Tokens Response Error ENSIndexer Config Unsupported") => import_v419.z.strictObject({
2595
- responseCode: import_v419.z.literal(NameTokensResponseCodes.Error),
2596
- errorCode: import_v419.z.literal(NameTokensResponseErrorCodes.EnsIndexerConfigUnsupported),
2493
+ var makeNameTokensResponseErrorEnsIndexerConfigUnsupported = (_valueLabel = "Name Tokens Response Error ENSIndexer Config Unsupported") => import_v418.z.strictObject({
2494
+ responseCode: import_v418.z.literal(NameTokensResponseCodes.Error),
2495
+ errorCode: import_v418.z.literal(NameTokensResponseErrorCodes.EnsIndexerConfigUnsupported),
2597
2496
  error: ErrorResponseSchema
2598
2497
  });
2599
- var makeNameTokensResponseErrorNameIndexingStatusUnsupported = (_valueLabel = "Name Tokens Response Error Indexing Status Unsupported") => import_v419.z.strictObject({
2600
- responseCode: import_v419.z.literal(NameTokensResponseCodes.Error),
2601
- errorCode: import_v419.z.literal(NameTokensResponseErrorCodes.IndexingStatusUnsupported),
2498
+ var makeNameTokensResponseErrorNameIndexingStatusUnsupported = (_valueLabel = "Name Tokens Response Error Indexing Status Unsupported") => import_v418.z.strictObject({
2499
+ responseCode: import_v418.z.literal(NameTokensResponseCodes.Error),
2500
+ errorCode: import_v418.z.literal(NameTokensResponseErrorCodes.IndexingStatusUnsupported),
2602
2501
  error: ErrorResponseSchema
2603
2502
  });
2604
- var makeNameTokensResponseErrorSchema = (valueLabel = "Name Tokens Response Error") => import_v419.z.discriminatedUnion("errorCode", [
2503
+ var makeNameTokensResponseErrorSchema = (valueLabel = "Name Tokens Response Error") => import_v418.z.discriminatedUnion("errorCode", [
2605
2504
  makeNameTokensResponseErrorNameTokensNotIndexedSchema(valueLabel),
2606
2505
  makeNameTokensResponseErrorEnsIndexerConfigUnsupported(valueLabel),
2607
2506
  makeNameTokensResponseErrorNameIndexingStatusUnsupported(valueLabel)
2608
2507
  ]);
2609
2508
  var makeNameTokensResponseSchema = (valueLabel = "Name Tokens Response", serializable) => {
2610
- return import_v419.z.discriminatedUnion("responseCode", [
2509
+ return import_v418.z.discriminatedUnion("responseCode", [
2611
2510
  makeNameTokensResponseOkSchema(valueLabel, serializable ?? false),
2612
2511
  makeNameTokensResponseErrorSchema(valueLabel)
2613
2512
  ]);
@@ -2620,7 +2519,7 @@ function deserializedNameTokensResponse(maybeResponse) {
2620
2519
  );
2621
2520
  if (parsed.error) {
2622
2521
  throw new Error(`Cannot deserialize NameTokensResponse:
2623
- ${(0, import_v420.prettifyError)(parsed.error)}
2522
+ ${(0, import_v419.prettifyError)(parsed.error)}
2624
2523
  `);
2625
2524
  }
2626
2525
  return parsed.data;
@@ -2638,7 +2537,7 @@ var nameTokensPrerequisites = Object.freeze({
2638
2537
  */
2639
2538
  requiredPlugins: ["registrars" /* Registrars */, "tokenscope" /* TokenScope */],
2640
2539
  /**
2641
- * Check if provided ENSApiPublicConfig supports the Name Tokens API.
2540
+ * Check if provided EnsIndexerPublicConfig supports the Name Tokens API.
2642
2541
  */
2643
2542
  hasEnsIndexerConfigSupport(config) {
2644
2543
  return nameTokensPrerequisites.requiredPlugins.every(
@@ -2694,44 +2593,44 @@ function serializeNameTokensResponse(response) {
2694
2593
  }
2695
2594
 
2696
2595
  // src/ensapi/api/registrar-actions/deserialize.ts
2697
- var import_v424 = require("zod/v4");
2596
+ var import_v423 = require("zod/v4");
2698
2597
 
2699
2598
  // src/ensapi/api/registrar-actions/zod-schemas.ts
2700
2599
  var import_ens7 = require("viem/ens");
2701
- var import_v423 = require("zod/v4");
2600
+ var import_v422 = require("zod/v4");
2702
2601
 
2703
2602
  // src/registrars/zod-schemas.ts
2704
- var import_v421 = require("zod/v4");
2603
+ var import_v420 = require("zod/v4");
2705
2604
 
2706
2605
  // src/registrars/encoded-referrer.ts
2707
- var import_viem15 = require("viem");
2606
+ var import_viem14 = require("viem");
2708
2607
  var ENCODED_REFERRER_BYTE_OFFSET = 12;
2709
2608
  var ENCODED_REFERRER_BYTE_LENGTH = 32;
2710
- var EXPECTED_ENCODED_REFERRER_PADDING = (0, import_viem15.pad)("0x", {
2609
+ var EXPECTED_ENCODED_REFERRER_PADDING = (0, import_viem14.pad)("0x", {
2711
2610
  size: ENCODED_REFERRER_BYTE_OFFSET,
2712
2611
  dir: "left"
2713
2612
  });
2714
- var ZERO_ENCODED_REFERRER = (0, import_viem15.pad)("0x", {
2613
+ var ZERO_ENCODED_REFERRER = (0, import_viem14.pad)("0x", {
2715
2614
  size: ENCODED_REFERRER_BYTE_LENGTH,
2716
2615
  dir: "left"
2717
2616
  });
2718
2617
  function buildEncodedReferrer(address) {
2719
2618
  const lowercaseAddress = address.toLowerCase();
2720
- return (0, import_viem15.pad)(lowercaseAddress, { size: ENCODED_REFERRER_BYTE_LENGTH, dir: "left" });
2619
+ return (0, import_viem14.pad)(lowercaseAddress, { size: ENCODED_REFERRER_BYTE_LENGTH, dir: "left" });
2721
2620
  }
2722
2621
  function decodeEncodedReferrer(encodedReferrer) {
2723
- if ((0, import_viem15.size)(encodedReferrer) !== ENCODED_REFERRER_BYTE_LENGTH) {
2622
+ if ((0, import_viem14.size)(encodedReferrer) !== ENCODED_REFERRER_BYTE_LENGTH) {
2724
2623
  throw new Error(
2725
2624
  `Encoded referrer value must be represented by ${ENCODED_REFERRER_BYTE_LENGTH} bytes.`
2726
2625
  );
2727
2626
  }
2728
- const padding = (0, import_viem15.slice)(encodedReferrer, 0, ENCODED_REFERRER_BYTE_OFFSET);
2627
+ const padding = (0, import_viem14.slice)(encodedReferrer, 0, ENCODED_REFERRER_BYTE_OFFSET);
2729
2628
  if (padding !== EXPECTED_ENCODED_REFERRER_PADDING) {
2730
- return import_viem15.zeroAddress;
2629
+ return import_viem14.zeroAddress;
2731
2630
  }
2732
- const decodedReferrer = (0, import_viem15.slice)(encodedReferrer, ENCODED_REFERRER_BYTE_OFFSET);
2631
+ const decodedReferrer = (0, import_viem14.slice)(encodedReferrer, ENCODED_REFERRER_BYTE_OFFSET);
2733
2632
  try {
2734
- return (0, import_viem15.getAddress)(decodedReferrer);
2633
+ return (0, import_viem14.getAddress)(decodedReferrer);
2735
2634
  } catch {
2736
2635
  throw new Error(`Decoded referrer value must be a valid EVM address.`);
2737
2636
  }
@@ -2776,11 +2675,11 @@ function serializeRegistrarAction(registrarAction) {
2776
2675
  }
2777
2676
 
2778
2677
  // src/registrars/zod-schemas.ts
2779
- var makeSubregistrySchema = (valueLabel = "Subregistry") => import_v421.z.object({
2678
+ var makeSubregistrySchema = (valueLabel = "Subregistry") => import_v420.z.object({
2780
2679
  subregistryId: makeAccountIdSchema(`${valueLabel} Subregistry ID`),
2781
2680
  node: makeNodeSchema(`${valueLabel} Node`)
2782
2681
  });
2783
- var makeRegistrationLifecycleSchema = (valueLabel = "Registration Lifecycle") => import_v421.z.object({
2682
+ var makeRegistrationLifecycleSchema = (valueLabel = "Registration Lifecycle") => import_v420.z.object({
2784
2683
  subregistry: makeSubregistrySchema(`${valueLabel} Subregistry`),
2785
2684
  node: makeNodeSchema(`${valueLabel} Node`),
2786
2685
  expiresAt: makeUnixTimestampSchema(`${valueLabel} Expires at`)
@@ -2796,18 +2695,18 @@ function invariant_registrarActionPricingTotalIsSumOfBaseCostAndPremium(ctx) {
2796
2695
  });
2797
2696
  }
2798
2697
  }
2799
- var makeRegistrarActionPricingSchema = (valueLabel = "Registrar Action Pricing") => import_v421.z.union([
2698
+ var makeRegistrarActionPricingSchema = (valueLabel = "Registrar Action Pricing") => import_v420.z.union([
2800
2699
  // pricing available
2801
- import_v421.z.object({
2700
+ import_v420.z.object({
2802
2701
  baseCost: makePriceEthSchema(`${valueLabel} Base Cost`),
2803
2702
  premium: makePriceEthSchema(`${valueLabel} Premium`),
2804
2703
  total: makePriceEthSchema(`${valueLabel} Total`)
2805
2704
  }).check(invariant_registrarActionPricingTotalIsSumOfBaseCostAndPremium).transform((v) => v),
2806
2705
  // pricing unknown
2807
- import_v421.z.object({
2808
- baseCost: import_v421.z.null(),
2809
- premium: import_v421.z.null(),
2810
- total: import_v421.z.null()
2706
+ import_v420.z.object({
2707
+ baseCost: import_v420.z.null(),
2708
+ premium: import_v420.z.null(),
2709
+ total: import_v420.z.null()
2811
2710
  }).transform((v) => v)
2812
2711
  ]);
2813
2712
  function invariant_registrarActionDecodedReferrerBasedOnRawReferrer(ctx) {
@@ -2830,9 +2729,9 @@ function invariant_registrarActionDecodedReferrerBasedOnRawReferrer(ctx) {
2830
2729
  });
2831
2730
  }
2832
2731
  }
2833
- var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral") => import_v421.z.union([
2732
+ var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral") => import_v420.z.union([
2834
2733
  // referral available
2835
- import_v421.z.object({
2734
+ import_v420.z.object({
2836
2735
  encodedReferrer: makeHexStringSchema(
2837
2736
  { bytesCount: ENCODED_REFERRER_BYTE_LENGTH },
2838
2737
  `${valueLabel} Encoded Referrer`
@@ -2840,9 +2739,9 @@ var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral
2840
2739
  decodedReferrer: makeLowercaseAddressSchema(`${valueLabel} Decoded Referrer`)
2841
2740
  }).check(invariant_registrarActionDecodedReferrerBasedOnRawReferrer),
2842
2741
  // referral not applicable
2843
- import_v421.z.object({
2844
- encodedReferrer: import_v421.z.null(),
2845
- decodedReferrer: import_v421.z.null()
2742
+ import_v420.z.object({
2743
+ encodedReferrer: import_v420.z.null(),
2744
+ decodedReferrer: import_v420.z.null()
2846
2745
  })
2847
2746
  ]);
2848
2747
  function invariant_eventIdsInitialElementIsTheActionId(ctx) {
@@ -2855,9 +2754,9 @@ function invariant_eventIdsInitialElementIsTheActionId(ctx) {
2855
2754
  });
2856
2755
  }
2857
2756
  }
2858
- var EventIdSchema = import_v421.z.string().nonempty();
2859
- var EventIdsSchema = import_v421.z.array(EventIdSchema).min(1).transform((v) => v);
2860
- var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") => import_v421.z.object({
2757
+ var EventIdSchema = import_v420.z.string().nonempty();
2758
+ var EventIdsSchema = import_v420.z.array(EventIdSchema).min(1).transform((v) => v);
2759
+ var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") => import_v420.z.object({
2861
2760
  id: EventIdSchema,
2862
2761
  incrementalDuration: makeDurationSchema(`${valueLabel} Incremental Duration`),
2863
2762
  registrant: makeLowercaseAddressSchema(`${valueLabel} Registrant`),
@@ -2871,38 +2770,38 @@ var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") => im
2871
2770
  eventIds: EventIdsSchema
2872
2771
  }).check(invariant_eventIdsInitialElementIsTheActionId);
2873
2772
  var makeRegistrarActionRegistrationSchema = (valueLabel = "Registration ") => makeBaseRegistrarActionSchema(valueLabel).extend({
2874
- type: import_v421.z.literal(RegistrarActionTypes.Registration)
2773
+ type: import_v420.z.literal(RegistrarActionTypes.Registration)
2875
2774
  });
2876
2775
  var makeRegistrarActionRenewalSchema = (valueLabel = "Renewal") => makeBaseRegistrarActionSchema(valueLabel).extend({
2877
- type: import_v421.z.literal(RegistrarActionTypes.Renewal)
2776
+ type: import_v420.z.literal(RegistrarActionTypes.Renewal)
2878
2777
  });
2879
- var makeRegistrarActionSchema = (valueLabel = "Registrar Action") => import_v421.z.discriminatedUnion("type", [
2778
+ var makeRegistrarActionSchema = (valueLabel = "Registrar Action") => import_v420.z.discriminatedUnion("type", [
2880
2779
  makeRegistrarActionRegistrationSchema(`${valueLabel} Registration`),
2881
2780
  makeRegistrarActionRenewalSchema(`${valueLabel} Renewal`)
2882
2781
  ]);
2883
2782
 
2884
2783
  // src/ensapi/api/shared/pagination/zod-schemas.ts
2885
- var import_v422 = require("zod/v4");
2784
+ var import_v421 = require("zod/v4");
2886
2785
 
2887
2786
  // src/ensapi/api/shared/pagination/request.ts
2888
2787
  var RECORDS_PER_PAGE_DEFAULT = 10;
2889
2788
  var RECORDS_PER_PAGE_MAX = 100;
2890
2789
 
2891
2790
  // src/ensapi/api/shared/pagination/zod-schemas.ts
2892
- var makeRequestPageParamsSchema = (valueLabel = "RequestPageParams") => import_v422.z.object({
2791
+ var makeRequestPageParamsSchema = (valueLabel = "RequestPageParams") => import_v421.z.object({
2893
2792
  page: makePositiveIntegerSchema(`${valueLabel}.page`),
2894
2793
  recordsPerPage: makePositiveIntegerSchema(`${valueLabel}.recordsPerPage`).max(
2895
2794
  RECORDS_PER_PAGE_MAX,
2896
2795
  `${valueLabel}.recordsPerPage must not exceed ${RECORDS_PER_PAGE_MAX}`
2897
2796
  )
2898
2797
  });
2899
- var makeResponsePageContextSchemaWithNoRecords = (valueLabel = "ResponsePageContextWithNoRecords") => import_v422.z.object({
2900
- totalRecords: import_v422.z.literal(0),
2901
- totalPages: import_v422.z.literal(1),
2902
- hasNext: import_v422.z.literal(false),
2903
- hasPrev: import_v422.z.literal(false),
2904
- startIndex: import_v422.z.undefined(),
2905
- endIndex: import_v422.z.undefined()
2798
+ var makeResponsePageContextSchemaWithNoRecords = (valueLabel = "ResponsePageContextWithNoRecords") => import_v421.z.object({
2799
+ totalRecords: import_v421.z.literal(0),
2800
+ totalPages: import_v421.z.literal(1),
2801
+ hasNext: import_v421.z.literal(false),
2802
+ hasPrev: import_v421.z.literal(false),
2803
+ startIndex: import_v421.z.undefined(),
2804
+ endIndex: import_v421.z.undefined()
2906
2805
  }).extend(makeRequestPageParamsSchema(valueLabel).shape);
2907
2806
  function invariant_responsePageWithRecordsIsCorrect(ctx) {
2908
2807
  const { hasNext, hasPrev, recordsPerPage, page, totalRecords, startIndex, endIndex } = ctx.value;
@@ -2937,15 +2836,15 @@ function invariant_responsePageWithRecordsIsCorrect(ctx) {
2937
2836
  });
2938
2837
  }
2939
2838
  }
2940
- var makeResponsePageContextSchemaWithRecords = (valueLabel = "ResponsePageContextWithRecords") => import_v422.z.object({
2839
+ var makeResponsePageContextSchemaWithRecords = (valueLabel = "ResponsePageContextWithRecords") => import_v421.z.object({
2941
2840
  totalRecords: makePositiveIntegerSchema(`${valueLabel}.totalRecords`),
2942
2841
  totalPages: makePositiveIntegerSchema(`${valueLabel}.totalPages`),
2943
- hasNext: import_v422.z.boolean(),
2944
- hasPrev: import_v422.z.boolean(),
2842
+ hasNext: import_v421.z.boolean(),
2843
+ hasPrev: import_v421.z.boolean(),
2945
2844
  startIndex: makeNonNegativeIntegerSchema(`${valueLabel}.startIndex`),
2946
2845
  endIndex: makeNonNegativeIntegerSchema(`${valueLabel}.endIndex`)
2947
2846
  }).extend(makeRequestPageParamsSchema(valueLabel).shape).check(invariant_responsePageWithRecordsIsCorrect);
2948
- var makeResponsePageContextSchema = (valueLabel = "ResponsePageContext") => import_v422.z.union([
2847
+ var makeResponsePageContextSchema = (valueLabel = "ResponsePageContext") => import_v421.z.union([
2949
2848
  makeResponsePageContextSchemaWithNoRecords(valueLabel),
2950
2849
  makeResponsePageContextSchemaWithRecords(valueLabel)
2951
2850
  ]);
@@ -2975,21 +2874,21 @@ function invariant_registrationLifecycleNodeMatchesName(ctx) {
2975
2874
  });
2976
2875
  }
2977
2876
  }
2978
- var makeNamedRegistrarActionSchema = (valueLabel = "Named Registrar Action") => import_v423.z.object({
2877
+ var makeNamedRegistrarActionSchema = (valueLabel = "Named Registrar Action") => import_v422.z.object({
2979
2878
  action: makeRegistrarActionSchema(valueLabel),
2980
2879
  name: makeReinterpretedNameSchema(valueLabel)
2981
2880
  }).check(invariant_registrationLifecycleNodeMatchesName);
2982
- var makeRegistrarActionsResponseOkSchema = (valueLabel = "Registrar Actions Response OK") => import_v423.z.object({
2983
- responseCode: import_v423.z.literal(RegistrarActionsResponseCodes.Ok),
2984
- registrarActions: import_v423.z.array(makeNamedRegistrarActionSchema(valueLabel)),
2881
+ var makeRegistrarActionsResponseOkSchema = (valueLabel = "Registrar Actions Response OK") => import_v422.z.object({
2882
+ responseCode: import_v422.z.literal(RegistrarActionsResponseCodes.Ok),
2883
+ registrarActions: import_v422.z.array(makeNamedRegistrarActionSchema(valueLabel)),
2985
2884
  pageContext: makeResponsePageContextSchema(`${valueLabel}.pageContext`),
2986
2885
  accurateAsOf: makeUnixTimestampSchema(`${valueLabel}.accurateAsOf`).optional()
2987
2886
  });
2988
- var makeRegistrarActionsResponseErrorSchema = (_valueLabel = "Registrar Actions Response Error") => import_v423.z.strictObject({
2989
- responseCode: import_v423.z.literal(RegistrarActionsResponseCodes.Error),
2887
+ var makeRegistrarActionsResponseErrorSchema = (_valueLabel = "Registrar Actions Response Error") => import_v422.z.strictObject({
2888
+ responseCode: import_v422.z.literal(RegistrarActionsResponseCodes.Error),
2990
2889
  error: ErrorResponseSchema
2991
2890
  });
2992
- var makeRegistrarActionsResponseSchema = (valueLabel = "Registrar Actions Response") => import_v423.z.discriminatedUnion("responseCode", [
2891
+ var makeRegistrarActionsResponseSchema = (valueLabel = "Registrar Actions Response") => import_v422.z.discriminatedUnion("responseCode", [
2993
2892
  makeRegistrarActionsResponseOkSchema(valueLabel),
2994
2893
  makeRegistrarActionsResponseErrorSchema(valueLabel)
2995
2894
  ]);
@@ -3000,7 +2899,7 @@ function deserializeRegistrarActionsResponse(maybeResponse) {
3000
2899
  if (parsed.error) {
3001
2900
  throw new Error(
3002
2901
  `Cannot deserialize RegistrarActionsResponse:
3003
- ${(0, import_v424.prettifyError)(parsed.error)}
2902
+ ${(0, import_v423.prettifyError)(parsed.error)}
3004
2903
  `
3005
2904
  );
3006
2905
  }
@@ -3095,7 +2994,7 @@ var registrarActionsPrerequisites = Object.freeze({
3095
2994
  "registrars" /* Registrars */
3096
2995
  ],
3097
2996
  /**
3098
- * Check if provided ENSApiPublicConfig supports the Registrar Actions API.
2997
+ * Check if provided EnsIndexerPublicConfig supports the Registrar Actions API.
3099
2998
  */
3100
2999
  hasEnsIndexerConfigSupport(config) {
3101
3000
  return registrarActionsPrerequisites.requiredPlugins.every(
@@ -3147,12 +3046,12 @@ function serializeRegistrarActionsResponse(response) {
3147
3046
  }
3148
3047
 
3149
3048
  // src/ensapi/api/shared/errors/deserialize.ts
3150
- var import_v425 = require("zod/v4");
3049
+ var import_v424 = require("zod/v4");
3151
3050
  function deserializeErrorResponse(maybeErrorResponse) {
3152
3051
  const parsed = ErrorResponseSchema.safeParse(maybeErrorResponse);
3153
3052
  if (parsed.error) {
3154
3053
  throw new Error(`Cannot deserialize ErrorResponse:
3155
- ${(0, import_v425.prettifyError)(parsed.error)}
3054
+ ${(0, import_v424.prettifyError)(parsed.error)}
3156
3055
  `);
3157
3056
  }
3158
3057
  return parsed.data;
@@ -3193,8 +3092,39 @@ function buildPageContext(page, recordsPerPage, totalRecords) {
3193
3092
  };
3194
3093
  }
3195
3094
 
3196
- // src/client.ts
3197
- var ENSNodeClient = class _ENSNodeClient {
3095
+ // src/ensapi/client-error.ts
3096
+ var ClientError = class _ClientError extends Error {
3097
+ details;
3098
+ constructor(message, details) {
3099
+ super(message);
3100
+ this.name = "ClientError";
3101
+ this.details = details;
3102
+ }
3103
+ static fromErrorResponse({ message, details }) {
3104
+ return new _ClientError(message, details);
3105
+ }
3106
+ };
3107
+
3108
+ // src/ensapi/deployments.ts
3109
+ var import_datasources6 = require("@ensnode/datasources");
3110
+ var DEFAULT_ENSNODE_API_URL_MAINNET = "https://api.alpha.ensnode.io";
3111
+ var DEFAULT_ENSNODE_API_URL_SEPOLIA = "https://api.alpha-sepolia.ensnode.io";
3112
+ var getDefaultEnsNodeUrl = (namespace) => {
3113
+ const effectiveNamespace = namespace ?? import_datasources6.ENSNamespaceIds.Mainnet;
3114
+ switch (effectiveNamespace) {
3115
+ case import_datasources6.ENSNamespaceIds.Mainnet:
3116
+ return new URL(DEFAULT_ENSNODE_API_URL_MAINNET);
3117
+ case import_datasources6.ENSNamespaceIds.Sepolia:
3118
+ return new URL(DEFAULT_ENSNODE_API_URL_SEPOLIA);
3119
+ default:
3120
+ throw new Error(
3121
+ `ENSNamespaceId ${effectiveNamespace} does not have a default ENSNode URL defined`
3122
+ );
3123
+ }
3124
+ };
3125
+
3126
+ // src/ensapi/client.ts
3127
+ var EnsApiClient = class _EnsApiClient {
3198
3128
  options;
3199
3129
  static defaultOptions() {
3200
3130
  return {
@@ -3203,7 +3133,7 @@ var ENSNodeClient = class _ENSNodeClient {
3203
3133
  }
3204
3134
  constructor(options = {}) {
3205
3135
  this.options = {
3206
- ..._ENSNodeClient.defaultOptions(),
3136
+ ..._EnsApiClient.defaultOptions(),
3207
3137
  ...options
3208
3138
  };
3209
3139
  }
@@ -3372,15 +3302,15 @@ var ENSNodeClient = class _ENSNodeClient {
3372
3302
  return data;
3373
3303
  }
3374
3304
  /**
3375
- * Fetch ENSNode Config
3305
+ * Fetch ENSApi Config
3376
3306
  *
3377
- * Fetch the ENSNode's configuration.
3307
+ * Fetch the ENSApi's configuration.
3378
3308
  *
3379
- * @returns {ConfigResponse}
3309
+ * @returns {EnsApiConfigResponse}
3380
3310
  *
3381
- * @throws if the ENSNode request fails
3382
- * @throws if the ENSNode API returns an error response
3383
- * @throws if the ENSNode response breaks required invariants
3311
+ * @throws if the ENSApi request fails
3312
+ * @throws if the ENSApi returns an error response
3313
+ * @throws if the ENSApi response breaks required invariants
3384
3314
  */
3385
3315
  async config() {
3386
3316
  const url = new URL(`/api/config`, this.options.url);
@@ -3393,18 +3323,18 @@ var ENSNodeClient = class _ENSNodeClient {
3393
3323
  }
3394
3324
  if (!response.ok) {
3395
3325
  const errorResponse = deserializeErrorResponse(responseData);
3396
- throw new Error(`Fetching ENSNode Config Failed: ${errorResponse.message}`);
3326
+ throw new Error(`Fetching ENSApi Config Failed: ${errorResponse.message}`);
3397
3327
  }
3398
- return deserializeConfigResponse(responseData);
3328
+ return deserializeEnsApiConfigResponse(responseData);
3399
3329
  }
3400
3330
  /**
3401
- * Fetch ENSNode Indexing Status
3331
+ * Fetch ENSApi Indexing Status
3402
3332
  *
3403
- * @returns {IndexingStatusResponse}
3333
+ * @returns {EnsApiIndexingStatusResponse}
3404
3334
  *
3405
- * @throws if the ENSNode request fails
3406
- * @throws if the ENSNode API returns an error response
3407
- * @throws if the ENSNode response breaks required invariants
3335
+ * @throws if the ENSApi request fails
3336
+ * @throws if the ENSApi returns an error response
3337
+ * @throws if the ENSApi response breaks required invariants
3408
3338
  */
3409
3339
  async indexingStatus() {
3410
3340
  const url = new URL(`/api/indexing-status`, this.options.url);
@@ -3423,10 +3353,12 @@ var ENSNodeClient = class _ENSNodeClient {
3423
3353
  console.log("Indexing Status API: handling a known indexing status server error.");
3424
3354
  }
3425
3355
  if (typeof errorResponse !== "undefined") {
3426
- throw new Error(`Fetching ENSNode Indexing Status Failed: ${errorResponse.message}`);
3356
+ throw new Error(`Fetching ENSApi Indexing Status Failed: ${errorResponse.message}`);
3427
3357
  }
3428
3358
  }
3429
- return deserializeIndexingStatusResponse(responseData);
3359
+ return deserializeEnsApiIndexingStatusResponse(
3360
+ responseData
3361
+ );
3430
3362
  }
3431
3363
  /**
3432
3364
  * Fetch ENSNode Registrar Actions
@@ -3448,11 +3380,11 @@ var ENSNodeClient = class _ENSNodeClient {
3448
3380
  * ```ts
3449
3381
  * import {
3450
3382
  * registrarActionsFilter,
3451
- * ENSNodeClient,
3383
+ * EnsApiClient,
3452
3384
  * } from "@ensnode/ensnode-sdk";
3453
3385
  * import { namehash } from "viem/ens";
3454
3386
  *
3455
- * const client: ENSNodeClient;
3387
+ * const client: EnsApiClient;
3456
3388
  *
3457
3389
  * // Get first page with default page size (10 records)
3458
3390
  * const response = await client.registrarActions();
@@ -3615,11 +3547,11 @@ var ENSNodeClient = class _ENSNodeClient {
3615
3547
  * @example
3616
3548
  * ```ts
3617
3549
  * import {
3618
- * ENSNodeClient,
3550
+ * EnsApiClient,
3619
3551
  * } from "@ensnode/ensnode-sdk";
3620
3552
  * import { namehash } from "viem/ens";
3621
3553
  *
3622
- * const client: ENSNodeClient;
3554
+ * const client: EnsApiClient;
3623
3555
  *
3624
3556
  * // get latest name token records from the indexed subregistry based on the requested name
3625
3557
  * const response = await client.nameTokens({
@@ -3659,6 +3591,102 @@ var ENSNodeClient = class _ENSNodeClient {
3659
3591
  return deserializedNameTokensResponse(responseData);
3660
3592
  }
3661
3593
  };
3594
+ var ENSNodeClient = class extends EnsApiClient {
3595
+ };
3596
+
3597
+ // src/ensindexer/config/deserialize.ts
3598
+ var import_v425 = require("zod/v4");
3599
+ function deserializeEnsIndexerPublicConfig(maybeConfig, valueLabel) {
3600
+ const schema = makeEnsIndexerPublicConfigSchema(valueLabel);
3601
+ const parsed = schema.safeParse(maybeConfig);
3602
+ if (parsed.error) {
3603
+ throw new Error(`Cannot deserialize EnsIndexerPublicConfig:
3604
+ ${(0, import_v425.prettifyError)(parsed.error)}
3605
+ `);
3606
+ }
3607
+ return parsed.data;
3608
+ }
3609
+ var deserializeENSIndexerPublicConfig = deserializeEnsIndexerPublicConfig;
3610
+
3611
+ // src/ensindexer/config/label-utils.ts
3612
+ var import_viem15 = require("viem");
3613
+ function labelHashToBytes(labelHash) {
3614
+ try {
3615
+ if (labelHash.length !== 66) {
3616
+ throw new Error(`Invalid labelHash length ${labelHash.length} characters (expected 66)`);
3617
+ }
3618
+ if (labelHash !== labelHash.toLowerCase()) {
3619
+ throw new Error("Labelhash must be in lowercase");
3620
+ }
3621
+ if (!labelHash.startsWith("0x")) {
3622
+ throw new Error("Labelhash must be 0x-prefixed");
3623
+ }
3624
+ const bytes = (0, import_viem15.hexToBytes)(labelHash);
3625
+ if (bytes.length !== 32) {
3626
+ throw new Error(`Invalid labelHash length ${bytes.length} bytes (expected 32)`);
3627
+ }
3628
+ return bytes;
3629
+ } catch (e) {
3630
+ if (e instanceof Error) {
3631
+ throw e;
3632
+ }
3633
+ throw new Error("Invalid hex format");
3634
+ }
3635
+ }
3636
+
3637
+ // src/ensindexer/config/labelset-utils.ts
3638
+ function buildLabelSetId(maybeLabelSetId) {
3639
+ return makeLabelSetIdSchema("LabelSetId").parse(maybeLabelSetId);
3640
+ }
3641
+ function buildLabelSetVersion(maybeLabelSetVersion) {
3642
+ return makeLabelSetVersionSchema("LabelSetVersion").parse(maybeLabelSetVersion);
3643
+ }
3644
+ function buildEnsRainbowClientLabelSet(labelSetId, labelSetVersion) {
3645
+ if (labelSetVersion !== void 0 && labelSetId === void 0) {
3646
+ throw new Error("When a labelSetVersion is defined, labelSetId must also be defined.");
3647
+ }
3648
+ return { labelSetId, labelSetVersion };
3649
+ }
3650
+ function validateSupportedLabelSetAndVersion(serverSet, clientSet) {
3651
+ if (clientSet.labelSetId === void 0) {
3652
+ return;
3653
+ }
3654
+ if (serverSet.labelSetId !== clientSet.labelSetId) {
3655
+ throw new Error(
3656
+ `Server label set ID "${serverSet.labelSetId}" does not match client's requested label set ID "${clientSet.labelSetId}".`
3657
+ );
3658
+ }
3659
+ if (clientSet.labelSetVersion !== void 0 && serverSet.highestLabelSetVersion < clientSet.labelSetVersion) {
3660
+ throw new Error(
3661
+ `Server highest label set version ${serverSet.highestLabelSetVersion} is less than client's requested version ${clientSet.labelSetVersion} for label set ID "${clientSet.labelSetId}".`
3662
+ );
3663
+ }
3664
+ }
3665
+
3666
+ // src/ensindexer/config/parsing.ts
3667
+ function parseNonNegativeInteger(maybeNumber) {
3668
+ const trimmed = maybeNumber.trim();
3669
+ if (!trimmed) {
3670
+ throw new Error("Input cannot be empty");
3671
+ }
3672
+ if (trimmed === "-0") {
3673
+ throw new Error("Negative zero is not a valid non-negative integer");
3674
+ }
3675
+ const num = Number(maybeNumber);
3676
+ if (Number.isNaN(num)) {
3677
+ throw new Error(`"${maybeNumber}" is not a valid number`);
3678
+ }
3679
+ if (!Number.isFinite(num)) {
3680
+ throw new Error(`"${maybeNumber}" is not a finite number`);
3681
+ }
3682
+ if (!Number.isInteger(num)) {
3683
+ throw new Error(`"${maybeNumber}" is not an integer`);
3684
+ }
3685
+ if (num < 0) {
3686
+ throw new Error(`"${maybeNumber}" is not a non-negative integer`);
3687
+ }
3688
+ return num;
3689
+ }
3662
3690
 
3663
3691
  // src/ensv2/ids-lib.ts
3664
3692
  var import_viem16 = require("viem");