@ensnode/ensnode-sdk 0.0.0-next-20260301131020 → 0.0.0-next-20260303163519
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 +217 -208
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +48 -39
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -98,6 +98,7 @@ __export(index_exports, {
|
|
|
98
98
|
buildAssetId: () => buildAssetId,
|
|
99
99
|
buildBlockNumberRange: () => buildBlockNumberRange,
|
|
100
100
|
buildBlockRefRange: () => buildBlockRefRange,
|
|
101
|
+
buildCrossChainIndexingStatusSnapshotOmnichain: () => buildCrossChainIndexingStatusSnapshotOmnichain,
|
|
101
102
|
buildEncodedReferrer: () => buildEncodedReferrer,
|
|
102
103
|
buildEnsRainbowClientLabelSet: () => buildEnsRainbowClientLabelSet,
|
|
103
104
|
buildIndexedBlockranges: () => buildIndexedBlockranges,
|
|
@@ -1075,16 +1076,16 @@ function serializeEnsApiConfigResponse(response) {
|
|
|
1075
1076
|
var serializeConfigResponse = serializeEnsApiConfigResponse;
|
|
1076
1077
|
|
|
1077
1078
|
// src/ensapi/api/indexing-status/deserialize.ts
|
|
1078
|
-
var
|
|
1079
|
+
var import_v417 = require("zod/v4");
|
|
1079
1080
|
|
|
1080
1081
|
// src/indexing-status/deserialize/realtime-indexing-status-projection.ts
|
|
1081
|
-
var
|
|
1082
|
+
var import_v415 = require("zod/v4");
|
|
1082
1083
|
|
|
1083
1084
|
// src/indexing-status/zod-schema/realtime-indexing-status-projection.ts
|
|
1084
|
-
var
|
|
1085
|
+
var import_v412 = require("zod/v4");
|
|
1085
1086
|
|
|
1086
1087
|
// src/indexing-status/zod-schema/cross-chain-indexing-status-snapshot.ts
|
|
1087
|
-
var
|
|
1088
|
+
var import_v411 = require("zod/v4");
|
|
1088
1089
|
|
|
1089
1090
|
// src/shared/block-ref.ts
|
|
1090
1091
|
function isBefore(blockA, blockB) {
|
|
@@ -1263,6 +1264,19 @@ function sortChainStatusesByStartBlockAsc(chains) {
|
|
|
1263
1264
|
);
|
|
1264
1265
|
}
|
|
1265
1266
|
|
|
1267
|
+
// src/indexing-status/validate/cross-chain-indexing-status-snapshot.ts
|
|
1268
|
+
var import_v47 = require("zod/v4");
|
|
1269
|
+
function validateCrossChainIndexingStatusSnapshot(unvalidatedSnapshot, valueLabel) {
|
|
1270
|
+
const schema = makeCrossChainIndexingStatusSnapshotSchema(valueLabel);
|
|
1271
|
+
const parsed = schema.safeParse(unvalidatedSnapshot);
|
|
1272
|
+
if (parsed.error) {
|
|
1273
|
+
throw new Error(`Invalid CrossChainIndexingStatusSnapshot:
|
|
1274
|
+
${(0, import_v47.prettifyError)(parsed.error)}
|
|
1275
|
+
`);
|
|
1276
|
+
}
|
|
1277
|
+
return parsed.data;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1266
1280
|
// src/indexing-status/cross-chain-indexing-status-snapshot.ts
|
|
1267
1281
|
var CrossChainIndexingStrategyIds = {
|
|
1268
1282
|
/**
|
|
@@ -1291,18 +1305,26 @@ function getLatestIndexedBlockRef(indexingStatus, chainId) {
|
|
|
1291
1305
|
}
|
|
1292
1306
|
return chainIndexingStatus.latestIndexedBlock;
|
|
1293
1307
|
}
|
|
1308
|
+
function buildCrossChainIndexingStatusSnapshotOmnichain(omnichainSnapshot, snapshotTime) {
|
|
1309
|
+
return validateCrossChainIndexingStatusSnapshot({
|
|
1310
|
+
strategy: CrossChainIndexingStrategyIds.Omnichain,
|
|
1311
|
+
slowestChainIndexingCursor: omnichainSnapshot.omnichainIndexingCursor,
|
|
1312
|
+
omnichainSnapshot,
|
|
1313
|
+
snapshotTime
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1294
1316
|
|
|
1295
1317
|
// src/indexing-status/zod-schema/omnichain-indexing-status-snapshot.ts
|
|
1296
|
-
var
|
|
1318
|
+
var import_v410 = require("zod/v4");
|
|
1297
1319
|
|
|
1298
1320
|
// src/indexing-status/validate/omnichain-indexing-status-snapshot.ts
|
|
1299
|
-
var
|
|
1321
|
+
var import_v48 = require("zod/v4");
|
|
1300
1322
|
function validateOmnichainIndexingStatusSnapshot(unvalidatedSnapshot, valueLabel) {
|
|
1301
1323
|
const schema = makeOmnichainIndexingStatusSnapshotSchema(valueLabel);
|
|
1302
1324
|
const parsed = schema.safeParse(unvalidatedSnapshot);
|
|
1303
1325
|
if (parsed.error) {
|
|
1304
1326
|
throw new Error(`Invalid OmnichainIndexingStatusSnapshot:
|
|
1305
|
-
${(0,
|
|
1327
|
+
${(0, import_v48.prettifyError)(parsed.error)}
|
|
1306
1328
|
`);
|
|
1307
1329
|
}
|
|
1308
1330
|
return parsed.data;
|
|
@@ -1432,7 +1454,7 @@ function buildOmnichainIndexingStatusSnapshot(chainStatusSnapshots) {
|
|
|
1432
1454
|
}
|
|
1433
1455
|
|
|
1434
1456
|
// src/indexing-status/zod-schema/chain-indexing-status-snapshot.ts
|
|
1435
|
-
var
|
|
1457
|
+
var import_v49 = require("zod/v4");
|
|
1436
1458
|
function invariant_chainSnapshotQueuedBlocks(ctx) {
|
|
1437
1459
|
const { config } = ctx.value;
|
|
1438
1460
|
if (config.rangeType === RangeTypeIds.LeftBounded) {
|
|
@@ -1507,29 +1529,29 @@ function invariant_chainSnapshotFollowingBlocks(ctx) {
|
|
|
1507
1529
|
});
|
|
1508
1530
|
}
|
|
1509
1531
|
}
|
|
1510
|
-
var makeChainIndexingStatusSnapshotQueuedSchema = (valueLabel = "Value") =>
|
|
1511
|
-
chainStatus:
|
|
1512
|
-
config:
|
|
1513
|
-
|
|
1514
|
-
rangeType:
|
|
1532
|
+
var makeChainIndexingStatusSnapshotQueuedSchema = (valueLabel = "Value") => import_v49.z.object({
|
|
1533
|
+
chainStatus: import_v49.z.literal(ChainIndexingStatusIds.Queued),
|
|
1534
|
+
config: import_v49.z.discriminatedUnion("rangeType", [
|
|
1535
|
+
import_v49.z.object({
|
|
1536
|
+
rangeType: import_v49.z.literal(RangeTypeIds.LeftBounded),
|
|
1515
1537
|
startBlock: makeBlockRefSchema(valueLabel)
|
|
1516
1538
|
}),
|
|
1517
|
-
|
|
1518
|
-
rangeType:
|
|
1539
|
+
import_v49.z.object({
|
|
1540
|
+
rangeType: import_v49.z.literal(RangeTypeIds.Bounded),
|
|
1519
1541
|
startBlock: makeBlockRefSchema(valueLabel),
|
|
1520
1542
|
endBlock: makeBlockRefSchema(valueLabel)
|
|
1521
1543
|
})
|
|
1522
1544
|
])
|
|
1523
1545
|
}).check(invariant_chainSnapshotQueuedBlocks);
|
|
1524
|
-
var makeChainIndexingStatusSnapshotBackfillSchema = (valueLabel = "Value") =>
|
|
1525
|
-
chainStatus:
|
|
1526
|
-
config:
|
|
1527
|
-
|
|
1528
|
-
rangeType:
|
|
1546
|
+
var makeChainIndexingStatusSnapshotBackfillSchema = (valueLabel = "Value") => import_v49.z.object({
|
|
1547
|
+
chainStatus: import_v49.z.literal(ChainIndexingStatusIds.Backfill),
|
|
1548
|
+
config: import_v49.z.discriminatedUnion("rangeType", [
|
|
1549
|
+
import_v49.z.object({
|
|
1550
|
+
rangeType: import_v49.z.literal(RangeTypeIds.LeftBounded),
|
|
1529
1551
|
startBlock: makeBlockRefSchema(valueLabel)
|
|
1530
1552
|
}),
|
|
1531
|
-
|
|
1532
|
-
rangeType:
|
|
1553
|
+
import_v49.z.object({
|
|
1554
|
+
rangeType: import_v49.z.literal(RangeTypeIds.Bounded),
|
|
1533
1555
|
startBlock: makeBlockRefSchema(valueLabel),
|
|
1534
1556
|
endBlock: makeBlockRefSchema(valueLabel)
|
|
1535
1557
|
})
|
|
@@ -1537,25 +1559,25 @@ var makeChainIndexingStatusSnapshotBackfillSchema = (valueLabel = "Value") => im
|
|
|
1537
1559
|
latestIndexedBlock: makeBlockRefSchema(valueLabel),
|
|
1538
1560
|
backfillEndBlock: makeBlockRefSchema(valueLabel)
|
|
1539
1561
|
}).check(invariant_chainSnapshotBackfillBlocks);
|
|
1540
|
-
var makeChainIndexingStatusSnapshotCompletedSchema = (valueLabel = "Value") =>
|
|
1541
|
-
chainStatus:
|
|
1542
|
-
config:
|
|
1543
|
-
rangeType:
|
|
1562
|
+
var makeChainIndexingStatusSnapshotCompletedSchema = (valueLabel = "Value") => import_v49.z.object({
|
|
1563
|
+
chainStatus: import_v49.z.literal(ChainIndexingStatusIds.Completed),
|
|
1564
|
+
config: import_v49.z.object({
|
|
1565
|
+
rangeType: import_v49.z.literal(RangeTypeIds.Bounded),
|
|
1544
1566
|
startBlock: makeBlockRefSchema(valueLabel),
|
|
1545
1567
|
endBlock: makeBlockRefSchema(valueLabel)
|
|
1546
1568
|
}),
|
|
1547
1569
|
latestIndexedBlock: makeBlockRefSchema(valueLabel)
|
|
1548
1570
|
}).check(invariant_chainSnapshotCompletedBlocks);
|
|
1549
|
-
var makeChainIndexingStatusSnapshotFollowingSchema = (valueLabel = "Value") =>
|
|
1550
|
-
chainStatus:
|
|
1551
|
-
config:
|
|
1552
|
-
rangeType:
|
|
1571
|
+
var makeChainIndexingStatusSnapshotFollowingSchema = (valueLabel = "Value") => import_v49.z.object({
|
|
1572
|
+
chainStatus: import_v49.z.literal(ChainIndexingStatusIds.Following),
|
|
1573
|
+
config: import_v49.z.object({
|
|
1574
|
+
rangeType: import_v49.z.literal(RangeTypeIds.LeftBounded),
|
|
1553
1575
|
startBlock: makeBlockRefSchema(valueLabel)
|
|
1554
1576
|
}),
|
|
1555
1577
|
latestIndexedBlock: makeBlockRefSchema(valueLabel),
|
|
1556
1578
|
latestKnownBlock: makeBlockRefSchema(valueLabel)
|
|
1557
1579
|
}).check(invariant_chainSnapshotFollowingBlocks);
|
|
1558
|
-
var makeChainIndexingStatusSnapshotSchema = (valueLabel = "Value") =>
|
|
1580
|
+
var makeChainIndexingStatusSnapshotSchema = (valueLabel = "Value") => import_v49.z.discriminatedUnion("chainStatus", [
|
|
1559
1581
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
|
|
1560
1582
|
makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1561
1583
|
makeChainIndexingStatusSnapshotCompletedSchema(valueLabel),
|
|
@@ -1684,11 +1706,11 @@ function invariant_omnichainStatusSnapshotFollowingHasValidChains(ctx) {
|
|
|
1684
1706
|
});
|
|
1685
1707
|
}
|
|
1686
1708
|
}
|
|
1687
|
-
var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) =>
|
|
1688
|
-
omnichainStatus:
|
|
1689
|
-
chains:
|
|
1709
|
+
var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_v410.z.object({
|
|
1710
|
+
omnichainStatus: import_v410.z.literal(OmnichainIndexingStatusIds.Unstarted),
|
|
1711
|
+
chains: import_v410.z.map(
|
|
1690
1712
|
makeChainIdSchema(),
|
|
1691
|
-
|
|
1713
|
+
import_v410.z.discriminatedUnion("chainStatus", [
|
|
1692
1714
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel)
|
|
1693
1715
|
]),
|
|
1694
1716
|
{
|
|
@@ -1697,11 +1719,11 @@ var makeOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_
|
|
|
1697
1719
|
),
|
|
1698
1720
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1699
1721
|
}).check(invariant_omnichainSnapshotUnstartedHasValidChains);
|
|
1700
|
-
var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) =>
|
|
1701
|
-
omnichainStatus:
|
|
1702
|
-
chains:
|
|
1722
|
+
var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v410.z.object({
|
|
1723
|
+
omnichainStatus: import_v410.z.literal(OmnichainIndexingStatusIds.Backfill),
|
|
1724
|
+
chains: import_v410.z.map(
|
|
1703
1725
|
makeChainIdSchema(),
|
|
1704
|
-
|
|
1726
|
+
import_v410.z.discriminatedUnion("chainStatus", [
|
|
1705
1727
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
|
|
1706
1728
|
makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1707
1729
|
makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
|
|
@@ -1712,11 +1734,11 @@ var makeOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v
|
|
|
1712
1734
|
),
|
|
1713
1735
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1714
1736
|
}).check(invariant_omnichainStatusSnapshotBackfillHasValidChains);
|
|
1715
|
-
var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) =>
|
|
1716
|
-
omnichainStatus:
|
|
1717
|
-
chains:
|
|
1737
|
+
var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_v410.z.object({
|
|
1738
|
+
omnichainStatus: import_v410.z.literal(OmnichainIndexingStatusIds.Completed),
|
|
1739
|
+
chains: import_v410.z.map(
|
|
1718
1740
|
makeChainIdSchema(),
|
|
1719
|
-
|
|
1741
|
+
import_v410.z.discriminatedUnion("chainStatus", [
|
|
1720
1742
|
makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
|
|
1721
1743
|
]),
|
|
1722
1744
|
{
|
|
@@ -1725,11 +1747,11 @@ var makeOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_
|
|
|
1725
1747
|
),
|
|
1726
1748
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1727
1749
|
}).check(invariant_omnichainStatusSnapshotCompletedHasValidChains);
|
|
1728
|
-
var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) =>
|
|
1729
|
-
omnichainStatus:
|
|
1730
|
-
chains:
|
|
1750
|
+
var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_v410.z.object({
|
|
1751
|
+
omnichainStatus: import_v410.z.literal(OmnichainIndexingStatusIds.Following),
|
|
1752
|
+
chains: import_v410.z.map(
|
|
1731
1753
|
makeChainIdSchema(),
|
|
1732
|
-
|
|
1754
|
+
import_v410.z.discriminatedUnion("chainStatus", [
|
|
1733
1755
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
|
|
1734
1756
|
makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1735
1757
|
makeChainIndexingStatusSnapshotFollowingSchema(valueLabel),
|
|
@@ -1741,7 +1763,7 @@ var makeOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_
|
|
|
1741
1763
|
),
|
|
1742
1764
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1743
1765
|
}).check(invariant_omnichainStatusSnapshotFollowingHasValidChains);
|
|
1744
|
-
var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexing Snapshot") =>
|
|
1766
|
+
var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexing Snapshot") => import_v410.z.discriminatedUnion("omnichainStatus", [
|
|
1745
1767
|
makeOmnichainIndexingStatusSnapshotUnstartedSchema(valueLabel),
|
|
1746
1768
|
makeOmnichainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1747
1769
|
makeOmnichainIndexingStatusSnapshotCompletedSchema(valueLabel),
|
|
@@ -1749,21 +1771,21 @@ var makeOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Omnichain Indexin
|
|
|
1749
1771
|
]).check(invariant_omnichainSnapshotStatusIsConsistentWithChainSnapshot).check(invariant_omnichainIndexingCursorLowerThanEarliestStartBlockAcrossQueuedChains).check(
|
|
1750
1772
|
invariant_omnichainIndexingCursorLowerThanOrEqualToLatestBackfillEndBlockAcrossBackfillChains
|
|
1751
1773
|
).check(invariant_omnichainIndexingCursorIsEqualToHighestLatestIndexedBlockAcrossIndexedChain);
|
|
1752
|
-
var makeSerializedOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) =>
|
|
1753
|
-
omnichainStatus:
|
|
1754
|
-
chains:
|
|
1774
|
+
var makeSerializedOmnichainIndexingStatusSnapshotUnstartedSchema = (valueLabel) => import_v410.z.object({
|
|
1775
|
+
omnichainStatus: import_v410.z.literal(OmnichainIndexingStatusIds.Unstarted),
|
|
1776
|
+
chains: import_v410.z.record(
|
|
1755
1777
|
makeChainIdStringSchema(),
|
|
1756
|
-
|
|
1778
|
+
import_v410.z.discriminatedUnion("chainStatus", [
|
|
1757
1779
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel)
|
|
1758
1780
|
])
|
|
1759
1781
|
),
|
|
1760
1782
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1761
1783
|
});
|
|
1762
|
-
var makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) =>
|
|
1763
|
-
omnichainStatus:
|
|
1764
|
-
chains:
|
|
1784
|
+
var makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) => import_v410.z.object({
|
|
1785
|
+
omnichainStatus: import_v410.z.literal(OmnichainIndexingStatusIds.Backfill),
|
|
1786
|
+
chains: import_v410.z.record(
|
|
1765
1787
|
makeChainIdStringSchema(),
|
|
1766
|
-
|
|
1788
|
+
import_v410.z.discriminatedUnion("chainStatus", [
|
|
1767
1789
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
|
|
1768
1790
|
makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1769
1791
|
makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
|
|
@@ -1771,21 +1793,21 @@ var makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema = (valueLabel) =
|
|
|
1771
1793
|
),
|
|
1772
1794
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1773
1795
|
});
|
|
1774
|
-
var makeSerializedOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) =>
|
|
1775
|
-
omnichainStatus:
|
|
1776
|
-
chains:
|
|
1796
|
+
var makeSerializedOmnichainIndexingStatusSnapshotCompletedSchema = (valueLabel) => import_v410.z.object({
|
|
1797
|
+
omnichainStatus: import_v410.z.literal(OmnichainIndexingStatusIds.Completed),
|
|
1798
|
+
chains: import_v410.z.record(
|
|
1777
1799
|
makeChainIdStringSchema(),
|
|
1778
|
-
|
|
1800
|
+
import_v410.z.discriminatedUnion("chainStatus", [
|
|
1779
1801
|
makeChainIndexingStatusSnapshotCompletedSchema(valueLabel)
|
|
1780
1802
|
])
|
|
1781
1803
|
),
|
|
1782
1804
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1783
1805
|
});
|
|
1784
|
-
var makeSerializedOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) =>
|
|
1785
|
-
omnichainStatus:
|
|
1786
|
-
chains:
|
|
1806
|
+
var makeSerializedOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel) => import_v410.z.object({
|
|
1807
|
+
omnichainStatus: import_v410.z.literal(OmnichainIndexingStatusIds.Following),
|
|
1808
|
+
chains: import_v410.z.record(
|
|
1787
1809
|
makeChainIdStringSchema(),
|
|
1788
|
-
|
|
1810
|
+
import_v410.z.discriminatedUnion("chainStatus", [
|
|
1789
1811
|
makeChainIndexingStatusSnapshotQueuedSchema(valueLabel),
|
|
1790
1812
|
makeChainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1791
1813
|
makeChainIndexingStatusSnapshotFollowingSchema(valueLabel),
|
|
@@ -1794,7 +1816,7 @@ var makeSerializedOmnichainIndexingStatusSnapshotFollowingSchema = (valueLabel)
|
|
|
1794
1816
|
),
|
|
1795
1817
|
omnichainIndexingCursor: makeUnixTimestampSchema(valueLabel)
|
|
1796
1818
|
});
|
|
1797
|
-
var makeSerializedOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Value") =>
|
|
1819
|
+
var makeSerializedOmnichainIndexingStatusSnapshotSchema = (valueLabel = "Value") => import_v410.z.discriminatedUnion("omnichainStatus", [
|
|
1798
1820
|
makeSerializedOmnichainIndexingStatusSnapshotUnstartedSchema(valueLabel),
|
|
1799
1821
|
makeSerializedOmnichainIndexingStatusSnapshotBackfillSchema(valueLabel),
|
|
1800
1822
|
makeSerializedOmnichainIndexingStatusSnapshotCompletedSchema(valueLabel),
|
|
@@ -1834,17 +1856,17 @@ function invariant_snapshotTimeIsTheHighestKnownBlockTimestamp(ctx) {
|
|
|
1834
1856
|
});
|
|
1835
1857
|
}
|
|
1836
1858
|
}
|
|
1837
|
-
var makeCrossChainIndexingStatusSnapshotOmnichainSchema = (valueLabel = "Cross-chain Indexing Status Snapshot Omnichain") =>
|
|
1838
|
-
strategy:
|
|
1859
|
+
var makeCrossChainIndexingStatusSnapshotOmnichainSchema = (valueLabel = "Cross-chain Indexing Status Snapshot Omnichain") => import_v411.z.object({
|
|
1860
|
+
strategy: import_v411.z.literal(CrossChainIndexingStrategyIds.Omnichain),
|
|
1839
1861
|
slowestChainIndexingCursor: makeUnixTimestampSchema(valueLabel),
|
|
1840
1862
|
snapshotTime: makeUnixTimestampSchema(valueLabel),
|
|
1841
1863
|
omnichainSnapshot: makeOmnichainIndexingStatusSnapshotSchema(valueLabel)
|
|
1842
1864
|
}).check(invariant_slowestChainEqualsToOmnichainSnapshotTime).check(invariant_snapshotTimeIsTheHighestKnownBlockTimestamp);
|
|
1843
|
-
var makeCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Cross-chain Indexing Status Snapshot") =>
|
|
1865
|
+
var makeCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Cross-chain Indexing Status Snapshot") => import_v411.z.discriminatedUnion("strategy", [
|
|
1844
1866
|
makeCrossChainIndexingStatusSnapshotOmnichainSchema(valueLabel)
|
|
1845
1867
|
]);
|
|
1846
|
-
var makeSerializedCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Serialized Cross-chain Indexing Status Snapshot") =>
|
|
1847
|
-
strategy:
|
|
1868
|
+
var makeSerializedCrossChainIndexingStatusSnapshotSchema = (valueLabel = "Serialized Cross-chain Indexing Status Snapshot") => import_v411.z.object({
|
|
1869
|
+
strategy: import_v411.z.enum(CrossChainIndexingStrategyIds),
|
|
1848
1870
|
slowestChainIndexingCursor: makeUnixTimestampSchema(valueLabel),
|
|
1849
1871
|
snapshotTime: makeUnixTimestampSchema(valueLabel),
|
|
1850
1872
|
omnichainSnapshot: makeSerializedOmnichainIndexingStatusSnapshotSchema(valueLabel)
|
|
@@ -1874,22 +1896,22 @@ function invariant_realtimeIndexingStatusProjectionWorstCaseDistanceIsCorrect(ct
|
|
|
1874
1896
|
});
|
|
1875
1897
|
}
|
|
1876
1898
|
}
|
|
1877
|
-
var makeRealtimeIndexingStatusProjectionSchema = (valueLabel = "Realtime Indexing Status Projection") =>
|
|
1899
|
+
var makeRealtimeIndexingStatusProjectionSchema = (valueLabel = "Realtime Indexing Status Projection") => import_v412.z.object({
|
|
1878
1900
|
projectedAt: makeUnixTimestampSchema(valueLabel),
|
|
1879
1901
|
worstCaseDistance: makeDurationSchema(valueLabel),
|
|
1880
1902
|
snapshot: makeCrossChainIndexingStatusSnapshotSchema(valueLabel)
|
|
1881
1903
|
}).check(invariant_realtimeIndexingStatusProjectionProjectedAtIsAfterOrEqualToSnapshotTime).check(invariant_realtimeIndexingStatusProjectionWorstCaseDistanceIsCorrect);
|
|
1882
|
-
var makeSerializedRealtimeIndexingStatusProjectionSchema = (valueLabel = "Value") =>
|
|
1904
|
+
var makeSerializedRealtimeIndexingStatusProjectionSchema = (valueLabel = "Value") => import_v412.z.object({
|
|
1883
1905
|
snapshot: makeSerializedCrossChainIndexingStatusSnapshotSchema(valueLabel),
|
|
1884
1906
|
projectedAt: makeUnixTimestampSchema(valueLabel),
|
|
1885
1907
|
worstCaseDistance: makeDurationSchema(valueLabel)
|
|
1886
1908
|
});
|
|
1887
1909
|
|
|
1888
1910
|
// src/indexing-status/deserialize/cross-chain-indexing-status-snapshot.ts
|
|
1889
|
-
var
|
|
1911
|
+
var import_v414 = require("zod/v4");
|
|
1890
1912
|
|
|
1891
1913
|
// src/indexing-status/deserialize/omnichain-indexing-status-snapshot.ts
|
|
1892
|
-
var
|
|
1914
|
+
var import_v413 = require("zod/v4");
|
|
1893
1915
|
function buildUnvalidatedOmnichainIndexingStatusSnapshot(serializedSnapshot) {
|
|
1894
1916
|
const chains = /* @__PURE__ */ new Map();
|
|
1895
1917
|
for (const [chainIdString, chainIndexingStatusSnapshot] of Object.entries(
|
|
@@ -1910,7 +1932,7 @@ function deserializeOmnichainIndexingStatusSnapshot(data, valueLabel) {
|
|
|
1910
1932
|
if (parsed.error) {
|
|
1911
1933
|
throw new Error(
|
|
1912
1934
|
`Cannot deserialize into OmnichainIndexingStatusSnapshot:
|
|
1913
|
-
${(0,
|
|
1935
|
+
${(0, import_v413.prettifyError)(parsed.error)}
|
|
1914
1936
|
`
|
|
1915
1937
|
);
|
|
1916
1938
|
}
|
|
@@ -1932,7 +1954,7 @@ function deserializeCrossChainIndexingStatusSnapshot(maybeSnapshot, valueLabel)
|
|
|
1932
1954
|
if (parsed.error) {
|
|
1933
1955
|
throw new Error(
|
|
1934
1956
|
`Cannot deserialize into CrossChainIndexingStatusSnapshot:
|
|
1935
|
-
${(0,
|
|
1957
|
+
${(0, import_v414.prettifyError)(parsed.error)}
|
|
1936
1958
|
`
|
|
1937
1959
|
);
|
|
1938
1960
|
}
|
|
@@ -1952,7 +1974,7 @@ function deserializeRealtimeIndexingStatusProjection(maybeProjection, valueLabel
|
|
|
1952
1974
|
if (parsed.error) {
|
|
1953
1975
|
throw new Error(
|
|
1954
1976
|
`Cannot deserialize into RealtimeIndexingStatusProjection:
|
|
1955
|
-
${(0,
|
|
1977
|
+
${(0, import_v415.prettifyError)(parsed.error)}
|
|
1956
1978
|
`
|
|
1957
1979
|
);
|
|
1958
1980
|
}
|
|
@@ -1973,23 +1995,23 @@ var EnsApiIndexingStatusResponseCodes = {
|
|
|
1973
1995
|
var IndexingStatusResponseCodes = EnsApiIndexingStatusResponseCodes;
|
|
1974
1996
|
|
|
1975
1997
|
// src/ensapi/api/indexing-status/zod-schemas.ts
|
|
1976
|
-
var
|
|
1977
|
-
var makeEnsApiIndexingStatusResponseOkSchema = (valueLabel = "Indexing Status Response OK") =>
|
|
1978
|
-
responseCode:
|
|
1998
|
+
var import_v416 = require("zod/v4");
|
|
1999
|
+
var makeEnsApiIndexingStatusResponseOkSchema = (valueLabel = "Indexing Status Response OK") => import_v416.z.strictObject({
|
|
2000
|
+
responseCode: import_v416.z.literal(EnsApiIndexingStatusResponseCodes.Ok),
|
|
1979
2001
|
realtimeProjection: makeRealtimeIndexingStatusProjectionSchema(valueLabel)
|
|
1980
2002
|
});
|
|
1981
|
-
var makeEnsApiIndexingStatusResponseErrorSchema = (_valueLabel = "Indexing Status Response Error") =>
|
|
1982
|
-
responseCode:
|
|
2003
|
+
var makeEnsApiIndexingStatusResponseErrorSchema = (_valueLabel = "Indexing Status Response Error") => import_v416.z.strictObject({
|
|
2004
|
+
responseCode: import_v416.z.literal(EnsApiIndexingStatusResponseCodes.Error)
|
|
1983
2005
|
});
|
|
1984
|
-
var makeEnsApiIndexingStatusResponseSchema = (valueLabel = "Indexing Status Response") =>
|
|
2006
|
+
var makeEnsApiIndexingStatusResponseSchema = (valueLabel = "Indexing Status Response") => import_v416.z.discriminatedUnion("responseCode", [
|
|
1985
2007
|
makeEnsApiIndexingStatusResponseOkSchema(valueLabel),
|
|
1986
2008
|
makeEnsApiIndexingStatusResponseErrorSchema(valueLabel)
|
|
1987
2009
|
]);
|
|
1988
|
-
var makeSerializedEnsApiIndexingStatusResponseOkSchema = (valueLabel = "Serialized Indexing Status Response OK") =>
|
|
1989
|
-
responseCode:
|
|
2010
|
+
var makeSerializedEnsApiIndexingStatusResponseOkSchema = (valueLabel = "Serialized Indexing Status Response OK") => import_v416.z.strictObject({
|
|
2011
|
+
responseCode: import_v416.z.literal(EnsApiIndexingStatusResponseCodes.Ok),
|
|
1990
2012
|
realtimeProjection: makeSerializedRealtimeIndexingStatusProjectionSchema(valueLabel)
|
|
1991
2013
|
});
|
|
1992
|
-
var makeSerializedEnsApiIndexingStatusResponseSchema = (valueLabel = "Serialized Indexing Status Response") =>
|
|
2014
|
+
var makeSerializedEnsApiIndexingStatusResponseSchema = (valueLabel = "Serialized Indexing Status Response") => import_v416.z.discriminatedUnion("responseCode", [
|
|
1993
2015
|
makeSerializedEnsApiIndexingStatusResponseOkSchema(valueLabel),
|
|
1994
2016
|
makeEnsApiIndexingStatusResponseErrorSchema(valueLabel)
|
|
1995
2017
|
]);
|
|
@@ -2011,7 +2033,7 @@ function deserializeEnsApiIndexingStatusResponse(maybeResponse) {
|
|
|
2011
2033
|
if (parsed.error) {
|
|
2012
2034
|
throw new Error(
|
|
2013
2035
|
`Cannot deserialize EnsApiIndexingStatusResponse:
|
|
2014
|
-
${(0,
|
|
2036
|
+
${(0, import_v417.prettifyError)(parsed.error)}
|
|
2015
2037
|
`
|
|
2016
2038
|
);
|
|
2017
2039
|
}
|
|
@@ -2148,11 +2170,11 @@ function serializeEnsApiIndexingStatusResponse(response) {
|
|
|
2148
2170
|
var serializeIndexingStatusResponse = serializeEnsApiIndexingStatusResponse;
|
|
2149
2171
|
|
|
2150
2172
|
// src/ensapi/api/name-tokens/deserialize.ts
|
|
2151
|
-
var
|
|
2173
|
+
var import_v422 = require("zod/v4");
|
|
2152
2174
|
|
|
2153
2175
|
// src/ensapi/api/name-tokens/zod-schemas.ts
|
|
2154
2176
|
var import_viem14 = require("viem");
|
|
2155
|
-
var
|
|
2177
|
+
var import_v421 = require("zod/v4");
|
|
2156
2178
|
|
|
2157
2179
|
// src/tokenscope/name-token.ts
|
|
2158
2180
|
var import_viem13 = require("viem");
|
|
@@ -2192,12 +2214,12 @@ var makeContractMatcher = (namespace, b) => (datasourceName, contractName) => {
|
|
|
2192
2214
|
|
|
2193
2215
|
// src/tokenscope/assets.ts
|
|
2194
2216
|
var import_viem12 = require("viem");
|
|
2195
|
-
var
|
|
2217
|
+
var import_v419 = require("zod/v4");
|
|
2196
2218
|
|
|
2197
2219
|
// src/tokenscope/zod-schemas.ts
|
|
2198
2220
|
var import_caip3 = require("caip");
|
|
2199
2221
|
var import_viem11 = require("viem");
|
|
2200
|
-
var
|
|
2222
|
+
var import_v418 = require("zod/v4");
|
|
2201
2223
|
|
|
2202
2224
|
// src/shared/types.ts
|
|
2203
2225
|
var AssetNamespaces = {
|
|
@@ -2206,10 +2228,10 @@ var AssetNamespaces = {
|
|
|
2206
2228
|
};
|
|
2207
2229
|
|
|
2208
2230
|
// src/tokenscope/zod-schemas.ts
|
|
2209
|
-
var tokenIdSchemaSerializable =
|
|
2210
|
-
var tokenIdSchemaNative =
|
|
2231
|
+
var tokenIdSchemaSerializable = import_v418.z.string();
|
|
2232
|
+
var tokenIdSchemaNative = import_v418.z.preprocess(
|
|
2211
2233
|
(v) => typeof v === "string" ? BigInt(v) : v,
|
|
2212
|
-
|
|
2234
|
+
import_v418.z.bigint().positive()
|
|
2213
2235
|
);
|
|
2214
2236
|
function makeTokenIdSchema(_valueLabel = "Token ID Schema", serializable = false) {
|
|
2215
2237
|
if (serializable) {
|
|
@@ -2219,13 +2241,13 @@ function makeTokenIdSchema(_valueLabel = "Token ID Schema", serializable = false
|
|
|
2219
2241
|
}
|
|
2220
2242
|
}
|
|
2221
2243
|
var makeAssetIdSchema = (valueLabel = "Asset ID Schema", serializable) => {
|
|
2222
|
-
return
|
|
2223
|
-
assetNamespace:
|
|
2244
|
+
return import_v418.z.object({
|
|
2245
|
+
assetNamespace: import_v418.z.enum(AssetNamespaces),
|
|
2224
2246
|
contract: makeAccountIdSchema(valueLabel),
|
|
2225
2247
|
tokenId: makeTokenIdSchema(valueLabel, serializable ?? false)
|
|
2226
2248
|
});
|
|
2227
2249
|
};
|
|
2228
|
-
var makeAssetIdStringSchema = (valueLabel = "Asset ID String Schema") =>
|
|
2250
|
+
var makeAssetIdStringSchema = (valueLabel = "Asset ID String Schema") => import_v418.z.preprocess((v) => {
|
|
2229
2251
|
if (typeof v === "string") {
|
|
2230
2252
|
const result = new import_caip3.AssetId(v);
|
|
2231
2253
|
return {
|
|
@@ -2249,20 +2271,20 @@ function invariant_nameTokenOwnershipHasNonZeroAddressOwner(ctx) {
|
|
|
2249
2271
|
});
|
|
2250
2272
|
}
|
|
2251
2273
|
}
|
|
2252
|
-
var makeNameTokenOwnershipNameWrapperSchema = (valueLabel = "Name Token Ownership NameWrapper") =>
|
|
2253
|
-
ownershipType:
|
|
2274
|
+
var makeNameTokenOwnershipNameWrapperSchema = (valueLabel = "Name Token Ownership NameWrapper") => import_v418.z.object({
|
|
2275
|
+
ownershipType: import_v418.z.literal(NameTokenOwnershipTypes.NameWrapper),
|
|
2254
2276
|
owner: makeAccountIdSchema(`${valueLabel}.owner`)
|
|
2255
2277
|
}).check(invariant_nameTokenOwnershipHasNonZeroAddressOwner);
|
|
2256
|
-
var makeNameTokenOwnershipFullyOnchainSchema = (valueLabel = "Name Token Ownership Fully Onchain") =>
|
|
2257
|
-
ownershipType:
|
|
2278
|
+
var makeNameTokenOwnershipFullyOnchainSchema = (valueLabel = "Name Token Ownership Fully Onchain") => import_v418.z.object({
|
|
2279
|
+
ownershipType: import_v418.z.literal(NameTokenOwnershipTypes.FullyOnchain),
|
|
2258
2280
|
owner: makeAccountIdSchema(`${valueLabel}.owner`)
|
|
2259
2281
|
}).check(invariant_nameTokenOwnershipHasNonZeroAddressOwner);
|
|
2260
|
-
var makeNameTokenOwnershipBurnedSchema = (valueLabel = "Name Token Ownership Burned") =>
|
|
2261
|
-
ownershipType:
|
|
2282
|
+
var makeNameTokenOwnershipBurnedSchema = (valueLabel = "Name Token Ownership Burned") => import_v418.z.object({
|
|
2283
|
+
ownershipType: import_v418.z.literal(NameTokenOwnershipTypes.Burned),
|
|
2262
2284
|
owner: makeAccountIdSchema(`${valueLabel}.owner`)
|
|
2263
2285
|
}).check(invariant_nameTokenOwnershipHasZeroAddressOwner);
|
|
2264
|
-
var makeNameTokenOwnershipUnknownSchema = (valueLabel = "Name Token Ownership Unknown") =>
|
|
2265
|
-
ownershipType:
|
|
2286
|
+
var makeNameTokenOwnershipUnknownSchema = (valueLabel = "Name Token Ownership Unknown") => import_v418.z.object({
|
|
2287
|
+
ownershipType: import_v418.z.literal(NameTokenOwnershipTypes.Unknown),
|
|
2266
2288
|
owner: makeAccountIdSchema(`${valueLabel}.owner`)
|
|
2267
2289
|
}).check(invariant_nameTokenOwnershipHasNonZeroAddressOwner);
|
|
2268
2290
|
function invariant_nameTokenOwnershipHasZeroAddressOwner(ctx) {
|
|
@@ -2275,16 +2297,16 @@ function invariant_nameTokenOwnershipHasZeroAddressOwner(ctx) {
|
|
|
2275
2297
|
});
|
|
2276
2298
|
}
|
|
2277
2299
|
}
|
|
2278
|
-
var makeNameTokenOwnershipSchema = (valueLabel = "Name Token Ownership") =>
|
|
2300
|
+
var makeNameTokenOwnershipSchema = (valueLabel = "Name Token Ownership") => import_v418.z.discriminatedUnion("ownershipType", [
|
|
2279
2301
|
makeNameTokenOwnershipNameWrapperSchema(valueLabel),
|
|
2280
2302
|
makeNameTokenOwnershipFullyOnchainSchema(valueLabel),
|
|
2281
2303
|
makeNameTokenOwnershipBurnedSchema(valueLabel),
|
|
2282
2304
|
makeNameTokenOwnershipUnknownSchema(valueLabel)
|
|
2283
2305
|
]);
|
|
2284
|
-
var makeNameTokenSchema = (valueLabel = "Name Token Schema", serializable) =>
|
|
2306
|
+
var makeNameTokenSchema = (valueLabel = "Name Token Schema", serializable) => import_v418.z.object({
|
|
2285
2307
|
token: makeAssetIdSchema(`${valueLabel}.token`, serializable),
|
|
2286
2308
|
ownership: makeNameTokenOwnershipSchema(`${valueLabel}.ownership`),
|
|
2287
|
-
mintStatus:
|
|
2309
|
+
mintStatus: import_v418.z.enum(NFTMintStatuses)
|
|
2288
2310
|
});
|
|
2289
2311
|
|
|
2290
2312
|
// src/tokenscope/assets.ts
|
|
@@ -2300,7 +2322,7 @@ function deserializeAssetId(maybeAssetId, valueLabel) {
|
|
|
2300
2322
|
const parsed = schema.safeParse(maybeAssetId);
|
|
2301
2323
|
if (parsed.error) {
|
|
2302
2324
|
throw new RangeError(`Cannot deserialize AssetId:
|
|
2303
|
-
${(0,
|
|
2325
|
+
${(0, import_v419.prettifyError)(parsed.error)}
|
|
2304
2326
|
`);
|
|
2305
2327
|
}
|
|
2306
2328
|
return parsed.data;
|
|
@@ -2310,7 +2332,7 @@ function parseAssetId(maybeAssetId, valueLabel) {
|
|
|
2310
2332
|
const parsed = schema.safeParse(maybeAssetId);
|
|
2311
2333
|
if (parsed.error) {
|
|
2312
2334
|
throw new RangeError(`Cannot parse AssetId:
|
|
2313
|
-
${(0,
|
|
2335
|
+
${(0, import_v419.prettifyError)(parsed.error)}
|
|
2314
2336
|
`);
|
|
2315
2337
|
}
|
|
2316
2338
|
return parsed.data;
|
|
@@ -2610,10 +2632,10 @@ function getNameTokenOwnership(namespaceId, name, owner) {
|
|
|
2610
2632
|
}
|
|
2611
2633
|
|
|
2612
2634
|
// src/ensapi/api/shared/errors/zod-schemas.ts
|
|
2613
|
-
var
|
|
2614
|
-
var ErrorResponseSchema =
|
|
2615
|
-
message:
|
|
2616
|
-
details:
|
|
2635
|
+
var import_v420 = require("zod/v4");
|
|
2636
|
+
var ErrorResponseSchema = import_v420.z.object({
|
|
2637
|
+
message: import_v420.z.string(),
|
|
2638
|
+
details: import_v420.z.optional(import_v420.z.unknown())
|
|
2617
2639
|
});
|
|
2618
2640
|
|
|
2619
2641
|
// src/ensapi/api/name-tokens/response.ts
|
|
@@ -2652,10 +2674,10 @@ var NameTokensResponseErrorCodes = {
|
|
|
2652
2674
|
};
|
|
2653
2675
|
|
|
2654
2676
|
// src/ensapi/api/name-tokens/zod-schemas.ts
|
|
2655
|
-
var makeRegisteredNameTokenSchema = (valueLabel = "Registered Name Token", serializable) =>
|
|
2677
|
+
var makeRegisteredNameTokenSchema = (valueLabel = "Registered Name Token", serializable) => import_v421.z.object({
|
|
2656
2678
|
domainId: makeNodeSchema(`${valueLabel}.domainId`),
|
|
2657
2679
|
name: makeReinterpretedNameSchema(valueLabel),
|
|
2658
|
-
tokens:
|
|
2680
|
+
tokens: import_v421.z.array(makeNameTokenSchema(`${valueLabel}.tokens`, serializable)).nonempty(),
|
|
2659
2681
|
expiresAt: makeUnixTimestampSchema(`${valueLabel}.expiresAt`),
|
|
2660
2682
|
accurateAsOf: makeUnixTimestampSchema(`${valueLabel}.accurateAsOf`)
|
|
2661
2683
|
}).check(function invariant_nameIsAssociatedWithDomainId(ctx) {
|
|
@@ -2697,32 +2719,32 @@ var makeRegisteredNameTokenSchema = (valueLabel = "Registered Name Token", seria
|
|
|
2697
2719
|
});
|
|
2698
2720
|
}
|
|
2699
2721
|
});
|
|
2700
|
-
var makeNameTokensResponseOkSchema = (valueLabel = "Name Tokens Response OK", serializable) =>
|
|
2701
|
-
responseCode:
|
|
2722
|
+
var makeNameTokensResponseOkSchema = (valueLabel = "Name Tokens Response OK", serializable) => import_v421.z.strictObject({
|
|
2723
|
+
responseCode: import_v421.z.literal(NameTokensResponseCodes.Ok),
|
|
2702
2724
|
registeredNameTokens: makeRegisteredNameTokenSchema(`${valueLabel}.nameTokens`, serializable)
|
|
2703
2725
|
});
|
|
2704
|
-
var makeNameTokensResponseErrorNameTokensNotIndexedSchema = (_valueLabel = "Name Tokens Response Error Name Not Indexed") =>
|
|
2705
|
-
responseCode:
|
|
2706
|
-
errorCode:
|
|
2726
|
+
var makeNameTokensResponseErrorNameTokensNotIndexedSchema = (_valueLabel = "Name Tokens Response Error Name Not Indexed") => import_v421.z.strictObject({
|
|
2727
|
+
responseCode: import_v421.z.literal(NameTokensResponseCodes.Error),
|
|
2728
|
+
errorCode: import_v421.z.literal(NameTokensResponseErrorCodes.NameTokensNotIndexed),
|
|
2707
2729
|
error: ErrorResponseSchema
|
|
2708
2730
|
});
|
|
2709
|
-
var makeNameTokensResponseErrorEnsIndexerConfigUnsupported = (_valueLabel = "Name Tokens Response Error ENSIndexer Config Unsupported") =>
|
|
2710
|
-
responseCode:
|
|
2711
|
-
errorCode:
|
|
2731
|
+
var makeNameTokensResponseErrorEnsIndexerConfigUnsupported = (_valueLabel = "Name Tokens Response Error ENSIndexer Config Unsupported") => import_v421.z.strictObject({
|
|
2732
|
+
responseCode: import_v421.z.literal(NameTokensResponseCodes.Error),
|
|
2733
|
+
errorCode: import_v421.z.literal(NameTokensResponseErrorCodes.EnsIndexerConfigUnsupported),
|
|
2712
2734
|
error: ErrorResponseSchema
|
|
2713
2735
|
});
|
|
2714
|
-
var makeNameTokensResponseErrorNameIndexingStatusUnsupported = (_valueLabel = "Name Tokens Response Error Indexing Status Unsupported") =>
|
|
2715
|
-
responseCode:
|
|
2716
|
-
errorCode:
|
|
2736
|
+
var makeNameTokensResponseErrorNameIndexingStatusUnsupported = (_valueLabel = "Name Tokens Response Error Indexing Status Unsupported") => import_v421.z.strictObject({
|
|
2737
|
+
responseCode: import_v421.z.literal(NameTokensResponseCodes.Error),
|
|
2738
|
+
errorCode: import_v421.z.literal(NameTokensResponseErrorCodes.IndexingStatusUnsupported),
|
|
2717
2739
|
error: ErrorResponseSchema
|
|
2718
2740
|
});
|
|
2719
|
-
var makeNameTokensResponseErrorSchema = (valueLabel = "Name Tokens Response Error") =>
|
|
2741
|
+
var makeNameTokensResponseErrorSchema = (valueLabel = "Name Tokens Response Error") => import_v421.z.discriminatedUnion("errorCode", [
|
|
2720
2742
|
makeNameTokensResponseErrorNameTokensNotIndexedSchema(valueLabel),
|
|
2721
2743
|
makeNameTokensResponseErrorEnsIndexerConfigUnsupported(valueLabel),
|
|
2722
2744
|
makeNameTokensResponseErrorNameIndexingStatusUnsupported(valueLabel)
|
|
2723
2745
|
]);
|
|
2724
2746
|
var makeNameTokensResponseSchema = (valueLabel = "Name Tokens Response", serializable) => {
|
|
2725
|
-
return
|
|
2747
|
+
return import_v421.z.discriminatedUnion("responseCode", [
|
|
2726
2748
|
makeNameTokensResponseOkSchema(valueLabel, serializable ?? false),
|
|
2727
2749
|
makeNameTokensResponseErrorSchema(valueLabel)
|
|
2728
2750
|
]);
|
|
@@ -2735,7 +2757,7 @@ function deserializedNameTokensResponse(maybeResponse) {
|
|
|
2735
2757
|
);
|
|
2736
2758
|
if (parsed.error) {
|
|
2737
2759
|
throw new Error(`Cannot deserialize NameTokensResponse:
|
|
2738
|
-
${(0,
|
|
2760
|
+
${(0, import_v422.prettifyError)(parsed.error)}
|
|
2739
2761
|
`);
|
|
2740
2762
|
}
|
|
2741
2763
|
return parsed.data;
|
|
@@ -2809,14 +2831,14 @@ function serializeNameTokensResponse(response) {
|
|
|
2809
2831
|
}
|
|
2810
2832
|
|
|
2811
2833
|
// src/ensapi/api/registrar-actions/deserialize.ts
|
|
2812
|
-
var
|
|
2834
|
+
var import_v426 = require("zod/v4");
|
|
2813
2835
|
|
|
2814
2836
|
// src/ensapi/api/registrar-actions/zod-schemas.ts
|
|
2815
2837
|
var import_ens7 = require("viem/ens");
|
|
2816
|
-
var
|
|
2838
|
+
var import_v425 = require("zod/v4");
|
|
2817
2839
|
|
|
2818
2840
|
// src/registrars/zod-schemas.ts
|
|
2819
|
-
var
|
|
2841
|
+
var import_v423 = require("zod/v4");
|
|
2820
2842
|
|
|
2821
2843
|
// src/registrars/encoded-referrer.ts
|
|
2822
2844
|
var import_viem15 = require("viem");
|
|
@@ -2891,11 +2913,11 @@ function serializeRegistrarAction(registrarAction) {
|
|
|
2891
2913
|
}
|
|
2892
2914
|
|
|
2893
2915
|
// src/registrars/zod-schemas.ts
|
|
2894
|
-
var makeSubregistrySchema = (valueLabel = "Subregistry") =>
|
|
2916
|
+
var makeSubregistrySchema = (valueLabel = "Subregistry") => import_v423.z.object({
|
|
2895
2917
|
subregistryId: makeAccountIdSchema(`${valueLabel} Subregistry ID`),
|
|
2896
2918
|
node: makeNodeSchema(`${valueLabel} Node`)
|
|
2897
2919
|
});
|
|
2898
|
-
var makeRegistrationLifecycleSchema = (valueLabel = "Registration Lifecycle") =>
|
|
2920
|
+
var makeRegistrationLifecycleSchema = (valueLabel = "Registration Lifecycle") => import_v423.z.object({
|
|
2899
2921
|
subregistry: makeSubregistrySchema(`${valueLabel} Subregistry`),
|
|
2900
2922
|
node: makeNodeSchema(`${valueLabel} Node`),
|
|
2901
2923
|
expiresAt: makeUnixTimestampSchema(`${valueLabel} Expires at`)
|
|
@@ -2911,18 +2933,18 @@ function invariant_registrarActionPricingTotalIsSumOfBaseCostAndPremium(ctx) {
|
|
|
2911
2933
|
});
|
|
2912
2934
|
}
|
|
2913
2935
|
}
|
|
2914
|
-
var makeRegistrarActionPricingSchema = (valueLabel = "Registrar Action Pricing") =>
|
|
2936
|
+
var makeRegistrarActionPricingSchema = (valueLabel = "Registrar Action Pricing") => import_v423.z.union([
|
|
2915
2937
|
// pricing available
|
|
2916
|
-
|
|
2938
|
+
import_v423.z.object({
|
|
2917
2939
|
baseCost: makePriceEthSchema(`${valueLabel} Base Cost`),
|
|
2918
2940
|
premium: makePriceEthSchema(`${valueLabel} Premium`),
|
|
2919
2941
|
total: makePriceEthSchema(`${valueLabel} Total`)
|
|
2920
2942
|
}).check(invariant_registrarActionPricingTotalIsSumOfBaseCostAndPremium).transform((v) => v),
|
|
2921
2943
|
// pricing unknown
|
|
2922
|
-
|
|
2923
|
-
baseCost:
|
|
2924
|
-
premium:
|
|
2925
|
-
total:
|
|
2944
|
+
import_v423.z.object({
|
|
2945
|
+
baseCost: import_v423.z.null(),
|
|
2946
|
+
premium: import_v423.z.null(),
|
|
2947
|
+
total: import_v423.z.null()
|
|
2926
2948
|
}).transform((v) => v)
|
|
2927
2949
|
]);
|
|
2928
2950
|
function invariant_registrarActionDecodedReferrerBasedOnRawReferrer(ctx) {
|
|
@@ -2945,9 +2967,9 @@ function invariant_registrarActionDecodedReferrerBasedOnRawReferrer(ctx) {
|
|
|
2945
2967
|
});
|
|
2946
2968
|
}
|
|
2947
2969
|
}
|
|
2948
|
-
var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral") =>
|
|
2970
|
+
var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral") => import_v423.z.union([
|
|
2949
2971
|
// referral available
|
|
2950
|
-
|
|
2972
|
+
import_v423.z.object({
|
|
2951
2973
|
encodedReferrer: makeHexStringSchema(
|
|
2952
2974
|
{ bytesCount: ENCODED_REFERRER_BYTE_LENGTH },
|
|
2953
2975
|
`${valueLabel} Encoded Referrer`
|
|
@@ -2955,9 +2977,9 @@ var makeRegistrarActionReferralSchema = (valueLabel = "Registrar Action Referral
|
|
|
2955
2977
|
decodedReferrer: makeLowercaseAddressSchema(`${valueLabel} Decoded Referrer`)
|
|
2956
2978
|
}).check(invariant_registrarActionDecodedReferrerBasedOnRawReferrer),
|
|
2957
2979
|
// referral not applicable
|
|
2958
|
-
|
|
2959
|
-
encodedReferrer:
|
|
2960
|
-
decodedReferrer:
|
|
2980
|
+
import_v423.z.object({
|
|
2981
|
+
encodedReferrer: import_v423.z.null(),
|
|
2982
|
+
decodedReferrer: import_v423.z.null()
|
|
2961
2983
|
})
|
|
2962
2984
|
]);
|
|
2963
2985
|
function invariant_eventIdsInitialElementIsTheActionId(ctx) {
|
|
@@ -2970,9 +2992,9 @@ function invariant_eventIdsInitialElementIsTheActionId(ctx) {
|
|
|
2970
2992
|
});
|
|
2971
2993
|
}
|
|
2972
2994
|
}
|
|
2973
|
-
var EventIdSchema =
|
|
2974
|
-
var EventIdsSchema =
|
|
2975
|
-
var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") =>
|
|
2995
|
+
var EventIdSchema = import_v423.z.string().nonempty();
|
|
2996
|
+
var EventIdsSchema = import_v423.z.array(EventIdSchema).min(1).transform((v) => v);
|
|
2997
|
+
var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") => import_v423.z.object({
|
|
2976
2998
|
id: EventIdSchema,
|
|
2977
2999
|
incrementalDuration: makeDurationSchema(`${valueLabel} Incremental Duration`),
|
|
2978
3000
|
registrant: makeLowercaseAddressSchema(`${valueLabel} Registrant`),
|
|
@@ -2986,38 +3008,38 @@ var makeBaseRegistrarActionSchema = (valueLabel = "Base Registrar Action") => im
|
|
|
2986
3008
|
eventIds: EventIdsSchema
|
|
2987
3009
|
}).check(invariant_eventIdsInitialElementIsTheActionId);
|
|
2988
3010
|
var makeRegistrarActionRegistrationSchema = (valueLabel = "Registration ") => makeBaseRegistrarActionSchema(valueLabel).extend({
|
|
2989
|
-
type:
|
|
3011
|
+
type: import_v423.z.literal(RegistrarActionTypes.Registration)
|
|
2990
3012
|
});
|
|
2991
3013
|
var makeRegistrarActionRenewalSchema = (valueLabel = "Renewal") => makeBaseRegistrarActionSchema(valueLabel).extend({
|
|
2992
|
-
type:
|
|
3014
|
+
type: import_v423.z.literal(RegistrarActionTypes.Renewal)
|
|
2993
3015
|
});
|
|
2994
|
-
var makeRegistrarActionSchema = (valueLabel = "Registrar Action") =>
|
|
3016
|
+
var makeRegistrarActionSchema = (valueLabel = "Registrar Action") => import_v423.z.discriminatedUnion("type", [
|
|
2995
3017
|
makeRegistrarActionRegistrationSchema(`${valueLabel} Registration`),
|
|
2996
3018
|
makeRegistrarActionRenewalSchema(`${valueLabel} Renewal`)
|
|
2997
3019
|
]);
|
|
2998
3020
|
|
|
2999
3021
|
// src/ensapi/api/shared/pagination/zod-schemas.ts
|
|
3000
|
-
var
|
|
3022
|
+
var import_v424 = require("zod/v4");
|
|
3001
3023
|
|
|
3002
3024
|
// src/ensapi/api/shared/pagination/request.ts
|
|
3003
3025
|
var RECORDS_PER_PAGE_DEFAULT = 10;
|
|
3004
3026
|
var RECORDS_PER_PAGE_MAX = 100;
|
|
3005
3027
|
|
|
3006
3028
|
// src/ensapi/api/shared/pagination/zod-schemas.ts
|
|
3007
|
-
var makeRequestPageParamsSchema = (valueLabel = "RequestPageParams") =>
|
|
3029
|
+
var makeRequestPageParamsSchema = (valueLabel = "RequestPageParams") => import_v424.z.object({
|
|
3008
3030
|
page: makePositiveIntegerSchema(`${valueLabel}.page`),
|
|
3009
3031
|
recordsPerPage: makePositiveIntegerSchema(`${valueLabel}.recordsPerPage`).max(
|
|
3010
3032
|
RECORDS_PER_PAGE_MAX,
|
|
3011
3033
|
`${valueLabel}.recordsPerPage must not exceed ${RECORDS_PER_PAGE_MAX}`
|
|
3012
3034
|
)
|
|
3013
3035
|
});
|
|
3014
|
-
var makeResponsePageContextSchemaWithNoRecords = (valueLabel = "ResponsePageContextWithNoRecords") =>
|
|
3015
|
-
totalRecords:
|
|
3016
|
-
totalPages:
|
|
3017
|
-
hasNext:
|
|
3018
|
-
hasPrev:
|
|
3019
|
-
startIndex:
|
|
3020
|
-
endIndex:
|
|
3036
|
+
var makeResponsePageContextSchemaWithNoRecords = (valueLabel = "ResponsePageContextWithNoRecords") => import_v424.z.object({
|
|
3037
|
+
totalRecords: import_v424.z.literal(0),
|
|
3038
|
+
totalPages: import_v424.z.literal(1),
|
|
3039
|
+
hasNext: import_v424.z.literal(false),
|
|
3040
|
+
hasPrev: import_v424.z.literal(false),
|
|
3041
|
+
startIndex: import_v424.z.undefined(),
|
|
3042
|
+
endIndex: import_v424.z.undefined()
|
|
3021
3043
|
}).extend(makeRequestPageParamsSchema(valueLabel).shape);
|
|
3022
3044
|
function invariant_responsePageWithRecordsIsCorrect(ctx) {
|
|
3023
3045
|
const { hasNext, hasPrev, recordsPerPage, page, totalRecords, startIndex, endIndex } = ctx.value;
|
|
@@ -3052,15 +3074,15 @@ function invariant_responsePageWithRecordsIsCorrect(ctx) {
|
|
|
3052
3074
|
});
|
|
3053
3075
|
}
|
|
3054
3076
|
}
|
|
3055
|
-
var makeResponsePageContextSchemaWithRecords = (valueLabel = "ResponsePageContextWithRecords") =>
|
|
3077
|
+
var makeResponsePageContextSchemaWithRecords = (valueLabel = "ResponsePageContextWithRecords") => import_v424.z.object({
|
|
3056
3078
|
totalRecords: makePositiveIntegerSchema(`${valueLabel}.totalRecords`),
|
|
3057
3079
|
totalPages: makePositiveIntegerSchema(`${valueLabel}.totalPages`),
|
|
3058
|
-
hasNext:
|
|
3059
|
-
hasPrev:
|
|
3080
|
+
hasNext: import_v424.z.boolean(),
|
|
3081
|
+
hasPrev: import_v424.z.boolean(),
|
|
3060
3082
|
startIndex: makeNonNegativeIntegerSchema(`${valueLabel}.startIndex`),
|
|
3061
3083
|
endIndex: makeNonNegativeIntegerSchema(`${valueLabel}.endIndex`)
|
|
3062
3084
|
}).extend(makeRequestPageParamsSchema(valueLabel).shape).check(invariant_responsePageWithRecordsIsCorrect);
|
|
3063
|
-
var makeResponsePageContextSchema = (valueLabel = "ResponsePageContext") =>
|
|
3085
|
+
var makeResponsePageContextSchema = (valueLabel = "ResponsePageContext") => import_v424.z.union([
|
|
3064
3086
|
makeResponsePageContextSchemaWithNoRecords(valueLabel),
|
|
3065
3087
|
makeResponsePageContextSchemaWithRecords(valueLabel)
|
|
3066
3088
|
]);
|
|
@@ -3090,21 +3112,21 @@ function invariant_registrationLifecycleNodeMatchesName(ctx) {
|
|
|
3090
3112
|
});
|
|
3091
3113
|
}
|
|
3092
3114
|
}
|
|
3093
|
-
var makeNamedRegistrarActionSchema = (valueLabel = "Named Registrar Action") =>
|
|
3115
|
+
var makeNamedRegistrarActionSchema = (valueLabel = "Named Registrar Action") => import_v425.z.object({
|
|
3094
3116
|
action: makeRegistrarActionSchema(valueLabel),
|
|
3095
3117
|
name: makeReinterpretedNameSchema(valueLabel)
|
|
3096
3118
|
}).check(invariant_registrationLifecycleNodeMatchesName);
|
|
3097
|
-
var makeRegistrarActionsResponseOkSchema = (valueLabel = "Registrar Actions Response OK") =>
|
|
3098
|
-
responseCode:
|
|
3099
|
-
registrarActions:
|
|
3119
|
+
var makeRegistrarActionsResponseOkSchema = (valueLabel = "Registrar Actions Response OK") => import_v425.z.object({
|
|
3120
|
+
responseCode: import_v425.z.literal(RegistrarActionsResponseCodes.Ok),
|
|
3121
|
+
registrarActions: import_v425.z.array(makeNamedRegistrarActionSchema(valueLabel)),
|
|
3100
3122
|
pageContext: makeResponsePageContextSchema(`${valueLabel}.pageContext`),
|
|
3101
3123
|
accurateAsOf: makeUnixTimestampSchema(`${valueLabel}.accurateAsOf`).optional()
|
|
3102
3124
|
});
|
|
3103
|
-
var makeRegistrarActionsResponseErrorSchema = (_valueLabel = "Registrar Actions Response Error") =>
|
|
3104
|
-
responseCode:
|
|
3125
|
+
var makeRegistrarActionsResponseErrorSchema = (_valueLabel = "Registrar Actions Response Error") => import_v425.z.strictObject({
|
|
3126
|
+
responseCode: import_v425.z.literal(RegistrarActionsResponseCodes.Error),
|
|
3105
3127
|
error: ErrorResponseSchema
|
|
3106
3128
|
});
|
|
3107
|
-
var makeRegistrarActionsResponseSchema = (valueLabel = "Registrar Actions Response") =>
|
|
3129
|
+
var makeRegistrarActionsResponseSchema = (valueLabel = "Registrar Actions Response") => import_v425.z.discriminatedUnion("responseCode", [
|
|
3108
3130
|
makeRegistrarActionsResponseOkSchema(valueLabel),
|
|
3109
3131
|
makeRegistrarActionsResponseErrorSchema(valueLabel)
|
|
3110
3132
|
]);
|
|
@@ -3115,7 +3137,7 @@ function deserializeRegistrarActionsResponse(maybeResponse) {
|
|
|
3115
3137
|
if (parsed.error) {
|
|
3116
3138
|
throw new Error(
|
|
3117
3139
|
`Cannot deserialize RegistrarActionsResponse:
|
|
3118
|
-
${(0,
|
|
3140
|
+
${(0, import_v426.prettifyError)(parsed.error)}
|
|
3119
3141
|
`
|
|
3120
3142
|
);
|
|
3121
3143
|
}
|
|
@@ -3262,12 +3284,12 @@ function serializeRegistrarActionsResponse(response) {
|
|
|
3262
3284
|
}
|
|
3263
3285
|
|
|
3264
3286
|
// src/ensapi/api/shared/errors/deserialize.ts
|
|
3265
|
-
var
|
|
3287
|
+
var import_v427 = require("zod/v4");
|
|
3266
3288
|
function deserializeErrorResponse(maybeErrorResponse) {
|
|
3267
3289
|
const parsed = ErrorResponseSchema.safeParse(maybeErrorResponse);
|
|
3268
3290
|
if (parsed.error) {
|
|
3269
3291
|
throw new Error(`Cannot deserialize ErrorResponse:
|
|
3270
|
-
${(0,
|
|
3292
|
+
${(0, import_v427.prettifyError)(parsed.error)}
|
|
3271
3293
|
`);
|
|
3272
3294
|
}
|
|
3273
3295
|
return parsed.data;
|
|
@@ -3827,7 +3849,7 @@ function serializeEnsIndexerConfigResponse(response) {
|
|
|
3827
3849
|
}
|
|
3828
3850
|
|
|
3829
3851
|
// src/ensindexer/api/indexing-status/deserialize.ts
|
|
3830
|
-
var
|
|
3852
|
+
var import_v429 = require("zod/v4");
|
|
3831
3853
|
|
|
3832
3854
|
// src/ensindexer/api/indexing-status/response.ts
|
|
3833
3855
|
var EnsIndexerIndexingStatusResponseCodes = {
|
|
@@ -3842,23 +3864,23 @@ var EnsIndexerIndexingStatusResponseCodes = {
|
|
|
3842
3864
|
};
|
|
3843
3865
|
|
|
3844
3866
|
// src/ensindexer/api/indexing-status/zod-schemas.ts
|
|
3845
|
-
var
|
|
3846
|
-
var makeEnsIndexerIndexingStatusResponseOkSchema = (valueLabel = "Indexing Status Response OK") =>
|
|
3847
|
-
responseCode:
|
|
3867
|
+
var import_v428 = require("zod/v4");
|
|
3868
|
+
var makeEnsIndexerIndexingStatusResponseOkSchema = (valueLabel = "Indexing Status Response OK") => import_v428.z.strictObject({
|
|
3869
|
+
responseCode: import_v428.z.literal(EnsIndexerIndexingStatusResponseCodes.Ok),
|
|
3848
3870
|
realtimeProjection: makeRealtimeIndexingStatusProjectionSchema(valueLabel)
|
|
3849
3871
|
});
|
|
3850
|
-
var makeEnsIndexerIndexingStatusResponseErrorSchema = (_valueLabel = "Indexing Status Response Error") =>
|
|
3851
|
-
responseCode:
|
|
3872
|
+
var makeEnsIndexerIndexingStatusResponseErrorSchema = (_valueLabel = "Indexing Status Response Error") => import_v428.z.strictObject({
|
|
3873
|
+
responseCode: import_v428.z.literal(EnsIndexerIndexingStatusResponseCodes.Error)
|
|
3852
3874
|
});
|
|
3853
|
-
var makeEnsIndexerIndexingStatusResponseSchema = (valueLabel = "Indexing Status Response") =>
|
|
3875
|
+
var makeEnsIndexerIndexingStatusResponseSchema = (valueLabel = "Indexing Status Response") => import_v428.z.discriminatedUnion("responseCode", [
|
|
3854
3876
|
makeEnsIndexerIndexingStatusResponseOkSchema(valueLabel),
|
|
3855
3877
|
makeEnsIndexerIndexingStatusResponseErrorSchema(valueLabel)
|
|
3856
3878
|
]);
|
|
3857
|
-
var makeSerializedEnsIndexerIndexingStatusResponseOkSchema = (valueLabel = "Serialized Indexing Status Response OK") =>
|
|
3858
|
-
responseCode:
|
|
3879
|
+
var makeSerializedEnsIndexerIndexingStatusResponseOkSchema = (valueLabel = "Serialized Indexing Status Response OK") => import_v428.z.strictObject({
|
|
3880
|
+
responseCode: import_v428.z.literal(EnsIndexerIndexingStatusResponseCodes.Ok),
|
|
3859
3881
|
realtimeProjection: makeSerializedRealtimeIndexingStatusProjectionSchema(valueLabel)
|
|
3860
3882
|
});
|
|
3861
|
-
var makeSerializedEnsIndexerIndexingStatusResponseSchema = (valueLabel = "Serialized Indexing Status Response") =>
|
|
3883
|
+
var makeSerializedEnsIndexerIndexingStatusResponseSchema = (valueLabel = "Serialized Indexing Status Response") => import_v428.z.discriminatedUnion("responseCode", [
|
|
3862
3884
|
makeSerializedEnsIndexerIndexingStatusResponseOkSchema(valueLabel),
|
|
3863
3885
|
makeEnsIndexerIndexingStatusResponseErrorSchema(valueLabel)
|
|
3864
3886
|
]);
|
|
@@ -3880,7 +3902,7 @@ function deserializeEnsIndexerIndexingStatusResponse(maybeResponse) {
|
|
|
3880
3902
|
if (parsed.error) {
|
|
3881
3903
|
throw new Error(
|
|
3882
3904
|
`Cannot deserialize EnsIndexerIndexingStatusResponse:
|
|
3883
|
-
${(0,
|
|
3905
|
+
${(0, import_v429.prettifyError)(parsed.error)}
|
|
3884
3906
|
`
|
|
3885
3907
|
);
|
|
3886
3908
|
}
|
|
@@ -3901,13 +3923,13 @@ function serializeEnsIndexerIndexingStatusResponse(response) {
|
|
|
3901
3923
|
}
|
|
3902
3924
|
|
|
3903
3925
|
// src/ensindexer/api/shared/errors/deserialize.ts
|
|
3904
|
-
var
|
|
3926
|
+
var import_v431 = require("zod/v4");
|
|
3905
3927
|
|
|
3906
3928
|
// src/ensindexer/api/shared/errors/zod-schemas.ts
|
|
3907
|
-
var
|
|
3908
|
-
var ErrorResponseSchema2 =
|
|
3909
|
-
message:
|
|
3910
|
-
details:
|
|
3929
|
+
var import_v430 = require("zod/v4");
|
|
3930
|
+
var ErrorResponseSchema2 = import_v430.z.object({
|
|
3931
|
+
message: import_v430.z.string(),
|
|
3932
|
+
details: import_v430.z.optional(import_v430.z.unknown())
|
|
3911
3933
|
});
|
|
3912
3934
|
|
|
3913
3935
|
// src/ensindexer/api/shared/errors/deserialize.ts
|
|
@@ -3915,7 +3937,7 @@ function deserializeErrorResponse2(maybeErrorResponse) {
|
|
|
3915
3937
|
const parsed = ErrorResponseSchema2.safeParse(maybeErrorResponse);
|
|
3916
3938
|
if (parsed.error) {
|
|
3917
3939
|
throw new Error(`Cannot deserialize ErrorResponse:
|
|
3918
|
-
${(0,
|
|
3940
|
+
${(0, import_v431.prettifyError)(parsed.error)}
|
|
3919
3941
|
`);
|
|
3920
3942
|
}
|
|
3921
3943
|
return parsed.data;
|
|
@@ -4192,14 +4214,14 @@ function isResolvedIdentity(identity) {
|
|
|
4192
4214
|
}
|
|
4193
4215
|
|
|
4194
4216
|
// src/indexing-status/deserialize/chain-indexing-status-snapshot.ts
|
|
4195
|
-
var
|
|
4217
|
+
var import_v432 = require("zod/v4");
|
|
4196
4218
|
function deserializeChainIndexingStatusSnapshot(maybeSnapshot, valueLabel) {
|
|
4197
4219
|
const schema = makeChainIndexingStatusSnapshotSchema(valueLabel);
|
|
4198
4220
|
const parsed = schema.safeParse(maybeSnapshot);
|
|
4199
4221
|
if (parsed.error) {
|
|
4200
4222
|
throw new Error(
|
|
4201
4223
|
`Cannot deserialize into ChainIndexingStatusSnapshot:
|
|
4202
|
-
${(0,
|
|
4224
|
+
${(0, import_v432.prettifyError)(parsed.error)}
|
|
4203
4225
|
`
|
|
4204
4226
|
);
|
|
4205
4227
|
}
|
|
@@ -4217,25 +4239,12 @@ function createRealtimeIndexingStatusProjection(snapshot, now) {
|
|
|
4217
4239
|
}
|
|
4218
4240
|
|
|
4219
4241
|
// src/indexing-status/validate/chain-indexing-status-snapshot.ts
|
|
4220
|
-
var
|
|
4242
|
+
var import_v433 = require("zod/v4");
|
|
4221
4243
|
function validateChainIndexingStatusSnapshot(unvalidatedSnapshot, valueLabel) {
|
|
4222
4244
|
const schema = makeChainIndexingStatusSnapshotSchema(valueLabel);
|
|
4223
4245
|
const parsed = schema.safeParse(unvalidatedSnapshot);
|
|
4224
4246
|
if (parsed.error) {
|
|
4225
4247
|
throw new Error(`Invalid ChainIndexingStatusSnapshot:
|
|
4226
|
-
${(0, import_v432.prettifyError)(parsed.error)}
|
|
4227
|
-
`);
|
|
4228
|
-
}
|
|
4229
|
-
return parsed.data;
|
|
4230
|
-
}
|
|
4231
|
-
|
|
4232
|
-
// src/indexing-status/validate/cross-chain-indexing-status-snapshot.ts
|
|
4233
|
-
var import_v433 = require("zod/v4");
|
|
4234
|
-
function validateCrossChainIndexingStatusSnapshot(unvalidatedSnapshot, valueLabel) {
|
|
4235
|
-
const schema = makeCrossChainIndexingStatusSnapshotSchema(valueLabel);
|
|
4236
|
-
const parsed = schema.safeParse(unvalidatedSnapshot);
|
|
4237
|
-
if (parsed.error) {
|
|
4238
|
-
throw new Error(`Invalid CrossChainIndexingStatusSnapshot:
|
|
4239
4248
|
${(0, import_v433.prettifyError)(parsed.error)}
|
|
4240
4249
|
`);
|
|
4241
4250
|
}
|