@ensnode/ensnode-sdk 1.0.3 → 1.2.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 +1538 -879
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1065 -587
- package/dist/index.d.ts +1065 -587
- package/dist/index.js +1560 -901
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Hex, Address, ByteArray, Hash } from 'viem';
|
|
2
|
-
import { CoinType, EvmCoinType } from '@ensdomains/address-encoder';
|
|
3
|
-
export { CoinType, EvmCoinType } from '@ensdomains/address-encoder';
|
|
4
|
-
import { EncodedReferrer } from '@namehash/ens-referrals';
|
|
5
|
-
export { EncodedReferrer, decodeEncodedReferrer, zeroEncodedReferrer } from '@namehash/ens-referrals';
|
|
6
1
|
import z$1, { z } from 'zod/v4';
|
|
7
2
|
import { ENSNamespaceId } from '@ensnode/datasources';
|
|
8
3
|
export { ENSNamespaceId, ENSNamespaceIds, getENSRootChainId } from '@ensnode/datasources';
|
|
4
|
+
import { Hex, Address, ByteArray, Hash } from 'viem';
|
|
5
|
+
import { CoinType, EvmCoinType } from '@ensdomains/address-encoder';
|
|
6
|
+
export { CoinType, EvmCoinType } from '@ensdomains/address-encoder';
|
|
7
|
+
import { EncodedReferrer, ReferrerLeaderboardPageParams, ReferrerLeaderboardPage, ReferrerDetail } from '@namehash/ens-referrals';
|
|
8
|
+
export { EncodedReferrer, ZERO_ENCODED_REFERRER, decodeEncodedReferrer } from '@namehash/ens-referrals';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* A hash value that uniquely identifies a single ENS name.
|
|
@@ -622,6 +622,7 @@ interface Cache<KeyType extends string, ValueType> {
|
|
|
622
622
|
*/
|
|
623
623
|
get capacity(): number;
|
|
624
624
|
}
|
|
625
|
+
|
|
625
626
|
/**
|
|
626
627
|
* Cache that maps from string -> ValueType with a LRU (least recently used) eviction policy.
|
|
627
628
|
*
|
|
@@ -645,60 +646,74 @@ declare class LruCache<KeyType extends string, ValueType> implements Cache<KeyTy
|
|
|
645
646
|
get size(): number;
|
|
646
647
|
get capacity(): number;
|
|
647
648
|
}
|
|
649
|
+
|
|
648
650
|
/**
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
* Items are automatically removed when they expire.
|
|
651
|
+
* Data structure for a single cached value.
|
|
652
652
|
*/
|
|
653
|
-
|
|
654
|
-
private readonly _cache;
|
|
655
|
-
private readonly _ttl;
|
|
653
|
+
interface CachedValue<ValueType> {
|
|
656
654
|
/**
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
* @param ttl Time-to-live duration in seconds. Items expire after this duration.
|
|
655
|
+
* The cached value of type ValueType.
|
|
660
656
|
*/
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
get size(): number;
|
|
667
|
-
get capacity(): number;
|
|
668
|
-
has(key: string): boolean;
|
|
669
|
-
delete(key: string): boolean;
|
|
657
|
+
value: ValueType;
|
|
658
|
+
/**
|
|
659
|
+
* Unix timestamp indicating when the cached `value` was generated.
|
|
660
|
+
*/
|
|
661
|
+
updatedAt: UnixTimestamp;
|
|
670
662
|
}
|
|
671
|
-
interface
|
|
663
|
+
interface SWRCacheOptions<ValueType> {
|
|
672
664
|
/**
|
|
673
|
-
* The async function to wrap with SWR caching.
|
|
674
|
-
*
|
|
675
|
-
* On
|
|
665
|
+
* The async function generating a value of `ValueType` to wrap with SWR caching.
|
|
666
|
+
*
|
|
667
|
+
* On success:
|
|
668
|
+
* - This function returns a value of type `ValueType` to store in the `SWRCache`.
|
|
669
|
+
*
|
|
670
|
+
* On error:
|
|
671
|
+
* - This function throws an error and no changes will be made to the `SWRCache`.
|
|
676
672
|
*/
|
|
677
673
|
fn: () => Promise<ValueType>;
|
|
678
674
|
/**
|
|
679
675
|
* Time-to-live duration in seconds. After this duration, data in the `SWRCache` is
|
|
680
|
-
* considered stale but is still retained in the cache until replaced with a new value.
|
|
676
|
+
* considered stale but is still retained in the cache until successfully replaced with a new value.
|
|
681
677
|
*/
|
|
682
678
|
ttl: Duration;
|
|
679
|
+
/**
|
|
680
|
+
* Optional time-to-proactively-revalidate duration in seconds. After this duration, automated attempts
|
|
681
|
+
* to asynchronously revalidate the cached value will be made in the background.
|
|
682
|
+
*
|
|
683
|
+
* If defined:
|
|
684
|
+
* - Proactive asynchronous revalidation attempts will be automatically triggered in the background
|
|
685
|
+
* on this interval.
|
|
686
|
+
*
|
|
687
|
+
* If undefined:
|
|
688
|
+
* - Revalidation only occurs lazily when an explicit request for the cached value is
|
|
689
|
+
* made after the `ttl` duration of the latest successfully cached value expires.
|
|
690
|
+
*/
|
|
691
|
+
revalidationInterval?: Duration;
|
|
692
|
+
/**
|
|
693
|
+
* Proactively initialize
|
|
694
|
+
*
|
|
695
|
+
* Optional. Defaults to `false`.
|
|
696
|
+
*
|
|
697
|
+
* If `true`:
|
|
698
|
+
* - The SWR cache will proactively work to initialize itself, even before any explicit request to
|
|
699
|
+
* access the cached value is made.
|
|
700
|
+
*
|
|
701
|
+
* If `false`:
|
|
702
|
+
* - The SWR cache will lazily wait to initialize itself only when one of the following occurs:
|
|
703
|
+
* - Background revalidation occurred (if requested); or
|
|
704
|
+
* - An explicit attempt to access the cached value is made.
|
|
705
|
+
*/
|
|
706
|
+
proactivelyInitialize?: boolean;
|
|
683
707
|
}
|
|
684
708
|
/**
|
|
685
|
-
* Stale-While-Revalidate (SWR) cache
|
|
709
|
+
* Stale-While-Revalidate (SWR) cache for async functions.
|
|
686
710
|
*
|
|
687
711
|
* This caching strategy serves cached data immediately (even if stale) while
|
|
688
712
|
* asynchronously revalidating the cache in the background. This provides:
|
|
689
713
|
* - Sub-millisecond response times (after first fetch)
|
|
690
714
|
* - Always available data (serves stale data during revalidation)
|
|
691
|
-
* - Automatic background updates (
|
|
692
|
-
* are made for the cached data
|
|
693
|
-
*
|
|
694
|
-
* Error Handling:
|
|
695
|
-
* - If a new invocation of the provided `fn` throws an error and a cached value exists
|
|
696
|
-
* from a previous successfully invocation of the provided `fn`, the stale cached value is returned.
|
|
697
|
-
* - If a new invocation of the provided `fn` throws an error and NO cached value exists,
|
|
698
|
-
* from any prior invocations of the provided `fn`, such that the provided `fn` has never
|
|
699
|
-
* successfully returned a value for the lifetime of the `SWRCache`, then `null` is returned.
|
|
700
|
-
* - Therefore, errors occuring within the provided `fn` are handled internally within
|
|
701
|
-
* `staleWhileRevalidate` and do not propagate to the caller.
|
|
715
|
+
* - Automatic background updates (triggered lazily when new requests
|
|
716
|
+
* are made for the cached data or when the `revalidationInterval` is reached)
|
|
702
717
|
*
|
|
703
718
|
* @example
|
|
704
719
|
* ```typescript
|
|
@@ -707,27 +722,96 @@ interface StaleWhileRevalidateOptions<ValueType> {
|
|
|
707
722
|
* return response.json();
|
|
708
723
|
* };
|
|
709
724
|
*
|
|
710
|
-
* const
|
|
725
|
+
* const cache = await SWRCache.create({
|
|
726
|
+
* fn: fetchExpensiveData,
|
|
727
|
+
* ttl: 60, // 1 minute TTL
|
|
728
|
+
* revalidationInterval: 5 * 60 // proactive revalidation after 5 minutes from latest cache update
|
|
729
|
+
* });
|
|
711
730
|
*
|
|
712
|
-
* // First call: fetches data (slow)
|
|
713
|
-
* const
|
|
731
|
+
* // [T0: 0] First call: fetches data (slow)
|
|
732
|
+
* const firstRead = await cache.readCache();
|
|
714
733
|
*
|
|
715
|
-
* // Within TTL: returns
|
|
716
|
-
* const
|
|
734
|
+
* // [T1: T0 + 59s] Within TTL: returns data cache at T0 (fast)
|
|
735
|
+
* const secondRead = await cache.readCache();
|
|
717
736
|
*
|
|
718
|
-
* // After TTL: returns stale data
|
|
719
|
-
*
|
|
720
|
-
*
|
|
737
|
+
* // [T2: T0 + 1m30s] After TTL: returns stale data that was cached at T0 immediately
|
|
738
|
+
* // revalidates asynchronously in the background
|
|
739
|
+
* const thirdRead = await cache.readCache(); // Still fast!
|
|
740
|
+
*
|
|
741
|
+
* // [T3: T2 + 90m] Background revalidation kicks in
|
|
742
|
+
*
|
|
743
|
+
* // [T4: T3 + 1m] Within TTL: returns data cache at T3 (fast)
|
|
744
|
+
* const fourthRead = await cache.readCache(); // Still fast!
|
|
721
745
|
*
|
|
722
|
-
*
|
|
723
|
-
*
|
|
724
|
-
*
|
|
725
|
-
* or `null` if `fn` has never successfully returned and has always thrown an error.
|
|
746
|
+
* // Please note how using `SWRCache` enabled action at T3 to happen.
|
|
747
|
+
* // If no `revalidationInterval` value was set, the action at T3 would not happen.
|
|
748
|
+
* // Therefore, the `fourthRead` would return stale data cached at T2.
|
|
726
749
|
*
|
|
727
750
|
* @link https://web.dev/stale-while-revalidate/
|
|
728
751
|
* @link https://datatracker.ietf.org/doc/html/rfc5861
|
|
729
752
|
*/
|
|
730
|
-
declare
|
|
753
|
+
declare class SWRCache<ValueType> {
|
|
754
|
+
readonly options: SWRCacheOptions<ValueType>;
|
|
755
|
+
private cache;
|
|
756
|
+
/**
|
|
757
|
+
* Optional promise of the current in-progress attempt to revalidate the `cache`.
|
|
758
|
+
*
|
|
759
|
+
* If null, no revalidation attempt is currently in progress.
|
|
760
|
+
* If not null, identifies the revalidation attempt that is currently in progress.
|
|
761
|
+
*
|
|
762
|
+
* Used to enforce no concurrent revalidation attempts.
|
|
763
|
+
*/
|
|
764
|
+
private inProgressRevalidate;
|
|
765
|
+
/**
|
|
766
|
+
* The callback function being managed by `BackgroundRevalidationScheduler`.
|
|
767
|
+
*
|
|
768
|
+
* If null, no background revalidation is scheduled.
|
|
769
|
+
* If not null, identifies the background revalidation that is currently scheduled.
|
|
770
|
+
*
|
|
771
|
+
* Used to enforce no concurrent background revalidation attempts.
|
|
772
|
+
*/
|
|
773
|
+
private scheduledBackgroundRevalidate;
|
|
774
|
+
private constructor();
|
|
775
|
+
/**
|
|
776
|
+
* Asynchronously create a new `SWRCache` instance.
|
|
777
|
+
*
|
|
778
|
+
* @param options - The {@link SWRCacheOptions} for the SWR cache.
|
|
779
|
+
* @returns a new `SWRCache` instance.
|
|
780
|
+
*/
|
|
781
|
+
static create<ValueType>(options: SWRCacheOptions<ValueType>): Promise<SWRCache<ValueType>>;
|
|
782
|
+
private revalidate;
|
|
783
|
+
/**
|
|
784
|
+
* Read the most recently cached `CachedValue` from the `SWRCache`.
|
|
785
|
+
*
|
|
786
|
+
* @returns a `CachedValue` holding a `value` of `ValueType` that was most recently successfully returned by `fn`
|
|
787
|
+
* or `null` if `fn` has never successfully returned and has always thrown an error,
|
|
788
|
+
*/
|
|
789
|
+
readCache: () => Promise<CachedValue<ValueType> | null>;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Cache that maps from string -> ValueType with TTL (time-to-live) expiration.
|
|
794
|
+
*
|
|
795
|
+
* Items are automatically removed when they expire.
|
|
796
|
+
*/
|
|
797
|
+
declare class TtlCache<KeyType extends string, ValueType> implements Cache<KeyType, ValueType> {
|
|
798
|
+
private readonly _cache;
|
|
799
|
+
private readonly _ttl;
|
|
800
|
+
/**
|
|
801
|
+
* Create a new TTL cache with the given TTL.
|
|
802
|
+
*
|
|
803
|
+
* @param ttl Time-to-live duration in seconds. Items expire after this duration.
|
|
804
|
+
*/
|
|
805
|
+
constructor(ttl: Duration);
|
|
806
|
+
private _cleanup;
|
|
807
|
+
set(key: string, value: ValueType): void;
|
|
808
|
+
get(key: string): ValueType | undefined;
|
|
809
|
+
clear(): void;
|
|
810
|
+
get size(): number;
|
|
811
|
+
get capacity(): number;
|
|
812
|
+
has(key: string): boolean;
|
|
813
|
+
delete(key: string): boolean;
|
|
814
|
+
}
|
|
731
815
|
|
|
732
816
|
/**
|
|
733
817
|
* Filter out duplicates.
|
|
@@ -1946,6 +2030,13 @@ declare function checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotFoll
|
|
|
1946
2030
|
* by the omnichain start block timestamp in ascending order.
|
|
1947
2031
|
*/
|
|
1948
2032
|
declare function sortChainStatusesByStartBlockAsc<ChainStatusType extends ChainIndexingStatusSnapshot>(chains: [ChainId, ChainStatusType][]): [ChainId, ChainStatusType][];
|
|
2033
|
+
/**
|
|
2034
|
+
* Gets the latest indexed {@link BlockRef} for the given {@link ChainId}.
|
|
2035
|
+
*
|
|
2036
|
+
* @returns the latest indexed {@link BlockRef} for the given {@link ChainId}, or null if the chain
|
|
2037
|
+
* isn't being indexed at all or is queued and therefore hasn't started indexing yet.
|
|
2038
|
+
*/
|
|
2039
|
+
declare function getLatestIndexedBlockRef(indexingStatus: CrossChainIndexingStatusSnapshot, chainId: ChainId): BlockRef | null;
|
|
1949
2040
|
|
|
1950
2041
|
/**
|
|
1951
2042
|
* Create realtime indexing status projection from
|
|
@@ -1964,125 +2055,307 @@ declare function serializeChainIndexingSnapshots<ChainIndexingStatusSnapshotType
|
|
|
1964
2055
|
*/
|
|
1965
2056
|
declare function serializeOmnichainIndexingStatusSnapshot(indexingStatus: OmnichainIndexingStatusSnapshot): SerializedOmnichainIndexingStatusSnapshot;
|
|
1966
2057
|
|
|
2058
|
+
declare const TheGraphCannotFallbackReasonSchema: z.ZodEnum<{
|
|
2059
|
+
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2060
|
+
readonly NoApiKey: "no-api-key";
|
|
2061
|
+
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2062
|
+
}>;
|
|
2063
|
+
declare const TheGraphFallbackSchema: z.ZodObject<{
|
|
2064
|
+
canFallback: z.ZodBoolean;
|
|
2065
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
2066
|
+
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2067
|
+
readonly NoApiKey: "no-api-key";
|
|
2068
|
+
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2069
|
+
}>>;
|
|
2070
|
+
}, z.core.$strict>;
|
|
1967
2071
|
/**
|
|
1968
|
-
*
|
|
1969
|
-
* "BaseRegistrar" contract for direct subnames of .eth) for the provided namespace.
|
|
2072
|
+
* Create a Zod schema for validating a serialized ENSApiPublicConfig.
|
|
1970
2073
|
*
|
|
1971
|
-
* @param
|
|
1972
|
-
* @returns The AccountId for the Ethnames Subregistry contract for the provided namespace.
|
|
1973
|
-
* @throws Error if the contract is not found for the given namespace.
|
|
1974
|
-
*/
|
|
1975
|
-
declare function getEthnamesSubregistryId(namespace: ENSNamespaceId): AccountId;
|
|
1976
|
-
|
|
1977
|
-
/**
|
|
1978
|
-
* Subregistry
|
|
1979
|
-
*/
|
|
1980
|
-
interface Subregistry {
|
|
1981
|
-
/**
|
|
1982
|
-
* Subregistry ID
|
|
1983
|
-
*
|
|
1984
|
-
* The ID of the subregistry the "logical registrar action" was taken on.
|
|
1985
|
-
*
|
|
1986
|
-
* Identifies the chainId and address of the associated subregistry smart
|
|
1987
|
-
* contract.
|
|
1988
|
-
*/
|
|
1989
|
-
subregistryId: AccountId;
|
|
1990
|
-
/**
|
|
1991
|
-
* The node (namehash) of the name the subregistry manages subnames of.
|
|
1992
|
-
* Example subregistry managed names:
|
|
1993
|
-
* - `eth`
|
|
1994
|
-
* - `base.eth`
|
|
1995
|
-
* - `linea.eth`
|
|
1996
|
-
*/
|
|
1997
|
-
node: Node;
|
|
1998
|
-
}
|
|
1999
|
-
/**
|
|
2000
|
-
* Serialized representation of {@link Subregistry}.
|
|
2074
|
+
* @param valueLabel - Optional label for the value being validated (used in error messages)
|
|
2001
2075
|
*/
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2076
|
+
declare function makeENSApiPublicConfigSchema(valueLabel?: string): z.ZodObject<{
|
|
2077
|
+
version: z.ZodString;
|
|
2078
|
+
theGraphFallback: z.ZodObject<{
|
|
2079
|
+
canFallback: z.ZodBoolean;
|
|
2080
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
2081
|
+
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2082
|
+
readonly NoApiKey: "no-api-key";
|
|
2083
|
+
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2084
|
+
}>>;
|
|
2085
|
+
}, z.core.$strict>;
|
|
2086
|
+
ensIndexerPublicConfig: z.ZodObject<{
|
|
2087
|
+
labelSet: z.ZodObject<{
|
|
2088
|
+
labelSetId: z.ZodString;
|
|
2089
|
+
labelSetVersion: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
|
|
2090
|
+
}, z.core.$strip>;
|
|
2091
|
+
indexedChainIds: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodInt, z.ZodTransform<number, number>>>, z.ZodTransform<Set<number>, number[]>>;
|
|
2092
|
+
isSubgraphCompatible: z.ZodBoolean;
|
|
2093
|
+
namespace: z.ZodEnum<{
|
|
2094
|
+
readonly Mainnet: "mainnet";
|
|
2095
|
+
readonly Sepolia: "sepolia";
|
|
2096
|
+
readonly Holesky: "holesky";
|
|
2097
|
+
readonly EnsTestEnv: "ens-test-env";
|
|
2098
|
+
}>;
|
|
2099
|
+
plugins: z.ZodArray<z.ZodString>;
|
|
2100
|
+
databaseSchemaName: z.ZodString;
|
|
2101
|
+
versionInfo: z.ZodObject<{
|
|
2102
|
+
nodejs: z.ZodString;
|
|
2103
|
+
ponder: z.ZodString;
|
|
2104
|
+
ensDb: z.ZodString;
|
|
2105
|
+
ensIndexer: z.ZodString;
|
|
2106
|
+
ensNormalize: z.ZodString;
|
|
2107
|
+
ensRainbow: z.ZodString;
|
|
2108
|
+
ensRainbowSchema: z.ZodInt;
|
|
2109
|
+
}, z.core.$strict>;
|
|
2110
|
+
}, z.core.$strip>;
|
|
2111
|
+
}, z.core.$strict>;
|
|
2006
2112
|
|
|
2113
|
+
type TheGraphCannotFallbackReason = z.infer<typeof TheGraphCannotFallbackReasonSchema>;
|
|
2114
|
+
type TheGraphFallback = z.infer<typeof TheGraphFallbackSchema>;
|
|
2007
2115
|
/**
|
|
2008
|
-
*
|
|
2116
|
+
* Complete public configuration object for ENSApi.
|
|
2009
2117
|
*
|
|
2010
|
-
*
|
|
2011
|
-
*
|
|
2118
|
+
* Contains ENSApi-specific configuration at the top level and
|
|
2119
|
+
* embeds the complete ENSIndexer public configuration.
|
|
2012
2120
|
*/
|
|
2013
|
-
|
|
2014
|
-
/**
|
|
2015
|
-
* Active
|
|
2016
|
-
*
|
|
2017
|
-
* Happens when
|
|
2018
|
-
* the current timestamp <= expiry.
|
|
2019
|
-
*/
|
|
2020
|
-
readonly Active: "registrationLifecycle_active";
|
|
2121
|
+
interface ENSApiPublicConfig {
|
|
2021
2122
|
/**
|
|
2022
|
-
*
|
|
2123
|
+
* ENSApi service version
|
|
2023
2124
|
*
|
|
2024
|
-
*
|
|
2025
|
-
* `expiry < the current timestamp <= expiry + 90 days`.
|
|
2125
|
+
* @see https://ghcr.io/namehash/ensnode/ensapi
|
|
2026
2126
|
*/
|
|
2027
|
-
|
|
2127
|
+
version: string;
|
|
2028
2128
|
/**
|
|
2029
|
-
*
|
|
2030
|
-
*
|
|
2031
|
-
* Happens when
|
|
2032
|
-
* `expiry + 90 days < the current timestamp <= expiry + 120 days`.
|
|
2129
|
+
* The Graph Fallback-related info.
|
|
2033
2130
|
*/
|
|
2034
|
-
|
|
2131
|
+
theGraphFallback: TheGraphFallback;
|
|
2035
2132
|
/**
|
|
2036
|
-
*
|
|
2133
|
+
* Complete ENSIndexer public configuration
|
|
2037
2134
|
*
|
|
2038
|
-
*
|
|
2039
|
-
*
|
|
2135
|
+
* Contains all ENSIndexer public configuration including
|
|
2136
|
+
* namespace, plugins, version info, etc.
|
|
2040
2137
|
*/
|
|
2041
|
-
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2138
|
+
ensIndexerPublicConfig: ENSIndexerPublicConfig;
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2044
2141
|
/**
|
|
2045
|
-
*
|
|
2142
|
+
* Serialized representation of {@link ENSApiPublicConfig}
|
|
2046
2143
|
*/
|
|
2047
|
-
interface
|
|
2048
|
-
/**
|
|
2049
|
-
* Subregistry that manages this Registration Lifecycle.
|
|
2050
|
-
*/
|
|
2051
|
-
subregistry: Subregistry;
|
|
2052
|
-
/**
|
|
2053
|
-
* The node (namehash) of the FQDN of the domain the registration lifecycle
|
|
2054
|
-
* is associated with.
|
|
2055
|
-
*
|
|
2056
|
-
* Guaranteed to be a subname of the node (namehash) of the subregistry
|
|
2057
|
-
* identified by `subregistryId.subregistryId`.
|
|
2058
|
-
*/
|
|
2059
|
-
node: Node;
|
|
2144
|
+
interface SerializedENSApiPublicConfig extends Omit<ENSApiPublicConfig, "ensIndexerPublicConfig"> {
|
|
2060
2145
|
/**
|
|
2061
|
-
*
|
|
2062
|
-
*
|
|
2063
|
-
* Identifies when the Registration Lifecycle is scheduled to expire.
|
|
2146
|
+
* Serialized representation of {@link ENSApiPublicConfig.ensIndexerPublicConfig}.
|
|
2064
2147
|
*/
|
|
2065
|
-
|
|
2148
|
+
ensIndexerPublicConfig: SerializedENSIndexerPublicConfig;
|
|
2066
2149
|
}
|
|
2150
|
+
|
|
2067
2151
|
/**
|
|
2068
|
-
*
|
|
2152
|
+
* Deserialize a {@link ENSApiPublicConfig} object.
|
|
2069
2153
|
*/
|
|
2070
|
-
|
|
2071
|
-
subregistry: SerializedSubregistry;
|
|
2072
|
-
}
|
|
2073
|
-
declare function serializeRegistrationLifecycle(registrationLifecycle: RegistrationLifecycle): SerializedRegistrationLifecycle;
|
|
2154
|
+
declare function deserializeENSApiPublicConfig(maybeConfig: SerializedENSApiPublicConfig, valueLabel?: string): ENSApiPublicConfig;
|
|
2074
2155
|
|
|
2075
2156
|
/**
|
|
2076
|
-
*
|
|
2077
|
-
* associated with the "logical registrar action".
|
|
2157
|
+
* Serialize a {@link ENSApiPublicConfig} object.
|
|
2078
2158
|
*/
|
|
2079
|
-
|
|
2159
|
+
declare function serializeENSApiPublicConfig(config: ENSApiPublicConfig): SerializedENSApiPublicConfig;
|
|
2160
|
+
|
|
2080
2161
|
/**
|
|
2081
|
-
*
|
|
2162
|
+
* ENSApi Public Config Response
|
|
2082
2163
|
*/
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2164
|
+
type ConfigResponse = ENSApiPublicConfig;
|
|
2165
|
+
|
|
2166
|
+
type SerializedConfigResponse = SerializedENSApiPublicConfig;
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* Deserialize a {@link ConfigResponse} object.
|
|
2170
|
+
*/
|
|
2171
|
+
declare function deserializeConfigResponse(serializedResponse: SerializedConfigResponse): ConfigResponse;
|
|
2172
|
+
|
|
2173
|
+
declare function serializeConfigResponse(response: ConfigResponse): SerializedConfigResponse;
|
|
2174
|
+
|
|
2175
|
+
/**
|
|
2176
|
+
* A status code for indexing status responses.
|
|
2177
|
+
*/
|
|
2178
|
+
declare const IndexingStatusResponseCodes: {
|
|
2179
|
+
/**
|
|
2180
|
+
* Represents that the indexing status is available.
|
|
2181
|
+
*/
|
|
2182
|
+
readonly Ok: "ok";
|
|
2183
|
+
/**
|
|
2184
|
+
* Represents that the indexing status is unavailable.
|
|
2185
|
+
*/
|
|
2186
|
+
readonly Error: "error";
|
|
2187
|
+
};
|
|
2188
|
+
/**
|
|
2189
|
+
* The derived string union of possible {@link IndexingStatusResponseCodes}.
|
|
2190
|
+
*/
|
|
2191
|
+
type IndexingStatusResponseCode = (typeof IndexingStatusResponseCodes)[keyof typeof IndexingStatusResponseCodes];
|
|
2192
|
+
/**
|
|
2193
|
+
* An indexing status response when the indexing status is available.
|
|
2194
|
+
*/
|
|
2195
|
+
type IndexingStatusResponseOk = {
|
|
2196
|
+
responseCode: typeof IndexingStatusResponseCodes.Ok;
|
|
2197
|
+
realtimeProjection: RealtimeIndexingStatusProjection;
|
|
2198
|
+
};
|
|
2199
|
+
/**
|
|
2200
|
+
* An indexing status response when the indexing status is unavailable.
|
|
2201
|
+
*/
|
|
2202
|
+
type IndexingStatusResponseError = {
|
|
2203
|
+
responseCode: typeof IndexingStatusResponseCodes.Error;
|
|
2204
|
+
};
|
|
2205
|
+
/**
|
|
2206
|
+
* Indexing status response.
|
|
2207
|
+
*
|
|
2208
|
+
* Use the `responseCode` field to determine the specific type interpretation
|
|
2209
|
+
* at runtime.
|
|
2210
|
+
*/
|
|
2211
|
+
type IndexingStatusResponse = IndexingStatusResponseOk | IndexingStatusResponseError;
|
|
2212
|
+
|
|
2213
|
+
/**
|
|
2214
|
+
* Serialized representation of {@link IndexingStatusResponseError}.
|
|
2215
|
+
*/
|
|
2216
|
+
type SerializedIndexingStatusResponseError = IndexingStatusResponseError;
|
|
2217
|
+
/**
|
|
2218
|
+
* Serialized representation of {@link IndexingStatusResponseOk}.
|
|
2219
|
+
*/
|
|
2220
|
+
interface SerializedIndexingStatusResponseOk extends Omit<IndexingStatusResponseOk, "realtimeProjection"> {
|
|
2221
|
+
realtimeProjection: SerializedRealtimeIndexingStatusProjection;
|
|
2222
|
+
}
|
|
2223
|
+
/**
|
|
2224
|
+
* Serialized representation of {@link IndexingStatusResponse}.
|
|
2225
|
+
*/
|
|
2226
|
+
type SerializedIndexingStatusResponse = SerializedIndexingStatusResponseOk | SerializedIndexingStatusResponseError;
|
|
2227
|
+
|
|
2228
|
+
/**
|
|
2229
|
+
* Deserialize a {@link IndexingStatusResponse} object.
|
|
2230
|
+
*/
|
|
2231
|
+
declare function deserializeIndexingStatusResponse(maybeResponse: SerializedIndexingStatusResponse): IndexingStatusResponse;
|
|
2232
|
+
|
|
2233
|
+
/**
|
|
2234
|
+
* Represents a request to Indexing Status API.
|
|
2235
|
+
*/
|
|
2236
|
+
type IndexingStatusRequest = {};
|
|
2237
|
+
|
|
2238
|
+
declare function serializeIndexingStatusResponse(response: IndexingStatusResponse): SerializedIndexingStatusResponse;
|
|
2239
|
+
|
|
2240
|
+
/**
|
|
2241
|
+
* Gets the SubregistryId (an AccountId) of the Ethnames Subregistry contract (this is the
|
|
2242
|
+
* "BaseRegistrar" contract for direct subnames of .eth) for the provided namespace.
|
|
2243
|
+
*
|
|
2244
|
+
* @param namespace The ENS namespace to get the Ethnames Subregistry ID for
|
|
2245
|
+
* @returns The AccountId for the Ethnames Subregistry contract for the provided namespace.
|
|
2246
|
+
* @throws Error if the contract is not found for the given namespace.
|
|
2247
|
+
*/
|
|
2248
|
+
declare function getEthnamesSubregistryId(namespace: ENSNamespaceId): AccountId;
|
|
2249
|
+
|
|
2250
|
+
/**
|
|
2251
|
+
* Subregistry
|
|
2252
|
+
*/
|
|
2253
|
+
interface Subregistry {
|
|
2254
|
+
/**
|
|
2255
|
+
* Subregistry ID
|
|
2256
|
+
*
|
|
2257
|
+
* The ID of the subregistry the "logical registrar action" was taken on.
|
|
2258
|
+
*
|
|
2259
|
+
* Identifies the chainId and address of the associated subregistry smart
|
|
2260
|
+
* contract.
|
|
2261
|
+
*/
|
|
2262
|
+
subregistryId: AccountId;
|
|
2263
|
+
/**
|
|
2264
|
+
* The node (namehash) of the name the subregistry manages subnames of.
|
|
2265
|
+
* Example subregistry managed names:
|
|
2266
|
+
* - `eth`
|
|
2267
|
+
* - `base.eth`
|
|
2268
|
+
* - `linea.eth`
|
|
2269
|
+
*/
|
|
2270
|
+
node: Node;
|
|
2271
|
+
}
|
|
2272
|
+
/**
|
|
2273
|
+
* Serialized representation of {@link Subregistry}.
|
|
2274
|
+
*/
|
|
2275
|
+
interface SerializedSubregistry extends Omit<Subregistry, "subregistryId"> {
|
|
2276
|
+
subregistryId: SerializedAccountId;
|
|
2277
|
+
}
|
|
2278
|
+
declare function serializeSubregistry(subregistry: Subregistry): SerializedSubregistry;
|
|
2279
|
+
|
|
2280
|
+
/**
|
|
2281
|
+
* Registration Lifecycle Stages
|
|
2282
|
+
*
|
|
2283
|
+
* Important: this definition should not be used anywhere.
|
|
2284
|
+
* It's only here to capture some ideas that were shared in the team.
|
|
2285
|
+
*/
|
|
2286
|
+
declare const RegistrationLifecycleStages: {
|
|
2287
|
+
/**
|
|
2288
|
+
* Active
|
|
2289
|
+
*
|
|
2290
|
+
* Happens when
|
|
2291
|
+
* the current timestamp <= expiry.
|
|
2292
|
+
*/
|
|
2293
|
+
readonly Active: "registrationLifecycle_active";
|
|
2294
|
+
/**
|
|
2295
|
+
* Grace Period
|
|
2296
|
+
*
|
|
2297
|
+
* Happens when
|
|
2298
|
+
* `expiry < the current timestamp <= expiry + 90 days`.
|
|
2299
|
+
*/
|
|
2300
|
+
readonly GracePeriod: "registrationLifecycle_gracePeriod";
|
|
2301
|
+
/**
|
|
2302
|
+
* Released with Temporary Premium Price
|
|
2303
|
+
*
|
|
2304
|
+
* Happens when
|
|
2305
|
+
* `expiry + 90 days < the current timestamp <= expiry + 120 days`.
|
|
2306
|
+
*/
|
|
2307
|
+
readonly ReleasedWithTempPrice: "registrationLifecycle_releasedWithTempPrice";
|
|
2308
|
+
/**
|
|
2309
|
+
* Fully Released (Regular Price)
|
|
2310
|
+
*
|
|
2311
|
+
* Happens when
|
|
2312
|
+
* ` expiry + 120 days < the current timestamp`.
|
|
2313
|
+
*/
|
|
2314
|
+
readonly FullyReleased: "registrationLifecycle_fullyReleased";
|
|
2315
|
+
};
|
|
2316
|
+
type RegistrationLifecycleStage = (typeof RegistrationLifecycleStages)[keyof typeof RegistrationLifecycleStages];
|
|
2317
|
+
/**
|
|
2318
|
+
* Registration Lifecycle
|
|
2319
|
+
*/
|
|
2320
|
+
interface RegistrationLifecycle {
|
|
2321
|
+
/**
|
|
2322
|
+
* Subregistry that manages this Registration Lifecycle.
|
|
2323
|
+
*/
|
|
2324
|
+
subregistry: Subregistry;
|
|
2325
|
+
/**
|
|
2326
|
+
* The node (namehash) of the FQDN of the domain the registration lifecycle
|
|
2327
|
+
* is associated with.
|
|
2328
|
+
*
|
|
2329
|
+
* Guaranteed to be a subname of the node (namehash) of the subregistry
|
|
2330
|
+
* identified by `subregistryId.subregistryId`.
|
|
2331
|
+
*/
|
|
2332
|
+
node: Node;
|
|
2333
|
+
/**
|
|
2334
|
+
* Expires at
|
|
2335
|
+
*
|
|
2336
|
+
* Identifies when the Registration Lifecycle is scheduled to expire.
|
|
2337
|
+
*/
|
|
2338
|
+
expiresAt: UnixTimestamp;
|
|
2339
|
+
}
|
|
2340
|
+
/**
|
|
2341
|
+
* Serialized representation of {@link RegistrationLifecycle}.
|
|
2342
|
+
*/
|
|
2343
|
+
interface SerializedRegistrationLifecycle extends Omit<RegistrationLifecycle, "subregistry"> {
|
|
2344
|
+
subregistry: SerializedSubregistry;
|
|
2345
|
+
}
|
|
2346
|
+
declare function serializeRegistrationLifecycle(registrationLifecycle: RegistrationLifecycle): SerializedRegistrationLifecycle;
|
|
2347
|
+
|
|
2348
|
+
/**
|
|
2349
|
+
* Globally unique, deterministic ID of an indexed onchain event
|
|
2350
|
+
* associated with the "logical registrar action".
|
|
2351
|
+
*/
|
|
2352
|
+
type RegistrarActionEventId = string;
|
|
2353
|
+
/**
|
|
2354
|
+
* Types of "logical registrar action".
|
|
2355
|
+
*/
|
|
2356
|
+
declare const RegistrarActionTypes: {
|
|
2357
|
+
readonly Registration: "registration";
|
|
2358
|
+
readonly Renewal: "renewal";
|
|
2086
2359
|
};
|
|
2087
2360
|
type RegistrarActionType = (typeof RegistrarActionTypes)[keyof typeof RegistrarActionTypes];
|
|
2088
2361
|
/**
|
|
@@ -2371,108 +2644,197 @@ interface SerializedRegistrarAction extends Omit<RegistrarAction, "registrationL
|
|
|
2371
2644
|
declare function serializeRegistrarActionPricing(pricing: RegistrarActionPricing): SerializedRegistrarActionPricing;
|
|
2372
2645
|
declare function serializeRegistrarAction(registrarAction: RegistrarAction): SerializedRegistrarAction;
|
|
2373
2646
|
|
|
2374
|
-
declare const TheGraphCannotFallbackReasonSchema: z.ZodEnum<{
|
|
2375
|
-
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2376
|
-
readonly NoApiKey: "no-api-key";
|
|
2377
|
-
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2378
|
-
}>;
|
|
2379
|
-
declare const TheGraphFallbackSchema: z.ZodObject<{
|
|
2380
|
-
canFallback: z.ZodBoolean;
|
|
2381
|
-
reason: z.ZodNullable<z.ZodEnum<{
|
|
2382
|
-
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2383
|
-
readonly NoApiKey: "no-api-key";
|
|
2384
|
-
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2385
|
-
}>>;
|
|
2386
|
-
}, z.core.$strict>;
|
|
2387
2647
|
/**
|
|
2388
|
-
*
|
|
2389
|
-
*
|
|
2390
|
-
* @param valueLabel - Optional label for the value being validated (used in error messages)
|
|
2648
|
+
* Schema for {@link ErrorResponse}.
|
|
2391
2649
|
*/
|
|
2392
|
-
declare
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
reason: z.ZodNullable<z.ZodEnum<{
|
|
2397
|
-
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2398
|
-
readonly NoApiKey: "no-api-key";
|
|
2399
|
-
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2400
|
-
}>>;
|
|
2401
|
-
}, z.core.$strict>;
|
|
2402
|
-
ensIndexerPublicConfig: z.ZodObject<{
|
|
2403
|
-
labelSet: z.ZodObject<{
|
|
2404
|
-
labelSetId: z.ZodString;
|
|
2405
|
-
labelSetVersion: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
|
|
2406
|
-
}, z.core.$strip>;
|
|
2407
|
-
indexedChainIds: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodInt, z.ZodTransform<number, number>>>, z.ZodTransform<Set<number>, number[]>>;
|
|
2408
|
-
isSubgraphCompatible: z.ZodBoolean;
|
|
2409
|
-
namespace: z.ZodEnum<{
|
|
2410
|
-
readonly Mainnet: "mainnet";
|
|
2411
|
-
readonly Sepolia: "sepolia";
|
|
2412
|
-
readonly Holesky: "holesky";
|
|
2413
|
-
readonly EnsTestEnv: "ens-test-env";
|
|
2414
|
-
}>;
|
|
2415
|
-
plugins: z.ZodArray<z.ZodString>;
|
|
2416
|
-
databaseSchemaName: z.ZodString;
|
|
2417
|
-
versionInfo: z.ZodObject<{
|
|
2418
|
-
nodejs: z.ZodString;
|
|
2419
|
-
ponder: z.ZodString;
|
|
2420
|
-
ensDb: z.ZodString;
|
|
2421
|
-
ensIndexer: z.ZodString;
|
|
2422
|
-
ensNormalize: z.ZodString;
|
|
2423
|
-
ensRainbow: z.ZodString;
|
|
2424
|
-
ensRainbowSchema: z.ZodInt;
|
|
2425
|
-
}, z.core.$strict>;
|
|
2426
|
-
}, z.core.$strip>;
|
|
2427
|
-
}, z.core.$strict>;
|
|
2650
|
+
declare const ErrorResponseSchema: z$1.ZodObject<{
|
|
2651
|
+
message: z$1.ZodString;
|
|
2652
|
+
details: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
2653
|
+
}, z$1.core.$strip>;
|
|
2428
2654
|
|
|
2429
|
-
type TheGraphCannotFallbackReason = z.infer<typeof TheGraphCannotFallbackReasonSchema>;
|
|
2430
|
-
type TheGraphFallback = z.infer<typeof TheGraphFallbackSchema>;
|
|
2431
2655
|
/**
|
|
2432
|
-
*
|
|
2656
|
+
* API Error Response Type
|
|
2657
|
+
*/
|
|
2658
|
+
type ErrorResponse = z$1.infer<typeof ErrorResponseSchema>;
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* Deserialize a {@link ErrorResponse} object.
|
|
2662
|
+
*/
|
|
2663
|
+
declare function deserializeErrorResponse(maybeErrorResponse: unknown): ErrorResponse;
|
|
2664
|
+
|
|
2665
|
+
/**
|
|
2666
|
+
* A status code for Registrar Actions API responses.
|
|
2667
|
+
*/
|
|
2668
|
+
declare const RegistrarActionsResponseCodes: {
|
|
2669
|
+
/**
|
|
2670
|
+
* Represents that Registrar Actions are available.
|
|
2671
|
+
*/
|
|
2672
|
+
readonly Ok: "ok";
|
|
2673
|
+
/**
|
|
2674
|
+
* Represents that Registrar Actions are unavailable.
|
|
2675
|
+
*/
|
|
2676
|
+
readonly Error: "error";
|
|
2677
|
+
};
|
|
2678
|
+
/**
|
|
2679
|
+
* The derived string union of possible {@link RegistrarActionsResponseCodes}.
|
|
2680
|
+
*/
|
|
2681
|
+
type RegistrarActionsResponseCode = (typeof RegistrarActionsResponseCodes)[keyof typeof RegistrarActionsResponseCodes];
|
|
2682
|
+
/**
|
|
2683
|
+
* "Logical registrar action" with its associated name.
|
|
2684
|
+
*/
|
|
2685
|
+
interface NamedRegistrarAction {
|
|
2686
|
+
action: RegistrarAction;
|
|
2687
|
+
/**
|
|
2688
|
+
* Name
|
|
2689
|
+
*
|
|
2690
|
+
* FQDN of the name associated with `action`.
|
|
2691
|
+
*
|
|
2692
|
+
* Guarantees:
|
|
2693
|
+
* - `namehash(name)` is always `action.registrationLifecycle.node`.
|
|
2694
|
+
*/
|
|
2695
|
+
name: InterpretedName;
|
|
2696
|
+
}
|
|
2697
|
+
/**
|
|
2698
|
+
* A response when Registrar Actions are available.
|
|
2699
|
+
*/
|
|
2700
|
+
type RegistrarActionsResponseOk = {
|
|
2701
|
+
responseCode: typeof RegistrarActionsResponseCodes.Ok;
|
|
2702
|
+
registrarActions: NamedRegistrarAction[];
|
|
2703
|
+
};
|
|
2704
|
+
/**
|
|
2705
|
+
* A response when Registrar Actions are unavailable.
|
|
2706
|
+
*/
|
|
2707
|
+
interface RegistrarActionsResponseError {
|
|
2708
|
+
responseCode: typeof IndexingStatusResponseCodes.Error;
|
|
2709
|
+
error: ErrorResponse;
|
|
2710
|
+
}
|
|
2711
|
+
/**
|
|
2712
|
+
* Registrar Actions response.
|
|
2433
2713
|
*
|
|
2434
|
-
*
|
|
2435
|
-
*
|
|
2714
|
+
* Use the `responseCode` field to determine the specific type interpretation
|
|
2715
|
+
* at runtime.
|
|
2716
|
+
*/
|
|
2717
|
+
type RegistrarActionsResponse = RegistrarActionsResponseOk | RegistrarActionsResponseError;
|
|
2718
|
+
|
|
2719
|
+
/**
|
|
2720
|
+
* Serialized representation of {@link RegistrarActionsResponseError}.
|
|
2721
|
+
*/
|
|
2722
|
+
type SerializedRegistrarActionsResponseError = RegistrarActionsResponseError;
|
|
2723
|
+
/**
|
|
2724
|
+
* Serialized representation of {@link NamedRegistrarAction}.
|
|
2725
|
+
*/
|
|
2726
|
+
interface SerializedNamedRegistrarAction extends Omit<NamedRegistrarAction, "action"> {
|
|
2727
|
+
action: SerializedRegistrarAction;
|
|
2728
|
+
}
|
|
2729
|
+
/**
|
|
2730
|
+
* Serialized representation of {@link RegistrarActionsResponseOk}.
|
|
2731
|
+
*/
|
|
2732
|
+
interface SerializedRegistrarActionsResponseOk extends Omit<RegistrarActionsResponseOk, "registrarActions"> {
|
|
2733
|
+
registrarActions: SerializedNamedRegistrarAction[];
|
|
2734
|
+
}
|
|
2735
|
+
/**
|
|
2736
|
+
* Serialized representation of {@link SerializedRegistrarActionsResponse}.
|
|
2737
|
+
*/
|
|
2738
|
+
type SerializedRegistrarActionsResponse = SerializedRegistrarActionsResponseOk | SerializedRegistrarActionsResponseError;
|
|
2739
|
+
|
|
2740
|
+
/**
|
|
2741
|
+
* Deserialize a {@link RegistrarActionsResponse} object.
|
|
2742
|
+
*/
|
|
2743
|
+
declare function deserializeRegistrarActionsResponse(maybeResponse: SerializedRegistrarActionsResponse): RegistrarActionsResponse;
|
|
2744
|
+
|
|
2745
|
+
/**
|
|
2746
|
+
* Records Filters: Filter Types
|
|
2747
|
+
*/
|
|
2748
|
+
declare const RegistrarActionsFilterTypes: {
|
|
2749
|
+
readonly BySubregistryNode: "bySubregistryNode";
|
|
2750
|
+
readonly WithEncodedReferral: "withEncodedReferral";
|
|
2751
|
+
};
|
|
2752
|
+
type RegistrarActionsFilterType = (typeof RegistrarActionsFilterTypes)[keyof typeof RegistrarActionsFilterTypes];
|
|
2753
|
+
type RegistrarActionsFilterBySubregistryNode = {
|
|
2754
|
+
filterType: typeof RegistrarActionsFilterTypes.BySubregistryNode;
|
|
2755
|
+
value: Node;
|
|
2756
|
+
};
|
|
2757
|
+
type RegistrarActionsFilterWithEncodedReferral = {
|
|
2758
|
+
filterType: typeof RegistrarActionsFilterTypes.WithEncodedReferral;
|
|
2759
|
+
};
|
|
2760
|
+
type RegistrarActionsFilter = RegistrarActionsFilterBySubregistryNode | RegistrarActionsFilterWithEncodedReferral;
|
|
2761
|
+
/**
|
|
2762
|
+
* Records Orders
|
|
2763
|
+
*/
|
|
2764
|
+
declare const RegistrarActionsOrders: {
|
|
2765
|
+
readonly LatestRegistrarActions: "orderBy[timestamp]=desc";
|
|
2766
|
+
};
|
|
2767
|
+
type RegistrarActionsOrder = (typeof RegistrarActionsOrders)[keyof typeof RegistrarActionsOrders];
|
|
2768
|
+
/**
|
|
2769
|
+
* Represents a request to Registrar Actions API.
|
|
2770
|
+
*/
|
|
2771
|
+
type RegistrarActionsRequest = {
|
|
2772
|
+
/**
|
|
2773
|
+
* Filters to be applied while generating results.
|
|
2774
|
+
*/
|
|
2775
|
+
filters?: RegistrarActionsFilter[];
|
|
2776
|
+
/**
|
|
2777
|
+
* Order applied while generating results.
|
|
2778
|
+
*/
|
|
2779
|
+
order?: RegistrarActionsOrder;
|
|
2780
|
+
/**
|
|
2781
|
+
* Limit the count of items per page to selected count of records.
|
|
2782
|
+
*
|
|
2783
|
+
* Guaranteed to be a positive integer (if defined).
|
|
2784
|
+
*/
|
|
2785
|
+
itemsPerPage?: number;
|
|
2786
|
+
};
|
|
2787
|
+
|
|
2788
|
+
/**
|
|
2789
|
+
* Build a "parent node" filter object for Registrar Actions query.
|
|
2790
|
+
*/
|
|
2791
|
+
declare function byParentNode(parentNode: Node): RegistrarActionsFilter;
|
|
2792
|
+
declare function byParentNode(parentNode: undefined): undefined;
|
|
2793
|
+
/**
|
|
2794
|
+
* Build a "with referral" filter object for Registrar Actions query.
|
|
2436
2795
|
*/
|
|
2437
|
-
|
|
2796
|
+
declare function withReferral(withReferral: true): RegistrarActionsFilter;
|
|
2797
|
+
declare function withReferral(withReferral: false | undefined): undefined;
|
|
2798
|
+
declare const registrarActionsFilter: {
|
|
2799
|
+
byParentNode: typeof byParentNode;
|
|
2800
|
+
withReferral: typeof withReferral;
|
|
2801
|
+
};
|
|
2802
|
+
|
|
2803
|
+
declare const registrarActionsPrerequisites: Readonly<{
|
|
2438
2804
|
/**
|
|
2439
|
-
*
|
|
2805
|
+
* Required plugins to enable Registrar Actions API routes.
|
|
2440
2806
|
*
|
|
2441
|
-
*
|
|
2807
|
+
* 1. `registrars` plugin is required so that data in the `registrarActions`
|
|
2808
|
+
* table is populated.
|
|
2809
|
+
* 2. `subgraph`, `basenames`, and `lineanames` are required to get the data
|
|
2810
|
+
* for the name associated with each registrar action.
|
|
2811
|
+
* 3. In theory not all of `subgraph`, `basenames`, and `lineanames` plugins
|
|
2812
|
+
* might be required. Ex: At least one, but the current logic in
|
|
2813
|
+
* the `registrars` plugin always indexes registrar actions across
|
|
2814
|
+
* Ethnames (subgraph), Basenames, and Lineanames and therefore we need to
|
|
2815
|
+
* ensure each value in the registrar actions table has
|
|
2816
|
+
* an associated record in the domains table.
|
|
2442
2817
|
*/
|
|
2443
|
-
|
|
2818
|
+
requiredPlugins: readonly [PluginName.Subgraph, PluginName.Basenames, PluginName.Lineanames, PluginName.Registrars];
|
|
2444
2819
|
/**
|
|
2445
|
-
*
|
|
2820
|
+
* Check if provided ENSApiPublicConfig supports the Registrar Actions API.
|
|
2446
2821
|
*/
|
|
2447
|
-
|
|
2822
|
+
hasEnsIndexerConfigSupport(config: ENSIndexerPublicConfig): boolean;
|
|
2448
2823
|
/**
|
|
2449
|
-
*
|
|
2824
|
+
* Required Indexing Status IDs
|
|
2450
2825
|
*
|
|
2451
|
-
*
|
|
2452
|
-
*
|
|
2826
|
+
* Database indexes are created by the time the omnichain indexing status
|
|
2827
|
+
* is either `completed` or `following`.
|
|
2453
2828
|
*/
|
|
2454
|
-
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
|
-
/**
|
|
2458
|
-
* Serialized representation of {@link ENSApiPublicConfig}
|
|
2459
|
-
*/
|
|
2460
|
-
interface SerializedENSApiPublicConfig extends Omit<ENSApiPublicConfig, "ensIndexerPublicConfig"> {
|
|
2829
|
+
supportedIndexingStatusIds: ("omnichain-following" | "omnichain-completed")[];
|
|
2461
2830
|
/**
|
|
2462
|
-
*
|
|
2831
|
+
* Check if provided indexing status supports the Registrar Actions API.
|
|
2463
2832
|
*/
|
|
2464
|
-
|
|
2465
|
-
}
|
|
2466
|
-
|
|
2467
|
-
/**
|
|
2468
|
-
* Deserialize a {@link ENSApiPublicConfig} object.
|
|
2469
|
-
*/
|
|
2470
|
-
declare function deserializeENSApiPublicConfig(maybeConfig: SerializedENSApiPublicConfig, valueLabel?: string): ENSApiPublicConfig;
|
|
2833
|
+
hasIndexingStatusSupport(omnichainIndexingStatusId: OmnichainIndexingStatusId): boolean;
|
|
2834
|
+
}>;
|
|
2471
2835
|
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
*/
|
|
2475
|
-
declare function serializeENSApiPublicConfig(config: ENSApiPublicConfig): SerializedENSApiPublicConfig;
|
|
2836
|
+
declare function serializeNamedRegistrarAction({ action, name, }: NamedRegistrarAction): SerializedNamedRegistrarAction;
|
|
2837
|
+
declare function serializeRegistrarActionsResponse(response: RegistrarActionsResponse): SerializedRegistrarActionsResponse;
|
|
2476
2838
|
|
|
2477
2839
|
/**
|
|
2478
2840
|
* The resolution status for an `Identity`.
|
|
@@ -2817,15 +3179,6 @@ type ProtocolSpanTreeNode = ProtocolSpan & {
|
|
|
2817
3179
|
};
|
|
2818
3180
|
type ProtocolTrace = ProtocolSpanTreeNode[];
|
|
2819
3181
|
|
|
2820
|
-
declare const ErrorResponseSchema: z$1.ZodObject<{
|
|
2821
|
-
message: z$1.ZodString;
|
|
2822
|
-
details: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
2823
|
-
}, z$1.core.$strip>;
|
|
2824
|
-
|
|
2825
|
-
/**
|
|
2826
|
-
* API Error Response Type
|
|
2827
|
-
*/
|
|
2828
|
-
type ErrorResponse = z$1.infer<typeof ErrorResponseSchema>;
|
|
2829
3182
|
interface TraceableRequest {
|
|
2830
3183
|
trace?: boolean;
|
|
2831
3184
|
}
|
|
@@ -2851,432 +3204,270 @@ interface ResolveRecordsResponse<SELECTION extends ResolverRecordsSelection> ext
|
|
|
2851
3204
|
records: ResolverRecordsResponse<SELECTION>;
|
|
2852
3205
|
}
|
|
2853
3206
|
/**
|
|
2854
|
-
* Resolve Primary Name Request Type
|
|
2855
|
-
*/
|
|
2856
|
-
interface ResolvePrimaryNameRequest extends ReverseResolutionArgs, AcceleratableRequest, TraceableRequest {
|
|
2857
|
-
}
|
|
2858
|
-
/**
|
|
2859
|
-
* Resolve Primary Name Response Type
|
|
2860
|
-
*/
|
|
2861
|
-
interface ResolvePrimaryNameResponse extends AcceleratableResponse, TraceableResponse {
|
|
2862
|
-
name: ReverseResolutionResult;
|
|
2863
|
-
}
|
|
2864
|
-
interface ResolvePrimaryNamesRequest extends MultichainPrimaryNameResolutionArgs, AcceleratableRequest, TraceableRequest {
|
|
2865
|
-
}
|
|
2866
|
-
interface ResolvePrimaryNamesResponse extends AcceleratableResponse, TraceableResponse {
|
|
2867
|
-
names: MultichainPrimaryNameResolutionResult;
|
|
2868
|
-
}
|
|
2869
|
-
/**
|
|
2870
|
-
* ENSIndexer Public Config Response
|
|
2871
|
-
*/
|
|
2872
|
-
type ConfigResponse = ENSApiPublicConfig;
|
|
2873
|
-
/**
|
|
2874
|
-
* Represents a request to Indexing Status API.
|
|
2875
|
-
*/
|
|
2876
|
-
type IndexingStatusRequest = {};
|
|
2877
|
-
/**
|
|
2878
|
-
* A status code for indexing status responses.
|
|
2879
|
-
*/
|
|
2880
|
-
declare const IndexingStatusResponseCodes: {
|
|
2881
|
-
/**
|
|
2882
|
-
* Represents that the indexing status is available.
|
|
2883
|
-
*/
|
|
2884
|
-
readonly Ok: "ok";
|
|
2885
|
-
/**
|
|
2886
|
-
* Represents that the indexing status is unavailable.
|
|
2887
|
-
*/
|
|
2888
|
-
readonly Error: "error";
|
|
2889
|
-
};
|
|
2890
|
-
/**
|
|
2891
|
-
* The derived string union of possible {@link IndexingStatusResponseCodes}.
|
|
2892
|
-
*/
|
|
2893
|
-
type IndexingStatusResponseCode = (typeof IndexingStatusResponseCodes)[keyof typeof IndexingStatusResponseCodes];
|
|
2894
|
-
/**
|
|
2895
|
-
* An indexing status response when the indexing status is available.
|
|
2896
|
-
*/
|
|
2897
|
-
type IndexingStatusResponseOk = {
|
|
2898
|
-
responseCode: typeof IndexingStatusResponseCodes.Ok;
|
|
2899
|
-
realtimeProjection: RealtimeIndexingStatusProjection;
|
|
2900
|
-
};
|
|
2901
|
-
/**
|
|
2902
|
-
* An indexing status response when the indexing status is unavailable.
|
|
2903
|
-
*/
|
|
2904
|
-
type IndexingStatusResponseError = {
|
|
2905
|
-
responseCode: typeof IndexingStatusResponseCodes.Error;
|
|
2906
|
-
};
|
|
2907
|
-
/**
|
|
2908
|
-
* Indexing status response.
|
|
2909
|
-
*
|
|
2910
|
-
* Use the `responseCode` field to determine the specific type interpretation
|
|
2911
|
-
* at runtime.
|
|
2912
|
-
*/
|
|
2913
|
-
type IndexingStatusResponse = IndexingStatusResponseOk | IndexingStatusResponseError;
|
|
2914
|
-
/**
|
|
2915
|
-
* Registrar Actions response
|
|
2916
|
-
*/
|
|
2917
|
-
/**
|
|
2918
|
-
* Records Filters: Filter Types
|
|
2919
|
-
*/
|
|
2920
|
-
declare const RegistrarActionsFilterTypes: {
|
|
2921
|
-
readonly BySubregistryNode: "bySubregistryNode";
|
|
2922
|
-
readonly WithEncodedReferral: "withEncodedReferral";
|
|
2923
|
-
};
|
|
2924
|
-
type RegistrarActionsFilterType = (typeof RegistrarActionsFilterTypes)[keyof typeof RegistrarActionsFilterTypes];
|
|
2925
|
-
type RegistrarActionsFilterBySubregistryNode = {
|
|
2926
|
-
filterType: typeof RegistrarActionsFilterTypes.BySubregistryNode;
|
|
2927
|
-
value: Node;
|
|
2928
|
-
};
|
|
2929
|
-
type RegistrarActionsFilterWithEncodedReferral = {
|
|
2930
|
-
filterType: typeof RegistrarActionsFilterTypes.WithEncodedReferral;
|
|
2931
|
-
};
|
|
2932
|
-
type RegistrarActionsFilter = RegistrarActionsFilterBySubregistryNode | RegistrarActionsFilterWithEncodedReferral;
|
|
2933
|
-
/**
|
|
2934
|
-
* Records Orders
|
|
2935
|
-
*/
|
|
2936
|
-
declare const RegistrarActionsOrders: {
|
|
2937
|
-
readonly LatestRegistrarActions: "orderBy[timestamp]=desc";
|
|
2938
|
-
};
|
|
2939
|
-
type RegistrarActionsOrder = (typeof RegistrarActionsOrders)[keyof typeof RegistrarActionsOrders];
|
|
2940
|
-
/**
|
|
2941
|
-
* Represents a request to Registrar Actions API.
|
|
2942
|
-
*/
|
|
2943
|
-
type RegistrarActionsRequest = {
|
|
2944
|
-
/**
|
|
2945
|
-
* Filters to be applied while generating results.
|
|
2946
|
-
*/
|
|
2947
|
-
filters?: RegistrarActionsFilter[];
|
|
2948
|
-
/**
|
|
2949
|
-
* Order applied while generating results.
|
|
2950
|
-
*/
|
|
2951
|
-
order?: RegistrarActionsOrder;
|
|
2952
|
-
/**
|
|
2953
|
-
* Limit the count of items per page to selected count of records.
|
|
2954
|
-
*
|
|
2955
|
-
* Guaranteed to be a positive integer (if defined).
|
|
2956
|
-
*/
|
|
2957
|
-
itemsPerPage?: number;
|
|
2958
|
-
};
|
|
2959
|
-
/**
|
|
2960
|
-
* A status code for Registrar Actions API responses.
|
|
2961
|
-
*/
|
|
2962
|
-
declare const RegistrarActionsResponseCodes: {
|
|
2963
|
-
/**
|
|
2964
|
-
* Represents that Registrar Actions are available.
|
|
2965
|
-
*/
|
|
2966
|
-
readonly Ok: "ok";
|
|
2967
|
-
/**
|
|
2968
|
-
* Represents that Registrar Actions are unavailable.
|
|
2969
|
-
*/
|
|
2970
|
-
readonly Error: "error";
|
|
2971
|
-
};
|
|
2972
|
-
/**
|
|
2973
|
-
* The derived string union of possible {@link RegistrarActionsResponseCodes}.
|
|
2974
|
-
*/
|
|
2975
|
-
type RegistrarActionsResponseCode = (typeof RegistrarActionsResponseCodes)[keyof typeof RegistrarActionsResponseCodes];
|
|
2976
|
-
/**
|
|
2977
|
-
* "Logical registrar action" with its associated name.
|
|
2978
|
-
*/
|
|
2979
|
-
interface NamedRegistrarAction {
|
|
2980
|
-
action: RegistrarAction;
|
|
2981
|
-
/**
|
|
2982
|
-
* Name
|
|
2983
|
-
*
|
|
2984
|
-
* FQDN of the name associated with `action`.
|
|
2985
|
-
*
|
|
2986
|
-
* Guarantees:
|
|
2987
|
-
* - `namehash(name)` is always `action.registrationLifecycle.node`.
|
|
2988
|
-
*/
|
|
2989
|
-
name: InterpretedName;
|
|
2990
|
-
}
|
|
2991
|
-
/**
|
|
2992
|
-
* A response when Registrar Actions are available.
|
|
2993
|
-
*/
|
|
2994
|
-
type RegistrarActionsResponseOk = {
|
|
2995
|
-
responseCode: typeof RegistrarActionsResponseCodes.Ok;
|
|
2996
|
-
registrarActions: NamedRegistrarAction[];
|
|
2997
|
-
};
|
|
2998
|
-
/**
|
|
2999
|
-
* A response when Registrar Actions are unavailable.
|
|
3000
|
-
*/
|
|
3001
|
-
interface RegistrarActionsResponseError {
|
|
3002
|
-
responseCode: typeof IndexingStatusResponseCodes.Error;
|
|
3003
|
-
error: ErrorResponse;
|
|
3004
|
-
}
|
|
3005
|
-
/**
|
|
3006
|
-
* Registrar Actions response.
|
|
3007
|
-
*
|
|
3008
|
-
* Use the `responseCode` field to determine the specific type interpretation
|
|
3009
|
-
* at runtime.
|
|
3010
|
-
*/
|
|
3011
|
-
type RegistrarActionsResponse = RegistrarActionsResponseOk | RegistrarActionsResponseError;
|
|
3012
|
-
|
|
3013
|
-
/**
|
|
3014
|
-
* Serialized representation of {@link IndexingStatusResponseError}.
|
|
3015
|
-
*/
|
|
3016
|
-
type SerializedIndexingStatusResponseError = IndexingStatusResponseError;
|
|
3017
|
-
/**
|
|
3018
|
-
* Serialized representation of {@link IndexingStatusResponseOk}.
|
|
3019
|
-
*/
|
|
3020
|
-
interface SerializedIndexingStatusResponseOk extends Omit<IndexingStatusResponseOk, "realtimeProjection"> {
|
|
3021
|
-
realtimeProjection: SerializedRealtimeIndexingStatusProjection;
|
|
3022
|
-
}
|
|
3023
|
-
/**
|
|
3024
|
-
* Serialized representation of {@link IndexingStatusResponse}.
|
|
3025
|
-
*/
|
|
3026
|
-
type SerializedIndexingStatusResponse = SerializedIndexingStatusResponseOk | SerializedIndexingStatusResponseError;
|
|
3027
|
-
/**
|
|
3028
|
-
* Serialized representation of {@link RegistrarActionsResponseError}.
|
|
3029
|
-
*/
|
|
3030
|
-
type SerializedRegistrarActionsResponseError = RegistrarActionsResponseError;
|
|
3031
|
-
/**
|
|
3032
|
-
* Serialized representation of {@link NamedRegistrarAction}.
|
|
3033
|
-
*/
|
|
3034
|
-
interface SerializedNamedRegistrarAction extends Omit<NamedRegistrarAction, "action"> {
|
|
3035
|
-
action: SerializedRegistrarAction;
|
|
3036
|
-
}
|
|
3037
|
-
/**
|
|
3038
|
-
* Serialized representation of {@link RegistrarActionsResponseOk}.
|
|
3039
|
-
*/
|
|
3040
|
-
interface SerializedRegistrarActionsResponseOk extends Omit<RegistrarActionsResponseOk, "registrarActions"> {
|
|
3041
|
-
registrarActions: SerializedNamedRegistrarAction[];
|
|
3042
|
-
}
|
|
3043
|
-
/**
|
|
3044
|
-
* Serialized representation of {@link SerializedRegistrarActionsResponse}.
|
|
3207
|
+
* Resolve Primary Name Request Type
|
|
3045
3208
|
*/
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
declare function deserializeErrorResponse(maybeErrorResponse: unknown): ErrorResponse;
|
|
3049
|
-
declare function deserializeIndexingStatusResponse(maybeResponse: SerializedIndexingStatusResponse): IndexingStatusResponse;
|
|
3050
|
-
declare function deserializeRegistrarActionsResponse(maybeResponse: SerializedRegistrarActionsResponse): RegistrarActionsResponse;
|
|
3051
|
-
|
|
3209
|
+
interface ResolvePrimaryNameRequest extends ReverseResolutionArgs, AcceleratableRequest, TraceableRequest {
|
|
3210
|
+
}
|
|
3052
3211
|
/**
|
|
3053
|
-
*
|
|
3212
|
+
* Resolve Primary Name Response Type
|
|
3054
3213
|
*/
|
|
3055
|
-
|
|
3056
|
-
|
|
3214
|
+
interface ResolvePrimaryNameResponse extends AcceleratableResponse, TraceableResponse {
|
|
3215
|
+
name: ReverseResolutionResult;
|
|
3216
|
+
}
|
|
3217
|
+
interface ResolvePrimaryNamesRequest extends MultichainPrimaryNameResolutionArgs, AcceleratableRequest, TraceableRequest {
|
|
3218
|
+
}
|
|
3219
|
+
interface ResolvePrimaryNamesResponse extends AcceleratableResponse, TraceableResponse {
|
|
3220
|
+
names: MultichainPrimaryNameResolutionResult;
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
declare const RECORDS_PER_PAGE_DEFAULT = 10;
|
|
3224
|
+
declare const RECORDS_PER_PAGE_MAX = 100;
|
|
3057
3225
|
/**
|
|
3058
|
-
*
|
|
3226
|
+
* Request page params.
|
|
3059
3227
|
*/
|
|
3060
|
-
|
|
3061
|
-
declare function withReferral(withReferral: false | undefined): undefined;
|
|
3062
|
-
declare const registrarActionsFilter: {
|
|
3063
|
-
byParentNode: typeof byParentNode;
|
|
3064
|
-
withReferral: typeof withReferral;
|
|
3065
|
-
};
|
|
3066
|
-
|
|
3067
|
-
declare const registrarActionsPrerequisites: Readonly<{
|
|
3228
|
+
interface RequestPageParams {
|
|
3068
3229
|
/**
|
|
3069
|
-
*
|
|
3070
|
-
*
|
|
3071
|
-
* 1
|
|
3072
|
-
* table is populated.
|
|
3073
|
-
* 2. `subgraph`, `basenames`, and `lineanames` are required to get the data
|
|
3074
|
-
* for the name associated with each registrar action.
|
|
3075
|
-
* 3. In theory not all of `subgraph`, `basenames`, and `lineanames` plugins
|
|
3076
|
-
* might be required. Ex: At least one, but the current logic in
|
|
3077
|
-
* the `registrars` plugin always indexes registrar actions across
|
|
3078
|
-
* Ethnames (subgraph), Basenames, and Lineanames and therefore we need to
|
|
3079
|
-
* ensure each value in the registrar actions table has
|
|
3080
|
-
* an associated record in the domains table.
|
|
3230
|
+
* Requested page number (1-indexed)
|
|
3231
|
+
* @invariant Must be a positive integer (>= 1)
|
|
3232
|
+
* @default 1
|
|
3081
3233
|
*/
|
|
3082
|
-
|
|
3234
|
+
page?: number;
|
|
3083
3235
|
/**
|
|
3084
|
-
*
|
|
3236
|
+
* Maximum number of records to return per page
|
|
3237
|
+
* @invariant Must be a positive integer (>= 1) and less than or equal to {@link RECORDS_PER_PAGE_MAX}
|
|
3238
|
+
* @default {@link RECORDS_PER_PAGE_DEFAULT}
|
|
3085
3239
|
*/
|
|
3086
|
-
|
|
3240
|
+
recordsPerPage?: number;
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
interface ResponsePageContextWithNoRecords extends Required<RequestPageParams> {
|
|
3087
3244
|
/**
|
|
3088
|
-
*
|
|
3089
|
-
*
|
|
3090
|
-
* Database indexes are created by the time the omnichain indexing status
|
|
3091
|
-
* is either `completed` or `following`.
|
|
3245
|
+
* Total number of records across all pages
|
|
3092
3246
|
*/
|
|
3093
|
-
|
|
3247
|
+
totalRecords: 0;
|
|
3094
3248
|
/**
|
|
3095
|
-
*
|
|
3249
|
+
* Total number of pages
|
|
3096
3250
|
*/
|
|
3097
|
-
|
|
3098
|
-
}>;
|
|
3099
|
-
|
|
3100
|
-
declare function serializeIndexingStatusResponse(response: IndexingStatusResponse): SerializedIndexingStatusResponse;
|
|
3101
|
-
declare function serializeNamedRegistrarAction({ action, name, }: NamedRegistrarAction): SerializedNamedRegistrarAction;
|
|
3102
|
-
declare function serializeRegistrarActionsResponse(response: RegistrarActionsResponse): SerializedRegistrarActionsResponse;
|
|
3103
|
-
|
|
3104
|
-
/**
|
|
3105
|
-
* The default number of items per page for paginated aggregated referrer queries.
|
|
3106
|
-
*/
|
|
3107
|
-
declare const ITEMS_PER_PAGE_DEFAULT = 25;
|
|
3108
|
-
/**
|
|
3109
|
-
* The maximum number of items per page for paginated aggregated referrer queries.
|
|
3110
|
-
*/
|
|
3111
|
-
declare const ITEMS_PER_PAGE_MAX = 100;
|
|
3112
|
-
/**
|
|
3113
|
-
* Represents the aggregated metrics for a single referrer.
|
|
3114
|
-
*/
|
|
3115
|
-
interface AggregatedReferrerMetrics {
|
|
3116
|
-
/** The Ethereum address of the referrer */
|
|
3117
|
-
referrer: Address;
|
|
3251
|
+
totalPages: 1;
|
|
3118
3252
|
/**
|
|
3119
|
-
*
|
|
3120
|
-
* @invariant Guaranteed to be a positive integer (> 0)
|
|
3253
|
+
* Indicates if there is a next page available
|
|
3121
3254
|
*/
|
|
3122
|
-
|
|
3255
|
+
hasNext: false;
|
|
3123
3256
|
/**
|
|
3124
|
-
*
|
|
3125
|
-
* @invariant Guaranteed to be a non-negative integer (>= 0), measured in seconds
|
|
3257
|
+
* Indicates if there is a previous page available
|
|
3126
3258
|
*/
|
|
3127
|
-
|
|
3128
|
-
}
|
|
3129
|
-
/**
|
|
3130
|
-
* Represents the aggregated metrics for a single referrer with contribution percentages.
|
|
3131
|
-
* Extends {@link AggregatedReferrerMetrics} with additional fields that show the referrer's
|
|
3132
|
-
* contribution as a percentage of the grand totals.
|
|
3133
|
-
*/
|
|
3134
|
-
interface AggregatedReferrerMetricsContribution extends AggregatedReferrerMetrics {
|
|
3259
|
+
hasPrev: false;
|
|
3135
3260
|
/**
|
|
3136
|
-
* The
|
|
3137
|
-
* Calculated as: totalReferrals / grandTotalReferrals
|
|
3138
|
-
* @invariant 0 <= totalReferralsContribution <= 1
|
|
3261
|
+
* The start index of the records on the page (0-indexed)
|
|
3139
3262
|
*/
|
|
3140
|
-
|
|
3263
|
+
startIndex: undefined;
|
|
3141
3264
|
/**
|
|
3142
|
-
* The
|
|
3143
|
-
* Calculated as: totalIncrementalDuration / grandTotalIncrementalDuration
|
|
3144
|
-
* @invariant 0 <= totalIncrementalDurationContribution <= 1
|
|
3265
|
+
* The end index of the records on the page (0-indexed)
|
|
3145
3266
|
*/
|
|
3146
|
-
|
|
3267
|
+
endIndex: undefined;
|
|
3147
3268
|
}
|
|
3148
|
-
|
|
3149
|
-
* Base pagination parameters for paginated queries.
|
|
3150
|
-
*/
|
|
3151
|
-
interface PaginationParams {
|
|
3269
|
+
interface ResponsePageContextWithRecords extends Required<RequestPageParams> {
|
|
3152
3270
|
/**
|
|
3153
|
-
*
|
|
3154
|
-
* @invariant
|
|
3155
|
-
* @default 1
|
|
3271
|
+
* Total number of records across all pages
|
|
3272
|
+
* @invariant Guaranteed to be a non-negative integer (>= 0)
|
|
3156
3273
|
*/
|
|
3157
|
-
|
|
3274
|
+
totalRecords: number;
|
|
3158
3275
|
/**
|
|
3159
|
-
*
|
|
3160
|
-
* @invariant
|
|
3161
|
-
* @default {@link ITEMS_PER_PAGE_DEFAULT}
|
|
3276
|
+
* Total number of pages
|
|
3277
|
+
* @invariant Guaranteed to be a positive integer (>= 1)
|
|
3162
3278
|
*/
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
}
|
|
3170
|
-
/**
|
|
3171
|
-
* Paginated aggregated referrers data with metadata.
|
|
3172
|
-
*/
|
|
3173
|
-
interface PaginatedAggregatedReferrers {
|
|
3279
|
+
totalPages: number;
|
|
3280
|
+
/**
|
|
3281
|
+
* Indicates if there is a next page available
|
|
3282
|
+
* @invariant true if and only if (`page` * `recordsPerPage` < `totalRecords`)
|
|
3283
|
+
*/
|
|
3284
|
+
hasNext: boolean;
|
|
3174
3285
|
/**
|
|
3175
|
-
*
|
|
3176
|
-
* @invariant
|
|
3286
|
+
* Indicates if there is a previous page available
|
|
3287
|
+
* @invariant true if and only if (`page` > 1)
|
|
3177
3288
|
*/
|
|
3178
|
-
|
|
3289
|
+
hasPrev: boolean;
|
|
3179
3290
|
/**
|
|
3180
|
-
*
|
|
3291
|
+
* The start index of the records on the page (0-indexed)
|
|
3292
|
+
*
|
|
3181
3293
|
* @invariant Guaranteed to be a non-negative integer (>= 0)
|
|
3182
3294
|
*/
|
|
3183
|
-
|
|
3295
|
+
startIndex: number;
|
|
3184
3296
|
/**
|
|
3185
|
-
*
|
|
3186
|
-
*
|
|
3297
|
+
* The end index of the records on the page (0-indexed)
|
|
3298
|
+
*
|
|
3299
|
+
* @invariant Guaranteed to be a non-negative integer (>= 0)
|
|
3300
|
+
* @invariant Guaranteed to be greater than or equal to `startIndex`.
|
|
3301
|
+
* @invariant Guaranteed to be less than `totalRecords`.
|
|
3187
3302
|
*/
|
|
3188
|
-
|
|
3303
|
+
endIndex: number;
|
|
3304
|
+
}
|
|
3305
|
+
type ResponsePageContext = ResponsePageContextWithNoRecords | ResponsePageContextWithRecords;
|
|
3306
|
+
|
|
3307
|
+
/**
|
|
3308
|
+
* Request parameters for a referrer leaderboard page query.
|
|
3309
|
+
*/
|
|
3310
|
+
interface ReferrerLeaderboardPageRequest extends ReferrerLeaderboardPageParams {
|
|
3311
|
+
}
|
|
3312
|
+
/**
|
|
3313
|
+
* A status code for a referrer leaderboard page API response.
|
|
3314
|
+
*/
|
|
3315
|
+
declare const ReferrerLeaderboardPageResponseCodes: {
|
|
3189
3316
|
/**
|
|
3190
|
-
*
|
|
3191
|
-
* @invariant true if and only if (page * itemsPerPage < total)
|
|
3317
|
+
* Represents that the requested referrer leaderboard page is available.
|
|
3192
3318
|
*/
|
|
3193
|
-
|
|
3319
|
+
readonly Ok: "ok";
|
|
3194
3320
|
/**
|
|
3195
|
-
*
|
|
3196
|
-
* @invariant true if and only if (page > 1)
|
|
3321
|
+
* Represents that the referrer leaderboard data is not available.
|
|
3197
3322
|
*/
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3323
|
+
readonly Error: "error";
|
|
3324
|
+
};
|
|
3325
|
+
/**
|
|
3326
|
+
* The derived string union of possible {@link ReferrerLeaderboardPageResponseCodes}.
|
|
3327
|
+
*/
|
|
3328
|
+
type ReferrerLeaderboardPageResponseCode = (typeof ReferrerLeaderboardPageResponseCodes)[keyof typeof ReferrerLeaderboardPageResponseCodes];
|
|
3329
|
+
/**
|
|
3330
|
+
* A referrer leaderboard page response when the data is available.
|
|
3331
|
+
*/
|
|
3332
|
+
type ReferrerLeaderboardPageResponseOk = {
|
|
3333
|
+
responseCode: typeof ReferrerLeaderboardPageResponseCodes.Ok;
|
|
3334
|
+
data: ReferrerLeaderboardPage;
|
|
3335
|
+
};
|
|
3336
|
+
/**
|
|
3337
|
+
* A referrer leaderboard page response when the data is not available.
|
|
3338
|
+
*/
|
|
3339
|
+
type ReferrerLeaderboardPageResponseError = {
|
|
3340
|
+
responseCode: typeof ReferrerLeaderboardPageResponseCodes.Error;
|
|
3341
|
+
error: string;
|
|
3342
|
+
errorMessage: string;
|
|
3343
|
+
};
|
|
3344
|
+
/**
|
|
3345
|
+
* A referrer leaderboard page API response.
|
|
3346
|
+
*
|
|
3347
|
+
* Use the `responseCode` field to determine the specific type interpretation
|
|
3348
|
+
* at runtime.
|
|
3349
|
+
*/
|
|
3350
|
+
type ReferrerLeaderboardPageResponse = ReferrerLeaderboardPageResponseOk | ReferrerLeaderboardPageResponseError;
|
|
3351
|
+
/**
|
|
3352
|
+
* Request parameters for referrer detail query.
|
|
3353
|
+
*/
|
|
3354
|
+
interface ReferrerDetailRequest {
|
|
3355
|
+
/** The Ethereum address of the referrer to query */
|
|
3356
|
+
referrer: Address;
|
|
3201
3357
|
}
|
|
3202
3358
|
/**
|
|
3203
|
-
* A status code for
|
|
3359
|
+
* A status code for referrer detail API responses.
|
|
3204
3360
|
*/
|
|
3205
|
-
declare const
|
|
3361
|
+
declare const ReferrerDetailResponseCodes: {
|
|
3206
3362
|
/**
|
|
3207
|
-
* Represents that the
|
|
3208
|
-
* @note The response may contain an empty array for the first page if there are no qualified referrers.
|
|
3209
|
-
* When the array is empty, total will be 0, page will be 1, and both hasNext and hasPrev will be false.
|
|
3363
|
+
* Represents that the referrer detail data is available.
|
|
3210
3364
|
*/
|
|
3211
3365
|
readonly Ok: "ok";
|
|
3212
3366
|
/**
|
|
3213
|
-
* Represents that
|
|
3367
|
+
* Represents that an error occurred while fetching the data.
|
|
3214
3368
|
*/
|
|
3215
3369
|
readonly Error: "error";
|
|
3216
3370
|
};
|
|
3217
3371
|
/**
|
|
3218
|
-
* The derived string union of possible {@link
|
|
3372
|
+
* The derived string union of possible {@link ReferrerDetailResponseCodes}.
|
|
3219
3373
|
*/
|
|
3220
|
-
type
|
|
3374
|
+
type ReferrerDetailResponseCode = (typeof ReferrerDetailResponseCodes)[keyof typeof ReferrerDetailResponseCodes];
|
|
3221
3375
|
/**
|
|
3222
|
-
* A
|
|
3376
|
+
* A referrer detail response when the data is available for a referrer on the leaderboard.
|
|
3223
3377
|
*/
|
|
3224
|
-
type
|
|
3225
|
-
responseCode: typeof
|
|
3226
|
-
data:
|
|
3378
|
+
type ReferrerDetailResponseOk = {
|
|
3379
|
+
responseCode: typeof ReferrerDetailResponseCodes.Ok;
|
|
3380
|
+
data: ReferrerDetail;
|
|
3227
3381
|
};
|
|
3228
3382
|
/**
|
|
3229
|
-
* A
|
|
3383
|
+
* A referrer detail response when an error occurs.
|
|
3230
3384
|
*/
|
|
3231
|
-
type
|
|
3232
|
-
responseCode: typeof
|
|
3385
|
+
type ReferrerDetailResponseError = {
|
|
3386
|
+
responseCode: typeof ReferrerDetailResponseCodes.Error;
|
|
3233
3387
|
error: string;
|
|
3234
3388
|
errorMessage: string;
|
|
3235
3389
|
};
|
|
3236
3390
|
/**
|
|
3237
|
-
* A
|
|
3391
|
+
* A referrer detail API response.
|
|
3238
3392
|
*
|
|
3239
3393
|
* Use the `responseCode` field to determine the specific type interpretation
|
|
3240
3394
|
* at runtime.
|
|
3241
3395
|
*/
|
|
3242
|
-
type
|
|
3396
|
+
type ReferrerDetailResponse = ReferrerDetailResponseOk | ReferrerDetailResponseError;
|
|
3243
3397
|
|
|
3244
3398
|
/**
|
|
3245
|
-
* Serialized representation of {@link
|
|
3399
|
+
* Serialized representation of {@link ReferrerLeaderboardPageResponseError}.
|
|
3246
3400
|
*
|
|
3247
3401
|
* Note: All fields are already serializable, so this type is identical to the source type.
|
|
3248
3402
|
*/
|
|
3249
|
-
type
|
|
3403
|
+
type SerializedReferrerLeaderboardPageResponseError = ReferrerLeaderboardPageResponseError;
|
|
3250
3404
|
/**
|
|
3251
|
-
* Serialized representation of {@link
|
|
3405
|
+
* Serialized representation of {@link ReferrerLeaderboardPageResponseOk}.
|
|
3252
3406
|
*
|
|
3253
3407
|
* Note: All fields are already serializable, so this type is identical to the source type.
|
|
3254
3408
|
*/
|
|
3255
|
-
type
|
|
3409
|
+
type SerializedReferrerLeaderboardPageResponseOk = ReferrerLeaderboardPageResponseOk;
|
|
3256
3410
|
/**
|
|
3257
|
-
* Serialized representation of {@link
|
|
3411
|
+
* Serialized representation of {@link ReferrerLeaderboardPageResponse}.
|
|
3258
3412
|
*/
|
|
3259
|
-
type
|
|
3413
|
+
type SerializedReferrerLeaderboardPageResponse = SerializedReferrerLeaderboardPageResponseOk | SerializedReferrerLeaderboardPageResponseError;
|
|
3414
|
+
/**
|
|
3415
|
+
* Serialized representation of {@link ReferrerDetailResponseOk}.
|
|
3416
|
+
*
|
|
3417
|
+
* Note: All fields in ReferrerDetailRanked and ReferrerDetailUnranked
|
|
3418
|
+
* (rules, referrer metrics, aggregatedMetrics, and timestamp) are already serializable primitives.
|
|
3419
|
+
* The rank field can be either a number or null, both of which are valid JSON primitives.
|
|
3420
|
+
*/
|
|
3421
|
+
type SerializedReferrerDetailResponseOk = ReferrerDetailResponseOk;
|
|
3422
|
+
/**
|
|
3423
|
+
* Serialized representation of {@link ReferrerDetailResponseError}.
|
|
3424
|
+
*
|
|
3425
|
+
* Note: All fields are already serializable, so this type is identical to the source type.
|
|
3426
|
+
*/
|
|
3427
|
+
type SerializedReferrerDetailResponseError = ReferrerDetailResponseError;
|
|
3428
|
+
/**
|
|
3429
|
+
* Serialized representation of {@link ReferrerDetailResponse}.
|
|
3430
|
+
*/
|
|
3431
|
+
type SerializedReferrerDetailResponse = SerializedReferrerDetailResponseOk | SerializedReferrerDetailResponseError;
|
|
3260
3432
|
|
|
3261
3433
|
/**
|
|
3262
|
-
* Deserialize a {@link
|
|
3434
|
+
* Deserialize a {@link ReferrerLeaderboardPageResponse} object.
|
|
3435
|
+
*
|
|
3436
|
+
* Note: While the serialized and deserialized types are identical (all fields
|
|
3437
|
+
* are primitives), this function performs critical validation using Zod schemas
|
|
3438
|
+
* to enforce invariants on the data. This ensures data integrity when receiving
|
|
3439
|
+
* responses from the API.
|
|
3440
|
+
*/
|
|
3441
|
+
declare function deserializeReferrerLeaderboardPageResponse(maybeResponse: SerializedReferrerLeaderboardPageResponse, valueLabel?: string): ReferrerLeaderboardPageResponse;
|
|
3442
|
+
/**
|
|
3443
|
+
* Deserialize a {@link ReferrerDetailResponse} object.
|
|
3263
3444
|
*
|
|
3264
3445
|
* Note: While the serialized and deserialized types are identical (all fields
|
|
3265
3446
|
* are primitives), this function performs critical validation using Zod schemas
|
|
3266
3447
|
* to enforce invariants on the data. This ensures data integrity when receiving
|
|
3267
3448
|
* responses from the API.
|
|
3268
3449
|
*/
|
|
3269
|
-
declare function
|
|
3450
|
+
declare function deserializeReferrerDetailResponse(maybeResponse: SerializedReferrerDetailResponse, valueLabel?: string): ReferrerDetailResponse;
|
|
3270
3451
|
|
|
3271
3452
|
/**
|
|
3272
|
-
* Serialize a {@link
|
|
3453
|
+
* Serialize a {@link ReferrerLeaderboardPageResponse} object.
|
|
3273
3454
|
*
|
|
3274
|
-
* Note: Since all fields in
|
|
3455
|
+
* Note: Since all fields in ReferrerLeaderboardPageResponse are already
|
|
3275
3456
|
* serializable primitives, this function performs an identity transformation.
|
|
3276
3457
|
* It exists to maintain consistency with the serialization pattern used
|
|
3277
3458
|
* throughout the codebase.
|
|
3278
3459
|
*/
|
|
3279
|
-
declare function
|
|
3460
|
+
declare function serializeReferrerLeaderboardPageResponse(response: ReferrerLeaderboardPageResponse): SerializedReferrerLeaderboardPageResponse;
|
|
3461
|
+
/**
|
|
3462
|
+
* Serialize a {@link ReferrerDetailResponse} object.
|
|
3463
|
+
*
|
|
3464
|
+
* Note: Since all fields in ReferrerDetailRanked and ReferrerDetailUnranked
|
|
3465
|
+
* (rules, referrer metrics, aggregatedMetrics, and timestamp) are already
|
|
3466
|
+
* serializable primitives, this function performs an identity transformation.
|
|
3467
|
+
* The rank field can be either a number or null, both of which are valid JSON primitives.
|
|
3468
|
+
* It exists to maintain consistency with the serialization pattern used throughout the codebase.
|
|
3469
|
+
*/
|
|
3470
|
+
declare function serializeReferrerDetailResponse(response: ReferrerDetailResponse): SerializedReferrerDetailResponse;
|
|
3280
3471
|
|
|
3281
3472
|
/**
|
|
3282
3473
|
* Configuration options for ENSNode API client
|
|
@@ -3458,15 +3649,15 @@ declare class ENSNodeClient {
|
|
|
3458
3649
|
*/
|
|
3459
3650
|
indexingStatus(): Promise<IndexingStatusResponse>;
|
|
3460
3651
|
/**
|
|
3461
|
-
* Fetch
|
|
3652
|
+
* Fetch Referrer Leaderboard Page
|
|
3462
3653
|
*
|
|
3463
|
-
* Retrieves a paginated list of
|
|
3654
|
+
* Retrieves a paginated list of referrer leaderboard metrics with contribution percentages.
|
|
3464
3655
|
* Each referrer's contribution is calculated as a percentage of the grand totals across all referrers.
|
|
3465
3656
|
*
|
|
3466
3657
|
* @param request - Pagination parameters
|
|
3467
3658
|
* @param request.page - The page number to retrieve (1-indexed, default: 1)
|
|
3468
3659
|
* @param request.itemsPerPage - Number of items per page (default: 25, max: 100)
|
|
3469
|
-
* @returns {
|
|
3660
|
+
* @returns {ReferrerLeaderboardPageResponse}
|
|
3470
3661
|
*
|
|
3471
3662
|
* @throws if the ENSNode request fails
|
|
3472
3663
|
* @throws if the ENSNode API returns an error response
|
|
@@ -3475,20 +3666,118 @@ declare class ENSNodeClient {
|
|
|
3475
3666
|
* @example
|
|
3476
3667
|
* ```typescript
|
|
3477
3668
|
* // Get first page with default page size (25 items)
|
|
3478
|
-
* const response = await client.
|
|
3479
|
-
* if (response.responseCode ===
|
|
3480
|
-
*
|
|
3481
|
-
*
|
|
3669
|
+
* const response = await client.getReferrerLeaderboardPage();
|
|
3670
|
+
* if (response.responseCode === ReferrerLeaderboardPageResponseCodes.Ok) {
|
|
3671
|
+
* const {
|
|
3672
|
+
* aggregatedMetrics,
|
|
3673
|
+
* referrers,
|
|
3674
|
+
* rules,
|
|
3675
|
+
* paginationContext,
|
|
3676
|
+
* updatedAt
|
|
3677
|
+
* } = response.data;
|
|
3678
|
+
* console.log(aggregatedMetrics);
|
|
3679
|
+
* console.log(referrers);
|
|
3680
|
+
* console.log(rules);
|
|
3681
|
+
* console.log(updatedAt);
|
|
3682
|
+
* console.log(`Page ${paginationContext.page} of ${paginationContext.totalPages}`);
|
|
3482
3683
|
* }
|
|
3483
3684
|
* ```
|
|
3484
3685
|
*
|
|
3485
3686
|
* @example
|
|
3486
3687
|
* ```typescript
|
|
3487
3688
|
* // Get second page with 50 items per page
|
|
3488
|
-
* const response = await client.
|
|
3689
|
+
* const response = await client.getReferrerLeaderboardPage({ page: 2, itemsPerPage: 50 });
|
|
3690
|
+
* ```
|
|
3691
|
+
*
|
|
3692
|
+
* @example
|
|
3693
|
+
* ```typescript
|
|
3694
|
+
* // Handle error response, ie. when Referrer Leaderboard is not currently available.
|
|
3695
|
+
* const response = await client.getReferrerLeaderboardPage();
|
|
3696
|
+
*
|
|
3697
|
+
* if (response.responseCode === ReferrerLeaderboardPageResponseCodes.Error) {
|
|
3698
|
+
* console.error(response.error);
|
|
3699
|
+
* console.error(response.errorMessage);
|
|
3700
|
+
* }
|
|
3701
|
+
* ```
|
|
3702
|
+
*/
|
|
3703
|
+
getReferrerLeaderboardPage(request?: ReferrerLeaderboardPageRequest): Promise<ReferrerLeaderboardPageResponse>;
|
|
3704
|
+
/**
|
|
3705
|
+
* Fetch Referrer Detail
|
|
3706
|
+
*
|
|
3707
|
+
* Retrieves detailed information about a specific referrer, whether they are on the
|
|
3708
|
+
* leaderboard or not.
|
|
3709
|
+
*
|
|
3710
|
+
* The response data is a discriminated union type with a `type` field:
|
|
3711
|
+
*
|
|
3712
|
+
* **For referrers on the leaderboard** (`ReferrerDetailRanked`):
|
|
3713
|
+
* - `type`: {@link ReferrerDetailTypeIds.Ranked}
|
|
3714
|
+
* - `referrer`: The `AwardedReferrerMetrics` from @namehash/ens-referrals
|
|
3715
|
+
* - `rules`: The referral program rules
|
|
3716
|
+
* - `aggregatedMetrics`: Aggregated metrics for all referrers on the leaderboard
|
|
3717
|
+
* - `accurateAsOf`: Unix timestamp indicating when the data was last updated
|
|
3718
|
+
*
|
|
3719
|
+
* **For referrers NOT on the leaderboard** (`ReferrerDetailUnranked`):
|
|
3720
|
+
* - `type`: {@link ReferrerDetailTypeIds.Unranked}
|
|
3721
|
+
* - `referrer`: The `UnrankedReferrerMetrics` from @namehash/ens-referrals
|
|
3722
|
+
* - `rules`: The referral program rules
|
|
3723
|
+
* - `aggregatedMetrics`: Aggregated metrics for all referrers on the leaderboard
|
|
3724
|
+
* - `accurateAsOf`: Unix timestamp indicating when the data was last updated
|
|
3725
|
+
*
|
|
3726
|
+
* @see {@link https://www.npmjs.com/package/@namehash/ens-referrals|@namehash/ens-referrals} for calculation details
|
|
3727
|
+
*
|
|
3728
|
+
* @param request The referrer address to query
|
|
3729
|
+
* @returns {ReferrerDetailResponse} Returns the referrer detail response
|
|
3730
|
+
*
|
|
3731
|
+
* @throws if the ENSNode request fails
|
|
3732
|
+
* @throws if the response data is malformed
|
|
3733
|
+
*
|
|
3734
|
+
* @example
|
|
3735
|
+
* ```typescript
|
|
3736
|
+
* // Get referrer detail for a specific address
|
|
3737
|
+
* const response = await client.getReferrerDetail({
|
|
3738
|
+
* referrer: "0x1234567890123456789012345678901234567890"
|
|
3739
|
+
* });
|
|
3740
|
+
* if (response.responseCode === ReferrerDetailResponseCodes.Ok) {
|
|
3741
|
+
* const { type, referrer, rules, aggregatedMetrics, accurateAsOf } = response.data;
|
|
3742
|
+
* console.log(type); // ReferrerDetailTypeIds.Ranked or ReferrerDetailTypeIds.Unranked
|
|
3743
|
+
* console.log(referrer);
|
|
3744
|
+
* console.log(accurateAsOf);
|
|
3745
|
+
* }
|
|
3746
|
+
* ```
|
|
3747
|
+
*
|
|
3748
|
+
* @example
|
|
3749
|
+
* ```typescript
|
|
3750
|
+
* // Use discriminated union to check if referrer is ranked
|
|
3751
|
+
* const response = await client.getReferrerDetail({
|
|
3752
|
+
* referrer: "0x1234567890123456789012345678901234567890"
|
|
3753
|
+
* });
|
|
3754
|
+
* if (response.responseCode === ReferrerDetailResponseCodes.Ok) {
|
|
3755
|
+
* if (response.data.type === ReferrerDetailTypeIds.Ranked) {
|
|
3756
|
+
* // TypeScript knows this is ReferrerDetailRanked
|
|
3757
|
+
* console.log(`Rank: ${response.data.referrer.rank}`);
|
|
3758
|
+
* console.log(`Qualified: ${response.data.referrer.isQualified}`);
|
|
3759
|
+
* console.log(`Award Pool Share: ${response.data.referrer.awardPoolShare * 100}%`);
|
|
3760
|
+
* } else {
|
|
3761
|
+
* // TypeScript knows this is ReferrerDetailUnranked
|
|
3762
|
+
* console.log("Referrer is not on the leaderboard (no referrals yet)");
|
|
3763
|
+
* }
|
|
3764
|
+
* }
|
|
3765
|
+
* ```
|
|
3766
|
+
*
|
|
3767
|
+
* @example
|
|
3768
|
+
* ```typescript
|
|
3769
|
+
* // Handle error response, ie. when Referrer Detail is not currently available.
|
|
3770
|
+
* const response = await client.getReferrerDetail({
|
|
3771
|
+
* referrer: "0x1234567890123456789012345678901234567890"
|
|
3772
|
+
* });
|
|
3773
|
+
*
|
|
3774
|
+
* if (response.responseCode === ReferrerDetailResponseCodes.Error) {
|
|
3775
|
+
* console.error(response.error);
|
|
3776
|
+
* console.error(response.errorMessage);
|
|
3777
|
+
* }
|
|
3489
3778
|
* ```
|
|
3490
3779
|
*/
|
|
3491
|
-
|
|
3780
|
+
getReferrerDetail(request: ReferrerDetailRequest): Promise<ReferrerDetailResponse>;
|
|
3492
3781
|
/**
|
|
3493
3782
|
* Fetch ENSNode Registrar Actions
|
|
3494
3783
|
*
|
|
@@ -3553,4 +3842,193 @@ declare class ClientError extends Error {
|
|
|
3553
3842
|
static fromErrorResponse({ message, details }: ErrorResponse): ClientError;
|
|
3554
3843
|
}
|
|
3555
3844
|
|
|
3556
|
-
|
|
3845
|
+
/**
|
|
3846
|
+
* An enum representing the possible CAIP-19 Asset Namespace values.
|
|
3847
|
+
*/
|
|
3848
|
+
declare const AssetNamespaces: {
|
|
3849
|
+
readonly ERC721: "erc721";
|
|
3850
|
+
readonly ERC1155: "erc1155";
|
|
3851
|
+
};
|
|
3852
|
+
type AssetNamespace = (typeof AssetNamespaces)[keyof typeof AssetNamespaces];
|
|
3853
|
+
/**
|
|
3854
|
+
* A uint256 value that identifies a specific NFT within a NFT contract.
|
|
3855
|
+
*/
|
|
3856
|
+
type TokenId = bigint;
|
|
3857
|
+
/**
|
|
3858
|
+
* A globally unique reference to an NFT.
|
|
3859
|
+
*/
|
|
3860
|
+
interface AssetId {
|
|
3861
|
+
assetNamespace: AssetNamespace;
|
|
3862
|
+
contract: AccountId;
|
|
3863
|
+
tokenId: TokenId;
|
|
3864
|
+
}
|
|
3865
|
+
/**
|
|
3866
|
+
* Serialized representation of an {@link AssetId}.
|
|
3867
|
+
*
|
|
3868
|
+
* Formatted as a fully lowercase CAIP-19 AssetId.
|
|
3869
|
+
*
|
|
3870
|
+
* @see https://chainagnostic.org/CAIPs/caip-19
|
|
3871
|
+
* @example "eip155:1/erc721:0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf2caa1c2ca1d027f1ac823b529d0a67cd144264b2789fa2ea4d63a67c7103cc"
|
|
3872
|
+
* for vitalik.eth in the eth base registrar on mainnet.
|
|
3873
|
+
*/
|
|
3874
|
+
type SerializedAssetId = string;
|
|
3875
|
+
/**
|
|
3876
|
+
* Serializes {@link AssetId} object.
|
|
3877
|
+
*/
|
|
3878
|
+
declare function serializeAssetId(assetId: AssetId): SerializedAssetId;
|
|
3879
|
+
/**
|
|
3880
|
+
* Builds an AssetId for the NFT represented by the given contract,
|
|
3881
|
+
* tokenId, and assetNamespace.
|
|
3882
|
+
*
|
|
3883
|
+
* @param contract - The contract that manages the NFT
|
|
3884
|
+
* @param tokenId - The tokenId of the NFT
|
|
3885
|
+
* @param assetNamespace - The assetNamespace of the NFT
|
|
3886
|
+
* @returns The AssetId for the NFT represented by the given contract,
|
|
3887
|
+
* tokenId, and assetNamespace
|
|
3888
|
+
*/
|
|
3889
|
+
declare const buildAssetId: (contract: AccountId, tokenId: TokenId, assetNamespace: AssetNamespace) => AssetId;
|
|
3890
|
+
/**
|
|
3891
|
+
* A globally unique reference to an NFT tokenizing the ownership of a domain.
|
|
3892
|
+
*/
|
|
3893
|
+
interface DomainAssetId extends AssetId {
|
|
3894
|
+
/**
|
|
3895
|
+
* The namehash (node) of the domain who's ownership is tokenized by
|
|
3896
|
+
* this `AssetId`.
|
|
3897
|
+
*/
|
|
3898
|
+
domainId: Node;
|
|
3899
|
+
}
|
|
3900
|
+
/**
|
|
3901
|
+
* An enum representing the mint status of a DomainAssetId.
|
|
3902
|
+
*
|
|
3903
|
+
* After we index a NFT we never delete it from our index. Instead, when an
|
|
3904
|
+
* indexed NFT is burned onchain we retain its record and update its mint
|
|
3905
|
+
* status as `burned`. If a NFT is minted again after it is burned its mint
|
|
3906
|
+
* status is updated to `minted`.
|
|
3907
|
+
*/
|
|
3908
|
+
declare const NFTMintStatuses: {
|
|
3909
|
+
readonly Minted: "minted";
|
|
3910
|
+
readonly Burned: "burned";
|
|
3911
|
+
};
|
|
3912
|
+
type NFTMintStatus = (typeof NFTMintStatuses)[keyof typeof NFTMintStatuses];
|
|
3913
|
+
/**
|
|
3914
|
+
* Metadata about a NFT transfer event.
|
|
3915
|
+
*
|
|
3916
|
+
* This metadata can be used for building more helpful messages when processing
|
|
3917
|
+
* NFT transfer events.
|
|
3918
|
+
*/
|
|
3919
|
+
interface NFTTransferEventMetadata {
|
|
3920
|
+
chainId: ChainId;
|
|
3921
|
+
blockNumber: bigint;
|
|
3922
|
+
transactionHash: Hex;
|
|
3923
|
+
eventHandlerName: string;
|
|
3924
|
+
nft: DomainAssetId;
|
|
3925
|
+
}
|
|
3926
|
+
declare const formatNFTTransferEventMetadata: (metadata: NFTTransferEventMetadata) => string;
|
|
3927
|
+
/**
|
|
3928
|
+
* An enum representing the type of transfer that has occurred to a DomainAssetId.
|
|
3929
|
+
*/
|
|
3930
|
+
declare const NFTTransferTypes: {
|
|
3931
|
+
/**
|
|
3932
|
+
* Initial transfer from zeroAddress to a non-zeroAddress
|
|
3933
|
+
* Can happen at most once to a NFT AssetId
|
|
3934
|
+
*
|
|
3935
|
+
* Invariants:
|
|
3936
|
+
* - NFT is not indexed and therefore has no previous mint status or owner
|
|
3937
|
+
* - new NFT mint status is `minted`
|
|
3938
|
+
* - new NFT owner is a non-zeroAddress
|
|
3939
|
+
*/
|
|
3940
|
+
readonly Mint: "mint";
|
|
3941
|
+
/**
|
|
3942
|
+
* Subsequent transfer from zeroAddress to a non-zeroAddress
|
|
3943
|
+
* Can happen any number of times to a NFT AssetId as it passes in a cycle from
|
|
3944
|
+
* mint -> burn -> remint -> burn -> remint -> ...
|
|
3945
|
+
*
|
|
3946
|
+
* Invariants:
|
|
3947
|
+
* - NFT is indexed
|
|
3948
|
+
* - previous NFT mint status was `burned`
|
|
3949
|
+
* - previous NFT owner is the zeroAddress
|
|
3950
|
+
* - new NFT mint status is `minted`
|
|
3951
|
+
* - new NFT owner is a non-zeroAddress
|
|
3952
|
+
*/
|
|
3953
|
+
readonly Remint: "remint";
|
|
3954
|
+
/**
|
|
3955
|
+
* Special transfer type for improperly implemented NFT contracts that allow a NFT
|
|
3956
|
+
* that is currently minted to be reminted before an intermediate burn.
|
|
3957
|
+
*
|
|
3958
|
+
* Transfer from zeroAddress to non-zeroAddress for an indexed NFT where the
|
|
3959
|
+
* previously indexed nft had status `minted` with a non-zeroAddress owner.
|
|
3960
|
+
*
|
|
3961
|
+
* Invariants:
|
|
3962
|
+
* - NFT is indexed
|
|
3963
|
+
* - previous NFT mint status was `minted`
|
|
3964
|
+
* - previous NFT owner was a non-zeroAddress
|
|
3965
|
+
* - new NFT mint status is `minted`
|
|
3966
|
+
* - new NFT owner is a non-zeroAddress
|
|
3967
|
+
*/
|
|
3968
|
+
readonly MintedRemint: "minted-remint";
|
|
3969
|
+
/**
|
|
3970
|
+
* Transfer from a non-zeroAddress to zeroAddress
|
|
3971
|
+
*
|
|
3972
|
+
* Invariants:
|
|
3973
|
+
* - NFT is indexed
|
|
3974
|
+
* - previous NFT mint status was `minted`
|
|
3975
|
+
* - previous NFT owner is a non-zeroAddress
|
|
3976
|
+
* - new NFT mint status is `burned`
|
|
3977
|
+
* - new NFT owner is the zeroAddress
|
|
3978
|
+
*/
|
|
3979
|
+
readonly Burn: "burn";
|
|
3980
|
+
/**
|
|
3981
|
+
* Transfer from a non-zeroAddress to a distinct non-zeroAddress
|
|
3982
|
+
*
|
|
3983
|
+
* Invariants:
|
|
3984
|
+
* - NFT is indexed
|
|
3985
|
+
* - previous and new NFT mint status is `minted`
|
|
3986
|
+
* - previous and new NFT owner are distinct non-zeroAddress
|
|
3987
|
+
*/
|
|
3988
|
+
readonly Transfer: "transfer";
|
|
3989
|
+
/**
|
|
3990
|
+
* Transfer from a non-zeroAddress to the same non-zeroAddress
|
|
3991
|
+
*
|
|
3992
|
+
* Invariants:
|
|
3993
|
+
* - NFT is indexed
|
|
3994
|
+
* - previous and new NFT mint status is `minted`
|
|
3995
|
+
* - previous and new NFT owner are equivalent non-zeroAddress
|
|
3996
|
+
*/
|
|
3997
|
+
readonly SelfTransfer: "self-transfer";
|
|
3998
|
+
/**
|
|
3999
|
+
* Transfer from zeroAddress to zeroAddress for an indexed NFT
|
|
4000
|
+
*
|
|
4001
|
+
* Invariants:
|
|
4002
|
+
* - NFT is indexed
|
|
4003
|
+
* - previous and new NFT mint status is `burned`
|
|
4004
|
+
* - previous and new NFT owner are zeroAddress
|
|
4005
|
+
*/
|
|
4006
|
+
readonly RemintBurn: "remint-burn";
|
|
4007
|
+
/**
|
|
4008
|
+
* Special transfer type for improperly implemented NFT contracts that allow a NFT
|
|
4009
|
+
* that is currently minted to be reminted again before an intermediate burn.
|
|
4010
|
+
*
|
|
4011
|
+
* Transfer from zeroAddress to zeroAddress for an indexed NFT where the
|
|
4012
|
+
* previously indexed nft had status `minted` with a non-zeroAddress owner.
|
|
4013
|
+
*
|
|
4014
|
+
* Invariants:
|
|
4015
|
+
* - NFT is indexed
|
|
4016
|
+
* - previous NFT mint status was `minted`
|
|
4017
|
+
* - previous NFT owner was a non-zeroAddress
|
|
4018
|
+
* - new NFT mint status is `burned`
|
|
4019
|
+
* - new NFT owner is the zeroAddress
|
|
4020
|
+
*/
|
|
4021
|
+
readonly MintedRemintBurn: "minted-remint-burn";
|
|
4022
|
+
/**
|
|
4023
|
+
* Transfer from zeroAddress to zeroAddress for an unindexed NFT
|
|
4024
|
+
*
|
|
4025
|
+
* Invariants:
|
|
4026
|
+
* - NFT is not indexed and therefore has no previous mint status or owner
|
|
4027
|
+
* - NFT should remain unindexed and without any mint status or owner
|
|
4028
|
+
*/
|
|
4029
|
+
readonly MintBurn: "mint-burn";
|
|
4030
|
+
};
|
|
4031
|
+
type NFTTransferType = (typeof NFTTransferTypes)[keyof typeof NFTTransferTypes];
|
|
4032
|
+
declare const getNFTTransferType: (from: Address, to: Address, allowMintedRemint: boolean, metadata: NFTTransferEventMetadata, currentlyIndexedOwner?: Address) => NFTTransferType;
|
|
4033
|
+
|
|
4034
|
+
export { ADDR_REVERSE_NODE, ATTR_PROTOCOL_NAME, ATTR_PROTOCOL_STEP, ATTR_PROTOCOL_STEP_RESULT, type AcceleratableRequest, type AcceleratableResponse, type AccountId, type AssetId, type AssetNamespace, AssetNamespaces, BASENAMES_NODE, type BlockNumber, type BlockRef, type Blockrange, type Cache, type CachedValue, type ChainId, type ChainIdString, type ChainIndexingConfig, type ChainIndexingConfigDefinite, type ChainIndexingConfigIndefinite, type ChainIndexingConfigTypeId, ChainIndexingConfigTypeIds, 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_EVM_CHAIN_ID, DEFAULT_EVM_COIN_TYPE, type DNSEncodedLiteralName, type DNSEncodedName, type DNSEncodedPartiallyInterpretedName, type Datetime, type DatetimeISO8601, type DeepPartial, type DefaultableChainId, type DomainAssetId, type Duration, type ENSApiPublicConfig, type ENSIndexerPublicConfig, type ENSIndexerVersionInfo, ENSNodeClient, ETH_COIN_TYPE, ETH_NODE, type EncodedLabelHash, type EnsRainbowClientLabelSet, 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 LabelSetId, type LabelSetVersion, type LiteralLabel, type LiteralName, LruCache, type MultichainPrimaryNameResolutionArgs, type MultichainPrimaryNameResolutionResult, type NFTMintStatus, NFTMintStatuses, type NFTTransferEventMetadata, type NFTTransferType, NFTTransferTypes, type Name, type NamedIdentity, type NamedRegistrarAction, type Node, type NormalizedName, type OmnichainIndexingStatusId, OmnichainIndexingStatusIds, type OmnichainIndexingStatusSnapshot, type OmnichainIndexingStatusSnapshotBackfill, type OmnichainIndexingStatusSnapshotCompleted, type OmnichainIndexingStatusSnapshotFollowing, type OmnichainIndexingStatusSnapshotUnstarted, PROTOCOL_ATTRIBUTE_PREFIX, PluginName, type Price, type PriceDai, type PriceEth, type PriceUsdc, type ProtocolSpan, type ProtocolSpanTreeNode, type ProtocolTrace, RECORDS_PER_PAGE_DEFAULT, RECORDS_PER_PAGE_MAX, ROOT_NODE, type RealtimeIndexingStatusProjection, type ReferrerDetailRequest, type ReferrerDetailResponse, type ReferrerDetailResponseCode, ReferrerDetailResponseCodes, type ReferrerDetailResponseError, type ReferrerDetailResponseOk, type ReferrerLeaderboardPageRequest, type ReferrerLeaderboardPageResponse, type ReferrerLeaderboardPageResponseCode, ReferrerLeaderboardPageResponseCodes, type ReferrerLeaderboardPageResponseError, type ReferrerLeaderboardPageResponseOk, type RegistrarAction, type RegistrarActionEventId, type RegistrarActionPricing, type RegistrarActionPricingAvailable, type RegistrarActionPricingUnknown, type RegistrarActionReferral, type RegistrarActionReferralAvailable, type RegistrarActionReferralNotApplicable, type RegistrarActionType, RegistrarActionTypes, type RegistrarActionsFilter, type RegistrarActionsFilterBySubregistryNode, type RegistrarActionsFilterType, RegistrarActionsFilterTypes, type RegistrarActionsFilterWithEncodedReferral, type RegistrarActionsOrder, RegistrarActionsOrders, type RegistrarActionsRequest, type RegistrarActionsResponse, type RegistrarActionsResponseCode, RegistrarActionsResponseCodes, type RegistrarActionsResponseError, type RegistrarActionsResponseOk, type RegistrationLifecycle, type RegistrationLifecycleStage, type RequestPageParams, type ResolutionStatusId, ResolutionStatusIds, type ResolvePrimaryNameRequest, type ResolvePrimaryNameResponse, type ResolvePrimaryNamesRequest, type ResolvePrimaryNamesResponse, type ResolveRecordsRequest, type ResolveRecordsResponse, type ResolvedIdentity, type ResolverRecordsResponse, type ResolverRecordsResponseBase, type ResolverRecordsSelection, type ResponsePageContext, type ResponsePageContextWithNoRecords, type ResponsePageContextWithRecords, type ReverseResolutionArgs, ReverseResolutionProtocolStep, type ReverseResolutionResult, type RpcUrl, SWRCache, type SWRCacheOptions, type SerializedAccountId, type SerializedAssetId, type SerializedChainIndexingStatusSnapshot, type SerializedChainIndexingStatusSnapshotBackfill, type SerializedChainIndexingStatusSnapshotCompleted, type SerializedChainIndexingStatusSnapshotFollowing, type SerializedChainIndexingStatusSnapshotQueued, type SerializedConfigResponse, type SerializedCrossChainIndexingStatusSnapshot, type SerializedCrossChainIndexingStatusSnapshotOmnichain, type SerializedCurrencyAmount, type SerializedCurrentIndexingProjectionOmnichain, type SerializedENSApiPublicConfig, type SerializedENSIndexerPublicConfig, type SerializedENSIndexerVersionInfo, type SerializedIndexedChainIds, type SerializedIndexingStatusResponse, type SerializedIndexingStatusResponseError, type SerializedIndexingStatusResponseOk, type SerializedNamedRegistrarAction, type SerializedOmnichainIndexingStatusSnapshot, type SerializedOmnichainIndexingStatusSnapshotBackfill, type SerializedOmnichainIndexingStatusSnapshotCompleted, type SerializedOmnichainIndexingStatusSnapshotFollowing, type SerializedOmnichainIndexingStatusSnapshotUnstarted, type SerializedPrice, type SerializedPriceDai, type SerializedPriceEth, type SerializedPriceUsdc, type SerializedRealtimeIndexingStatusProjection, type SerializedReferrerDetailResponse, type SerializedReferrerDetailResponseError, type SerializedReferrerDetailResponseOk, type SerializedReferrerLeaderboardPageResponse, type SerializedReferrerLeaderboardPageResponseError, type SerializedReferrerLeaderboardPageResponseOk, type SerializedRegistrarAction, type SerializedRegistrarActionPricing, type SerializedRegistrarActionPricingAvailable, type SerializedRegistrarActionPricingUnknown, type SerializedRegistrarActionsResponse, type SerializedRegistrarActionsResponseError, type SerializedRegistrarActionsResponseOk, type SerializedRegistrationLifecycle, type SerializedSubregistry, type SubgraphInterpretedLabel, type SubgraphInterpretedName, type Subregistry, type TheGraphCannotFallbackReason, TheGraphCannotFallbackReasonSchema, type TheGraphFallback, TheGraphFallbackSchema, type TokenId, TraceableENSProtocol, type TraceableRequest, type TraceableResponse, TtlCache, type UnixTimestamp, type UnknownIdentity, type UnnamedIdentity, type UnresolvedIdentity, type UrlString, accountIdEqual, addDuration, addPrices, addrReverseLabel, asLowerCaseAddress, beautifyName, bigIntToNumber, bigintToCoinType, buildAssetId, buildEnsRainbowClientLabelSet, buildLabelSetId, buildLabelSetVersion, buildUnresolvedIdentity, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotCompleted, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotFollowing, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotUnstarted, coinTypeReverseLabel, coinTypeToEvmChainId, createIndexingConfig, createRealtimeIndexingStatusProjection, decodeDNSEncodedLiteralName, decodeDNSEncodedName, deserializeAccountId, deserializeBlockNumber, deserializeBlockRef, deserializeBlockrange, deserializeChainId, deserializeChainIndexingStatusSnapshot, deserializeConfigResponse, deserializeCrossChainIndexingStatusSnapshot, deserializeDatetime, deserializeDuration, deserializeENSApiPublicConfig, deserializeENSIndexerPublicConfig, deserializeErrorResponse, deserializeIndexingStatusResponse, deserializeOmnichainIndexingStatusSnapshot, deserializeRealtimeIndexingStatusProjection, deserializeReferrerDetailResponse, deserializeReferrerLeaderboardPageResponse, deserializeRegistrarActionsResponse, deserializeUnixTimestamp, deserializeUrl, durationBetween, encodeLabelHash, evmChainIdToCoinType, formatNFTTransferEventMetadata, getCurrencyInfo, getEthnamesSubregistryId, getLatestIndexedBlockRef, getNFTTransferType, getNameHierarchy, getOmnichainIndexingCursor, getOmnichainIndexingStatus, getResolvePrimaryNameChainIdParam, getTimestampForHighestOmnichainKnownBlock, getTimestampForLowestOmnichainStartBlock, hasNullByte, interpretedLabelsToInterpretedName, isEncodedLabelHash, isHttpProtocol, isLabelHash, isNormalizedLabel, isNormalizedName, isPriceCurrencyEqual, isPriceEqual, isRegistrarActionPricingAvailable, isRegistrarActionReferralAvailable, isResolvedIdentity, isSelectionEmpty, isSubgraphCompatible, isWebSocketProtocol, labelHashToBytes, labelhashLiteralLabel, literalLabelToInterpretedLabel, literalLabelsToInterpretedName, literalLabelsToLiteralName, makeENSApiPublicConfigSchema, makeSubdomainNode, parseNonNegativeInteger, parseReverseName, priceDai, priceEth, priceUsdc, registrarActionsFilter, registrarActionsPrerequisites, reverseName, serializeAccountId, serializeAssetId, serializeChainId, serializeChainIndexingSnapshots, serializeConfigResponse, serializeCrossChainIndexingStatusSnapshotOmnichain, serializeDatetime, serializeENSApiPublicConfig, serializeENSIndexerPublicConfig, serializeIndexedChainIds, serializeIndexingStatusResponse, serializeNamedRegistrarAction, serializeOmnichainIndexingStatusSnapshot, serializePrice, serializePriceEth, serializeRealtimeIndexingStatusProjection, serializeReferrerDetailResponse, serializeReferrerLeaderboardPageResponse, serializeRegistrarAction, serializeRegistrarActionPricing, serializeRegistrarActionsResponse, serializeRegistrationLifecycle, serializeSubregistry, serializeUrl, sortChainStatusesByStartBlockAsc, stripNullBytes, translateDefaultableChainIdToChainId, uint256ToHex32, uniq, validateSupportedLabelSetAndVersion };
|