@ensnode/ensnode-sdk 0.0.0-next-20260210145458 → 0.0.0-next-20260211153531
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 +377 -365
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -89
- package/dist/index.d.ts +92 -89
- package/dist/index.js +371 -359
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1565,6 +1565,95 @@ interface OmnichainIndexingStatusSnapshotCompleted {
|
|
|
1565
1565
|
* at runtime.
|
|
1566
1566
|
*/
|
|
1567
1567
|
type OmnichainIndexingStatusSnapshot = OmnichainIndexingStatusSnapshotUnstarted | OmnichainIndexingStatusSnapshotBackfill | OmnichainIndexingStatusSnapshotCompleted | OmnichainIndexingStatusSnapshotFollowing;
|
|
1568
|
+
/**
|
|
1569
|
+
* Check if Chain Indexing Status Snapshots fit the 'unstarted' overall status
|
|
1570
|
+
* snapshot requirements:
|
|
1571
|
+
* - All chains are guaranteed to have a status of "queued".
|
|
1572
|
+
*
|
|
1573
|
+
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1574
|
+
* {@link ChainIndexingStatusSnapshotQueued}.
|
|
1575
|
+
*/
|
|
1576
|
+
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotUnstarted(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotQueued[];
|
|
1577
|
+
/**
|
|
1578
|
+
* Check if Chain Indexing Status Snapshots fit the 'backfill' overall status
|
|
1579
|
+
* snapshot requirements:
|
|
1580
|
+
* - At least one chain is guaranteed to be in the "backfill" status.
|
|
1581
|
+
* - Each chain is guaranteed to have a status of either "queued",
|
|
1582
|
+
* "backfill" or "completed".
|
|
1583
|
+
*
|
|
1584
|
+
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1585
|
+
* {@link ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill}.
|
|
1586
|
+
*/
|
|
1587
|
+
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill[];
|
|
1588
|
+
/**
|
|
1589
|
+
* Checks if Chain Indexing Status Snapshots fit the 'completed' overall status
|
|
1590
|
+
* snapshot requirements:
|
|
1591
|
+
* - All chains are guaranteed to have a status of "completed".
|
|
1592
|
+
*
|
|
1593
|
+
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1594
|
+
* {@link ChainIndexingStatusSnapshotCompleted}.
|
|
1595
|
+
*/
|
|
1596
|
+
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotCompleted(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotCompleted[];
|
|
1597
|
+
/**
|
|
1598
|
+
* Checks Chain Indexing Status Snapshots fit the 'following' overall status
|
|
1599
|
+
* snapshot requirements:
|
|
1600
|
+
* - At least one chain is guaranteed to be in the "following" status.
|
|
1601
|
+
* - Any other chain can have any status.
|
|
1602
|
+
*/
|
|
1603
|
+
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotFollowing(chains: ChainIndexingStatusSnapshot[]): boolean;
|
|
1604
|
+
/**
|
|
1605
|
+
* Get {@link OmnichainIndexingStatusId} based on indexed chains' statuses.
|
|
1606
|
+
*
|
|
1607
|
+
* This function decides what is the `OmnichainIndexingStatusId` is,
|
|
1608
|
+
* based on provided chain indexing statuses.
|
|
1609
|
+
*
|
|
1610
|
+
* @throws an error if unable to determine overall indexing status
|
|
1611
|
+
*/
|
|
1612
|
+
declare function getOmnichainIndexingStatus(chains: ChainIndexingStatusSnapshot[]): OmnichainIndexingStatusId;
|
|
1613
|
+
/**
|
|
1614
|
+
* Get Omnichain Indexing Cursor
|
|
1615
|
+
*
|
|
1616
|
+
* The cursor tracks the "highest" latest indexed block timestamp across
|
|
1617
|
+
* all indexed chains. If all chains are queued, the cursor tracks the moment
|
|
1618
|
+
* just before the earliest start block timestamp across those chains.
|
|
1619
|
+
*
|
|
1620
|
+
* @throws an error if no chains are provided
|
|
1621
|
+
*/
|
|
1622
|
+
declare function getOmnichainIndexingCursor(chains: ChainIndexingStatusSnapshot[]): UnixTimestamp;
|
|
1623
|
+
|
|
1624
|
+
/**
|
|
1625
|
+
* Serialized representation of {@link OmnichainIndexingStatusSnapshotUnstarted}
|
|
1626
|
+
*/
|
|
1627
|
+
interface SerializedOmnichainIndexingStatusSnapshotUnstarted extends Omit<OmnichainIndexingStatusSnapshotUnstarted, "chains"> {
|
|
1628
|
+
chains: Record<ChainIdString, ChainIndexingStatusSnapshotQueued>;
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* Serialized representation of {@link OmnichainIndexingStatusSnapshotBackfill}
|
|
1632
|
+
*/
|
|
1633
|
+
interface SerializedOmnichainIndexingStatusSnapshotBackfill extends Omit<OmnichainIndexingStatusSnapshotBackfill, "chains"> {
|
|
1634
|
+
chains: Record<ChainIdString, ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill>;
|
|
1635
|
+
}
|
|
1636
|
+
/**
|
|
1637
|
+
* Serialized representation of {@link OmnichainIndexingStatusSnapshotCompleted}
|
|
1638
|
+
*/
|
|
1639
|
+
interface SerializedOmnichainIndexingStatusSnapshotCompleted extends Omit<OmnichainIndexingStatusSnapshotCompleted, "chains"> {
|
|
1640
|
+
chains: Record<ChainIdString, ChainIndexingStatusSnapshotCompleted>;
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* Serialized representation of {@link OmnichainIndexingStatusSnapshotFollowing}
|
|
1644
|
+
*/
|
|
1645
|
+
interface SerializedOmnichainIndexingStatusSnapshotFollowing extends Omit<OmnichainIndexingStatusSnapshotFollowing, "chains"> {
|
|
1646
|
+
chains: Record<ChainIdString, ChainIndexingStatusSnapshot>;
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* Serialized representation of {@link OmnichainIndexingStatusSnapshot}
|
|
1650
|
+
*/
|
|
1651
|
+
type SerializedOmnichainIndexingStatusSnapshot = SerializedOmnichainIndexingStatusSnapshotUnstarted | SerializedOmnichainIndexingStatusSnapshotBackfill | SerializedOmnichainIndexingStatusSnapshotCompleted | SerializedOmnichainIndexingStatusSnapshotFollowing;
|
|
1652
|
+
/**
|
|
1653
|
+
* Serialize a {@link OmnichainIndexingStatusSnapshot} object.
|
|
1654
|
+
*/
|
|
1655
|
+
declare function serializeOmnichainIndexingStatusSnapshot(indexingStatus: OmnichainIndexingStatusSnapshot): SerializedOmnichainIndexingStatusSnapshot;
|
|
1656
|
+
|
|
1568
1657
|
/**
|
|
1569
1658
|
* The strategy used for indexing one or more chains.
|
|
1570
1659
|
*
|
|
@@ -1675,34 +1764,6 @@ type RealtimeIndexingStatusProjection = {
|
|
|
1675
1764
|
snapshot: CrossChainIndexingStatusSnapshot;
|
|
1676
1765
|
};
|
|
1677
1766
|
|
|
1678
|
-
/**
|
|
1679
|
-
* Serialized representation of {@link OmnichainIndexingStatusSnapshotUnstarted}
|
|
1680
|
-
*/
|
|
1681
|
-
interface SerializedOmnichainIndexingStatusSnapshotUnstarted extends Omit<OmnichainIndexingStatusSnapshotUnstarted, "chains"> {
|
|
1682
|
-
chains: Record<ChainIdString, ChainIndexingStatusSnapshotQueued>;
|
|
1683
|
-
}
|
|
1684
|
-
/**
|
|
1685
|
-
* Serialized representation of {@link OmnichainIndexingStatusSnapshotBackfill}
|
|
1686
|
-
*/
|
|
1687
|
-
interface SerializedOmnichainIndexingStatusSnapshotBackfill extends Omit<OmnichainIndexingStatusSnapshotBackfill, "chains"> {
|
|
1688
|
-
chains: Record<ChainIdString, ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill>;
|
|
1689
|
-
}
|
|
1690
|
-
/**
|
|
1691
|
-
* Serialized representation of {@link OmnichainIndexingStatusSnapshotCompleted}
|
|
1692
|
-
*/
|
|
1693
|
-
interface SerializedOmnichainIndexingStatusSnapshotCompleted extends Omit<OmnichainIndexingStatusSnapshotCompleted, "chains"> {
|
|
1694
|
-
chains: Record<ChainIdString, ChainIndexingStatusSnapshotCompleted>;
|
|
1695
|
-
}
|
|
1696
|
-
/**
|
|
1697
|
-
* Serialized representation of {@link OmnichainIndexingStatusSnapshotFollowing}
|
|
1698
|
-
*/
|
|
1699
|
-
interface SerializedOmnichainIndexingStatusSnapshotFollowing extends Omit<OmnichainIndexingStatusSnapshotFollowing, "chains"> {
|
|
1700
|
-
chains: Record<ChainIdString, ChainIndexingStatusSnapshot>;
|
|
1701
|
-
}
|
|
1702
|
-
/**
|
|
1703
|
-
* Serialized representation of {@link OmnichainIndexingStatusSnapshot}
|
|
1704
|
-
*/
|
|
1705
|
-
type SerializedOmnichainIndexingStatusSnapshot = SerializedOmnichainIndexingStatusSnapshotUnstarted | SerializedOmnichainIndexingStatusSnapshotBackfill | SerializedOmnichainIndexingStatusSnapshotCompleted | SerializedOmnichainIndexingStatusSnapshotFollowing;
|
|
1706
1767
|
/**
|
|
1707
1768
|
* Serialized representation of {@link CrossChainIndexingStatusSnapshotOmnichain}
|
|
1708
1769
|
*/
|
|
@@ -1726,10 +1787,6 @@ interface SerializedRealtimeIndexingStatusProjection extends Omit<RealtimeIndexi
|
|
|
1726
1787
|
snapshot: SerializedCrossChainIndexingStatusSnapshot;
|
|
1727
1788
|
}
|
|
1728
1789
|
|
|
1729
|
-
/**
|
|
1730
|
-
* Deserialize an {@link OmnichainIndexingStatusSnapshot} object.
|
|
1731
|
-
*/
|
|
1732
|
-
declare function deserializeOmnichainIndexingStatusSnapshot(maybeSnapshot: SerializedOmnichainIndexingStatusSnapshot, valueLabel?: string): OmnichainIndexingStatusSnapshot;
|
|
1733
1790
|
/**
|
|
1734
1791
|
* Deserialize an {@link CrossChainIndexingStatusSnapshot} object.
|
|
1735
1792
|
*/
|
|
@@ -1770,60 +1827,10 @@ declare function serializeChainIndexingSnapshots<ChainIndexingStatusSnapshotType
|
|
|
1770
1827
|
declare function deserializeChainIndexingStatusSnapshot(maybeSnapshot: SerializedChainIndexingStatusSnapshot, valueLabel?: string): ChainIndexingStatusSnapshot;
|
|
1771
1828
|
|
|
1772
1829
|
/**
|
|
1773
|
-
*
|
|
1774
|
-
*
|
|
1775
|
-
* This function decides what is the `OmnichainIndexingStatusId` is,
|
|
1776
|
-
* based on provided chain indexing statuses.
|
|
1777
|
-
*
|
|
1778
|
-
* @throws an error if unable to determine overall indexing status
|
|
1779
|
-
*/
|
|
1780
|
-
declare function getOmnichainIndexingStatus(chains: ChainIndexingStatusSnapshot[]): OmnichainIndexingStatusId;
|
|
1781
|
-
/**
|
|
1782
|
-
* Get Omnichain Indexing Cursor
|
|
1783
|
-
*
|
|
1784
|
-
* The cursor tracks the "highest" latest indexed block timestamp across
|
|
1785
|
-
* all indexed chains. If all chains are queued, the cursor tracks the moment
|
|
1786
|
-
* just before the earliest start block timestamp across those chains.
|
|
1787
|
-
*
|
|
1788
|
-
* @throws an error if no chains are provided
|
|
1789
|
-
*/
|
|
1790
|
-
declare function getOmnichainIndexingCursor(chains: ChainIndexingStatusSnapshot[]): UnixTimestamp;
|
|
1791
|
-
/**
|
|
1792
|
-
* Check if Chain Indexing Status Snapshots fit the 'unstarted' overall status
|
|
1793
|
-
* snapshot requirements:
|
|
1794
|
-
* - All chains are guaranteed to have a status of "queued".
|
|
1795
|
-
*
|
|
1796
|
-
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1797
|
-
* {@link ChainIndexingStatusSnapshotQueued}.
|
|
1798
|
-
*/
|
|
1799
|
-
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotUnstarted(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotQueued[];
|
|
1800
|
-
/**
|
|
1801
|
-
* Check if Chain Indexing Status Snapshots fit the 'backfill' overall status
|
|
1802
|
-
* snapshot requirements:
|
|
1803
|
-
* - At least one chain is guaranteed to be in the "backfill" status.
|
|
1804
|
-
* - Each chain is guaranteed to have a status of either "queued",
|
|
1805
|
-
* "backfill" or "completed".
|
|
1806
|
-
*
|
|
1807
|
-
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1808
|
-
* {@link ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill}.
|
|
1809
|
-
*/
|
|
1810
|
-
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill[];
|
|
1811
|
-
/**
|
|
1812
|
-
* Checks if Chain Indexing Status Snapshots fit the 'completed' overall status
|
|
1813
|
-
* snapshot requirements:
|
|
1814
|
-
* - All chains are guaranteed to have a status of "completed".
|
|
1815
|
-
*
|
|
1816
|
-
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1817
|
-
* {@link ChainIndexingStatusSnapshotCompleted}.
|
|
1818
|
-
*/
|
|
1819
|
-
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotCompleted(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotCompleted[];
|
|
1820
|
-
/**
|
|
1821
|
-
* Checks Chain Indexing Status Snapshots fit the 'following' overall status
|
|
1822
|
-
* snapshot requirements:
|
|
1823
|
-
* - At least one chain is guaranteed to be in the "following" status.
|
|
1824
|
-
* - Any other chain can have any status.
|
|
1830
|
+
* Deserialize an {@link OmnichainIndexingStatusSnapshot} object.
|
|
1825
1831
|
*/
|
|
1826
|
-
declare function
|
|
1832
|
+
declare function deserializeOmnichainIndexingStatusSnapshot(maybeSnapshot: SerializedOmnichainIndexingStatusSnapshot, valueLabel?: string): OmnichainIndexingStatusSnapshot;
|
|
1833
|
+
|
|
1827
1834
|
/**
|
|
1828
1835
|
* Gets the latest indexed {@link BlockRef} for the given {@link ChainId}.
|
|
1829
1836
|
*
|
|
@@ -1840,10 +1847,6 @@ declare function createRealtimeIndexingStatusProjection(snapshot: CrossChainInde
|
|
|
1840
1847
|
|
|
1841
1848
|
declare function serializeCrossChainIndexingStatusSnapshotOmnichain({ strategy, slowestChainIndexingCursor, snapshotTime, omnichainSnapshot, }: CrossChainIndexingStatusSnapshot): SerializedCrossChainIndexingStatusSnapshot;
|
|
1842
1849
|
declare function serializeRealtimeIndexingStatusProjection(indexingProjection: RealtimeIndexingStatusProjection): SerializedRealtimeIndexingStatusProjection;
|
|
1843
|
-
/**
|
|
1844
|
-
* Serialize a {@link OmnichainIndexingStatusSnapshot} object.
|
|
1845
|
-
*/
|
|
1846
|
-
declare function serializeOmnichainIndexingStatusSnapshot(indexingStatus: OmnichainIndexingStatusSnapshot): SerializedOmnichainIndexingStatusSnapshot;
|
|
1847
1850
|
|
|
1848
1851
|
/**
|
|
1849
1852
|
* Validates a maybe {@link ChainIndexingStatusSnapshot} object.
|
package/dist/index.d.ts
CHANGED
|
@@ -1565,6 +1565,95 @@ interface OmnichainIndexingStatusSnapshotCompleted {
|
|
|
1565
1565
|
* at runtime.
|
|
1566
1566
|
*/
|
|
1567
1567
|
type OmnichainIndexingStatusSnapshot = OmnichainIndexingStatusSnapshotUnstarted | OmnichainIndexingStatusSnapshotBackfill | OmnichainIndexingStatusSnapshotCompleted | OmnichainIndexingStatusSnapshotFollowing;
|
|
1568
|
+
/**
|
|
1569
|
+
* Check if Chain Indexing Status Snapshots fit the 'unstarted' overall status
|
|
1570
|
+
* snapshot requirements:
|
|
1571
|
+
* - All chains are guaranteed to have a status of "queued".
|
|
1572
|
+
*
|
|
1573
|
+
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1574
|
+
* {@link ChainIndexingStatusSnapshotQueued}.
|
|
1575
|
+
*/
|
|
1576
|
+
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotUnstarted(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotQueued[];
|
|
1577
|
+
/**
|
|
1578
|
+
* Check if Chain Indexing Status Snapshots fit the 'backfill' overall status
|
|
1579
|
+
* snapshot requirements:
|
|
1580
|
+
* - At least one chain is guaranteed to be in the "backfill" status.
|
|
1581
|
+
* - Each chain is guaranteed to have a status of either "queued",
|
|
1582
|
+
* "backfill" or "completed".
|
|
1583
|
+
*
|
|
1584
|
+
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1585
|
+
* {@link ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill}.
|
|
1586
|
+
*/
|
|
1587
|
+
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill[];
|
|
1588
|
+
/**
|
|
1589
|
+
* Checks if Chain Indexing Status Snapshots fit the 'completed' overall status
|
|
1590
|
+
* snapshot requirements:
|
|
1591
|
+
* - All chains are guaranteed to have a status of "completed".
|
|
1592
|
+
*
|
|
1593
|
+
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1594
|
+
* {@link ChainIndexingStatusSnapshotCompleted}.
|
|
1595
|
+
*/
|
|
1596
|
+
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotCompleted(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotCompleted[];
|
|
1597
|
+
/**
|
|
1598
|
+
* Checks Chain Indexing Status Snapshots fit the 'following' overall status
|
|
1599
|
+
* snapshot requirements:
|
|
1600
|
+
* - At least one chain is guaranteed to be in the "following" status.
|
|
1601
|
+
* - Any other chain can have any status.
|
|
1602
|
+
*/
|
|
1603
|
+
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotFollowing(chains: ChainIndexingStatusSnapshot[]): boolean;
|
|
1604
|
+
/**
|
|
1605
|
+
* Get {@link OmnichainIndexingStatusId} based on indexed chains' statuses.
|
|
1606
|
+
*
|
|
1607
|
+
* This function decides what is the `OmnichainIndexingStatusId` is,
|
|
1608
|
+
* based on provided chain indexing statuses.
|
|
1609
|
+
*
|
|
1610
|
+
* @throws an error if unable to determine overall indexing status
|
|
1611
|
+
*/
|
|
1612
|
+
declare function getOmnichainIndexingStatus(chains: ChainIndexingStatusSnapshot[]): OmnichainIndexingStatusId;
|
|
1613
|
+
/**
|
|
1614
|
+
* Get Omnichain Indexing Cursor
|
|
1615
|
+
*
|
|
1616
|
+
* The cursor tracks the "highest" latest indexed block timestamp across
|
|
1617
|
+
* all indexed chains. If all chains are queued, the cursor tracks the moment
|
|
1618
|
+
* just before the earliest start block timestamp across those chains.
|
|
1619
|
+
*
|
|
1620
|
+
* @throws an error if no chains are provided
|
|
1621
|
+
*/
|
|
1622
|
+
declare function getOmnichainIndexingCursor(chains: ChainIndexingStatusSnapshot[]): UnixTimestamp;
|
|
1623
|
+
|
|
1624
|
+
/**
|
|
1625
|
+
* Serialized representation of {@link OmnichainIndexingStatusSnapshotUnstarted}
|
|
1626
|
+
*/
|
|
1627
|
+
interface SerializedOmnichainIndexingStatusSnapshotUnstarted extends Omit<OmnichainIndexingStatusSnapshotUnstarted, "chains"> {
|
|
1628
|
+
chains: Record<ChainIdString, ChainIndexingStatusSnapshotQueued>;
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* Serialized representation of {@link OmnichainIndexingStatusSnapshotBackfill}
|
|
1632
|
+
*/
|
|
1633
|
+
interface SerializedOmnichainIndexingStatusSnapshotBackfill extends Omit<OmnichainIndexingStatusSnapshotBackfill, "chains"> {
|
|
1634
|
+
chains: Record<ChainIdString, ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill>;
|
|
1635
|
+
}
|
|
1636
|
+
/**
|
|
1637
|
+
* Serialized representation of {@link OmnichainIndexingStatusSnapshotCompleted}
|
|
1638
|
+
*/
|
|
1639
|
+
interface SerializedOmnichainIndexingStatusSnapshotCompleted extends Omit<OmnichainIndexingStatusSnapshotCompleted, "chains"> {
|
|
1640
|
+
chains: Record<ChainIdString, ChainIndexingStatusSnapshotCompleted>;
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* Serialized representation of {@link OmnichainIndexingStatusSnapshotFollowing}
|
|
1644
|
+
*/
|
|
1645
|
+
interface SerializedOmnichainIndexingStatusSnapshotFollowing extends Omit<OmnichainIndexingStatusSnapshotFollowing, "chains"> {
|
|
1646
|
+
chains: Record<ChainIdString, ChainIndexingStatusSnapshot>;
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* Serialized representation of {@link OmnichainIndexingStatusSnapshot}
|
|
1650
|
+
*/
|
|
1651
|
+
type SerializedOmnichainIndexingStatusSnapshot = SerializedOmnichainIndexingStatusSnapshotUnstarted | SerializedOmnichainIndexingStatusSnapshotBackfill | SerializedOmnichainIndexingStatusSnapshotCompleted | SerializedOmnichainIndexingStatusSnapshotFollowing;
|
|
1652
|
+
/**
|
|
1653
|
+
* Serialize a {@link OmnichainIndexingStatusSnapshot} object.
|
|
1654
|
+
*/
|
|
1655
|
+
declare function serializeOmnichainIndexingStatusSnapshot(indexingStatus: OmnichainIndexingStatusSnapshot): SerializedOmnichainIndexingStatusSnapshot;
|
|
1656
|
+
|
|
1568
1657
|
/**
|
|
1569
1658
|
* The strategy used for indexing one or more chains.
|
|
1570
1659
|
*
|
|
@@ -1675,34 +1764,6 @@ type RealtimeIndexingStatusProjection = {
|
|
|
1675
1764
|
snapshot: CrossChainIndexingStatusSnapshot;
|
|
1676
1765
|
};
|
|
1677
1766
|
|
|
1678
|
-
/**
|
|
1679
|
-
* Serialized representation of {@link OmnichainIndexingStatusSnapshotUnstarted}
|
|
1680
|
-
*/
|
|
1681
|
-
interface SerializedOmnichainIndexingStatusSnapshotUnstarted extends Omit<OmnichainIndexingStatusSnapshotUnstarted, "chains"> {
|
|
1682
|
-
chains: Record<ChainIdString, ChainIndexingStatusSnapshotQueued>;
|
|
1683
|
-
}
|
|
1684
|
-
/**
|
|
1685
|
-
* Serialized representation of {@link OmnichainIndexingStatusSnapshotBackfill}
|
|
1686
|
-
*/
|
|
1687
|
-
interface SerializedOmnichainIndexingStatusSnapshotBackfill extends Omit<OmnichainIndexingStatusSnapshotBackfill, "chains"> {
|
|
1688
|
-
chains: Record<ChainIdString, ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill>;
|
|
1689
|
-
}
|
|
1690
|
-
/**
|
|
1691
|
-
* Serialized representation of {@link OmnichainIndexingStatusSnapshotCompleted}
|
|
1692
|
-
*/
|
|
1693
|
-
interface SerializedOmnichainIndexingStatusSnapshotCompleted extends Omit<OmnichainIndexingStatusSnapshotCompleted, "chains"> {
|
|
1694
|
-
chains: Record<ChainIdString, ChainIndexingStatusSnapshotCompleted>;
|
|
1695
|
-
}
|
|
1696
|
-
/**
|
|
1697
|
-
* Serialized representation of {@link OmnichainIndexingStatusSnapshotFollowing}
|
|
1698
|
-
*/
|
|
1699
|
-
interface SerializedOmnichainIndexingStatusSnapshotFollowing extends Omit<OmnichainIndexingStatusSnapshotFollowing, "chains"> {
|
|
1700
|
-
chains: Record<ChainIdString, ChainIndexingStatusSnapshot>;
|
|
1701
|
-
}
|
|
1702
|
-
/**
|
|
1703
|
-
* Serialized representation of {@link OmnichainIndexingStatusSnapshot}
|
|
1704
|
-
*/
|
|
1705
|
-
type SerializedOmnichainIndexingStatusSnapshot = SerializedOmnichainIndexingStatusSnapshotUnstarted | SerializedOmnichainIndexingStatusSnapshotBackfill | SerializedOmnichainIndexingStatusSnapshotCompleted | SerializedOmnichainIndexingStatusSnapshotFollowing;
|
|
1706
1767
|
/**
|
|
1707
1768
|
* Serialized representation of {@link CrossChainIndexingStatusSnapshotOmnichain}
|
|
1708
1769
|
*/
|
|
@@ -1726,10 +1787,6 @@ interface SerializedRealtimeIndexingStatusProjection extends Omit<RealtimeIndexi
|
|
|
1726
1787
|
snapshot: SerializedCrossChainIndexingStatusSnapshot;
|
|
1727
1788
|
}
|
|
1728
1789
|
|
|
1729
|
-
/**
|
|
1730
|
-
* Deserialize an {@link OmnichainIndexingStatusSnapshot} object.
|
|
1731
|
-
*/
|
|
1732
|
-
declare function deserializeOmnichainIndexingStatusSnapshot(maybeSnapshot: SerializedOmnichainIndexingStatusSnapshot, valueLabel?: string): OmnichainIndexingStatusSnapshot;
|
|
1733
1790
|
/**
|
|
1734
1791
|
* Deserialize an {@link CrossChainIndexingStatusSnapshot} object.
|
|
1735
1792
|
*/
|
|
@@ -1770,60 +1827,10 @@ declare function serializeChainIndexingSnapshots<ChainIndexingStatusSnapshotType
|
|
|
1770
1827
|
declare function deserializeChainIndexingStatusSnapshot(maybeSnapshot: SerializedChainIndexingStatusSnapshot, valueLabel?: string): ChainIndexingStatusSnapshot;
|
|
1771
1828
|
|
|
1772
1829
|
/**
|
|
1773
|
-
*
|
|
1774
|
-
*
|
|
1775
|
-
* This function decides what is the `OmnichainIndexingStatusId` is,
|
|
1776
|
-
* based on provided chain indexing statuses.
|
|
1777
|
-
*
|
|
1778
|
-
* @throws an error if unable to determine overall indexing status
|
|
1779
|
-
*/
|
|
1780
|
-
declare function getOmnichainIndexingStatus(chains: ChainIndexingStatusSnapshot[]): OmnichainIndexingStatusId;
|
|
1781
|
-
/**
|
|
1782
|
-
* Get Omnichain Indexing Cursor
|
|
1783
|
-
*
|
|
1784
|
-
* The cursor tracks the "highest" latest indexed block timestamp across
|
|
1785
|
-
* all indexed chains. If all chains are queued, the cursor tracks the moment
|
|
1786
|
-
* just before the earliest start block timestamp across those chains.
|
|
1787
|
-
*
|
|
1788
|
-
* @throws an error if no chains are provided
|
|
1789
|
-
*/
|
|
1790
|
-
declare function getOmnichainIndexingCursor(chains: ChainIndexingStatusSnapshot[]): UnixTimestamp;
|
|
1791
|
-
/**
|
|
1792
|
-
* Check if Chain Indexing Status Snapshots fit the 'unstarted' overall status
|
|
1793
|
-
* snapshot requirements:
|
|
1794
|
-
* - All chains are guaranteed to have a status of "queued".
|
|
1795
|
-
*
|
|
1796
|
-
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1797
|
-
* {@link ChainIndexingStatusSnapshotQueued}.
|
|
1798
|
-
*/
|
|
1799
|
-
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotUnstarted(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotQueued[];
|
|
1800
|
-
/**
|
|
1801
|
-
* Check if Chain Indexing Status Snapshots fit the 'backfill' overall status
|
|
1802
|
-
* snapshot requirements:
|
|
1803
|
-
* - At least one chain is guaranteed to be in the "backfill" status.
|
|
1804
|
-
* - Each chain is guaranteed to have a status of either "queued",
|
|
1805
|
-
* "backfill" or "completed".
|
|
1806
|
-
*
|
|
1807
|
-
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1808
|
-
* {@link ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill}.
|
|
1809
|
-
*/
|
|
1810
|
-
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill[];
|
|
1811
|
-
/**
|
|
1812
|
-
* Checks if Chain Indexing Status Snapshots fit the 'completed' overall status
|
|
1813
|
-
* snapshot requirements:
|
|
1814
|
-
* - All chains are guaranteed to have a status of "completed".
|
|
1815
|
-
*
|
|
1816
|
-
* Note: This function narrows the {@link ChainIndexingStatusSnapshot} type to
|
|
1817
|
-
* {@link ChainIndexingStatusSnapshotCompleted}.
|
|
1818
|
-
*/
|
|
1819
|
-
declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotCompleted(chains: ChainIndexingStatusSnapshot[]): chains is ChainIndexingStatusSnapshotCompleted[];
|
|
1820
|
-
/**
|
|
1821
|
-
* Checks Chain Indexing Status Snapshots fit the 'following' overall status
|
|
1822
|
-
* snapshot requirements:
|
|
1823
|
-
* - At least one chain is guaranteed to be in the "following" status.
|
|
1824
|
-
* - Any other chain can have any status.
|
|
1830
|
+
* Deserialize an {@link OmnichainIndexingStatusSnapshot} object.
|
|
1825
1831
|
*/
|
|
1826
|
-
declare function
|
|
1832
|
+
declare function deserializeOmnichainIndexingStatusSnapshot(maybeSnapshot: SerializedOmnichainIndexingStatusSnapshot, valueLabel?: string): OmnichainIndexingStatusSnapshot;
|
|
1833
|
+
|
|
1827
1834
|
/**
|
|
1828
1835
|
* Gets the latest indexed {@link BlockRef} for the given {@link ChainId}.
|
|
1829
1836
|
*
|
|
@@ -1840,10 +1847,6 @@ declare function createRealtimeIndexingStatusProjection(snapshot: CrossChainInde
|
|
|
1840
1847
|
|
|
1841
1848
|
declare function serializeCrossChainIndexingStatusSnapshotOmnichain({ strategy, slowestChainIndexingCursor, snapshotTime, omnichainSnapshot, }: CrossChainIndexingStatusSnapshot): SerializedCrossChainIndexingStatusSnapshot;
|
|
1842
1849
|
declare function serializeRealtimeIndexingStatusProjection(indexingProjection: RealtimeIndexingStatusProjection): SerializedRealtimeIndexingStatusProjection;
|
|
1843
|
-
/**
|
|
1844
|
-
* Serialize a {@link OmnichainIndexingStatusSnapshot} object.
|
|
1845
|
-
*/
|
|
1846
|
-
declare function serializeOmnichainIndexingStatusSnapshot(indexingStatus: OmnichainIndexingStatusSnapshot): SerializedOmnichainIndexingStatusSnapshot;
|
|
1847
1850
|
|
|
1848
1851
|
/**
|
|
1849
1852
|
* Validates a maybe {@link ChainIndexingStatusSnapshot} object.
|