@ensnode/ensnode-sdk 1.7.0 → 1.8.0
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 +46 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +166 -222
- package/dist/index.d.ts +166 -222
- package/dist/index.js +46 -31
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1863,11 +1863,31 @@ type CrossChainIndexingStatusSnapshot = CrossChainIndexingStatusSnapshotOmnichai
|
|
|
1863
1863
|
* isn't being indexed at all or is queued and therefore hasn't started indexing yet.
|
|
1864
1864
|
*/
|
|
1865
1865
|
declare function getLatestIndexedBlockRef(indexingStatus: CrossChainIndexingStatusSnapshot, chainId: ChainId): BlockRef | null;
|
|
1866
|
+
/**
|
|
1867
|
+
* Get the "highest known block timestamp" from chain indexing status snapshots.
|
|
1868
|
+
*
|
|
1869
|
+
* Returns the maximum timestamp referenced anywhere in the provided chain snapshots,
|
|
1870
|
+
* across all of:
|
|
1871
|
+
* - `config.startBlock` timestamps for all chains
|
|
1872
|
+
* - `config.endBlock` timestamps for bounded chains
|
|
1873
|
+
* - `backfillEndBlock` timestamps for chains in backfill status
|
|
1874
|
+
* - `latestKnownBlock` timestamps for chains in following status
|
|
1875
|
+
*
|
|
1876
|
+
* This is used to enforce the invariant that `snapshotTime` must be >= all
|
|
1877
|
+
* referenced block timestamps. It differs from {@link getTimestampForHighestOmnichainKnownBlock},
|
|
1878
|
+
* which computes the highest "target" block timestamp for progress display and
|
|
1879
|
+
* does not include `startBlock` timestamps.
|
|
1880
|
+
*
|
|
1881
|
+
* @throws Error if `chains` is empty.
|
|
1882
|
+
*/
|
|
1883
|
+
declare function getHighestKnownBlockTimestamp(chains: ChainIndexingStatusSnapshot[]): UnixTimestamp;
|
|
1866
1884
|
/**
|
|
1867
1885
|
* Build a Cross-Chain Indexing Status Snapshot based on the omnichain indexing status snapshot.
|
|
1868
1886
|
*
|
|
1869
1887
|
* @param omnichainSnapshot - The omnichain indexing status snapshot.
|
|
1870
1888
|
* @param snapshotTime - The timestamp when the cross-chain indexing status snapshot was generated.
|
|
1889
|
+
* Will be adjusted upward if necessary to satisfy the invariant that snapshotTime must
|
|
1890
|
+
* be >= the highest known block timestamp (handles clock skew and future block timestamps).
|
|
1871
1891
|
* @returns The cross-chain indexing status snapshot.
|
|
1872
1892
|
* @throws if the generated snapshot does not satisfy the invariants defined
|
|
1873
1893
|
* in {@link CrossChainIndexingStatusSnapshotOmnichain}
|
|
@@ -3564,6 +3584,14 @@ type RegistrarActionsFilter = RegistrarActionsFilterBySubregistryNode | Registra
|
|
|
3564
3584
|
* Records Orders
|
|
3565
3585
|
*/
|
|
3566
3586
|
declare const RegistrarActionsOrders: {
|
|
3587
|
+
/**
|
|
3588
|
+
* Returns registrar actions newest-first.
|
|
3589
|
+
*
|
|
3590
|
+
* Sorts by block timestamp descending. Because each action's identifier encodes
|
|
3591
|
+
* all ordering-relevant onchain properties, this also correctly orders actions
|
|
3592
|
+
* that share the same block timestamp by the chronological order in which they
|
|
3593
|
+
* were executed within the block.
|
|
3594
|
+
*/
|
|
3567
3595
|
readonly LatestRegistrarActions: "orderBy[timestamp]=desc";
|
|
3568
3596
|
};
|
|
3569
3597
|
type RegistrarActionsOrder = (typeof RegistrarActionsOrders)[keyof typeof RegistrarActionsOrders];
|
|
@@ -4506,222 +4534,6 @@ declare const DEFAULT_ENSNODE_API_URL_SEPOLIA: "https://api.alpha-sepolia.ensnod
|
|
|
4506
4534
|
*/
|
|
4507
4535
|
declare const getDefaultEnsNodeUrl: (namespace?: ENSNamespaceId) => URL;
|
|
4508
4536
|
|
|
4509
|
-
type EnsIndexerPublicConfigCompatibilityCheck = Omit<EnsIndexerPublicConfig, "databaseSchemaName" | "ensRainbowPublicConfig" | "versionInfo">;
|
|
4510
|
-
/**
|
|
4511
|
-
* Validate if `configB` is compatible with `configA`, such that `configA` equals to `configB`.
|
|
4512
|
-
*
|
|
4513
|
-
* @throws error if configs are incompatible.
|
|
4514
|
-
*/
|
|
4515
|
-
declare function validateEnsIndexerPublicConfigCompatibility(configA: EnsIndexerPublicConfigCompatibilityCheck, configB: EnsIndexerPublicConfigCompatibilityCheck): void;
|
|
4516
|
-
|
|
4517
|
-
/**
|
|
4518
|
-
* Builds an unvalidated {@link EnsIndexerPublicConfig} object to be
|
|
4519
|
-
* validated with {@link makeEnsIndexerPublicConfigSchema}.
|
|
4520
|
-
*
|
|
4521
|
-
* @param serializedPublicConfig - The serialized public config to build from.
|
|
4522
|
-
* @return An unvalidated {@link EnsIndexerPublicConfig} object.
|
|
4523
|
-
*/
|
|
4524
|
-
declare function buildUnvalidatedEnsIndexerPublicConfig(serializedPublicConfig: SerializedEnsIndexerPublicConfig): Unvalidated<EnsIndexerPublicConfig>;
|
|
4525
|
-
/**
|
|
4526
|
-
* Deserialize value into {@link EnsIndexerPublicConfig} object.
|
|
4527
|
-
*/
|
|
4528
|
-
declare function deserializeEnsIndexerPublicConfig(maybePublicConfig: Unvalidated<SerializedEnsIndexerPublicConfig>, valueLabel?: string): EnsIndexerPublicConfig;
|
|
4529
|
-
/**
|
|
4530
|
-
* Deserialize object into a {@link EnsIndexerPublicConfig} object.
|
|
4531
|
-
*
|
|
4532
|
-
* @deprecated Use {@link deserializeEnsIndexerPublicConfig} instead.
|
|
4533
|
-
*/
|
|
4534
|
-
declare const deserializeENSIndexerPublicConfig: typeof deserializeEnsIndexerPublicConfig;
|
|
4535
|
-
|
|
4536
|
-
/**
|
|
4537
|
-
* Determines if the provided `config` results in indexing behavior compatible with the legacy ENS
|
|
4538
|
-
* Subgraph.
|
|
4539
|
-
*
|
|
4540
|
-
* @see https://ensnode.io/docs/concepts/what-is-the-ens-subgraph/
|
|
4541
|
-
*/
|
|
4542
|
-
declare function isSubgraphCompatible(config: Pick<EnsIndexerPublicConfig, "namespace" | "plugins" | "labelSet">): boolean;
|
|
4543
|
-
|
|
4544
|
-
/**
|
|
4545
|
-
* Converts a Labelhash to bytes, with validation
|
|
4546
|
-
* @param labelHash The Labelhash to convert
|
|
4547
|
-
* @returns A ByteArray containing the bytes
|
|
4548
|
-
* @throws Error if `labelHash` is not a valid 32-byte hex string
|
|
4549
|
-
*/
|
|
4550
|
-
declare function labelHashToBytes(labelHash: LabelHash): ByteArray;
|
|
4551
|
-
|
|
4552
|
-
/**
|
|
4553
|
-
* Builds a valid LabelSetId from a string.
|
|
4554
|
-
* @param maybeLabelSetId - The string to validate and convert to a LabelSetId.
|
|
4555
|
-
* @returns A valid LabelSetId.
|
|
4556
|
-
* @throws If the input string is not a valid LabelSetId.
|
|
4557
|
-
*/
|
|
4558
|
-
declare function buildLabelSetId(maybeLabelSetId: string): LabelSetId;
|
|
4559
|
-
/**
|
|
4560
|
-
* Builds a valid LabelSetVersion from a number or string.
|
|
4561
|
-
* @param maybeLabelSetVersion - The number or string to validate and convert to a LabelSetVersion.
|
|
4562
|
-
* @returns A valid LabelSetVersion.
|
|
4563
|
-
* @throws If the input is not a valid LabelSetVersion.
|
|
4564
|
-
*/
|
|
4565
|
-
declare function buildLabelSetVersion(maybeLabelSetVersion: number | string): LabelSetVersion;
|
|
4566
|
-
/**
|
|
4567
|
-
* Builds an EnsRainbowClientLabelSet.
|
|
4568
|
-
* @param labelSetId - The label set ID.
|
|
4569
|
-
* @param labelSetVersion - The label set version.
|
|
4570
|
-
* @returns A valid EnsRainbowClientLabelSet object.
|
|
4571
|
-
* @throws If `labelSetVersion` is defined without `labelSetId`.
|
|
4572
|
-
*/
|
|
4573
|
-
declare function buildEnsRainbowClientLabelSet(labelSetId?: LabelSetId, labelSetVersion?: LabelSetVersion): EnsRainbowClientLabelSet;
|
|
4574
|
-
/**
|
|
4575
|
-
* Validates that the server's label set is compatible with the client's requested label set.
|
|
4576
|
-
* @param serverSet - The label set provided by the server.
|
|
4577
|
-
* @param clientSet - The label set requested by the client.
|
|
4578
|
-
* @throws If the server set is not compatible with the client set.
|
|
4579
|
-
*/
|
|
4580
|
-
declare function validateSupportedLabelSetAndVersion(serverSet: EnsRainbowServerLabelSet, clientSet: EnsRainbowClientLabelSet): void;
|
|
4581
|
-
|
|
4582
|
-
/**
|
|
4583
|
-
* Parses a string into a non-negative integer.
|
|
4584
|
-
* @param input The string to parse
|
|
4585
|
-
* @returns The parsed non-negative integer
|
|
4586
|
-
* @throws Error if the input is not a valid non-negative integer
|
|
4587
|
-
*/
|
|
4588
|
-
declare function parseNonNegativeInteger(maybeNumber: string): number;
|
|
4589
|
-
|
|
4590
|
-
/**
|
|
4591
|
-
* Serializes a {@link ChainConfig} object.
|
|
4592
|
-
*/
|
|
4593
|
-
declare function serializeIndexedChainIds(indexedChainIds: Set<ChainId>): SerializedIndexedChainIds;
|
|
4594
|
-
/**
|
|
4595
|
-
* Serialize a {@link EnsIndexerPublicConfig} object.
|
|
4596
|
-
*/
|
|
4597
|
-
declare function serializeEnsIndexerPublicConfig(config: EnsIndexerPublicConfig): SerializedEnsIndexerPublicConfig;
|
|
4598
|
-
/**
|
|
4599
|
-
* Serialize a {@link EnsIndexerPublicConfig} object.
|
|
4600
|
-
*
|
|
4601
|
-
* @deprecated Use {@link serializeEnsIndexerPublicConfig} instead.
|
|
4602
|
-
*/
|
|
4603
|
-
declare const serializeENSIndexerPublicConfig: typeof serializeEnsIndexerPublicConfig;
|
|
4604
|
-
|
|
4605
|
-
/**
|
|
4606
|
-
* Validates an unvalidated representation of
|
|
4607
|
-
* {@link EnsIndexerPublicConfig} object.
|
|
4608
|
-
*
|
|
4609
|
-
* @throws Error if the provided object is not
|
|
4610
|
-
* a valid {@link EnsIndexerPublicConfig}.
|
|
4611
|
-
*/
|
|
4612
|
-
declare function validateEnsIndexerPublicConfig(unvalidatedConfig: Unvalidated<EnsIndexerPublicConfig>): EnsIndexerPublicConfig;
|
|
4613
|
-
|
|
4614
|
-
/**
|
|
4615
|
-
* Validates an unvalidated representation of
|
|
4616
|
-
* {@link EnsIndexerVersionInfo} object.
|
|
4617
|
-
*
|
|
4618
|
-
* @throws Error if the provided object is not
|
|
4619
|
-
* a valid {@link EnsIndexerVersionInfo}.
|
|
4620
|
-
*/
|
|
4621
|
-
declare function validateEnsIndexerVersionInfo(unvalidatedVersionInfo: Unvalidated<EnsIndexerVersionInfo>): EnsIndexerVersionInfo;
|
|
4622
|
-
|
|
4623
|
-
/**
|
|
4624
|
-
* ENSDb Client Query
|
|
4625
|
-
*
|
|
4626
|
-
* Includes methods for reading from ENSDb.
|
|
4627
|
-
*/
|
|
4628
|
-
interface EnsDbClientQuery {
|
|
4629
|
-
/**
|
|
4630
|
-
* Get ENSDb Version
|
|
4631
|
-
*
|
|
4632
|
-
* @returns the existing record, or `undefined`.
|
|
4633
|
-
*/
|
|
4634
|
-
getEnsDbVersion(): Promise<string | undefined>;
|
|
4635
|
-
/**
|
|
4636
|
-
* Get ENSIndexer Public Config
|
|
4637
|
-
*
|
|
4638
|
-
* @returns the existing record, or `undefined`.
|
|
4639
|
-
*/
|
|
4640
|
-
getEnsIndexerPublicConfig(): Promise<EnsIndexerPublicConfig | undefined>;
|
|
4641
|
-
/**
|
|
4642
|
-
* Get Indexing Status Snapshot
|
|
4643
|
-
*
|
|
4644
|
-
* @returns the existing record, or `undefined`.
|
|
4645
|
-
*/
|
|
4646
|
-
getIndexingStatusSnapshot(): Promise<CrossChainIndexingStatusSnapshot | undefined>;
|
|
4647
|
-
}
|
|
4648
|
-
/**
|
|
4649
|
-
* ENSDb Client Mutation
|
|
4650
|
-
*
|
|
4651
|
-
* Includes methods for writing into ENSDb.
|
|
4652
|
-
*/
|
|
4653
|
-
interface EnsDbClientMutation {
|
|
4654
|
-
/**
|
|
4655
|
-
* Upsert ENSDb Version
|
|
4656
|
-
*
|
|
4657
|
-
* @throws when upsert operation failed.
|
|
4658
|
-
*/
|
|
4659
|
-
upsertEnsDbVersion(ensDbVersion: string): Promise<void>;
|
|
4660
|
-
/**
|
|
4661
|
-
* Upsert ENSIndexer Public Config
|
|
4662
|
-
*
|
|
4663
|
-
* @throws when upsert operation failed.
|
|
4664
|
-
*/
|
|
4665
|
-
upsertEnsIndexerPublicConfig(ensIndexerPublicConfig: EnsIndexerPublicConfig): Promise<void>;
|
|
4666
|
-
/**
|
|
4667
|
-
* Upsert Indexing Status Snapshot
|
|
4668
|
-
*
|
|
4669
|
-
* @throws when upsert operation failed.
|
|
4670
|
-
*/
|
|
4671
|
-
upsertIndexingStatusSnapshot(indexingStatus: CrossChainIndexingStatusSnapshot): Promise<void>;
|
|
4672
|
-
}
|
|
4673
|
-
|
|
4674
|
-
/**
|
|
4675
|
-
* Keys used to distinguish records in `ensnode_metadata` table in the ENSDb.
|
|
4676
|
-
*/
|
|
4677
|
-
declare const EnsNodeMetadataKeys: {
|
|
4678
|
-
readonly EnsDbVersion: "ensdb_version";
|
|
4679
|
-
readonly EnsIndexerPublicConfig: "ensindexer_public_config";
|
|
4680
|
-
readonly EnsIndexerIndexingStatus: "ensindexer_indexing_status";
|
|
4681
|
-
};
|
|
4682
|
-
type EnsNodeMetadataKey = (typeof EnsNodeMetadataKeys)[keyof typeof EnsNodeMetadataKeys];
|
|
4683
|
-
interface EnsNodeMetadataEnsDbVersion {
|
|
4684
|
-
key: typeof EnsNodeMetadataKeys.EnsDbVersion;
|
|
4685
|
-
value: string;
|
|
4686
|
-
}
|
|
4687
|
-
interface EnsNodeMetadataEnsIndexerPublicConfig {
|
|
4688
|
-
key: typeof EnsNodeMetadataKeys.EnsIndexerPublicConfig;
|
|
4689
|
-
value: EnsIndexerPublicConfig;
|
|
4690
|
-
}
|
|
4691
|
-
interface EnsNodeMetadataEnsIndexerIndexingStatus {
|
|
4692
|
-
key: typeof EnsNodeMetadataKeys.EnsIndexerIndexingStatus;
|
|
4693
|
-
value: CrossChainIndexingStatusSnapshot;
|
|
4694
|
-
}
|
|
4695
|
-
/**
|
|
4696
|
-
* ENSNode Metadata
|
|
4697
|
-
*
|
|
4698
|
-
* Union type gathering all variants of ENSNode Metadata.
|
|
4699
|
-
*/
|
|
4700
|
-
type EnsNodeMetadata = EnsNodeMetadataEnsDbVersion | EnsNodeMetadataEnsIndexerPublicConfig | EnsNodeMetadataEnsIndexerIndexingStatus;
|
|
4701
|
-
|
|
4702
|
-
/**
|
|
4703
|
-
* Serialized representation of {@link EnsNodeMetadataEnsDbVersion}.
|
|
4704
|
-
*/
|
|
4705
|
-
type SerializedEnsNodeMetadataEnsDbVersion = EnsNodeMetadataEnsDbVersion;
|
|
4706
|
-
/**
|
|
4707
|
-
* Serialized representation of {@link EnsNodeMetadataEnsIndexerPublicConfig}.
|
|
4708
|
-
*/
|
|
4709
|
-
interface SerializedEnsNodeMetadataEnsIndexerPublicConfig {
|
|
4710
|
-
key: typeof EnsNodeMetadataKeys.EnsIndexerPublicConfig;
|
|
4711
|
-
value: SerializedEnsIndexerPublicConfig;
|
|
4712
|
-
}
|
|
4713
|
-
/**
|
|
4714
|
-
* Serialized representation of {@link EnsNodeMetadataEnsIndexerIndexingStatus}.
|
|
4715
|
-
*/
|
|
4716
|
-
interface SerializedEnsNodeMetadataEnsIndexerIndexingStatus {
|
|
4717
|
-
key: typeof EnsNodeMetadataKeys.EnsIndexerIndexingStatus;
|
|
4718
|
-
value: SerializedCrossChainIndexingStatusSnapshot;
|
|
4719
|
-
}
|
|
4720
|
-
/**
|
|
4721
|
-
* Serialized representation of {@link EnsNodeMetadata}
|
|
4722
|
-
*/
|
|
4723
|
-
type SerializedEnsNodeMetadata = SerializedEnsNodeMetadataEnsDbVersion | SerializedEnsNodeMetadataEnsIndexerPublicConfig | SerializedEnsNodeMetadataEnsIndexerIndexingStatus;
|
|
4724
|
-
|
|
4725
4537
|
/**
|
|
4726
4538
|
* ENSIndexer Public Config Response
|
|
4727
4539
|
*/
|
|
@@ -4853,6 +4665,120 @@ declare class EnsIndexerClient {
|
|
|
4853
4665
|
indexingStatus(): Promise<EnsIndexerIndexingStatusResponse>;
|
|
4854
4666
|
}
|
|
4855
4667
|
|
|
4668
|
+
type EnsIndexerPublicConfigCompatibilityCheck = Omit<EnsIndexerPublicConfig, "databaseSchemaName" | "ensRainbowPublicConfig" | "versionInfo">;
|
|
4669
|
+
/**
|
|
4670
|
+
* Validate if `configB` is compatible with `configA`, such that `configA` equals to `configB`.
|
|
4671
|
+
*
|
|
4672
|
+
* @throws error if configs are incompatible.
|
|
4673
|
+
*/
|
|
4674
|
+
declare function validateEnsIndexerPublicConfigCompatibility(configA: EnsIndexerPublicConfigCompatibilityCheck, configB: EnsIndexerPublicConfigCompatibilityCheck): void;
|
|
4675
|
+
|
|
4676
|
+
/**
|
|
4677
|
+
* Builds an unvalidated {@link EnsIndexerPublicConfig} object to be
|
|
4678
|
+
* validated with {@link makeEnsIndexerPublicConfigSchema}.
|
|
4679
|
+
*
|
|
4680
|
+
* @param serializedPublicConfig - The serialized public config to build from.
|
|
4681
|
+
* @return An unvalidated {@link EnsIndexerPublicConfig} object.
|
|
4682
|
+
*/
|
|
4683
|
+
declare function buildUnvalidatedEnsIndexerPublicConfig(serializedPublicConfig: SerializedEnsIndexerPublicConfig): Unvalidated<EnsIndexerPublicConfig>;
|
|
4684
|
+
/**
|
|
4685
|
+
* Deserialize value into {@link EnsIndexerPublicConfig} object.
|
|
4686
|
+
*/
|
|
4687
|
+
declare function deserializeEnsIndexerPublicConfig(maybePublicConfig: Unvalidated<SerializedEnsIndexerPublicConfig>, valueLabel?: string): EnsIndexerPublicConfig;
|
|
4688
|
+
/**
|
|
4689
|
+
* Deserialize object into a {@link EnsIndexerPublicConfig} object.
|
|
4690
|
+
*
|
|
4691
|
+
* @deprecated Use {@link deserializeEnsIndexerPublicConfig} instead.
|
|
4692
|
+
*/
|
|
4693
|
+
declare const deserializeENSIndexerPublicConfig: typeof deserializeEnsIndexerPublicConfig;
|
|
4694
|
+
|
|
4695
|
+
/**
|
|
4696
|
+
* Determines if the provided `config` results in indexing behavior compatible with the legacy ENS
|
|
4697
|
+
* Subgraph.
|
|
4698
|
+
*
|
|
4699
|
+
* @see https://ensnode.io/docs/concepts/what-is-the-ens-subgraph/
|
|
4700
|
+
*/
|
|
4701
|
+
declare function isSubgraphCompatible(config: Pick<EnsIndexerPublicConfig, "namespace" | "plugins" | "labelSet">): boolean;
|
|
4702
|
+
|
|
4703
|
+
/**
|
|
4704
|
+
* Converts a Labelhash to bytes, with validation
|
|
4705
|
+
* @param labelHash The Labelhash to convert
|
|
4706
|
+
* @returns A ByteArray containing the bytes
|
|
4707
|
+
* @throws Error if `labelHash` is not a valid 32-byte hex string
|
|
4708
|
+
*/
|
|
4709
|
+
declare function labelHashToBytes(labelHash: LabelHash): ByteArray;
|
|
4710
|
+
|
|
4711
|
+
/**
|
|
4712
|
+
* Builds a valid LabelSetId from a string.
|
|
4713
|
+
* @param maybeLabelSetId - The string to validate and convert to a LabelSetId.
|
|
4714
|
+
* @returns A valid LabelSetId.
|
|
4715
|
+
* @throws If the input string is not a valid LabelSetId.
|
|
4716
|
+
*/
|
|
4717
|
+
declare function buildLabelSetId(maybeLabelSetId: string): LabelSetId;
|
|
4718
|
+
/**
|
|
4719
|
+
* Builds a valid LabelSetVersion from a number or string.
|
|
4720
|
+
* @param maybeLabelSetVersion - The number or string to validate and convert to a LabelSetVersion.
|
|
4721
|
+
* @returns A valid LabelSetVersion.
|
|
4722
|
+
* @throws If the input is not a valid LabelSetVersion.
|
|
4723
|
+
*/
|
|
4724
|
+
declare function buildLabelSetVersion(maybeLabelSetVersion: number | string): LabelSetVersion;
|
|
4725
|
+
/**
|
|
4726
|
+
* Builds an EnsRainbowClientLabelSet.
|
|
4727
|
+
* @param labelSetId - The label set ID.
|
|
4728
|
+
* @param labelSetVersion - The label set version.
|
|
4729
|
+
* @returns A valid EnsRainbowClientLabelSet object.
|
|
4730
|
+
* @throws If `labelSetVersion` is defined without `labelSetId`.
|
|
4731
|
+
*/
|
|
4732
|
+
declare function buildEnsRainbowClientLabelSet(labelSetId?: LabelSetId, labelSetVersion?: LabelSetVersion): EnsRainbowClientLabelSet;
|
|
4733
|
+
/**
|
|
4734
|
+
* Validates that the server's label set is compatible with the client's requested label set.
|
|
4735
|
+
* @param serverSet - The label set provided by the server.
|
|
4736
|
+
* @param clientSet - The label set requested by the client.
|
|
4737
|
+
* @throws If the server set is not compatible with the client set.
|
|
4738
|
+
*/
|
|
4739
|
+
declare function validateSupportedLabelSetAndVersion(serverSet: EnsRainbowServerLabelSet, clientSet: EnsRainbowClientLabelSet): void;
|
|
4740
|
+
|
|
4741
|
+
/**
|
|
4742
|
+
* Parses a string into a non-negative integer.
|
|
4743
|
+
* @param input The string to parse
|
|
4744
|
+
* @returns The parsed non-negative integer
|
|
4745
|
+
* @throws Error if the input is not a valid non-negative integer
|
|
4746
|
+
*/
|
|
4747
|
+
declare function parseNonNegativeInteger(maybeNumber: string): number;
|
|
4748
|
+
|
|
4749
|
+
/**
|
|
4750
|
+
* Serializes a {@link ChainConfig} object.
|
|
4751
|
+
*/
|
|
4752
|
+
declare function serializeIndexedChainIds(indexedChainIds: Set<ChainId>): SerializedIndexedChainIds;
|
|
4753
|
+
/**
|
|
4754
|
+
* Serialize a {@link EnsIndexerPublicConfig} object.
|
|
4755
|
+
*/
|
|
4756
|
+
declare function serializeEnsIndexerPublicConfig(config: EnsIndexerPublicConfig): SerializedEnsIndexerPublicConfig;
|
|
4757
|
+
/**
|
|
4758
|
+
* Serialize a {@link EnsIndexerPublicConfig} object.
|
|
4759
|
+
*
|
|
4760
|
+
* @deprecated Use {@link serializeEnsIndexerPublicConfig} instead.
|
|
4761
|
+
*/
|
|
4762
|
+
declare const serializeENSIndexerPublicConfig: typeof serializeEnsIndexerPublicConfig;
|
|
4763
|
+
|
|
4764
|
+
/**
|
|
4765
|
+
* Validates an unvalidated representation of
|
|
4766
|
+
* {@link EnsIndexerPublicConfig} object.
|
|
4767
|
+
*
|
|
4768
|
+
* @throws Error if the provided object is not
|
|
4769
|
+
* a valid {@link EnsIndexerPublicConfig}.
|
|
4770
|
+
*/
|
|
4771
|
+
declare function validateEnsIndexerPublicConfig(unvalidatedConfig: Unvalidated<EnsIndexerPublicConfig>): EnsIndexerPublicConfig;
|
|
4772
|
+
|
|
4773
|
+
/**
|
|
4774
|
+
* Validates an unvalidated representation of
|
|
4775
|
+
* {@link EnsIndexerVersionInfo} object.
|
|
4776
|
+
*
|
|
4777
|
+
* @throws Error if the provided object is not
|
|
4778
|
+
* a valid {@link EnsIndexerVersionInfo}.
|
|
4779
|
+
*/
|
|
4780
|
+
declare function validateEnsIndexerVersionInfo(unvalidatedVersionInfo: Unvalidated<EnsIndexerVersionInfo>): EnsIndexerVersionInfo;
|
|
4781
|
+
|
|
4856
4782
|
/**
|
|
4857
4783
|
* Check if provided EnsIndexerPublicConfig supports the ENSNode GraphQL API.
|
|
4858
4784
|
*/
|
|
@@ -5233,13 +5159,11 @@ declare class TtlCache<KeyType extends string, ValueType> implements Cache<KeyTy
|
|
|
5233
5159
|
declare const uniq: <T>(arr: T[]) => T[];
|
|
5234
5160
|
|
|
5235
5161
|
/**
|
|
5236
|
-
* Build a map of indexed blockranges for each indexed chain,
|
|
5237
|
-
* based on the ENSIndexer configuration.
|
|
5162
|
+
* Build a map of indexed blockranges for each indexed chain, based on the ENSIndexer configuration.
|
|
5238
5163
|
*
|
|
5239
|
-
* Useful for presenting a clear view of the indexed blockranges
|
|
5240
|
-
* across chains.
|
|
5164
|
+
* Useful for presenting a clear view of the indexed blockranges across chains.
|
|
5241
5165
|
*/
|
|
5242
|
-
declare function buildIndexedBlockranges(namespace: ENSNamespaceId,
|
|
5166
|
+
declare function buildIndexedBlockranges(namespace: ENSNamespaceId, pluginsDatasourceNames: Map<PluginName, DatasourceName[]>): Map<ChainId, BlockNumberRangeWithStartBlock>;
|
|
5243
5167
|
|
|
5244
5168
|
/**
|
|
5245
5169
|
* Gets the AccountId for the contract in the specified namespace, datasource, and
|
|
@@ -5565,16 +5489,36 @@ declare const getENSv1Registry: (namespace: ENSNamespaceId) => AccountId;
|
|
|
5565
5489
|
declare const isENSv1Registry: (namespace: ENSNamespaceId, contract: AccountId) => boolean;
|
|
5566
5490
|
/**
|
|
5567
5491
|
* Gets the AccountId representing the ENSv2 Root Registry in the selected `namespace`.
|
|
5492
|
+
*
|
|
5493
|
+
* @throws if the ENSv2Root Datasource or the RootRegistry contract are not defined
|
|
5568
5494
|
*/
|
|
5569
5495
|
declare const getENSv2RootRegistry: (namespace: ENSNamespaceId) => AccountId;
|
|
5570
5496
|
/**
|
|
5571
5497
|
* Gets the RegistryId representing the ENSv2 Root Registry in the selected `namespace`.
|
|
5498
|
+
*
|
|
5499
|
+
* @throws if the ENSv2Root Datasource or the RootRegistry contract are not defined
|
|
5572
5500
|
*/
|
|
5573
5501
|
declare const getENSv2RootRegistryId: (namespace: ENSNamespaceId) => RegistryId;
|
|
5574
5502
|
/**
|
|
5575
5503
|
* Determines whether `contract` is the ENSv2 Root Registry in `namespace`.
|
|
5504
|
+
*
|
|
5505
|
+
* @throws if the ENSv2Root Datasource or the RootRegistry contract are not defined
|
|
5576
5506
|
*/
|
|
5577
5507
|
declare const isENSv2RootRegistry: (namespace: ENSNamespaceId, contract: AccountId) => boolean;
|
|
5508
|
+
/**
|
|
5509
|
+
* Gets the AccountId representing the ENSv2 Root Registry in the selected `namespace` if defined,
|
|
5510
|
+
* otherwise `undefined`.
|
|
5511
|
+
*
|
|
5512
|
+
* TODO: remove this function and its usage after all namespaces define ENSv2Root
|
|
5513
|
+
*/
|
|
5514
|
+
declare const maybeGetENSv2RootRegistry: (namespace: ENSNamespaceId) => AccountId | undefined;
|
|
5515
|
+
/**
|
|
5516
|
+
* Gets the RegistryId representing the ENSv2 Root Registry in the selected `namespace` if defined,
|
|
5517
|
+
* otherwise `undefined`.
|
|
5518
|
+
*
|
|
5519
|
+
* TODO: remove this function and its usage after all namespaces define ENSv2Root
|
|
5520
|
+
*/
|
|
5521
|
+
declare const maybeGetENSv2RootRegistryId: (namespace: ENSNamespaceId) => RegistryId | undefined;
|
|
5578
5522
|
|
|
5579
5523
|
/**
|
|
5580
5524
|
* Serializes a {@link ChainId} value into its string representation.
|
|
@@ -5629,4 +5573,4 @@ declare function isWebSocketProtocol(url: URL): boolean;
|
|
|
5629
5573
|
*/
|
|
5630
5574
|
declare function hasSubgraphApiConfigSupport(config: EnsIndexerPublicConfig): PrerequisiteResult;
|
|
5631
5575
|
|
|
5632
|
-
export { ADDR_REVERSE_NODE, ATTR_PROTOCOL_NAME, ATTR_PROTOCOL_STEP, ATTR_PROTOCOL_STEP_RESULT, type AcceleratableRequest, type AcceleratableResponse, type AccountId, type AccountIdString, type AssetId, type AssetIdString, type AssetNamespace, AssetNamespaces, BASENAMES_NODE, type BlockNumber, type BlockNumberRange, type BlockNumberRangeBounded, type BlockNumberRangeLeftBounded, type BlockNumberRangeRightBounded, type BlockNumberRangeUnbounded, type BlockNumberRangeWithStartBlock, type BlockRef, type BlockRefRange, type BlockRefRangeBounded, type BlockRefRangeLeftBounded, type BlockRefRangeRightBounded, type BlockRefRangeUnbounded, type BlockRefRangeWithStartBlock, type Cache, type CachedResult, type CanonicalId, type CanonicalPath, type ChainId, type ChainIdString, type ChainIndexingStatusId, ChainIndexingStatusIds, type ChainIndexingStatusSnapshot, type ChainIndexingStatusSnapshotBackfill, type ChainIndexingStatusSnapshotCompleted, type ChainIndexingStatusSnapshotFollowing, type ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill, type ChainIndexingStatusSnapshotQueued, ClientError, type ClientOptions, type ConfigResponse, type CrossChainIndexingStatusSnapshot, type CrossChainIndexingStatusSnapshotOmnichain, type CrossChainIndexingStrategyId, CrossChainIndexingStrategyIds, type CurrencyAmount, type CurrencyId, CurrencyIds, type CurrencyInfo, DEFAULT_ENSNODE_API_URL_MAINNET, DEFAULT_ENSNODE_API_URL_SEPOLIA, DEFAULT_EVM_CHAIN_ID, DEFAULT_EVM_COIN_TYPE, type DNSEncodedLiteralName, type DNSEncodedName, type DNSEncodedPartiallyInterpretedName, type Datetime, type DatetimeISO8601, type DeepPartial, type DefaultableChainId, type DomainAssetId, type DomainId, type Duration, ENCODED_REFERRER_BYTE_LENGTH, ENCODED_REFERRER_BYTE_OFFSET, type ENSApiPublicConfig, type ENSIndexerPublicConfig, type ENSIndexerVersionInfo, ENSNodeClient, ENS_ROOT, type ENSv1DomainId, type ENSv2DomainId, ETH_COIN_TYPE, ETH_NODE, EXPECTED_ENCODED_REFERRER_PADDING, type EncodedLabelHash, type EncodedReferrer, EnsApiClient, type EnsApiClientOptions, type EnsApiConfigResponse, type EnsApiIndexingStatusRequest, type EnsApiIndexingStatusResponse, type EnsApiIndexingStatusResponseCode, EnsApiIndexingStatusResponseCodes, type EnsApiIndexingStatusResponseError, type EnsApiIndexingStatusResponseOk, type EnsApiPublicConfig, type EnsDbClientMutation, type EnsDbClientQuery, EnsIndexerClient, type EnsIndexerClientOptions, type EnsIndexerConfigResponse, type EnsIndexerIndexingStatusRequest, type EnsIndexerIndexingStatusResponse, type EnsIndexerIndexingStatusResponseCode, EnsIndexerIndexingStatusResponseCodes, type EnsIndexerIndexingStatusResponseError, type EnsIndexerIndexingStatusResponseOk, type EnsIndexerPublicConfig, type EnsIndexerPublicConfigCompatibilityCheck, type EnsIndexerVersionInfo, type EnsNodeMetadata, type EnsNodeMetadataEnsDbVersion, type EnsNodeMetadataEnsIndexerIndexingStatus, type EnsNodeMetadataEnsIndexerPublicConfig, type EnsNodeMetadataKey, EnsNodeMetadataKeys, type EnsRainbowClientLabelSet, type EnsRainbowPublicConfig, type EnsRainbowServerLabelSet, type ErrorResponse, type ForwardResolutionArgs, ForwardResolutionProtocolStep, type ForwardResolutionResult, type Identity, type IndexingStatusRequest, type IndexingStatusResponse, type IndexingStatusResponseCode, IndexingStatusResponseCodes, type IndexingStatusResponseError, type IndexingStatusResponseOk, type InterpretedLabel, type InterpretedName, LINEANAMES_NODE, type Label, type LabelHash, type LabelHashPath, type LabelSetId, type LabelSetVersion, type LiteralLabel, type LiteralName, LruCache, type MultichainPrimaryNameResolutionArgs, type MultichainPrimaryNameResolutionResult, type NFTMintStatus, NFTMintStatuses, type NFTTransferEventMetadata, type NFTTransferType, NFTTransferTypes, NODE_ANY, type Name, type NameToken, type NameTokenOwnership, type NameTokenOwnershipBurned, type NameTokenOwnershipFullyOnchain, type NameTokenOwnershipNameWrapper, type NameTokenOwnershipType, NameTokenOwnershipTypes, type NameTokenOwnershipUnknown, type NameTokensRequest, type NameTokensResponse, type NameTokensResponseCode, NameTokensResponseCodes, type NameTokensResponseError, type NameTokensResponseErrorCode, NameTokensResponseErrorCodes, type NameTokensResponseErrorEnsIndexerConfigUnsupported, type NameTokensResponseErrorIndexingStatusUnsupported, type NameTokensResponseErrorNameTokensNotIndexed, type NameTokensResponseOk, type NamedIdentity, type NamedRegistrarAction, type NamespaceSpecificValue, type Node, type NormalizedName, type OmnichainIndexingStatusId, OmnichainIndexingStatusIds, type OmnichainIndexingStatusSnapshot, type OmnichainIndexingStatusSnapshotBackfill, type OmnichainIndexingStatusSnapshotCompleted, type OmnichainIndexingStatusSnapshotFollowing, type OmnichainIndexingStatusSnapshotUnstarted, PROTOCOL_ATTRIBUTE_PREFIX, type PermissionsId, type PermissionsResourceId, type PermissionsUserId, PluginName, type PrerequisiteResult, type Price, type PriceDai, type PriceEth, type PriceUsdc, RECORDS_PER_PAGE_DEFAULT, RECORDS_PER_PAGE_MAX, ROOT_NODE, ROOT_RESOURCE, type RangeType, RangeTypeIds, type RealtimeIndexingStatusProjection, type RegisteredNameTokens, type RegistrarAction, type RegistrarActionEventId, type RegistrarActionPricing, type RegistrarActionPricingAvailable, type RegistrarActionPricingUnknown, type RegistrarActionReferral, type RegistrarActionReferralAvailable, type RegistrarActionReferralNotApplicable, type RegistrarActionType, RegistrarActionTypes, type RegistrarActionsFilter, type RegistrarActionsFilterBeginTimestamp, type RegistrarActionsFilterByDecodedReferrer, type RegistrarActionsFilterBySubregistryNode, type RegistrarActionsFilterEndTimestamp, type RegistrarActionsFilterType, RegistrarActionsFilterTypes, type RegistrarActionsFilterWithEncodedReferral, type RegistrarActionsOrder, RegistrarActionsOrders, type RegistrarActionsRequest, type RegistrarActionsResponse, type RegistrarActionsResponseCode, RegistrarActionsResponseCodes, type RegistrarActionsResponseError, type RegistrarActionsResponseOk, type RegistrationExpiryInfo, type RegistrationId, type RegistrationLifecycle, type RegistrationLifecycleStage, type RegistryId, type RenewalId, type RequestPageParams, type RequiredAndNotNull, type ResolutionStatusId, ResolutionStatusIds, type ResolvePrimaryNameRequest, type ResolvePrimaryNameResponse, type ResolvePrimaryNamesRequest, type ResolvePrimaryNamesResponse, type ResolveRecordsRequest, type ResolveRecordsResponse, type ResolvedIdentity, type ResolverId, type ResolverRecordsId, type ResolverRecordsResponse, type ResolverRecordsResponseBase, type ResolverRecordsSelection, type ResponsePageContext, type ResponsePageContextWithNoRecords, type ResponsePageContextWithRecords, type ReverseResolutionArgs, ReverseResolutionProtocolStep, type ReverseResolutionResult, type RpcUrl, SWRCache, type SWRCacheOptions, type SerializedAssetId, type SerializedChainIndexingStatusSnapshot, type SerializedChainIndexingStatusSnapshotBackfill, type SerializedChainIndexingStatusSnapshotCompleted, type SerializedChainIndexingStatusSnapshotFollowing, type SerializedChainIndexingStatusSnapshotQueued, type SerializedConfigResponse, type SerializedCrossChainIndexingStatusSnapshot, type SerializedCrossChainIndexingStatusSnapshotOmnichain, type SerializedCurrencyAmount, type SerializedCurrentIndexingProjectionOmnichain, type SerializedDomainAssetId, type SerializedENSApiPublicConfig, type SerializedENSIndexerPublicConfig, type SerializedENSIndexerVersionInfo, type SerializedEnsApiConfigResponse, type SerializedEnsApiIndexingStatusResponse, type SerializedEnsApiIndexingStatusResponseError, type SerializedEnsApiIndexingStatusResponseOk, type SerializedEnsApiPublicConfig, type SerializedEnsIndexerConfigResponse, type SerializedEnsIndexerIndexingStatusResponse, type SerializedEnsIndexerIndexingStatusResponseError, type SerializedEnsIndexerIndexingStatusResponseOk, type SerializedEnsIndexerPublicConfig, type SerializedEnsIndexerVersionInfo, type SerializedEnsNodeMetadata, type SerializedEnsNodeMetadataEnsDbVersion, type SerializedEnsNodeMetadataEnsIndexerIndexingStatus, type SerializedEnsNodeMetadataEnsIndexerPublicConfig, type SerializedIndexedChainIds, type SerializedIndexingStatusResponse, type SerializedIndexingStatusResponseError, type SerializedIndexingStatusResponseOk, type SerializedNameToken, type SerializedNameTokensResponse, type SerializedNameTokensResponseError, type SerializedNameTokensResponseOk, type SerializedNamedRegistrarAction, type SerializedOmnichainIndexingStatusSnapshot, type SerializedOmnichainIndexingStatusSnapshotBackfill, type SerializedOmnichainIndexingStatusSnapshotCompleted, type SerializedOmnichainIndexingStatusSnapshotFollowing, type SerializedOmnichainIndexingStatusSnapshotUnstarted, type SerializedPrice, type SerializedPriceDai, type SerializedPriceEth, type SerializedPriceUsdc, type SerializedRealtimeIndexingStatusProjection, type SerializedRegisteredNameTokens, type SerializedRegistrarAction, type SerializedRegistrarActionPricing, type SerializedRegistrarActionPricingAvailable, type SerializedRegistrarActionPricingUnknown, type SerializedRegistrarActionsResponse, type SerializedRegistrarActionsResponseError, type SerializedRegistrarActionsResponseOk, type SerializedTokenId, type SubgraphInterpretedLabel, type SubgraphInterpretedName, type Subregistry, type TheGraphCannotFallbackReason, TheGraphCannotFallbackReasonSchema, type TheGraphFallback, TheGraphFallbackSchema, type TokenId, TraceableENSProtocol, type TraceableRequest, type TraceableResponse, type TracingNode, type TracingSpan, type TracingTrace, TtlCache, type UnixTimestamp, type UnknownIdentity, type UnnamedIdentity, type UnresolvedIdentity, type Unvalidated, type UrlString, ZERO_ENCODED_REFERRER, accountIdEqual, addDuration, addPrices, addrReverseLabel, asLowerCaseAddress, beautifyName, bigIntToNumber, bigintToCoinType, buildAssetId, buildBlockNumberRange, buildBlockRefRange, buildCrossChainIndexingStatusSnapshotOmnichain, buildEncodedReferrer, buildEnsRainbowClientLabelSet, buildIndexedBlockranges, buildLabelSetId, buildLabelSetVersion, buildOmnichainIndexingStatusSnapshot, buildPageContext, buildUnresolvedIdentity, buildUnvalidatedCrossChainIndexingStatusSnapshot, buildUnvalidatedEnsIndexerPublicConfig, buildUnvalidatedOmnichainIndexingStatusSnapshot, buildUnvalidatedRealtimeIndexingStatusProjection, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotCompleted, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotFollowing, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotUnstarted, coinTypeReverseLabel, coinTypeToEvmChainId, constructSubInterpretedName, createRealtimeIndexingStatusProjection, decodeDNSEncodedLiteralName, decodeDNSEncodedName, decodeEncodedReferrer, deserializeAssetId, deserializeBlockNumber, deserializeBlockRef, deserializeChainId, deserializeChainIndexingStatusSnapshot, deserializeConfigResponse, deserializeCrossChainIndexingStatusSnapshot, deserializeDatetime, deserializeDuration, deserializeENSApiPublicConfig, deserializeENSIndexerPublicConfig, deserializeEnsApiConfigResponse, deserializeEnsApiIndexingStatusResponse, deserializeEnsApiPublicConfig, deserializeEnsIndexerConfigResponse, deserializeEnsIndexerIndexingStatusResponse, deserializeEnsIndexerPublicConfig, deserializeErrorResponse, deserializeIndexingStatusResponse, deserializeOmnichainIndexingStatusSnapshot, deserializePriceDai, deserializePriceEth, deserializePriceUsdc, deserializeRealtimeIndexingStatusProjection, deserializeRegistrarActionsResponse, deserializeUnixTimestamp, deserializeUrl, deserializedNameTokensResponse, durationBetween, encodeLabelHash, encodedLabelToLabelhash, ensureInterpretedLabel, evmChainIdToCoinType, formatAccountId, formatAssetId, formatNFTTransferEventMetadata, getBasenamesSubregistryId, getBasenamesSubregistryManagedName, getCanonicalId, getCurrencyInfo, getDatasourceContract, getDefaultEnsNodeUrl, getENSv1Registry, getENSv2RootRegistry, getENSv2RootRegistryId, getEthnamesSubregistryId, getEthnamesSubregistryManagedName, getLatestIndexedBlockRef, getLineanamesSubregistryId, getLineanamesSubregistryManagedName, getNFTTransferType, getNameHierarchy, getNameTokenOwnership, getNameWrapperAccounts, getNamespaceSpecificValue, getOmnichainIndexingCursor, getOmnichainIndexingStatus, getParentNameFQDN, getResolvePrimaryNameChainIdParam, getTimestampForHighestOmnichainKnownBlock, getTimestampForLowestOmnichainStartBlock, hasGraphqlApiConfigSupport, hasNullByte, hasRegistrarActionsConfigSupport, hasRegistrarActionsIndexingStatusSupport, hasSubgraphApiConfigSupport, interpretAddress, interpretAddressRecordValue, interpretNameRecordValue, interpretTextRecordKey, interpretTextRecordValue, interpretTokenIdAsLabelHash, interpretTokenIdAsNode, interpretedLabelsToInterpretedName, interpretedLabelsToLabelHashPath, interpretedNameToInterpretedLabels, isENSv1Registry, isENSv2RootRegistry, isEncodedLabelHash, isHttpProtocol, isInterpetedLabel, isInterpretedName, isLabelHash, isNormalizedLabel, isNormalizedName, isPccFuseSet, isPriceCurrencyEqual, isPriceEqual, isRegistrarActionPricingAvailable, isRegistrarActionReferralAvailable, isRegistrationExpired, isRegistrationFullyExpired, isRegistrationInGracePeriod, isResolvedIdentity, isSelectionEmpty, isSubgraphCompatible, isWebSocketProtocol, labelHashToBytes, labelhashLiteralLabel, literalLabelToInterpretedLabel, literalLabelsToInterpretedName, literalLabelsToLiteralName, makeContractMatcher, makeENSApiPublicConfigSchema, makeENSv1DomainId, makeENSv2DomainId, makeEnsApiPublicConfigSchema, makePermissionsId, makePermissionsResourceId, makePermissionsUserId, makeRegistrationId, makeRegistryId, makeRenewalId, makeResolverId, makeResolverRecordsId, makeSerializedEnsApiPublicConfigSchema, makeSubdomainNode, maybeGetDatasourceContract, mergeBlockNumberRanges, nameTokensPrerequisites, parseAccountId, parseAssetId, parseDai, parseEncodedLabelHash, parseEth, parseLabelHash, parseLabelHashOrEncodedLabelHash, parseNonNegativeInteger, parsePartialInterpretedName, parseReverseName, parseTimestamp, parseUsdc, priceDai, priceEth, priceUsdc, registrarActionsFilter, reverseName, scaleBigintByNumber, scalePrice, serializeAssetId, serializeChainId, serializeChainIndexingSnapshots, serializeConfigResponse, serializeCrossChainIndexingStatusSnapshot, serializeCrossChainIndexingStatusSnapshotOmnichain, serializeDatetime, serializeDomainAssetId, serializeENSApiPublicConfig, serializeENSIndexerPublicConfig, serializeEnsApiConfigResponse, serializeEnsApiIndexingStatusResponse, serializeEnsApiPublicConfig, serializeEnsIndexerConfigResponse, serializeEnsIndexerIndexingStatusResponse, serializeEnsIndexerPublicConfig, serializeIndexedChainIds, serializeIndexingStatusResponse, serializeNameToken, serializeNameTokensResponse, serializeNamedRegistrarAction, serializeOmnichainIndexingStatusSnapshot, serializePrice, serializePriceDai, serializePriceEth, serializePriceUsdc, serializeRealtimeIndexingStatusProjection, serializeRegisteredNameTokens, serializeRegistrarAction, serializeRegistrarActionPricing, serializeRegistrarActionsResponse, serializeUrl, sortChainStatusesByStartBlockAsc, stripNullBytes, translateDefaultableChainIdToChainId, uint256ToHex32, uniq, validateChainIndexingStatusSnapshot, validateCrossChainIndexingStatusSnapshot, validateEnsIndexerPublicConfig, validateEnsIndexerPublicConfigCompatibility, validateEnsIndexerVersionInfo, validateOmnichainIndexingStatusSnapshot, validateRealtimeIndexingStatusProjection, validateSupportedLabelSetAndVersion };
|
|
5576
|
+
export { ADDR_REVERSE_NODE, ATTR_PROTOCOL_NAME, ATTR_PROTOCOL_STEP, ATTR_PROTOCOL_STEP_RESULT, type AcceleratableRequest, type AcceleratableResponse, type AccountId, type AccountIdString, type AssetId, type AssetIdString, type AssetNamespace, AssetNamespaces, BASENAMES_NODE, type BlockNumber, type BlockNumberRange, type BlockNumberRangeBounded, type BlockNumberRangeLeftBounded, type BlockNumberRangeRightBounded, type BlockNumberRangeUnbounded, type BlockNumberRangeWithStartBlock, type BlockRef, type BlockRefRange, type BlockRefRangeBounded, type BlockRefRangeLeftBounded, type BlockRefRangeRightBounded, type BlockRefRangeUnbounded, type BlockRefRangeWithStartBlock, type Cache, type CachedResult, type CanonicalId, type CanonicalPath, type ChainId, type ChainIdString, type ChainIndexingStatusId, ChainIndexingStatusIds, type ChainIndexingStatusSnapshot, type ChainIndexingStatusSnapshotBackfill, type ChainIndexingStatusSnapshotCompleted, type ChainIndexingStatusSnapshotFollowing, type ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill, type ChainIndexingStatusSnapshotQueued, ClientError, type ClientOptions, type ConfigResponse, type CrossChainIndexingStatusSnapshot, type CrossChainIndexingStatusSnapshotOmnichain, type CrossChainIndexingStrategyId, CrossChainIndexingStrategyIds, type CurrencyAmount, type CurrencyId, CurrencyIds, type CurrencyInfo, DEFAULT_ENSNODE_API_URL_MAINNET, DEFAULT_ENSNODE_API_URL_SEPOLIA, DEFAULT_EVM_CHAIN_ID, DEFAULT_EVM_COIN_TYPE, type DNSEncodedLiteralName, type DNSEncodedName, type DNSEncodedPartiallyInterpretedName, type Datetime, type DatetimeISO8601, type DeepPartial, type DefaultableChainId, type DomainAssetId, type DomainId, type Duration, ENCODED_REFERRER_BYTE_LENGTH, ENCODED_REFERRER_BYTE_OFFSET, type ENSApiPublicConfig, type ENSIndexerPublicConfig, type ENSIndexerVersionInfo, ENSNodeClient, ENS_ROOT, type ENSv1DomainId, type ENSv2DomainId, ETH_COIN_TYPE, ETH_NODE, EXPECTED_ENCODED_REFERRER_PADDING, type EncodedLabelHash, type EncodedReferrer, EnsApiClient, type EnsApiClientOptions, type EnsApiConfigResponse, type EnsApiIndexingStatusRequest, type EnsApiIndexingStatusResponse, type EnsApiIndexingStatusResponseCode, EnsApiIndexingStatusResponseCodes, type EnsApiIndexingStatusResponseError, type EnsApiIndexingStatusResponseOk, type EnsApiPublicConfig, EnsIndexerClient, type EnsIndexerClientOptions, type EnsIndexerConfigResponse, type EnsIndexerIndexingStatusRequest, type EnsIndexerIndexingStatusResponse, type EnsIndexerIndexingStatusResponseCode, EnsIndexerIndexingStatusResponseCodes, type EnsIndexerIndexingStatusResponseError, type EnsIndexerIndexingStatusResponseOk, type EnsIndexerPublicConfig, type EnsIndexerPublicConfigCompatibilityCheck, type EnsIndexerVersionInfo, type EnsRainbowClientLabelSet, type EnsRainbowPublicConfig, type EnsRainbowServerLabelSet, type ErrorResponse, type ForwardResolutionArgs, ForwardResolutionProtocolStep, type ForwardResolutionResult, type Identity, type IndexingStatusRequest, type IndexingStatusResponse, type IndexingStatusResponseCode, IndexingStatusResponseCodes, type IndexingStatusResponseError, type IndexingStatusResponseOk, type InterpretedLabel, type InterpretedName, LINEANAMES_NODE, type Label, type LabelHash, type LabelHashPath, type LabelSetId, type LabelSetVersion, type LiteralLabel, type LiteralName, LruCache, type MultichainPrimaryNameResolutionArgs, type MultichainPrimaryNameResolutionResult, type NFTMintStatus, NFTMintStatuses, type NFTTransferEventMetadata, type NFTTransferType, NFTTransferTypes, NODE_ANY, type Name, type NameToken, type NameTokenOwnership, type NameTokenOwnershipBurned, type NameTokenOwnershipFullyOnchain, type NameTokenOwnershipNameWrapper, type NameTokenOwnershipType, NameTokenOwnershipTypes, type NameTokenOwnershipUnknown, type NameTokensRequest, type NameTokensResponse, type NameTokensResponseCode, NameTokensResponseCodes, type NameTokensResponseError, type NameTokensResponseErrorCode, NameTokensResponseErrorCodes, type NameTokensResponseErrorEnsIndexerConfigUnsupported, type NameTokensResponseErrorIndexingStatusUnsupported, type NameTokensResponseErrorNameTokensNotIndexed, type NameTokensResponseOk, type NamedIdentity, type NamedRegistrarAction, type NamespaceSpecificValue, type Node, type NormalizedName, type OmnichainIndexingStatusId, OmnichainIndexingStatusIds, type OmnichainIndexingStatusSnapshot, type OmnichainIndexingStatusSnapshotBackfill, type OmnichainIndexingStatusSnapshotCompleted, type OmnichainIndexingStatusSnapshotFollowing, type OmnichainIndexingStatusSnapshotUnstarted, PROTOCOL_ATTRIBUTE_PREFIX, type PermissionsId, type PermissionsResourceId, type PermissionsUserId, PluginName, type PrerequisiteResult, type Price, type PriceDai, type PriceEth, type PriceUsdc, RECORDS_PER_PAGE_DEFAULT, RECORDS_PER_PAGE_MAX, ROOT_NODE, ROOT_RESOURCE, type RangeType, RangeTypeIds, type RealtimeIndexingStatusProjection, type RegisteredNameTokens, type RegistrarAction, type RegistrarActionEventId, type RegistrarActionPricing, type RegistrarActionPricingAvailable, type RegistrarActionPricingUnknown, type RegistrarActionReferral, type RegistrarActionReferralAvailable, type RegistrarActionReferralNotApplicable, type RegistrarActionType, RegistrarActionTypes, type RegistrarActionsFilter, type RegistrarActionsFilterBeginTimestamp, type RegistrarActionsFilterByDecodedReferrer, type RegistrarActionsFilterBySubregistryNode, type RegistrarActionsFilterEndTimestamp, type RegistrarActionsFilterType, RegistrarActionsFilterTypes, type RegistrarActionsFilterWithEncodedReferral, type RegistrarActionsOrder, RegistrarActionsOrders, type RegistrarActionsRequest, type RegistrarActionsResponse, type RegistrarActionsResponseCode, RegistrarActionsResponseCodes, type RegistrarActionsResponseError, type RegistrarActionsResponseOk, type RegistrationExpiryInfo, type RegistrationId, type RegistrationLifecycle, type RegistrationLifecycleStage, type RegistryId, type RenewalId, type RequestPageParams, type RequiredAndNotNull, type ResolutionStatusId, ResolutionStatusIds, type ResolvePrimaryNameRequest, type ResolvePrimaryNameResponse, type ResolvePrimaryNamesRequest, type ResolvePrimaryNamesResponse, type ResolveRecordsRequest, type ResolveRecordsResponse, type ResolvedIdentity, type ResolverId, type ResolverRecordsId, type ResolverRecordsResponse, type ResolverRecordsResponseBase, type ResolverRecordsSelection, type ResponsePageContext, type ResponsePageContextWithNoRecords, type ResponsePageContextWithRecords, type ReverseResolutionArgs, ReverseResolutionProtocolStep, type ReverseResolutionResult, type RpcUrl, SWRCache, type SWRCacheOptions, type SerializedAssetId, type SerializedChainIndexingStatusSnapshot, type SerializedChainIndexingStatusSnapshotBackfill, type SerializedChainIndexingStatusSnapshotCompleted, type SerializedChainIndexingStatusSnapshotFollowing, type SerializedChainIndexingStatusSnapshotQueued, type SerializedConfigResponse, type SerializedCrossChainIndexingStatusSnapshot, type SerializedCrossChainIndexingStatusSnapshotOmnichain, type SerializedCurrencyAmount, type SerializedCurrentIndexingProjectionOmnichain, type SerializedDomainAssetId, type SerializedENSApiPublicConfig, type SerializedENSIndexerPublicConfig, type SerializedENSIndexerVersionInfo, type SerializedEnsApiConfigResponse, type SerializedEnsApiIndexingStatusResponse, type SerializedEnsApiIndexingStatusResponseError, type SerializedEnsApiIndexingStatusResponseOk, type SerializedEnsApiPublicConfig, type SerializedEnsIndexerConfigResponse, type SerializedEnsIndexerIndexingStatusResponse, type SerializedEnsIndexerIndexingStatusResponseError, type SerializedEnsIndexerIndexingStatusResponseOk, type SerializedEnsIndexerPublicConfig, type SerializedEnsIndexerVersionInfo, type SerializedIndexedChainIds, type SerializedIndexingStatusResponse, type SerializedIndexingStatusResponseError, type SerializedIndexingStatusResponseOk, type SerializedNameToken, type SerializedNameTokensResponse, type SerializedNameTokensResponseError, type SerializedNameTokensResponseOk, type SerializedNamedRegistrarAction, type SerializedOmnichainIndexingStatusSnapshot, type SerializedOmnichainIndexingStatusSnapshotBackfill, type SerializedOmnichainIndexingStatusSnapshotCompleted, type SerializedOmnichainIndexingStatusSnapshotFollowing, type SerializedOmnichainIndexingStatusSnapshotUnstarted, type SerializedPrice, type SerializedPriceDai, type SerializedPriceEth, type SerializedPriceUsdc, type SerializedRealtimeIndexingStatusProjection, type SerializedRegisteredNameTokens, type SerializedRegistrarAction, type SerializedRegistrarActionPricing, type SerializedRegistrarActionPricingAvailable, type SerializedRegistrarActionPricingUnknown, type SerializedRegistrarActionsResponse, type SerializedRegistrarActionsResponseError, type SerializedRegistrarActionsResponseOk, type SerializedTokenId, type SubgraphInterpretedLabel, type SubgraphInterpretedName, type Subregistry, type TheGraphCannotFallbackReason, TheGraphCannotFallbackReasonSchema, type TheGraphFallback, TheGraphFallbackSchema, type TokenId, TraceableENSProtocol, type TraceableRequest, type TraceableResponse, type TracingNode, type TracingSpan, type TracingTrace, TtlCache, type UnixTimestamp, type UnknownIdentity, type UnnamedIdentity, type UnresolvedIdentity, type Unvalidated, type UrlString, ZERO_ENCODED_REFERRER, accountIdEqual, addDuration, addPrices, addrReverseLabel, asLowerCaseAddress, beautifyName, bigIntToNumber, bigintToCoinType, buildAssetId, buildBlockNumberRange, buildBlockRefRange, buildCrossChainIndexingStatusSnapshotOmnichain, buildEncodedReferrer, buildEnsRainbowClientLabelSet, buildIndexedBlockranges, buildLabelSetId, buildLabelSetVersion, buildOmnichainIndexingStatusSnapshot, buildPageContext, buildUnresolvedIdentity, buildUnvalidatedCrossChainIndexingStatusSnapshot, buildUnvalidatedEnsIndexerPublicConfig, buildUnvalidatedOmnichainIndexingStatusSnapshot, buildUnvalidatedRealtimeIndexingStatusProjection, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotCompleted, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotFollowing, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotUnstarted, coinTypeReverseLabel, coinTypeToEvmChainId, constructSubInterpretedName, createRealtimeIndexingStatusProjection, decodeDNSEncodedLiteralName, decodeDNSEncodedName, decodeEncodedReferrer, deserializeAssetId, deserializeBlockNumber, deserializeBlockRef, deserializeChainId, deserializeChainIndexingStatusSnapshot, deserializeConfigResponse, deserializeCrossChainIndexingStatusSnapshot, deserializeDatetime, deserializeDuration, deserializeENSApiPublicConfig, deserializeENSIndexerPublicConfig, deserializeEnsApiConfigResponse, deserializeEnsApiIndexingStatusResponse, deserializeEnsApiPublicConfig, deserializeEnsIndexerConfigResponse, deserializeEnsIndexerIndexingStatusResponse, deserializeEnsIndexerPublicConfig, deserializeErrorResponse, deserializeIndexingStatusResponse, deserializeOmnichainIndexingStatusSnapshot, deserializePriceDai, deserializePriceEth, deserializePriceUsdc, deserializeRealtimeIndexingStatusProjection, deserializeRegistrarActionsResponse, deserializeUnixTimestamp, deserializeUrl, deserializedNameTokensResponse, durationBetween, encodeLabelHash, encodedLabelToLabelhash, ensureInterpretedLabel, evmChainIdToCoinType, formatAccountId, formatAssetId, formatNFTTransferEventMetadata, getBasenamesSubregistryId, getBasenamesSubregistryManagedName, getCanonicalId, getCurrencyInfo, getDatasourceContract, getDefaultEnsNodeUrl, getENSv1Registry, getENSv2RootRegistry, getENSv2RootRegistryId, getEthnamesSubregistryId, getEthnamesSubregistryManagedName, getHighestKnownBlockTimestamp, getLatestIndexedBlockRef, getLineanamesSubregistryId, getLineanamesSubregistryManagedName, getNFTTransferType, getNameHierarchy, getNameTokenOwnership, getNameWrapperAccounts, getNamespaceSpecificValue, getOmnichainIndexingCursor, getOmnichainIndexingStatus, getParentNameFQDN, getResolvePrimaryNameChainIdParam, getTimestampForHighestOmnichainKnownBlock, getTimestampForLowestOmnichainStartBlock, hasGraphqlApiConfigSupport, hasNullByte, hasRegistrarActionsConfigSupport, hasRegistrarActionsIndexingStatusSupport, hasSubgraphApiConfigSupport, interpretAddress, interpretAddressRecordValue, interpretNameRecordValue, interpretTextRecordKey, interpretTextRecordValue, interpretTokenIdAsLabelHash, interpretTokenIdAsNode, interpretedLabelsToInterpretedName, interpretedLabelsToLabelHashPath, interpretedNameToInterpretedLabels, isENSv1Registry, isENSv2RootRegistry, isEncodedLabelHash, isHttpProtocol, isInterpetedLabel, isInterpretedName, isLabelHash, isNormalizedLabel, isNormalizedName, isPccFuseSet, isPriceCurrencyEqual, isPriceEqual, isRegistrarActionPricingAvailable, isRegistrarActionReferralAvailable, isRegistrationExpired, isRegistrationFullyExpired, isRegistrationInGracePeriod, isResolvedIdentity, isSelectionEmpty, isSubgraphCompatible, isWebSocketProtocol, labelHashToBytes, labelhashLiteralLabel, literalLabelToInterpretedLabel, literalLabelsToInterpretedName, literalLabelsToLiteralName, makeContractMatcher, makeENSApiPublicConfigSchema, makeENSv1DomainId, makeENSv2DomainId, makeEnsApiPublicConfigSchema, makePermissionsId, makePermissionsResourceId, makePermissionsUserId, makeRegistrationId, makeRegistryId, makeRenewalId, makeResolverId, makeResolverRecordsId, makeSerializedEnsApiPublicConfigSchema, makeSubdomainNode, maybeGetDatasourceContract, maybeGetENSv2RootRegistry, maybeGetENSv2RootRegistryId, mergeBlockNumberRanges, nameTokensPrerequisites, parseAccountId, parseAssetId, parseDai, parseEncodedLabelHash, parseEth, parseLabelHash, parseLabelHashOrEncodedLabelHash, parseNonNegativeInteger, parsePartialInterpretedName, parseReverseName, parseTimestamp, parseUsdc, priceDai, priceEth, priceUsdc, registrarActionsFilter, reverseName, scaleBigintByNumber, scalePrice, serializeAssetId, serializeChainId, serializeChainIndexingSnapshots, serializeConfigResponse, serializeCrossChainIndexingStatusSnapshot, serializeCrossChainIndexingStatusSnapshotOmnichain, serializeDatetime, serializeDomainAssetId, serializeENSApiPublicConfig, serializeENSIndexerPublicConfig, serializeEnsApiConfigResponse, serializeEnsApiIndexingStatusResponse, serializeEnsApiPublicConfig, serializeEnsIndexerConfigResponse, serializeEnsIndexerIndexingStatusResponse, serializeEnsIndexerPublicConfig, serializeIndexedChainIds, serializeIndexingStatusResponse, serializeNameToken, serializeNameTokensResponse, serializeNamedRegistrarAction, serializeOmnichainIndexingStatusSnapshot, serializePrice, serializePriceDai, serializePriceEth, serializePriceUsdc, serializeRealtimeIndexingStatusProjection, serializeRegisteredNameTokens, serializeRegistrarAction, serializeRegistrarActionPricing, serializeRegistrarActionsResponse, serializeUrl, sortChainStatusesByStartBlockAsc, stripNullBytes, translateDefaultableChainIdToChainId, uint256ToHex32, uniq, validateChainIndexingStatusSnapshot, validateCrossChainIndexingStatusSnapshot, validateEnsIndexerPublicConfig, validateEnsIndexerPublicConfigCompatibility, validateEnsIndexerVersionInfo, validateOmnichainIndexingStatusSnapshot, validateRealtimeIndexingStatusProjection, validateSupportedLabelSetAndVersion };
|
package/dist/index.js
CHANGED
|
@@ -850,7 +850,7 @@ import { z as z8 } from "zod/v4";
|
|
|
850
850
|
|
|
851
851
|
// src/shared/block-ref.ts
|
|
852
852
|
function isBefore(blockA, blockB) {
|
|
853
|
-
return blockA.number < blockB.number
|
|
853
|
+
return blockA.number < blockB.number;
|
|
854
854
|
}
|
|
855
855
|
function isEqualTo(blockA, blockB) {
|
|
856
856
|
return blockA.number === blockB.number && blockA.timestamp === blockB.timestamp;
|
|
@@ -1077,12 +1077,31 @@ function getLatestIndexedBlockRef(indexingStatus, chainId) {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
return chainIndexingStatus.latestIndexedBlock;
|
|
1079
1079
|
}
|
|
1080
|
+
function getHighestKnownBlockTimestamp(chains) {
|
|
1081
|
+
if (chains.length === 0) {
|
|
1082
|
+
throw new Error(
|
|
1083
|
+
"Invariant violation: at least one chain is required to determine the highest known block timestamp"
|
|
1084
|
+
);
|
|
1085
|
+
}
|
|
1086
|
+
const startBlockTimestamps = chains.map((chain) => chain.config.startBlock.timestamp);
|
|
1087
|
+
const endBlockTimestamps = chains.map((chain) => chain.config).filter((chainConfig) => chainConfig.rangeType === RangeTypeIds.Bounded).map((chainConfig) => chainConfig.endBlock.timestamp);
|
|
1088
|
+
const backfillEndBlockTimestamps = chains.filter((chain) => chain.chainStatus === ChainIndexingStatusIds.Backfill).map((chain) => chain.backfillEndBlock.timestamp);
|
|
1089
|
+
const latestKnownBlockTimestamps = chains.filter((chain) => chain.chainStatus === ChainIndexingStatusIds.Following).map((chain) => chain.latestKnownBlock.timestamp);
|
|
1090
|
+
return Math.max(
|
|
1091
|
+
...startBlockTimestamps,
|
|
1092
|
+
...endBlockTimestamps,
|
|
1093
|
+
...backfillEndBlockTimestamps,
|
|
1094
|
+
...latestKnownBlockTimestamps
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1080
1097
|
function buildCrossChainIndexingStatusSnapshotOmnichain(omnichainSnapshot, snapshotTime) {
|
|
1098
|
+
const chains = Array.from(omnichainSnapshot.chains.values());
|
|
1099
|
+
const adjustedSnapshotTime = Math.max(snapshotTime, getHighestKnownBlockTimestamp(chains));
|
|
1081
1100
|
return validateCrossChainIndexingStatusSnapshot({
|
|
1082
1101
|
strategy: CrossChainIndexingStrategyIds.Omnichain,
|
|
1083
1102
|
slowestChainIndexingCursor: omnichainSnapshot.omnichainIndexingCursor,
|
|
1084
1103
|
omnichainSnapshot,
|
|
1085
|
-
snapshotTime
|
|
1104
|
+
snapshotTime: adjustedSnapshotTime
|
|
1086
1105
|
});
|
|
1087
1106
|
}
|
|
1088
1107
|
|
|
@@ -1610,16 +1629,7 @@ function invariant_slowestChainEqualsToOmnichainSnapshotTime(ctx) {
|
|
|
1610
1629
|
function invariant_snapshotTimeIsTheHighestKnownBlockTimestamp(ctx) {
|
|
1611
1630
|
const { snapshotTime, omnichainSnapshot } = ctx.value;
|
|
1612
1631
|
const chains = Array.from(omnichainSnapshot.chains.values());
|
|
1613
|
-
const
|
|
1614
|
-
const endBlockTimestamps = chains.map((chain) => chain.config).filter((chainConfig) => chainConfig.rangeType === RangeTypeIds.Bounded).map((chainConfig) => chainConfig.endBlock.timestamp);
|
|
1615
|
-
const backfillEndBlockTimestamps = chains.filter((chain) => chain.chainStatus === ChainIndexingStatusIds.Backfill).map((chain) => chain.backfillEndBlock.timestamp);
|
|
1616
|
-
const latestKnownBlockTimestamps = chains.filter((chain) => chain.chainStatus === ChainIndexingStatusIds.Following).map((chain) => chain.latestKnownBlock.timestamp);
|
|
1617
|
-
const highestKnownBlockTimestamp = Math.max(
|
|
1618
|
-
...startBlockTimestamps,
|
|
1619
|
-
...endBlockTimestamps,
|
|
1620
|
-
...backfillEndBlockTimestamps,
|
|
1621
|
-
...latestKnownBlockTimestamps
|
|
1622
|
-
);
|
|
1632
|
+
const highestKnownBlockTimestamp = getHighestKnownBlockTimestamp(chains);
|
|
1623
1633
|
if (snapshotTime < highestKnownBlockTimestamp) {
|
|
1624
1634
|
ctx.issues.push({
|
|
1625
1635
|
code: "custom",
|
|
@@ -2927,6 +2937,14 @@ var RegistrarActionsFilterTypes = {
|
|
|
2927
2937
|
EndTimestamp: "endTimestamp"
|
|
2928
2938
|
};
|
|
2929
2939
|
var RegistrarActionsOrders = {
|
|
2940
|
+
/**
|
|
2941
|
+
* Returns registrar actions newest-first.
|
|
2942
|
+
*
|
|
2943
|
+
* Sorts by block timestamp descending. Because each action's identifier encodes
|
|
2944
|
+
* all ordering-relevant onchain properties, this also correctly orders actions
|
|
2945
|
+
* that share the same block timestamp by the chronological order in which they
|
|
2946
|
+
* were executed within the block.
|
|
2947
|
+
*/
|
|
2930
2948
|
LatestRegistrarActions: "orderBy[timestamp]=desc"
|
|
2931
2949
|
};
|
|
2932
2950
|
|
|
@@ -3587,13 +3605,6 @@ var EnsApiClient = class _EnsApiClient {
|
|
|
3587
3605
|
var ENSNodeClient = class extends EnsApiClient {
|
|
3588
3606
|
};
|
|
3589
3607
|
|
|
3590
|
-
// src/ensdb/ensnode-metadata.ts
|
|
3591
|
-
var EnsNodeMetadataKeys = {
|
|
3592
|
-
EnsDbVersion: "ensdb_version",
|
|
3593
|
-
EnsIndexerPublicConfig: "ensindexer_public_config",
|
|
3594
|
-
EnsIndexerIndexingStatus: "ensindexer_indexing_status"
|
|
3595
|
-
};
|
|
3596
|
-
|
|
3597
3608
|
// src/ensindexer/api/config/deserialize.ts
|
|
3598
3609
|
function deserializeEnsIndexerConfigResponse(maybeResponse) {
|
|
3599
3610
|
return deserializeEnsIndexerPublicConfig(maybeResponse, "EnsIndexerConfigResponse");
|
|
@@ -4468,18 +4479,14 @@ var TtlCache = class {
|
|
|
4468
4479
|
import {
|
|
4469
4480
|
maybeGetDatasource as maybeGetDatasource5
|
|
4470
4481
|
} from "@ensnode/datasources";
|
|
4471
|
-
function buildIndexedBlockranges(namespace,
|
|
4482
|
+
function buildIndexedBlockranges(namespace, pluginsDatasourceNames) {
|
|
4472
4483
|
const indexedBlockranges = /* @__PURE__ */ new Map();
|
|
4473
|
-
for (const [
|
|
4474
|
-
for (const
|
|
4475
|
-
const
|
|
4476
|
-
if (!
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
);
|
|
4480
|
-
}
|
|
4481
|
-
const datasourceChainId = requiredDatasource.chain.id;
|
|
4482
|
-
const datasourceContracts = Object.values(requiredDatasource.contracts);
|
|
4484
|
+
for (const [, datasourceNames] of pluginsDatasourceNames) {
|
|
4485
|
+
for (const datasourceName of datasourceNames) {
|
|
4486
|
+
const datasource = maybeGetDatasource5(namespace, datasourceName);
|
|
4487
|
+
if (!datasource) continue;
|
|
4488
|
+
const datasourceChainId = datasource.chain.id;
|
|
4489
|
+
const datasourceContracts = Object.values(datasource.contracts);
|
|
4483
4490
|
for (const datasourceContract of datasourceContracts) {
|
|
4484
4491
|
const currentChainIndexedBlockrange = indexedBlockranges.get(datasourceChainId);
|
|
4485
4492
|
const contractIndexedBlockrange = buildBlockNumberRange(
|
|
@@ -4626,6 +4633,12 @@ var isENSv1Registry = (namespace, contract) => accountIdEqual(getENSv1Registry(n
|
|
|
4626
4633
|
var getENSv2RootRegistry = (namespace) => getDatasourceContract(namespace, DatasourceNames5.ENSv2Root, "RootRegistry");
|
|
4627
4634
|
var getENSv2RootRegistryId = (namespace) => makeRegistryId(getENSv2RootRegistry(namespace));
|
|
4628
4635
|
var isENSv2RootRegistry = (namespace, contract) => accountIdEqual(getENSv2RootRegistry(namespace), contract);
|
|
4636
|
+
var maybeGetENSv2RootRegistry = (namespace) => maybeGetDatasourceContract(namespace, DatasourceNames5.ENSv2Root, "RootRegistry");
|
|
4637
|
+
var maybeGetENSv2RootRegistryId = (namespace) => {
|
|
4638
|
+
const root = maybeGetENSv2RootRegistry(namespace);
|
|
4639
|
+
if (!root) return void 0;
|
|
4640
|
+
return makeRegistryId(root);
|
|
4641
|
+
};
|
|
4629
4642
|
|
|
4630
4643
|
// src/shared/url.ts
|
|
4631
4644
|
function isHttpProtocol(url) {
|
|
@@ -4701,7 +4714,6 @@ export {
|
|
|
4701
4714
|
EnsApiIndexingStatusResponseCodes,
|
|
4702
4715
|
EnsIndexerClient,
|
|
4703
4716
|
EnsIndexerIndexingStatusResponseCodes,
|
|
4704
|
-
EnsNodeMetadataKeys,
|
|
4705
4717
|
ForwardResolutionProtocolStep,
|
|
4706
4718
|
IndexingStatusResponseCodes,
|
|
4707
4719
|
LINEANAMES_NODE,
|
|
@@ -4815,6 +4827,7 @@ export {
|
|
|
4815
4827
|
getENSv2RootRegistryId,
|
|
4816
4828
|
getEthnamesSubregistryId,
|
|
4817
4829
|
getEthnamesSubregistryManagedName,
|
|
4830
|
+
getHighestKnownBlockTimestamp,
|
|
4818
4831
|
getLatestIndexedBlockRef,
|
|
4819
4832
|
getLineanamesSubregistryId,
|
|
4820
4833
|
getLineanamesSubregistryManagedName,
|
|
@@ -4886,6 +4899,8 @@ export {
|
|
|
4886
4899
|
makeSerializedEnsApiPublicConfigSchema,
|
|
4887
4900
|
makeSubdomainNode,
|
|
4888
4901
|
maybeGetDatasourceContract,
|
|
4902
|
+
maybeGetENSv2RootRegistry,
|
|
4903
|
+
maybeGetENSv2RootRegistryId,
|
|
4889
4904
|
mergeBlockNumberRanges,
|
|
4890
4905
|
nameTokensPrerequisites,
|
|
4891
4906
|
parseAccountId,
|