@ensnode/ensnode-sdk 0.0.0-next-20260217191049 → 0.0.0-next-20260217205130
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 +252 -212
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +57 -10
- package/dist/index.d.ts +57 -10
- package/dist/index.js +92 -52
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -100,6 +100,7 @@ __export(index_exports, {
|
|
|
100
100
|
buildPageContext: () => buildPageContext,
|
|
101
101
|
buildUnresolvedIdentity: () => buildUnresolvedIdentity,
|
|
102
102
|
buildUnvalidatedCrossChainIndexingStatusSnapshot: () => buildUnvalidatedCrossChainIndexingStatusSnapshot,
|
|
103
|
+
buildUnvalidatedEnsIndexerPublicConfig: () => buildUnvalidatedEnsIndexerPublicConfig,
|
|
103
104
|
buildUnvalidatedOmnichainIndexingStatusSnapshot: () => buildUnvalidatedOmnichainIndexingStatusSnapshot,
|
|
104
105
|
buildUnvalidatedRealtimeIndexingStatusProjection: () => buildUnvalidatedRealtimeIndexingStatusProjection,
|
|
105
106
|
checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill: () => checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill,
|
|
@@ -226,6 +227,7 @@ __export(index_exports, {
|
|
|
226
227
|
makeRenewalId: () => makeRenewalId,
|
|
227
228
|
makeResolverId: () => makeResolverId,
|
|
228
229
|
makeResolverRecordsId: () => makeResolverRecordsId,
|
|
230
|
+
makeSerializedEnsApiPublicConfigSchema: () => makeSerializedEnsApiPublicConfigSchema,
|
|
229
231
|
makeSubdomainNode: () => makeSubdomainNode,
|
|
230
232
|
maybeGetDatasourceContract: () => maybeGetDatasourceContract,
|
|
231
233
|
nameTokensPrerequisites: () => nameTokensPrerequisites,
|
|
@@ -480,10 +482,10 @@ var uint256ToHex32 = (num) => (0, import_viem5.toHex)(num, { size: 32 });
|
|
|
480
482
|
var import_datasources = require("@ensnode/datasources");
|
|
481
483
|
|
|
482
484
|
// src/ensapi/config/deserialize.ts
|
|
483
|
-
var
|
|
485
|
+
var import_v46 = require("zod/v4");
|
|
484
486
|
|
|
485
|
-
// src/
|
|
486
|
-
var
|
|
487
|
+
// src/ensindexer/config/deserialize.ts
|
|
488
|
+
var import_v43 = require("zod/v4");
|
|
487
489
|
|
|
488
490
|
// src/ensindexer/config/zod-schemas.ts
|
|
489
491
|
var import_v42 = require("zod/v4");
|
|
@@ -827,9 +829,14 @@ function invariant_ensDbVersionIsSameAsEnsIndexerVersion(ctx) {
|
|
|
827
829
|
}
|
|
828
830
|
|
|
829
831
|
// src/ensindexer/config/zod-schemas.ts
|
|
830
|
-
var makeIndexedChainIdsSchema = (valueLabel = "Indexed Chain IDs") => import_v42.z.
|
|
832
|
+
var makeIndexedChainIdsSchema = (valueLabel = "Indexed Chain IDs") => import_v42.z.set(makeChainIdSchema(valueLabel), { error: `${valueLabel} must be a set` }).min(1, {
|
|
833
|
+
error: `${valueLabel} must be a set with at least one chain ID.`
|
|
834
|
+
});
|
|
835
|
+
var makeSerializedIndexedChainIdsSchema = (valueLabel = "Indexed Chain IDs") => import_v42.z.array(makeChainIdSchema(valueLabel), {
|
|
831
836
|
error: `${valueLabel} must be an array.`
|
|
832
|
-
}).min(1, {
|
|
837
|
+
}).min(1, {
|
|
838
|
+
error: `${valueLabel} must be an array with at least one chain ID.`
|
|
839
|
+
});
|
|
833
840
|
var makePluginsListSchema = (valueLabel = "Plugins") => import_v42.z.array(import_v42.z.string(), {
|
|
834
841
|
error: `${valueLabel} must be a list of strings.`
|
|
835
842
|
}).min(1, {
|
|
@@ -878,7 +885,6 @@ var makeEnsIndexerVersionInfoSchema = (valueLabel = "Value") => import_v42.z.str
|
|
|
878
885
|
error: `${valueLabel} must be a valid ENSIndexerVersionInfo object.`
|
|
879
886
|
}
|
|
880
887
|
).check(invariant_ensDbVersionIsSameAsEnsIndexerVersion);
|
|
881
|
-
var makeENSIndexerVersionInfoSchema = makeEnsIndexerVersionInfoSchema;
|
|
882
888
|
function invariant_isSubgraphCompatibleRequirements(ctx) {
|
|
883
889
|
const { value: config } = ctx;
|
|
884
890
|
if (config.isSubgraphCompatible && !isSubgraphCompatible(config)) {
|
|
@@ -892,27 +898,61 @@ function invariant_isSubgraphCompatibleRequirements(ctx) {
|
|
|
892
898
|
var makeEnsIndexerPublicConfigSchema = (valueLabel = "ENSIndexerPublicConfig") => import_v42.z.object({
|
|
893
899
|
labelSet: makeFullyPinnedLabelSetSchema(`${valueLabel}.labelSet`),
|
|
894
900
|
indexedChainIds: makeIndexedChainIdsSchema(`${valueLabel}.indexedChainIds`),
|
|
895
|
-
isSubgraphCompatible: import_v42.z.boolean({
|
|
901
|
+
isSubgraphCompatible: import_v42.z.boolean({
|
|
902
|
+
error: `${valueLabel}.isSubgraphCompatible must be a boolean value.`
|
|
903
|
+
}),
|
|
896
904
|
namespace: makeENSNamespaceIdSchema(`${valueLabel}.namespace`),
|
|
897
905
|
plugins: makePluginsListSchema(`${valueLabel}.plugins`),
|
|
898
906
|
databaseSchemaName: makeDatabaseSchemaNameSchema(`${valueLabel}.databaseSchemaName`),
|
|
899
|
-
versionInfo:
|
|
907
|
+
versionInfo: makeEnsIndexerVersionInfoSchema(`${valueLabel}.versionInfo`)
|
|
900
908
|
}).check(invariant_isSubgraphCompatibleRequirements);
|
|
909
|
+
var makeSerializedEnsIndexerPublicConfigSchema = (valueLabel = "Serialized ENSIndexerPublicConfig") => import_v42.z.object({
|
|
910
|
+
labelSet: makeFullyPinnedLabelSetSchema(`${valueLabel}.labelSet`),
|
|
911
|
+
indexedChainIds: makeSerializedIndexedChainIdsSchema(`${valueLabel}.indexedChainIds`),
|
|
912
|
+
isSubgraphCompatible: import_v42.z.boolean({
|
|
913
|
+
error: `${valueLabel}.isSubgraphCompatible must be a boolean value.`
|
|
914
|
+
}),
|
|
915
|
+
namespace: makeENSNamespaceIdSchema(`${valueLabel}.namespace`),
|
|
916
|
+
plugins: makePluginsListSchema(`${valueLabel}.plugins`),
|
|
917
|
+
databaseSchemaName: makeDatabaseSchemaNameSchema(`${valueLabel}.databaseSchemaName`),
|
|
918
|
+
versionInfo: makeEnsIndexerVersionInfoSchema(`${valueLabel}.versionInfo`)
|
|
919
|
+
});
|
|
920
|
+
|
|
921
|
+
// src/ensindexer/config/deserialize.ts
|
|
922
|
+
function buildUnvalidatedEnsIndexerPublicConfig(serializedPublicConfig) {
|
|
923
|
+
return {
|
|
924
|
+
...serializedPublicConfig,
|
|
925
|
+
indexedChainIds: new Set(serializedPublicConfig.indexedChainIds)
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
function deserializeEnsIndexerPublicConfig(maybePublicConfig, valueLabel) {
|
|
929
|
+
const parsed = makeSerializedEnsIndexerPublicConfigSchema(valueLabel).transform(buildUnvalidatedEnsIndexerPublicConfig).pipe(makeEnsIndexerPublicConfigSchema(valueLabel)).safeParse(maybePublicConfig);
|
|
930
|
+
if (parsed.error) {
|
|
931
|
+
throw new Error(`Cannot deserialize EnsIndexerPublicConfig:
|
|
932
|
+
${(0, import_v43.prettifyError)(parsed.error)}
|
|
933
|
+
`);
|
|
934
|
+
}
|
|
935
|
+
return parsed.data;
|
|
936
|
+
}
|
|
937
|
+
var deserializeENSIndexerPublicConfig = deserializeEnsIndexerPublicConfig;
|
|
938
|
+
|
|
939
|
+
// src/ensapi/config/zod-schemas.ts
|
|
940
|
+
var import_v45 = require("zod/v4");
|
|
901
941
|
|
|
902
942
|
// src/shared/config/thegraph.ts
|
|
903
|
-
var
|
|
904
|
-
var TheGraphCannotFallbackReasonSchema =
|
|
943
|
+
var import_v44 = require("zod/v4");
|
|
944
|
+
var TheGraphCannotFallbackReasonSchema = import_v44.z.enum({
|
|
905
945
|
NotSubgraphCompatible: "not-subgraph-compatible",
|
|
906
946
|
NoApiKey: "no-api-key",
|
|
907
947
|
NoSubgraphUrl: "no-subgraph-url"
|
|
908
948
|
});
|
|
909
|
-
var TheGraphFallbackSchema =
|
|
910
|
-
|
|
911
|
-
canFallback:
|
|
912
|
-
url:
|
|
949
|
+
var TheGraphFallbackSchema = import_v44.z.discriminatedUnion("canFallback", [
|
|
950
|
+
import_v44.z.strictObject({
|
|
951
|
+
canFallback: import_v44.z.literal(true),
|
|
952
|
+
url: import_v44.z.string()
|
|
913
953
|
}),
|
|
914
|
-
|
|
915
|
-
canFallback:
|
|
954
|
+
import_v44.z.strictObject({
|
|
955
|
+
canFallback: import_v44.z.literal(false),
|
|
916
956
|
reason: TheGraphCannotFallbackReasonSchema
|
|
917
957
|
})
|
|
918
958
|
]);
|
|
@@ -920,33 +960,47 @@ var TheGraphFallbackSchema = import_v43.z.discriminatedUnion("canFallback", [
|
|
|
920
960
|
// src/ensapi/config/zod-schemas.ts
|
|
921
961
|
function makeEnsApiPublicConfigSchema(valueLabel) {
|
|
922
962
|
const label = valueLabel ?? "ENSApiPublicConfig";
|
|
923
|
-
return
|
|
924
|
-
version:
|
|
963
|
+
return import_v45.z.object({
|
|
964
|
+
version: import_v45.z.string().min(1, `${label}.version must be a non-empty string`),
|
|
925
965
|
theGraphFallback: TheGraphFallbackSchema,
|
|
926
966
|
ensIndexerPublicConfig: makeEnsIndexerPublicConfigSchema(`${label}.ensIndexerPublicConfig`)
|
|
927
967
|
});
|
|
928
968
|
}
|
|
929
969
|
var makeENSApiPublicConfigSchema = makeEnsApiPublicConfigSchema;
|
|
970
|
+
function makeSerializedEnsApiPublicConfigSchema(valueLabel) {
|
|
971
|
+
const label = valueLabel ?? "ENSApiPublicConfig";
|
|
972
|
+
return import_v45.z.object({
|
|
973
|
+
version: import_v45.z.string().min(1, `${label}.version must be a non-empty string`),
|
|
974
|
+
theGraphFallback: TheGraphFallbackSchema,
|
|
975
|
+
ensIndexerPublicConfig: makeSerializedEnsIndexerPublicConfigSchema(
|
|
976
|
+
`${label}.ensIndexerPublicConfig`
|
|
977
|
+
)
|
|
978
|
+
});
|
|
979
|
+
}
|
|
930
980
|
|
|
931
981
|
// src/ensapi/config/deserialize.ts
|
|
932
|
-
function
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
982
|
+
function buildUnvalidatedEnsApiPublicConfig(serializedPublicConfig) {
|
|
983
|
+
return {
|
|
984
|
+
...serializedPublicConfig,
|
|
985
|
+
ensIndexerPublicConfig: buildUnvalidatedEnsIndexerPublicConfig(
|
|
986
|
+
serializedPublicConfig.ensIndexerPublicConfig
|
|
987
|
+
)
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
function deserializeEnsApiPublicConfig(maybePublicConfig, valueLabel) {
|
|
991
|
+
const parsed = makeSerializedEnsApiPublicConfigSchema(valueLabel).transform(buildUnvalidatedEnsApiPublicConfig).pipe(makeEnsApiPublicConfigSchema(valueLabel)).safeParse(maybePublicConfig);
|
|
992
|
+
if (parsed.error) {
|
|
993
|
+
throw new Error(`Cannot deserialize EnsApiPublicConfig:
|
|
994
|
+
${(0, import_v46.prettifyError)(parsed.error)}
|
|
940
995
|
`);
|
|
941
|
-
}
|
|
942
|
-
throw error;
|
|
943
996
|
}
|
|
997
|
+
return parsed.data;
|
|
944
998
|
}
|
|
945
999
|
var deserializeENSApiPublicConfig = deserializeEnsApiPublicConfig;
|
|
946
1000
|
|
|
947
1001
|
// src/ensapi/api/config/deserialize.ts
|
|
948
|
-
function deserializeEnsApiConfigResponse(
|
|
949
|
-
return deserializeEnsApiPublicConfig(
|
|
1002
|
+
function deserializeEnsApiConfigResponse(maybeResponse) {
|
|
1003
|
+
return deserializeEnsApiPublicConfig(maybeResponse);
|
|
950
1004
|
}
|
|
951
1005
|
var deserializeConfigResponse = deserializeEnsApiConfigResponse;
|
|
952
1006
|
|
|
@@ -994,16 +1048,16 @@ function serializeEnsApiConfigResponse(response) {
|
|
|
994
1048
|
var serializeConfigResponse = serializeEnsApiConfigResponse;
|
|
995
1049
|
|
|
996
1050
|
// src/ensapi/api/indexing-status/deserialize.ts
|
|
997
|
-
var
|
|
1051
|
+
var import_v415 = require("zod/v4");
|
|
998
1052
|
|
|
999
1053
|
// src/indexing-status/deserialize/realtime-indexing-status-projection.ts
|
|
1000
|
-
var
|
|
1054
|
+
var import_v413 = require("zod/v4");
|
|
1001
1055
|
|
|
1002
1056
|
// src/indexing-status/zod-schema/realtime-indexing-status-projection.ts
|
|
1003
|
-
var
|
|
1057
|
+
var import_v410 = require("zod/v4");
|
|
1004
1058
|
|
|
1005
1059
|
// src/indexing-status/zod-schema/cross-chain-indexing-status-snapshot.ts
|
|
1006
|
-
var
|
|
1060
|
+
var import_v49 = require("zod/v4");
|
|
1007
1061
|
|
|
1008
1062
|
// src/indexing-status/chain-indexing-status-snapshot.ts
|
|
1009
1063
|
var ChainIndexingConfigTypeIds = {
|
|
@@ -1134,7 +1188,7 @@ function getLatestIndexedBlockRef(indexingStatus, chainId) {
|
|
|
1134
1188
|
}
|
|
1135
1189
|
|
|
1136
1190
|
// src/indexing-status/zod-schema/omnichain-indexing-status-snapshot.ts
|
|
1137
|
-
var
|
|
1191
|
+
var import_v48 = require("zod/v4");
|
|
1138
1192
|
|
|
1139
1193
|
// src/indexing-status/omnichain-indexing-status-snapshot.ts
|
|
1140
1194
|
var OmnichainIndexingStatusIds = {
|
|
@@ -1218,7 +1272,7 @@ function getOmnichainIndexingCursor(chains) {
|
|
|
1218
1272
|
}
|
|
1219
1273
|
|
|
1220
1274
|
// src/indexing-status/zod-schema/chain-indexing-status-snapshot.ts
|
|
1221
|
-
var
|
|
1275
|
+
var import_v47 = require("zod/v4");
|
|
1222
1276
|
|
|
1223
1277
|
// src/shared/block-ref.ts
|
|
1224
1278
|
function isBefore(blockA, blockB) {
|
|
@@ -1306,46 +1360,46 @@ function invariant_chainSnapshotFollowingBlocks(ctx) {
|
|
|
1306
1360
|
});
|
|
1307
1361
|
}
|
|
1308
1362
|
}
|
|
1309
|
-
var makeChainIndexingConfigSchema = (valueLabel = "Value") =>
|
|
1310
|
-
|
|
1311
|
-
configType:
|
|
1363
|
+
var makeChainIndexingConfigSchema = (valueLabel = "Value") => import_v47.z.discriminatedUnion("configType", [
|
|
1364
|
+
import_v47.z.object({
|
|
1365
|
+
configType: import_v47.z.literal(ChainIndexingConfigTypeIds.Indefinite),
|
|
1312
1366
|
startBlock: makeBlockRefSchema(valueLabel)
|
|
1313
1367
|
}),
|
|
1314
|
-
|
|
1315
|
-
configType:
|
|
1368
|
+
import_v47.z.object({
|
|
1369
|
+
configType: import_v47.z.literal(ChainIndexingConfigTypeIds.Definite),
|
|
1316
1370
|
startBlock: makeBlockRefSchema(valueLabel),
|
|
1317
1371
|
endBlock: makeBlockRefSchema(valueLabel)
|
|
1318
1372
|
})
|
|
1319
1373
|
]);
|
|
1320
|
-
var makeChainIndexingStatusSnapshotQueuedSchema = (valueLabel = "Value") =>
|
|
1321
|
-
chainStatus:
|
|
1374
|
+
var makeChainIndexingStatusSnapshotQueuedSchema = (valueLabel = "Value") => import_v47.z.object({
|
|
1375
|
+
chainStatus: import_v47.z.literal(ChainIndexingStatusIds.Queued),
|
|
1322
1376
|
config: makeChainIndexingConfigSchema(valueLabel)
|
|
1323
1377
|
}).check(invariant_chainSnapshotQueuedBlocks);
|
|
1324
|
-
var makeChainIndexingStatusSnapshotBackfillSchema = (valueLabel = "Value") =>
|
|
1325
|
-
chainStatus:
|
|
1378
|
+
var makeChainIndexingStatusSnapshotBackfillSchema = (valueLabel = "Value") => import_v47.z.object({
|
|
1379
|
+
chainStatus: import_v47.z.literal(ChainIndexingStatusIds.Backfill),
|
|
1326
1380
|
config: makeChainIndexingConfigSchema(valueLabel),
|
|
1327
1381
|
latestIndexedBlock: makeBlockRefSchema(valueLabel),
|
|
1328
1382
|
backfillEndBlock: makeBlockRefSchema(valueLabel)
|
|
1329
1383
|
}).check(invariant_chainSnapshotBackfillBlocks);
|
|
1330
|
-
var makeChainIndexingStatusSnapshotCompletedSchema = (valueLabel = "Value") =>
|
|
1331
|
-
chainStatus:
|
|
1332
|
-
config:
|
|
1333
|
-
configType:
|
|
1384
|
+
var makeChainIndexingStatusSnapshotCompletedSchema = (valueLabel = "Value") => import_v47.z.object({
|
|
1385
|
+
chainStatus: import_v47.z.literal(ChainIndexingStatusIds.Completed),
|
|
1386
|
+
config: import_v47.z.object({
|
|
1387
|
+
configType: import_v47.z.literal(ChainIndexingConfigTypeIds.Definite),
|
|
1334
1388
|
startBlock: makeBlockRefSchema(valueLabel),
|
|
1335
1389
|
endBlock: makeBlockRefSchema(valueLabel)
|
|
1336
1390
|
}),
|
|
1337
1391
|
latestIndexedBlock: makeBlockRefSchema(valueLabel)
|
|
1338
1392
|
}).check(invariant_chainSnapshotCompletedBlocks);
|
|
1339
|
-
var makeChainIndexingStatusSnapshotFollowingSchema = (valueLabel = "Value") =>
|
|
1340
|
-
chainStatus:
|
|
1341
|
-
config:
|
|
1342
|
-
configType:
|
|
1393
|
+
var makeChainIndexingStatusSnapshotFollowingSchema = (valueLabel = "Value") => import_v47.z.object({
|
|
1394
|
+
chainStatus: import_v47.z.literal(ChainIndexingStatusIds.Following),
|
|
1395
|
+
config: import_v47.z.object({
|
|
1396
|
+
configType: import_v47.z.literal(ChainIndexingConfigTypeIds.Indefinite),
|
|
1343
1397
|
startBlock: makeBlockRefSchema(valueLabel)
|
|
1344
1398
|
}),
|
|
1345
1399
|
latestIndexedBlock: makeBlockRefSchema(valueLabel),
|
|
1346
1400
|
latestKnownBlock: makeBlockRefSchema(valueLabel)
|
|
1347
1401
|
}).check(invariant_chainSnapshotFollowingBlocks);
|
|
1348
|
-
var makeChainIndexingStatusSnapshotSchema = (valueLabel = "Value") =>
|
|
1402
|
+
var makeChainIndexingStatusSnapshotSchema = (valueLabel = "Value") => import_v47.z.discriminatedUnion("chainStatus", [
|
|
1349
1403
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
|
|
1350
1404
|
makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1351
1405
|
makeChainIndexingStatusSnapshotCompletedSchema(valueLabel),
|
|
@@ -1474,11 +1528,11 @@ function invariant_omnichainStatusSnapshotFollowingHasValidChains(ctx) {
|
|
|
1474
1528
|
});
|
|
1475
1529
|
}
|
|
1476
1530
|
}
|
|
1477
|
-
var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) =>
|
|
1478
|
-
omnichainStatus:
|
|
1479
|
-
chains:
|
|
1531
|
+
var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_v48.z.object({
|
|
1532
|
+
omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Unstarted),
|
|
1533
|
+
chains: import_v48.z.map(
|
|
1480
1534
|
makeChainIdSchema(),
|
|
1481
|
-
|
|
1535
|
+
import_v48.z.discriminatedUnion("chainStatus", [
|
|
1482
1536
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel)
|
|
1483
1537
|
]),
|
|
1484
1538
|
{
|
|
@@ -1487,11 +1541,11 @@ var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_
|
|
|
1487
1541
|
),
|
|
1488
1542
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1489
1543
|
}).check(invariant_omnichainSnapshotUnstartedHasValidChains);
|
|
1490
|
-
var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) =>
|
|
1491
|
-
omnichainStatus:
|
|
1492
|
-
chains:
|
|
1544
|
+
var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v48.z.object({
|
|
1545
|
+
omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Backfill),
|
|
1546
|
+
chains: import_v48.z.map(
|
|
1493
1547
|
makeChainIdSchema(),
|
|
1494
|
-
|
|
1548
|
+
import_v48.z.discriminatedUnion("chainStatus", [
|
|
1495
1549
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
|
|
1496
1550
|
makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1497
1551
|
makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
|
|
@@ -1502,11 +1556,11 @@ var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v
|
|
|
1502
1556
|
),
|
|
1503
1557
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1504
1558
|
}).check(invariant_omnichainStatusSnapshotBackfillHasValidChains);
|
|
1505
|
-
var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) =>
|
|
1506
|
-
omnichainStatus:
|
|
1507
|
-
chains:
|
|
1559
|
+
var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_v48.z.object({
|
|
1560
|
+
omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Completed),
|
|
1561
|
+
chains: import_v48.z.map(
|
|
1508
1562
|
makeChainIdSchema(),
|
|
1509
|
-
|
|
1563
|
+
import_v48.z.discriminatedUnion("chainStatus", [
|
|
1510
1564
|
makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
|
|
1511
1565
|
]),
|
|
1512
1566
|
{
|
|
@@ -1515,11 +1569,11 @@ var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_
|
|
|
1515
1569
|
),
|
|
1516
1570
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1517
1571
|
}).check(invariant_omnichainStatusSnapshotCompletedHasValidChains);
|
|
1518
|
-
var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) =>
|
|
1519
|
-
omnichainStatus:
|
|
1520
|
-
chains:
|
|
1572
|
+
var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_v48.z.object({
|
|
1573
|
+
omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Following),
|
|
1574
|
+
chains: import_v48.z.map(
|
|
1521
1575
|
makeChainIdSchema(),
|
|
1522
|
-
|
|
1576
|
+
import_v48.z.discriminatedUnion("chainStatus", [
|
|
1523
1577
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
|
|
1524
1578
|
makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1525
1579
|
makeChainIndexingStatusSnapshotFollowingSchema(valueLabel),
|
|
@@ -1531,7 +1585,7 @@ var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_
|
|
|
1531
1585
|
),
|
|
1532
1586
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1533
1587
|
}).check(invariant_omnichainStatusSnapshotFollowingHasValidChains);
|
|
1534
|
-
var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexing Snapshot") =>
|
|
1588
|
+
var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexing Snapshot") => import_v48.z.discriminatedUnion("omnichainStatus", [
|
|
1535
1589
|
makeOmnichainIndexingStatusSnapshotUnstartedSchema(valueLabel),
|
|
1536
1590
|
makeOmnichainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1537
1591
|
makeOmnichainIndexingStatusSnapshotCompletedSchema(valueLabel),
|
|
@@ -1539,21 +1593,21 @@ var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexin
|
|
|
1539
1593
|
]).check(invariant_omnichainSnapshotStatusIsConsistentWithChainSnapshot).check(invariant_omnichainIndexingCursorLowerThanEarliestStartBlockAcrossQueuedChains).check(
|
|
1540
1594
|
invariant_omnichainIndexingCursorLowerThanOrEqualToLatestBackfillEndBlockAcrossBackfillChains
|
|
1541
1595
|
).check(invariant_omnichainIndexingCursorIsEqualToHighestLatestIndexedBlockAcrossIndexedChain);
|
|
1542
|
-
var makeSerializedOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) =>
|
|
1543
|
-
omnichainStatus:
|
|
1544
|
-
chains:
|
|
1596
|
+
var makeSerializedOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_v48.z.object({
|
|
1597
|
+
omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Unstarted),
|
|
1598
|
+
chains: import_v48.z.record(
|
|
1545
1599
|
makeChainIdStringSchema(),
|
|
1546
|
-
|
|
1600
|
+
import_v48.z.discriminatedUnion("chainStatus", [
|
|
1547
1601
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel)
|
|
1548
1602
|
])
|
|
1549
1603
|
),
|
|
1550
1604
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1551
1605
|
});
|
|
1552
|
-
var makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) =>
|
|
1553
|
-
omnichainStatus:
|
|
1554
|
-
chains:
|
|
1606
|
+
var makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v48.z.object({
|
|
1607
|
+
omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Backfill),
|
|
1608
|
+
chains: import_v48.z.record(
|
|
1555
1609
|
makeChainIdStringSchema(),
|
|
1556
|
-
|
|
1610
|
+
import_v48.z.discriminatedUnion("chainStatus", [
|
|
1557
1611
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
|
|
1558
1612
|
makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1559
1613
|
makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
|
|
@@ -1561,21 +1615,21 @@ var makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) =
|
|
|
1561
1615
|
),
|
|
1562
1616
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1563
1617
|
});
|
|
1564
|
-
var makeSerializedOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) =>
|
|
1565
|
-
omnichainStatus:
|
|
1566
|
-
chains:
|
|
1618
|
+
var makeSerializedOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_v48.z.object({
|
|
1619
|
+
omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Completed),
|
|
1620
|
+
chains: import_v48.z.record(
|
|
1567
1621
|
makeChainIdStringSchema(),
|
|
1568
|
-
|
|
1622
|
+
import_v48.z.discriminatedUnion("chainStatus", [
|
|
1569
1623
|
makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
|
|
1570
1624
|
])
|
|
1571
1625
|
),
|
|
1572
1626
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1573
1627
|
});
|
|
1574
|
-
var makeSerializedOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) =>
|
|
1575
|
-
omnichainStatus:
|
|
1576
|
-
chains:
|
|
1628
|
+
var makeSerializedOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_v48.z.object({
|
|
1629
|
+
omnichainStatus: import_v48.z.literal(OmnichainIndexingStatusIds.Following),
|
|
1630
|
+
chains: import_v48.z.record(
|
|
1577
1631
|
makeChainIdStringSchema(),
|
|
1578
|
-
|
|
1632
|
+
import_v48.z.discriminatedUnion("chainStatus", [
|
|
1579
1633
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
|
|
1580
1634
|
makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1581
1635
|
makeChainIndexingStatusSnapshotFollowingSchema(valueLabel),
|
|
@@ -1584,7 +1638,7 @@ var makeSerializedOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel)
|
|
|
1584
1638
|
),
|
|
1585
1639
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1586
1640
|
});
|
|
1587
|
-
var makeSerializedOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Value") =>
|
|
1641
|
+
var makeSerializedOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Value") => import_v48.z.discriminatedUnion("omnichainStatus", [
|
|
1588
1642
|
makeSerializedOmnichainIndexingStatusSnapshotUnstartedSchema(valueLabel),
|
|
1589
1643
|
makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1590
1644
|
makeSerializedOmnichainIndexingStatusSnapshotCompletedSchema(valueLabel),
|
|
@@ -1624,17 +1678,17 @@ function invariant_snapshotTimeIsTheHighestKnownBlockTimestamp(ctx) {
|
|
|
1624
1678
|
});
|
|
1625
1679
|
}
|
|
1626
1680
|
}
|
|
1627
|
-
var makeCrossChainIndexingStatusSnapshotOmnichainSchema = (valueLabel = "Cross-chain Indexing Status Snapshot Omnichain") =>
|
|
1628
|
-
strategy:
|
|
1681
|
+
var makeCrossChainIndexingStatusSnapshotOmnichainSchema = (valueLabel = "Cross-chain Indexing Status Snapshot Omnichain") => import_v49.z.object({
|
|
1682
|
+
strategy: import_v49.z.literal(CrossChainIndexingStrategyIds.Omnichain),
|
|
1629
1683
|
slowestChainIndexingCursor: makeUnixTimestampSchema(valueLabel),
|
|
1630
1684
|
snapshotTime: makeUnixTimestampSchema(valueLabel),
|
|
1631
1685
|
omnichainSnapshot: makeOmnichainIndexingStatusSnapshotSchema(valueLabel)
|
|
1632
1686
|
}).check(invariant_slowestChainEqualsToOmnichainSnapshotTime).check(invariant_snapshotTimeIsTheHighestKnownBlockTimestamp);
|
|
1633
|
-
var makeCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Cross-chain Indexing Status Snapshot") =>
|
|
1687
|
+
var makeCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Cross-chain Indexing Status Snapshot") => import_v49.z.discriminatedUnion("strategy", [
|
|
1634
1688
|
makeCrossChainIndexingStatusSnapshotOmnichainSchema(valueLabel)
|
|
1635
1689
|
]);
|
|
1636
|
-
var makeSerializedCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Serialized Cross-chain Indexing Status Snapshot") =>
|
|
1637
|
-
strategy:
|
|
1690
|
+
var makeSerializedCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Serialized Cross-chain Indexing Status Snapshot") => import_v49.z.object({
|
|
1691
|
+
strategy: import_v49.z.enum(CrossChainIndexingStrategyIds),
|
|
1638
1692
|
slowestChainIndexingCursor: makeUnixTimestampSchema(valueLabel),
|
|
1639
1693
|
snapshotTime: makeUnixTimestampSchema(valueLabel),
|
|
1640
1694
|
omnichainSnapshot: makeSerializedOmnichainIndexingStatusSnapshotSchema(valueLabel)
|
|
@@ -1664,22 +1718,22 @@ function invariant_realtimeIndexingStatusProjectionWorstCaseDistanceIsCorrect(ct
|
|
|
1664
1718
|
});
|
|
1665
1719
|
}
|
|
1666
1720
|
}
|
|
1667
|
-
var makeRealtimeIndexingStatusProjectionSchema = (valueLabel = "Realtime Indexing Status Projection") =>
|
|
1721
|
+
var makeRealtimeIndexingStatusProjectionSchema = (valueLabel = "Realtime Indexing Status Projection") => import_v410.z.object({
|
|
1668
1722
|
projectedAt: makeUnixTimestampSchema(valueLabel),
|
|
1669
1723
|
worstCaseDistance: makeDurationSchema(valueLabel),
|
|
1670
1724
|
snapshot: makeCrossChainIndexingStatusSnapshotSchema(valueLabel)
|
|
1671
1725
|
}).check(invariant_realtimeIndexingStatusProjectionProjectedAtIsAfterOrEqualToSnapshotTime).check(invariant_realtimeIndexingStatusProjectionWorstCaseDistanceIsCorrect);
|
|
1672
|
-
var makeSerializedRealtimeIndexingStatusProjectionSchema = (valueLabel = "Value") =>
|
|
1726
|
+
var makeSerializedRealtimeIndexingStatusProjectionSchema = (valueLabel = "Value") => import_v410.z.object({
|
|
1673
1727
|
snapshot: makeSerializedCrossChainIndexingStatusSnapshotSchema(valueLabel),
|
|
1674
1728
|
projectedAt: makeUnixTimestampSchema(valueLabel),
|
|
1675
1729
|
worstCaseDistance: makeDurationSchema(valueLabel)
|
|
1676
1730
|
});
|
|
1677
1731
|
|
|
1678
1732
|
// src/indexing-status/deserialize/cross-chain-indexing-status-snapshot.ts
|
|
1679
|
-
var
|
|
1733
|
+
var import_v412 = require("zod/v4");
|
|
1680
1734
|
|
|
1681
1735
|
// src/indexing-status/deserialize/omnichain-indexing-status-snapshot.ts
|
|
1682
|
-
var
|
|
1736
|
+
var import_v411 = require("zod/v4");
|
|
1683
1737
|
function buildUnvalidatedOmnichainIndexingStatusSnapshot(serializedSnapshot) {
|
|
1684
1738
|
const chains = /* @__PURE__ */ new Map();
|
|
1685
1739
|
for (const [chainIdString, chainIndexingStatusSnapshot] of Object.entries(
|
|
@@ -1700,7 +1754,7 @@ function deserializeOmnichainIndexingStatusSnapshot(data, valueLabel) {
|
|
|
1700
1754
|
if (parsed.error) {
|
|
1701
1755
|
throw new Error(
|
|
1702
1756
|
`Cannot deserialize into OmnichainIndexingStatusSnapshot:
|
|
1703
|
-
${(0,
|
|
1757
|
+
${(0, import_v411.prettifyError)(parsed.error)}
|
|
1704
1758
|
`
|
|
1705
1759
|
);
|
|
1706
1760
|
}
|
|
@@ -1722,7 +1776,7 @@ function deserializeCrossChainIndexingStatusSnapshot(maybeSnapshot, valueLabel)
|
|
|
1722
1776
|
if (parsed.error) {
|
|
1723
1777
|
throw new Error(
|
|
1724
1778
|
`Cannot deserialize into CrossChainIndexingStatusSnapshot:
|
|
1725
|
-
${(0,
|
|
1779
|
+
${(0, import_v412.prettifyError)(parsed.error)}
|
|
1726
1780
|
`
|
|
1727
1781
|
);
|
|
1728
1782
|
}
|
|
@@ -1742,7 +1796,7 @@ function deserializeRealtimeIndexingStatusProjection(maybeProjection, valueLabel
|
|
|
1742
1796
|
if (parsed.error) {
|
|
1743
1797
|
throw new Error(
|
|
1744
1798
|
`Cannot deserialize into RealtimeIndexingStatusProjection:
|
|
1745
|
-
${(0,
|
|
1799
|
+
${(0, import_v413.prettifyError)(parsed.error)}
|
|
1746
1800
|
`
|
|
1747
1801
|
);
|
|
1748
1802
|
}
|
|
@@ -1763,23 +1817,23 @@ var EnsApiIndexingStatusResponseCodes = {
|
|
|
1763
1817
|
var IndexingStatusResponseCodes = EnsApiIndexingStatusResponseCodes;
|
|
1764
1818
|
|
|
1765
1819
|
// src/ensapi/api/indexing-status/zod-schemas.ts
|
|
1766
|
-
var
|
|
1767
|
-
var makeEnsApiIndexingStatusResponseOkSchema = (valueLabel = "Indexing Status Response OK") =>
|
|
1768
|
-
responseCode:
|
|
1820
|
+
var import_v414 = require("zod/v4");
|
|
1821
|
+
var makeEnsApiIndexingStatusResponseOkSchema = (valueLabel = "Indexing Status Response OK") => import_v414.z.strictObject({
|
|
1822
|
+
responseCode: import_v414.z.literal(EnsApiIndexingStatusResponseCodes.Ok),
|
|
1769
1823
|
realtimeProjection: makeRealtimeIndexingStatusProjectionSchema(valueLabel)
|
|
1770
1824
|
});
|
|
1771
|
-
var makeEnsApiIndexingStatusResponseErrorSchema = (_valueLabel = "Indexing Status Response Error") =>
|
|
1772
|
-
responseCode:
|
|
1825
|
+
var makeEnsApiIndexingStatusResponseErrorSchema = (_valueLabel = "Indexing Status Response Error") => import_v414.z.strictObject({
|
|
1826
|
+
responseCode: import_v414.z.literal(EnsApiIndexingStatusResponseCodes.Error)
|
|
1773
1827
|
});
|
|
1774
|
-
var makeEnsApiIndexingStatusResponseSchema = (valueLabel = "Indexing Status Response") =>
|
|
1828
|
+
var makeEnsApiIndexingStatusResponseSchema = (valueLabel = "Indexing Status Response") => import_v414.z.discriminatedUnion("responseCode", [
|
|
1775
1829
|
makeEnsApiIndexingStatusResponseOkSchema(valueLabel),
|
|
1776
1830
|
makeEnsApiIndexingStatusResponseErrorSchema(valueLabel)
|
|
1777
1831
|
]);
|
|
1778
|
-
var makeSerializedEnsApiIndexingStatusResponseOkSchema = (valueLabel = "Serialized Indexing Status Response OK") =>
|
|
1779
|
-
responseCode:
|
|
1832
|
+
var makeSerializedEnsApiIndexingStatusResponseOkSchema = (valueLabel = "Serialized Indexing Status Response OK") => import_v414.z.strictObject({
|
|
1833
|
+
responseCode: import_v414.z.literal(EnsApiIndexingStatusResponseCodes.Ok),
|
|
1780
1834
|
realtimeProjection: makeSerializedRealtimeIndexingStatusProjectionSchema(valueLabel)
|
|
1781
1835
|
});
|
|
1782
|
-
var makeSerializedEnsApiIndexingStatusResponseSchema = (valueLabel = "Serialized Indexing Status Response") =>
|
|
1836
|
+
var makeSerializedEnsApiIndexingStatusResponseSchema = (valueLabel = "Serialized Indexing Status Response") => import_v414.z.discriminatedUnion("responseCode", [
|
|
1783
1837
|
makeSerializedEnsApiIndexingStatusResponseOkSchema(valueLabel),
|
|
1784
1838
|
makeEnsApiIndexingStatusResponseErrorSchema(valueLabel)
|
|
1785
1839
|
]);
|
|
@@ -1801,7 +1855,7 @@ function deserializeEnsApiIndexingStatusResponse(maybeResponse) {
|
|
|
1801
1855
|
if (parsed.error) {
|
|
1802
1856
|
throw new Error(
|
|
1803
1857
|
`Cannot deserialize EnsApiIndexingStatusResponse:
|
|
1804
|
-
${(0,
|
|
1858
|
+
${(0, import_v415.prettifyError)(parsed.error)}
|
|
1805
1859
|
`
|
|
1806
1860
|
);
|
|
1807
1861
|
}
|
|
@@ -1932,11 +1986,11 @@ function serializeEnsApiIndexingStatusResponse(response) {
|
|
|
1932
1986
|
var serializeIndexingStatusResponse = serializeEnsApiIndexingStatusResponse;
|
|
1933
1987
|
|
|
1934
1988
|
// src/ensapi/api/name-tokens/deserialize.ts
|
|
1935
|
-
var
|
|
1989
|
+
var import_v420 = require("zod/v4");
|
|
1936
1990
|
|
|
1937
1991
|
// src/ensapi/api/name-tokens/zod-schemas.ts
|
|
1938
1992
|
var import_viem13 = require("viem");
|
|
1939
|
-
var
|
|
1993
|
+
var import_v419 = require("zod/v4");
|
|
1940
1994
|
|
|
1941
1995
|
// src/tokenscope/name-token.ts
|
|
1942
1996
|
var import_viem12 = require("viem");
|
|
@@ -1976,12 +2030,12 @@ var makeContractMatcher = (namespace, b) => (datasourceName, contractName) => {
|
|
|
1976
2030
|
|
|
1977
2031
|
// src/tokenscope/assets.ts
|
|
1978
2032
|
var import_viem11 = require("viem");
|
|
1979
|
-
var
|
|
2033
|
+
var import_v417 = require("zod/v4");
|
|
1980
2034
|
|
|
1981
2035
|
// src/tokenscope/zod-schemas.ts
|
|
1982
2036
|
var import_caip3 = require("caip");
|
|
1983
2037
|
var import_viem10 = require("viem");
|
|
1984
|
-
var
|
|
2038
|
+
var import_v416 = require("zod/v4");
|
|
1985
2039
|
|
|
1986
2040
|
// src/shared/types.ts
|
|
1987
2041
|
var AssetNamespaces = {
|
|
@@ -1990,10 +2044,10 @@ var AssetNamespaces = {
|
|
|
1990
2044
|
};
|
|
1991
2045
|
|
|
1992
2046
|
// src/tokenscope/zod-schemas.ts
|
|
1993
|
-
var tokenIdSchemaSerializable =
|
|
1994
|
-
var tokenIdSchemaNative =
|
|
2047
|
+
var tokenIdSchemaSerializable = import_v416.z.string();
|
|
2048
|
+
var tokenIdSchemaNative = import_v416.z.preprocess(
|
|
1995
2049
|
(v) => typeof v === "string" ? BigInt(v) : v,
|
|
1996
|
-
|
|
2050
|
+
import_v416.z.bigint().positive()
|
|
1997
2051
|
);
|
|
1998
2052
|
function makeTokenIdSchema(_valueLabel = "Token ID Schema", serializable = false) {
|
|
1999
2053
|
if (serializable) {
|
|
@@ -2003,13 +2057,13 @@ function makeTokenIdSchema(_valueLabel = "Token ID Schema", serializable = false
|
|
|
2003
2057
|
}
|
|
2004
2058
|
}
|
|
2005
2059
|
var makeAssetIdSchema = (valueLabel = "Asset ID Schema", serializable) => {
|
|
2006
|
-
return
|
|
2007
|
-
assetNamespace:
|
|
2060
|
+
return import_v416.z.object({
|
|
2061
|
+
assetNamespace: import_v416.z.enum(AssetNamespaces),
|
|
2008
2062
|
contract: makeAccountIdSchema(valueLabel),
|
|
2009
2063
|
tokenId: makeTokenIdSchema(valueLabel, serializable ?? false)
|
|
2010
2064
|
});
|
|
2011
2065
|
};
|
|
2012
|
-
var makeAssetIdStringSchema = (valueLabel = "Asset ID String Schema") =>
|
|
2066
|
+
var makeAssetIdStringSchema = (valueLabel = "Asset ID String Schema") => import_v416.z.preprocess((v) => {
|
|
2013
2067
|
if (typeof v === "string") {
|
|
2014
2068
|
const result = new import_caip3.AssetId(v);
|
|
2015
2069
|
return {
|
|
@@ -2033,20 +2087,20 @@ function invariant_nameTokenOwnershipHasNonZeroAddressOwner(ctx) {
|
|
|
2033
2087
|
});
|
|
2034
2088
|
}
|
|
2035
2089
|
}
|
|
2036
|
-
var makeNameTokenOwnershipNameWrapperSchema = (valueLabel = "Name Token Ownership NameWrapper") =>
|
|
2037
|
-
ownershipType:
|
|
2090
|
+
var makeNameTokenOwnershipNameWrapperSchema = (valueLabel = "Name Token Ownership NameWrapper") => import_v416.z.object({
|
|
2091
|
+
ownershipType: import_v416.z.literal(NameTokenOwnershipTypes.NameWrapper),
|
|
2038
2092
|
owner: makeAccountIdSchema(`${valueLabel}.owner`)
|
|
2039
2093
|
}).check(invariant_nameTokenOwnershipHasNonZeroAddressOwner);
|
|
2040
|
-
var makeNameTokenOwnershipFullyOnchainSchema = (valueLabel = "Name Token Ownership Fully Onchain") =>
|
|
2041
|
-
ownershipType:
|
|
2094
|
+
var makeNameTokenOwnershipFullyOnchainSchema = (valueLabel = "Name Token Ownership Fully Onchain") => import_v416.z.object({
|
|
2095
|
+
ownershipType: import_v416.z.literal(NameTokenOwnershipTypes.FullyOnchain),
|
|
2042
2096
|
owner: makeAccountIdSchema(`${valueLabel}.owner`)
|
|
2043
2097
|
}).check(invariant_nameTokenOwnershipHasNonZeroAddressOwner);
|
|
2044
|
-
var makeNameTokenOwnershipBurnedSchema = (valueLabel = "Name Token Ownership Burned") =>
|
|
2045
|
-
ownershipType:
|
|
2098
|
+
var makeNameTokenOwnershipBurnedSchema = (valueLabel = "Name Token Ownership Burned") => import_v416.z.object({
|
|
2099
|
+
ownershipType: import_v416.z.literal(NameTokenOwnershipTypes.Burned),
|
|
2046
2100
|
owner: makeAccountIdSchema(`${valueLabel}.owner`)
|
|
2047
2101
|
}).check(invariant_nameTokenOwnershipHasZeroAddressOwner);
|
|
2048
|
-
var makeNameTokenOwnershipUnknownSchema = (valueLabel = "Name Token Ownership Unknown") =>
|
|
2049
|
-
ownershipType:
|
|
2102
|
+
var makeNameTokenOwnershipUnknownSchema = (valueLabel = "Name Token Ownership Unknown") => import_v416.z.object({
|
|
2103
|
+
ownershipType: import_v416.z.literal(NameTokenOwnershipTypes.Unknown),
|
|
2050
2104
|
owner: makeAccountIdSchema(`${valueLabel}.owner`)
|
|
2051
2105
|
}).check(invariant_nameTokenOwnershipHasNonZeroAddressOwner);
|
|
2052
2106
|
function invariant_nameTokenOwnershipHasZeroAddressOwner(ctx) {
|
|
@@ -2059,16 +2113,16 @@ function invariant_nameTokenOwnershipHasZeroAddressOwner(ctx) {
|
|
|
2059
2113
|
});
|
|
2060
2114
|
}
|
|
2061
2115
|
}
|
|
2062
|
-
var makeNameTokenOwnershipSchema = (valueLabel = "Name Token Ownership") =>
|
|
2116
|
+
var makeNameTokenOwnershipSchema = (valueLabel = "Name Token Ownership") => import_v416.z.discriminatedUnion("ownershipType", [
|
|
2063
2117
|
makeNameTokenOwnershipNameWrapperSchema(valueLabel),
|
|
2064
2118
|
makeNameTokenOwnershipFullyOnchainSchema(valueLabel),
|
|
2065
2119
|
makeNameTokenOwnershipBurnedSchema(valueLabel),
|
|
2066
2120
|
makeNameTokenOwnershipUnknownSchema(valueLabel)
|
|
2067
2121
|
]);
|
|
2068
|
-
var makeNameTokenSchema = (valueLabel = "Name Token Schema", serializable) =>
|
|
2122
|
+
var makeNameTokenSchema = (valueLabel = "Name Token Schema", serializable) => import_v416.z.object({
|
|
2069
2123
|
token: makeAssetIdSchema(`${valueLabel}.token`, serializable),
|
|
2070
2124
|
ownership: makeNameTokenOwnershipSchema(`${valueLabel}.ownership`),
|
|
2071
|
-
mintStatus:
|
|
2125
|
+
mintStatus: import_v416.z.enum(NFTMintStatuses)
|
|
2072
2126
|
});
|
|
2073
2127
|
|
|
2074
2128
|
// src/tokenscope/assets.ts
|
|
@@ -2084,7 +2138,7 @@ function deserializeAssetId(maybeAssetId, valueLabel) {
|
|
|
2084
2138
|
const parsed = schema.safeParse(maybeAssetId);
|
|
2085
2139
|
if (parsed.error) {
|
|
2086
2140
|
throw new RangeError(`Cannot deserialize AssetId:
|
|
2087
|
-
${(0,
|
|
2141
|
+
${(0, import_v417.prettifyError)(parsed.error)}
|
|
2088
2142
|
`);
|
|
2089
2143
|
}
|
|
2090
2144
|
return parsed.data;
|
|
@@ -2094,7 +2148,7 @@ function parseAssetId(maybeAssetId, valueLabel) {
|
|
|
2094
2148
|
const parsed = schema.safeParse(maybeAssetId);
|
|
2095
2149
|
if (parsed.error) {
|
|
2096
2150
|
throw new RangeError(`Cannot parse AssetId:
|
|
2097
|
-
${(0,
|
|
2151
|
+
${(0, import_v417.prettifyError)(parsed.error)}
|
|
2098
2152
|
`);
|
|
2099
2153
|
}
|
|
2100
2154
|
return parsed.data;
|
|
@@ -2394,10 +2448,10 @@ function getNameTokenOwnership(namespaceId, name, owner) {
|
|
|
2394
2448
|
}
|
|
2395
2449
|
|
|
2396
2450
|
// src/ensapi/api/shared/errors/zod-schemas.ts
|
|
2397
|
-
var
|
|
2398
|
-
var ErrorResponseSchema =
|
|
2399
|
-
message:
|
|
2400
|
-
details:
|
|
2451
|
+
var import_v418 = require("zod/v4");
|
|
2452
|
+
var ErrorResponseSchema = import_v418.z.object({
|
|
2453
|
+
message: import_v418.z.string(),
|
|
2454
|
+
details: import_v418.z.optional(import_v418.z.unknown())
|
|
2401
2455
|
});
|
|
2402
2456
|
|
|
2403
2457
|
// src/ensapi/api/name-tokens/response.ts
|
|
@@ -2436,10 +2490,10 @@ var NameTokensResponseErrorCodes = {
|
|
|
2436
2490
|
};
|
|
2437
2491
|
|
|
2438
2492
|
// src/ensapi/api/name-tokens/zod-schemas.ts
|
|
2439
|
-
var makeRegisteredNameTokenSchema = (valueLabel = "Registered Name Token", serializable) =>
|
|
2493
|
+
var makeRegisteredNameTokenSchema = (valueLabel = "Registered Name Token", serializable) => import_v419.z.object({
|
|
2440
2494
|
domainId: makeNodeSchema(`${valueLabel}.domainId`),
|
|
2441
2495
|
name: makeReinterpretedNameSchema(valueLabel),
|
|
2442
|
-
tokens:
|
|
2496
|
+
tokens: import_v419.z.array(makeNameTokenSchema(`${valueLabel}.tokens`, serializable)).nonempty(),
|
|
2443
2497
|
expiresAt: makeUnixTimestampSchema(`${valueLabel}.expiresAt`),
|
|
2444
2498
|
accurateAsOf: makeUnixTimestampSchema(`${valueLabel}.accurateAsOf`)
|
|
2445
2499
|
}).check(function invariant_nameIsAssociatedWithDomainId(ctx) {
|
|
@@ -2481,32 +2535,32 @@ var makeRegisteredNameTokenSchema = (valueLabel = "Registered Name Token", seria
|
|
|
2481
2535
|
});
|
|
2482
2536
|
}
|
|
2483
2537
|
});
|
|
2484
|
-
var makeNameTokensResponseOkSchema = (valueLabel = "Name Tokens Response OK", serializable) =>
|
|
2485
|
-
responseCode:
|
|
2538
|
+
var makeNameTokensResponseOkSchema = (valueLabel = "Name Tokens Response OK", serializable) => import_v419.z.strictObject({
|
|
2539
|
+
responseCode: import_v419.z.literal(NameTokensResponseCodes.Ok),
|
|
2486
2540
|
registeredNameTokens: makeRegisteredNameTokenSchema(`${valueLabel}.nameTokens`, serializable)
|
|
2487
2541
|
});
|
|
2488
|
-
var makeNameTokensResponseErrorNameTokensNotIndexedSchema = (_valueLabel = "Name Tokens Response Error Name Not Indexed") =>
|
|
2489
|
-
responseCode:
|
|
2490
|
-
errorCode:
|
|
2542
|
+
var makeNameTokensResponseErrorNameTokensNotIndexedSchema = (_valueLabel = "Name Tokens Response Error Name Not Indexed") => import_v419.z.strictObject({
|
|
2543
|
+
responseCode: import_v419.z.literal(NameTokensResponseCodes.Error),
|
|
2544
|
+
errorCode: import_v419.z.literal(NameTokensResponseErrorCodes.NameTokensNotIndexed),
|
|
2491
2545
|
error: ErrorResponseSchema
|
|
2492
2546
|
});
|
|
2493
|
-
var makeNameTokensResponseErrorEnsIndexerConfigUnsupported = (_valueLabel = "Name Tokens Response Error ENSIndexer Config Unsupported") =>
|
|
2494
|
-
responseCode:
|
|
2495
|
-
errorCode:
|
|
2547
|
+
var makeNameTokensResponseErrorEnsIndexerConfigUnsupported = (_valueLabel = "Name Tokens Response Error ENSIndexer Config Unsupported") => import_v419.z.strictObject({
|
|
2548
|
+
responseCode: import_v419.z.literal(NameTokensResponseCodes.Error),
|
|
2549
|
+
errorCode: import_v419.z.literal(NameTokensResponseErrorCodes.EnsIndexerConfigUnsupported),
|
|
2496
2550
|
error: ErrorResponseSchema
|
|
2497
2551
|
});
|
|
2498
|
-
var makeNameTokensResponseErrorNameIndexingStatusUnsupported = (_valueLabel = "Name Tokens Response Error Indexing Status Unsupported") =>
|
|
2499
|
-
responseCode:
|
|
2500
|
-
errorCode:
|
|
2552
|
+
var makeNameTokensResponseErrorNameIndexingStatusUnsupported = (_valueLabel = "Name Tokens Response Error Indexing Status Unsupported") => import_v419.z.strictObject({
|
|
2553
|
+
responseCode: import_v419.z.literal(NameTokensResponseCodes.Error),
|
|
2554
|
+
errorCode: import_v419.z.literal(NameTokensResponseErrorCodes.IndexingStatusUnsupported),
|
|
2501
2555
|
error: ErrorResponseSchema
|
|
2502
2556
|
});
|
|
2503
|
-
var makeNameTokensResponseErrorSchema = (valueLabel = "Name Tokens Response Error") =>
|
|
2557
|
+
var makeNameTokensResponseErrorSchema = (valueLabel = "Name Tokens Response Error") => import_v419.z.discriminatedUnion("errorCode", [
|
|
2504
2558
|
makeNameTokensResponseErrorNameTokensNotIndexedSchema(valueLabel),
|
|
2505
2559
|
makeNameTokensResponseErrorEnsIndexerConfigUnsupported(valueLabel),
|
|
2506
2560
|
makeNameTokensResponseErrorNameIndexingStatusUnsupported(valueLabel)
|
|
2507
2561
|
]);
|
|
2508
2562
|
var makeNameTokensResponseSchema = (valueLabel = "Name Tokens Response", serializable) => {
|
|
2509
|
-
return
|
|
2563
|
+
return import_v419.z.discriminatedUnion("responseCode", [
|
|
2510
2564
|
makeNameTokensResponseOkSchema(valueLabel, serializable ?? false),
|
|
2511
2565
|
makeNameTokensResponseErrorSchema(valueLabel)
|
|
2512
2566
|
]);
|
|
@@ -2519,7 +2573,7 @@ function deserializedNameTokensResponse(maybeResponse) {
|
|
|
2519
2573
|
);
|
|
2520
2574
|
if (parsed.error) {
|
|
2521
2575
|
throw new Error(`Cannot deserialize NameTokensResponse:
|
|
2522
|
-
${(0,
|
|
2576
|
+
${(0, import_v420.prettifyError)(parsed.error)}
|
|
2523
2577
|
`);
|
|
2524
2578
|
}
|
|
2525
2579
|
return parsed.data;
|
|
@@ -2593,14 +2647,14 @@ function serializeNameTokensResponse(response) {
|
|
|
2593
2647
|
}
|
|
2594
2648
|
|
|
2595
2649
|
// src/ensapi/api/registrar-actions/deserialize.ts
|
|
2596
|
-
var
|
|
2650
|
+
var import_v424 = require("zod/v4");
|
|
2597
2651
|
|
|
2598
2652
|
// src/ensapi/api/registrar-actions/zod-schemas.ts
|
|
2599
2653
|
var import_ens7 = require("viem/ens");
|
|
2600
|
-
var
|
|
2654
|
+
var import_v423 = require("zod/v4");
|
|
2601
2655
|
|
|
2602
2656
|
// src/registrars/zod-schemas.ts
|
|
2603
|
-
var
|
|
2657
|
+
var import_v421 = require("zod/v4");
|
|
2604
2658
|
|
|
2605
2659
|
// src/registrars/encoded-referrer.ts
|
|
2606
2660
|
var import_viem14 = require("viem");
|
|
@@ -2675,11 +2729,11 @@ function serializeRegistrarAction(registrarAction) {
|
|
|
2675
2729
|
}
|
|
2676
2730
|
|
|
2677
2731
|
// src/registrars/zod-schemas.ts
|
|
2678
|
-
var makeSubregistrySchema = (valueLabel = "Subregistry") =>
|
|
2732
|
+
var makeSubregistrySchema = (valueLabel = "Subregistry") => import_v421.z.object({
|
|
2679
2733
|
subregistryId: makeAccountIdSchema(`${valueLabel} Subregistry ID`),
|
|
2680
2734
|
node: makeNodeSchema(`${valueLabel} Node`)
|
|
2681
2735
|
});
|
|
2682
|
-
var makeRegistrationLifecycleSchema = (valueLabel = "Registration Lifecycle") =>
|
|
2736
|
+
var makeRegistrationLifecycleSchema = (valueLabel = "Registration Lifecycle") => import_v421.z.object({
|
|
2683
2737
|
subregistry: makeSubregistrySchema(`${valueLabel} Subregistry`),
|
|
2684
2738
|
node: makeNodeSchema(`${valueLabel} Node`),
|
|
2685
2739
|
expiresAt: makeUnixTimestampSchema(`${valueLabel} Expires at`)
|
|
@@ -2695,18 +2749,18 @@ function invariant_registrarActionPricingTotalIsSumOfBaseCostAndPremium(ctx) {
|
|
|
2695
2749
|
});
|
|
2696
2750
|
}
|
|
2697
2751
|
}
|
|
2698
|
-
var makeRegistrarActionPricingSchema = (valueLabel = "Registrar Action Pricing") =>
|
|
2752
|
+
var makeRegistrarActionPricingSchema = (valueLabel = "Registrar Action Pricing") => import_v421.z.union([
|
|
2699
2753
|
// pricing available
|
|
2700
|
-
|
|
2754
|
+
import_v421.z.object({
|
|
2701
2755
|
baseCost: makePriceEthSchema(`${valueLabel} Base Cost`),
|
|
2702
2756
|
premium: makePriceEthSchema(`${valueLabel} Premium`),
|
|
2703
2757
|
total: makePriceEthSchema(`${valueLabel} Total`)
|
|
2704
2758
|
}).check(invariant_registrarActionPricingTotalIsSumOfBaseCostAndPremium).transform((v) => v),
|
|
2705
2759
|
// pricing unknown
|
|
2706
|
-
|
|
2707
|
-
baseCost:
|
|
2708
|
-
premium:
|
|
2709
|
-
total:
|
|
2760
|
+
import_v421.z.object({
|
|
2761
|
+
baseCost: import_v421.z.null(),
|
|
2762
|
+
premium: import_v421.z.null(),
|
|
2763
|
+
total: import_v421.z.null()
|
|
2710
2764
|
}).transform((v) => v)
|
|
2711
2765
|
]);
|
|
2712
2766
|
function invariant_registrarActionDecodedReferrerBasedOnRawReferrer(ctx) {
|
|
@@ -2729,9 +2783,9 @@ function invariant_registrarActionDecodedReferrerBasedOnRawReferrer(ctx) {
|
|
|
2729
2783
|
});
|
|
2730
2784
|
}
|
|
2731
2785
|
}
|
|
2732
|
-
var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral") =>
|
|
2786
|
+
var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral") => import_v421.z.union([
|
|
2733
2787
|
// referral available
|
|
2734
|
-
|
|
2788
|
+
import_v421.z.object({
|
|
2735
2789
|
encodedReferrer: makeHexStringSchema(
|
|
2736
2790
|
{ bytesCount: ENCODED_REFERRER_BYTE_LENGTH },
|
|
2737
2791
|
`${valueLabel} Encoded Referrer`
|
|
@@ -2739,9 +2793,9 @@ var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral
|
|
|
2739
2793
|
decodedReferrer: makeLowercaseAddressSchema(`${valueLabel} Decoded Referrer`)
|
|
2740
2794
|
}).check(invariant_registrarActionDecodedReferrerBasedOnRawReferrer),
|
|
2741
2795
|
// referral not applicable
|
|
2742
|
-
|
|
2743
|
-
encodedReferrer:
|
|
2744
|
-
decodedReferrer:
|
|
2796
|
+
import_v421.z.object({
|
|
2797
|
+
encodedReferrer: import_v421.z.null(),
|
|
2798
|
+
decodedReferrer: import_v421.z.null()
|
|
2745
2799
|
})
|
|
2746
2800
|
]);
|
|
2747
2801
|
function invariant_eventIdsInitialElementIsTheActionId(ctx) {
|
|
@@ -2754,9 +2808,9 @@ function invariant_eventIdsInitialElementIsTheActionId(ctx) {
|
|
|
2754
2808
|
});
|
|
2755
2809
|
}
|
|
2756
2810
|
}
|
|
2757
|
-
var EventIdSchema =
|
|
2758
|
-
var EventIdsSchema =
|
|
2759
|
-
var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") =>
|
|
2811
|
+
var EventIdSchema = import_v421.z.string().nonempty();
|
|
2812
|
+
var EventIdsSchema = import_v421.z.array(EventIdSchema).min(1).transform((v) => v);
|
|
2813
|
+
var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") => import_v421.z.object({
|
|
2760
2814
|
id: EventIdSchema,
|
|
2761
2815
|
incrementalDuration: makeDurationSchema(`${valueLabel} Incremental Duration`),
|
|
2762
2816
|
registrant: makeLowercaseAddressSchema(`${valueLabel} Registrant`),
|
|
@@ -2770,38 +2824,38 @@ var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") => im
|
|
|
2770
2824
|
eventIds: EventIdsSchema
|
|
2771
2825
|
}).check(invariant_eventIdsInitialElementIsTheActionId);
|
|
2772
2826
|
var makeRegistrarActionRegistrationSchema = (valueLabel = "Registration ") => makeBaseRegistrarActionSchema(valueLabel).extend({
|
|
2773
|
-
type:
|
|
2827
|
+
type: import_v421.z.literal(RegistrarActionTypes.Registration)
|
|
2774
2828
|
});
|
|
2775
2829
|
var makeRegistrarActionRenewalSchema = (valueLabel = "Renewal") => makeBaseRegistrarActionSchema(valueLabel).extend({
|
|
2776
|
-
type:
|
|
2830
|
+
type: import_v421.z.literal(RegistrarActionTypes.Renewal)
|
|
2777
2831
|
});
|
|
2778
|
-
var makeRegistrarActionSchema = (valueLabel = "Registrar Action") =>
|
|
2832
|
+
var makeRegistrarActionSchema = (valueLabel = "Registrar Action") => import_v421.z.discriminatedUnion("type", [
|
|
2779
2833
|
makeRegistrarActionRegistrationSchema(`${valueLabel} Registration`),
|
|
2780
2834
|
makeRegistrarActionRenewalSchema(`${valueLabel} Renewal`)
|
|
2781
2835
|
]);
|
|
2782
2836
|
|
|
2783
2837
|
// src/ensapi/api/shared/pagination/zod-schemas.ts
|
|
2784
|
-
var
|
|
2838
|
+
var import_v422 = require("zod/v4");
|
|
2785
2839
|
|
|
2786
2840
|
// src/ensapi/api/shared/pagination/request.ts
|
|
2787
2841
|
var RECORDS_PER_PAGE_DEFAULT = 10;
|
|
2788
2842
|
var RECORDS_PER_PAGE_MAX = 100;
|
|
2789
2843
|
|
|
2790
2844
|
// src/ensapi/api/shared/pagination/zod-schemas.ts
|
|
2791
|
-
var makeRequestPageParamsSchema = (valueLabel = "RequestPageParams") =>
|
|
2845
|
+
var makeRequestPageParamsSchema = (valueLabel = "RequestPageParams") => import_v422.z.object({
|
|
2792
2846
|
page: makePositiveIntegerSchema(`${valueLabel}.page`),
|
|
2793
2847
|
recordsPerPage: makePositiveIntegerSchema(`${valueLabel}.recordsPerPage`).max(
|
|
2794
2848
|
RECORDS_PER_PAGE_MAX,
|
|
2795
2849
|
`${valueLabel}.recordsPerPage must not exceed ${RECORDS_PER_PAGE_MAX}`
|
|
2796
2850
|
)
|
|
2797
2851
|
});
|
|
2798
|
-
var makeResponsePageContextSchemaWithNoRecords = (valueLabel = "ResponsePageContextWithNoRecords") =>
|
|
2799
|
-
totalRecords:
|
|
2800
|
-
totalPages:
|
|
2801
|
-
hasNext:
|
|
2802
|
-
hasPrev:
|
|
2803
|
-
startIndex:
|
|
2804
|
-
endIndex:
|
|
2852
|
+
var makeResponsePageContextSchemaWithNoRecords = (valueLabel = "ResponsePageContextWithNoRecords") => import_v422.z.object({
|
|
2853
|
+
totalRecords: import_v422.z.literal(0),
|
|
2854
|
+
totalPages: import_v422.z.literal(1),
|
|
2855
|
+
hasNext: import_v422.z.literal(false),
|
|
2856
|
+
hasPrev: import_v422.z.literal(false),
|
|
2857
|
+
startIndex: import_v422.z.undefined(),
|
|
2858
|
+
endIndex: import_v422.z.undefined()
|
|
2805
2859
|
}).extend(makeRequestPageParamsSchema(valueLabel).shape);
|
|
2806
2860
|
function invariant_responsePageWithRecordsIsCorrect(ctx) {
|
|
2807
2861
|
const { hasNext, hasPrev, recordsPerPage, page, totalRecords, startIndex, endIndex } = ctx.value;
|
|
@@ -2836,15 +2890,15 @@ function invariant_responsePageWithRecordsIsCorrect(ctx) {
|
|
|
2836
2890
|
});
|
|
2837
2891
|
}
|
|
2838
2892
|
}
|
|
2839
|
-
var makeResponsePageContextSchemaWithRecords = (valueLabel = "ResponsePageContextWithRecords") =>
|
|
2893
|
+
var makeResponsePageContextSchemaWithRecords = (valueLabel = "ResponsePageContextWithRecords") => import_v422.z.object({
|
|
2840
2894
|
totalRecords: makePositiveIntegerSchema(`${valueLabel}.totalRecords`),
|
|
2841
2895
|
totalPages: makePositiveIntegerSchema(`${valueLabel}.totalPages`),
|
|
2842
|
-
hasNext:
|
|
2843
|
-
hasPrev:
|
|
2896
|
+
hasNext: import_v422.z.boolean(),
|
|
2897
|
+
hasPrev: import_v422.z.boolean(),
|
|
2844
2898
|
startIndex: makeNonNegativeIntegerSchema(`${valueLabel}.startIndex`),
|
|
2845
2899
|
endIndex: makeNonNegativeIntegerSchema(`${valueLabel}.endIndex`)
|
|
2846
2900
|
}).extend(makeRequestPageParamsSchema(valueLabel).shape).check(invariant_responsePageWithRecordsIsCorrect);
|
|
2847
|
-
var makeResponsePageContextSchema = (valueLabel = "ResponsePageContext") =>
|
|
2901
|
+
var makeResponsePageContextSchema = (valueLabel = "ResponsePageContext") => import_v422.z.union([
|
|
2848
2902
|
makeResponsePageContextSchemaWithNoRecords(valueLabel),
|
|
2849
2903
|
makeResponsePageContextSchemaWithRecords(valueLabel)
|
|
2850
2904
|
]);
|
|
@@ -2874,21 +2928,21 @@ function invariant_registrationLifecycleNodeMatchesName(ctx) {
|
|
|
2874
2928
|
});
|
|
2875
2929
|
}
|
|
2876
2930
|
}
|
|
2877
|
-
var makeNamedRegistrarActionSchema = (valueLabel = "Named Registrar Action") =>
|
|
2931
|
+
var makeNamedRegistrarActionSchema = (valueLabel = "Named Registrar Action") => import_v423.z.object({
|
|
2878
2932
|
action: makeRegistrarActionSchema(valueLabel),
|
|
2879
2933
|
name: makeReinterpretedNameSchema(valueLabel)
|
|
2880
2934
|
}).check(invariant_registrationLifecycleNodeMatchesName);
|
|
2881
|
-
var makeRegistrarActionsResponseOkSchema = (valueLabel = "Registrar Actions Response OK") =>
|
|
2882
|
-
responseCode:
|
|
2883
|
-
registrarActions:
|
|
2935
|
+
var makeRegistrarActionsResponseOkSchema = (valueLabel = "Registrar Actions Response OK") => import_v423.z.object({
|
|
2936
|
+
responseCode: import_v423.z.literal(RegistrarActionsResponseCodes.Ok),
|
|
2937
|
+
registrarActions: import_v423.z.array(makeNamedRegistrarActionSchema(valueLabel)),
|
|
2884
2938
|
pageContext: makeResponsePageContextSchema(`${valueLabel}.pageContext`),
|
|
2885
2939
|
accurateAsOf: makeUnixTimestampSchema(`${valueLabel}.accurateAsOf`).optional()
|
|
2886
2940
|
});
|
|
2887
|
-
var makeRegistrarActionsResponseErrorSchema = (_valueLabel = "Registrar Actions Response Error") =>
|
|
2888
|
-
responseCode:
|
|
2941
|
+
var makeRegistrarActionsResponseErrorSchema = (_valueLabel = "Registrar Actions Response Error") => import_v423.z.strictObject({
|
|
2942
|
+
responseCode: import_v423.z.literal(RegistrarActionsResponseCodes.Error),
|
|
2889
2943
|
error: ErrorResponseSchema
|
|
2890
2944
|
});
|
|
2891
|
-
var makeRegistrarActionsResponseSchema = (valueLabel = "Registrar Actions Response") =>
|
|
2945
|
+
var makeRegistrarActionsResponseSchema = (valueLabel = "Registrar Actions Response") => import_v423.z.discriminatedUnion("responseCode", [
|
|
2892
2946
|
makeRegistrarActionsResponseOkSchema(valueLabel),
|
|
2893
2947
|
makeRegistrarActionsResponseErrorSchema(valueLabel)
|
|
2894
2948
|
]);
|
|
@@ -2899,7 +2953,7 @@ function deserializeRegistrarActionsResponse(maybeResponse) {
|
|
|
2899
2953
|
if (parsed.error) {
|
|
2900
2954
|
throw new Error(
|
|
2901
2955
|
`Cannot deserialize RegistrarActionsResponse:
|
|
2902
|
-
${(0,
|
|
2956
|
+
${(0, import_v424.prettifyError)(parsed.error)}
|
|
2903
2957
|
`
|
|
2904
2958
|
);
|
|
2905
2959
|
}
|
|
@@ -3046,12 +3100,12 @@ function serializeRegistrarActionsResponse(response) {
|
|
|
3046
3100
|
}
|
|
3047
3101
|
|
|
3048
3102
|
// src/ensapi/api/shared/errors/deserialize.ts
|
|
3049
|
-
var
|
|
3103
|
+
var import_v425 = require("zod/v4");
|
|
3050
3104
|
function deserializeErrorResponse(maybeErrorResponse) {
|
|
3051
3105
|
const parsed = ErrorResponseSchema.safeParse(maybeErrorResponse);
|
|
3052
3106
|
if (parsed.error) {
|
|
3053
3107
|
throw new Error(`Cannot deserialize ErrorResponse:
|
|
3054
|
-
${(0,
|
|
3108
|
+
${(0, import_v425.prettifyError)(parsed.error)}
|
|
3055
3109
|
`);
|
|
3056
3110
|
}
|
|
3057
3111
|
return parsed.data;
|
|
@@ -3594,20 +3648,6 @@ var EnsApiClient = class _EnsApiClient {
|
|
|
3594
3648
|
var ENSNodeClient = class extends EnsApiClient {
|
|
3595
3649
|
};
|
|
3596
3650
|
|
|
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
3651
|
// src/ensindexer/config/label-utils.ts
|
|
3612
3652
|
var import_viem15 = require("viem");
|
|
3613
3653
|
function labelHashToBytes(labelHash) {
|