@ensnode/ensnode-sdk 1.2.0 → 1.3.1
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 +1237 -749
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1059 -595
- package/dist/index.d.ts +1059 -595
- package/dist/index.js +1212 -729
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,57 @@
|
|
|
1
1
|
import z$1, { z } from 'zod/v4';
|
|
2
|
-
import { ENSNamespaceId } from '@ensnode/datasources';
|
|
2
|
+
import { ENSNamespaceId, DatasourceName } from '@ensnode/datasources';
|
|
3
3
|
export { ENSNamespaceId, ENSNamespaceIds, getENSRootChainId } from '@ensnode/datasources';
|
|
4
4
|
import { Hex, Address, ByteArray, Hash } from 'viem';
|
|
5
5
|
import { CoinType, EvmCoinType } from '@ensdomains/address-encoder';
|
|
6
6
|
export { CoinType, EvmCoinType } from '@ensdomains/address-encoder';
|
|
7
|
-
import { EncodedReferrer, ReferrerLeaderboardPageParams, ReferrerLeaderboardPage, ReferrerDetail } from '@namehash/ens-referrals';
|
|
7
|
+
import { UnixTimestamp as UnixTimestamp$1, EncodedReferrer, ReferrerLeaderboardPageParams, ReferrerLeaderboardPage, ReferrerDetail } from '@namehash/ens-referrals';
|
|
8
8
|
export { EncodedReferrer, ZERO_ENCODED_REFERRER, decodeEncodedReferrer } from '@namehash/ens-referrals';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* The ETH coinType.
|
|
12
|
+
*
|
|
13
|
+
* @see https://docs.ens.domains/ensip/9
|
|
14
|
+
*/
|
|
15
|
+
declare const ETH_COIN_TYPE: CoinType;
|
|
16
|
+
/**
|
|
17
|
+
* The 'default' chainId corresponding to the below {@link DEFAULT_EVM_COIN_TYPE} in the context of
|
|
18
|
+
* ENSIP-19.
|
|
19
|
+
*
|
|
20
|
+
* @see https://docs.ens.domains/ensip/19
|
|
21
|
+
*/
|
|
22
|
+
declare const DEFAULT_EVM_CHAIN_ID = 0;
|
|
23
|
+
/**
|
|
24
|
+
* ENSIP-19 EVM CoinType representing the 'default' coinType for EVM chains in ENS.
|
|
25
|
+
*
|
|
26
|
+
* @see https://docs.ens.domains/ensip/19/#reverse-resolution
|
|
27
|
+
*/
|
|
28
|
+
declare const DEFAULT_EVM_COIN_TYPE: EvmCoinType;
|
|
29
|
+
/**
|
|
30
|
+
* Converts a CoinType to an EVM Chain Id.
|
|
31
|
+
*
|
|
32
|
+
* NOTE: for whatever reason @ensdomains/address-encoder#coinTypeToEvmChainId doesn't handle the
|
|
33
|
+
* mainnet case so we implement that here
|
|
34
|
+
*
|
|
35
|
+
* @see https://docs.ens.domains/ensip/11/
|
|
36
|
+
*/
|
|
37
|
+
declare const coinTypeToEvmChainId: (coinType: CoinType) => ChainId;
|
|
38
|
+
/**
|
|
39
|
+
* Converts an EVM Chain Id to a CoinType.
|
|
40
|
+
*
|
|
41
|
+
* NOTE: for whatever reason @ensdomains/address-encoder#evmChainIdToCoinType doesn't handle the
|
|
42
|
+
* mainnet case so we implement that here
|
|
43
|
+
*/
|
|
44
|
+
declare const evmChainIdToCoinType: (chainId: ChainId) => CoinType;
|
|
45
|
+
/**
|
|
46
|
+
* Converts a bigint value representing a CoinType into a valid CoinType.
|
|
47
|
+
*
|
|
48
|
+
* This is useful when onchain events emit coinTypes as bigint but we want to constrain them to
|
|
49
|
+
* the CoinType type.
|
|
50
|
+
*
|
|
51
|
+
* @throws if `value` is too large to fit in Number.MAX_SAFE_INTEGER
|
|
52
|
+
*/
|
|
53
|
+
declare const bigintToCoinType: (value: bigint) => CoinType;
|
|
54
|
+
|
|
10
55
|
/**
|
|
11
56
|
* A hash value that uniquely identifies a single ENS name.
|
|
12
57
|
* Result of `namehash` function as specified in ENSIP-1.
|
|
@@ -253,66 +298,6 @@ type DNSEncodedPartiallyInterpretedName = DNSEncodedName & {
|
|
|
253
298
|
__brand: "DNSEncodedPartiallyInterpretedName";
|
|
254
299
|
};
|
|
255
300
|
|
|
256
|
-
/**
|
|
257
|
-
* Determines whether the Name is normalized.
|
|
258
|
-
*
|
|
259
|
-
* @param name - The Name to check for normalization
|
|
260
|
-
* @returns True if the name is normalized according to ENS normalization rules, false otherwise
|
|
261
|
-
*/
|
|
262
|
-
declare function isNormalizedName(name: Name): name is NormalizedName;
|
|
263
|
-
/**
|
|
264
|
-
* Determines whether the Label is normalized.
|
|
265
|
-
*
|
|
266
|
-
* @param label - The Label to check for normalization
|
|
267
|
-
* @returns True if the label is normalized according to ENS normalization rules, false otherwise
|
|
268
|
-
*/
|
|
269
|
-
declare function isNormalizedLabel(label: Label): boolean;
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* The ETH coinType.
|
|
273
|
-
*
|
|
274
|
-
* @see https://docs.ens.domains/ensip/9
|
|
275
|
-
*/
|
|
276
|
-
declare const ETH_COIN_TYPE: CoinType;
|
|
277
|
-
/**
|
|
278
|
-
* The 'default' chainId corresponding to the below {@link DEFAULT_EVM_COIN_TYPE} in the context of
|
|
279
|
-
* ENSIP-19.
|
|
280
|
-
*
|
|
281
|
-
* @see https://docs.ens.domains/ensip/19
|
|
282
|
-
*/
|
|
283
|
-
declare const DEFAULT_EVM_CHAIN_ID = 0;
|
|
284
|
-
/**
|
|
285
|
-
* ENSIP-19 EVM CoinType representing the 'default' coinType for EVM chains in ENS.
|
|
286
|
-
*
|
|
287
|
-
* @see https://docs.ens.domains/ensip/19/#reverse-resolution
|
|
288
|
-
*/
|
|
289
|
-
declare const DEFAULT_EVM_COIN_TYPE: EvmCoinType;
|
|
290
|
-
/**
|
|
291
|
-
* Converts a CoinType to an EVM Chain Id.
|
|
292
|
-
*
|
|
293
|
-
* NOTE: for whatever reason @ensdomains/address-encoder#coinTypeToEvmChainId doesn't handle the
|
|
294
|
-
* mainnet case so we implement that here
|
|
295
|
-
*
|
|
296
|
-
* @see https://docs.ens.domains/ensip/11/
|
|
297
|
-
*/
|
|
298
|
-
declare const coinTypeToEvmChainId: (coinType: CoinType) => ChainId;
|
|
299
|
-
/**
|
|
300
|
-
* Converts an EVM Chain Id to a CoinType.
|
|
301
|
-
*
|
|
302
|
-
* NOTE: for whatever reason @ensdomains/address-encoder#evmChainIdToCoinType doesn't handle the
|
|
303
|
-
* mainnet case so we implement that here
|
|
304
|
-
*/
|
|
305
|
-
declare const evmChainIdToCoinType: (chainId: ChainId) => CoinType;
|
|
306
|
-
/**
|
|
307
|
-
* Converts a bigint value representing a CoinType into a valid CoinType.
|
|
308
|
-
*
|
|
309
|
-
* This is useful when onchain events emit coinTypes as bigint but we want to constrain them to
|
|
310
|
-
* the CoinType type.
|
|
311
|
-
*
|
|
312
|
-
* @throws if `value` is too large to fit in Number.MAX_SAFE_INTEGER
|
|
313
|
-
*/
|
|
314
|
-
declare const bigintToCoinType: (value: bigint) => CoinType;
|
|
315
|
-
|
|
316
301
|
declare const ROOT_NODE: Node;
|
|
317
302
|
declare const ETH_NODE: Node;
|
|
318
303
|
declare const BASENAMES_NODE: Node;
|
|
@@ -362,6 +347,21 @@ declare const encodeLabelHash: (labelHash: LabelHash) => EncodedLabelHash;
|
|
|
362
347
|
*/
|
|
363
348
|
declare function isEncodedLabelHash(maybeEncodedLabelHash: string): maybeEncodedLabelHash is EncodedLabelHash;
|
|
364
349
|
|
|
350
|
+
/**
|
|
351
|
+
* Determines whether the Name is normalized.
|
|
352
|
+
*
|
|
353
|
+
* @param name - The Name to check for normalization
|
|
354
|
+
* @returns True if the name is normalized according to ENS normalization rules, false otherwise
|
|
355
|
+
*/
|
|
356
|
+
declare function isNormalizedName(name: Name): name is NormalizedName;
|
|
357
|
+
/**
|
|
358
|
+
* Determines whether the Label is normalized.
|
|
359
|
+
*
|
|
360
|
+
* @param label - The Label to check for normalization
|
|
361
|
+
* @returns True if the label is normalized according to ENS normalization rules, false otherwise
|
|
362
|
+
*/
|
|
363
|
+
declare function isNormalizedLabel(label: Label): boolean;
|
|
364
|
+
|
|
365
365
|
/**
|
|
366
366
|
* Checks if the input is a {@link LabelHash}.
|
|
367
367
|
*
|
|
@@ -369,6 +369,10 @@ declare function isEncodedLabelHash(maybeEncodedLabelHash: string): maybeEncoded
|
|
|
369
369
|
*/
|
|
370
370
|
declare function isLabelHash(maybeLabelHash: string): maybeLabelHash is LabelHash;
|
|
371
371
|
|
|
372
|
+
/**
|
|
373
|
+
* Name for the ENS Root
|
|
374
|
+
*/
|
|
375
|
+
declare const ENS_ROOT: Name;
|
|
372
376
|
/**
|
|
373
377
|
* Constructs a name hierarchy from a given NormalizedName.
|
|
374
378
|
*
|
|
@@ -381,6 +385,10 @@ declare function isLabelHash(maybeLabelHash: string): maybeLabelHash is LabelHas
|
|
|
381
385
|
* on '.' and receive NormalizedNames as a result
|
|
382
386
|
*/
|
|
383
387
|
declare const getNameHierarchy: (name: NormalizedName) => NormalizedName[];
|
|
388
|
+
/**
|
|
389
|
+
* Get FQDN of parent for a name.
|
|
390
|
+
*/
|
|
391
|
+
declare const getParentNameFQDN: (name: Name) => Name;
|
|
384
392
|
/**
|
|
385
393
|
* Beautifies a name by converting each normalized label in the provided name to
|
|
386
394
|
* its "beautified" form. Labels that are not normalized retain their original value.
|
|
@@ -647,61 +655,32 @@ declare class LruCache<KeyType extends string, ValueType> implements Cache<KeyTy
|
|
|
647
655
|
get capacity(): number;
|
|
648
656
|
}
|
|
649
657
|
|
|
650
|
-
/**
|
|
651
|
-
* Data structure for a single cached value.
|
|
652
|
-
*/
|
|
653
|
-
interface CachedValue<ValueType> {
|
|
654
|
-
/**
|
|
655
|
-
* The cached value of type ValueType.
|
|
656
|
-
*/
|
|
657
|
-
value: ValueType;
|
|
658
|
-
/**
|
|
659
|
-
* Unix timestamp indicating when the cached `value` was generated.
|
|
660
|
-
*/
|
|
661
|
-
updatedAt: UnixTimestamp;
|
|
662
|
-
}
|
|
663
658
|
interface SWRCacheOptions<ValueType> {
|
|
664
659
|
/**
|
|
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`.
|
|
660
|
+
* The async function generating a value of `ValueType` to wrap with SWR caching. It may throw an
|
|
661
|
+
* Error type.
|
|
672
662
|
*/
|
|
673
663
|
fn: () => Promise<ValueType>;
|
|
674
664
|
/**
|
|
675
|
-
* Time-to-live duration in seconds. After this duration
|
|
676
|
-
* considered stale but is still retained in the cache
|
|
665
|
+
* Time-to-live duration of a cached result in seconds. After this duration:
|
|
666
|
+
* - the currently cached result is considered "stale" but is still retained in the cache
|
|
667
|
+
* until successfully replaced.
|
|
668
|
+
* - Each time the cache is read, if the cached result is "stale" and no background
|
|
669
|
+
* revalidation attempt is already in progress, a new background revalidation
|
|
670
|
+
* attempt will be made.
|
|
677
671
|
*/
|
|
678
672
|
ttl: Duration;
|
|
679
673
|
/**
|
|
680
|
-
* Optional time-to-proactively-revalidate duration in seconds. After
|
|
681
|
-
*
|
|
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.
|
|
674
|
+
* Optional time-to-proactively-revalidate duration in seconds. After a cached result is
|
|
675
|
+
* initialized, and this duration has passed, attempts to asynchronously revalidate
|
|
676
|
+
* the cached result will be proactively made in the background on this interval.
|
|
690
677
|
*/
|
|
691
|
-
|
|
678
|
+
proactiveRevalidationInterval?: Duration;
|
|
692
679
|
/**
|
|
693
|
-
*
|
|
694
|
-
*
|
|
695
|
-
* Optional. Defaults to `false`.
|
|
680
|
+
* Optional proactive initialization. Defaults to `false`.
|
|
696
681
|
*
|
|
697
|
-
* If `true`:
|
|
698
|
-
*
|
|
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.
|
|
682
|
+
* If `true`: The SWR cache will proactively initialize itself.
|
|
683
|
+
* If `false`: The SWR cache will lazily wait to initialize itself until the first read.
|
|
705
684
|
*/
|
|
706
685
|
proactivelyInitialize?: boolean;
|
|
707
686
|
}
|
|
@@ -712,81 +691,43 @@ interface SWRCacheOptions<ValueType> {
|
|
|
712
691
|
* asynchronously revalidating the cache in the background. This provides:
|
|
713
692
|
* - Sub-millisecond response times (after first fetch)
|
|
714
693
|
* - Always available data (serves stale data during revalidation)
|
|
715
|
-
* - Automatic background updates
|
|
716
|
-
* are made for the cached data or when the `revalidationInterval` is reached)
|
|
694
|
+
* - Automatic background updates via configurable intervals
|
|
717
695
|
*
|
|
718
696
|
* @example
|
|
719
697
|
* ```typescript
|
|
720
|
-
* const
|
|
721
|
-
*
|
|
722
|
-
* return response.json();
|
|
723
|
-
* };
|
|
724
|
-
*
|
|
725
|
-
* const cache = await SWRCache.create({
|
|
726
|
-
* fn: fetchExpensiveData,
|
|
698
|
+
* const cache = new SWRCache({
|
|
699
|
+
* fn: async () => fetch('/api/data').then(r => r.json()),
|
|
727
700
|
* ttl: 60, // 1 minute TTL
|
|
728
|
-
*
|
|
701
|
+
* proactiveRevalidationInterval: 300 // proactively revalidate every 5 minutes
|
|
729
702
|
* });
|
|
730
703
|
*
|
|
731
|
-
* //
|
|
732
|
-
* const
|
|
733
|
-
*
|
|
734
|
-
* // [T1: T0 + 59s] Within TTL: returns data cache at T0 (fast)
|
|
735
|
-
* const secondRead = await cache.readCache();
|
|
736
|
-
*
|
|
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!
|
|
704
|
+
* // Returns cached data or waits for initial fetch
|
|
705
|
+
* const data = await cache.read();
|
|
740
706
|
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
* // [T4: T3 + 1m] Within TTL: returns data cache at T3 (fast)
|
|
744
|
-
* const fourthRead = await cache.readCache(); // Still fast!
|
|
745
|
-
*
|
|
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.
|
|
707
|
+
* if (data instanceof Error) { ... }
|
|
708
|
+
* ```
|
|
749
709
|
*
|
|
750
710
|
* @link https://web.dev/stale-while-revalidate/
|
|
751
711
|
* @link https://datatracker.ietf.org/doc/html/rfc5861
|
|
752
712
|
*/
|
|
753
713
|
declare class SWRCache<ValueType> {
|
|
754
|
-
readonly options
|
|
714
|
+
private readonly options;
|
|
755
715
|
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
716
|
private inProgressRevalidate;
|
|
717
|
+
private backgroundInterval;
|
|
718
|
+
constructor(options: SWRCacheOptions<ValueType>);
|
|
719
|
+
private revalidate;
|
|
765
720
|
/**
|
|
766
|
-
*
|
|
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.
|
|
721
|
+
* Read the most recently cached result from the `SWRCache`.
|
|
777
722
|
*
|
|
778
|
-
* @
|
|
779
|
-
*
|
|
723
|
+
* @returns a `ValueType` that was most recently successfully returned by `fn` or `Error` if `fn`
|
|
724
|
+
* has never successfully returned.
|
|
780
725
|
*/
|
|
781
|
-
|
|
782
|
-
private revalidate;
|
|
726
|
+
read(): Promise<ValueType | Error>;
|
|
783
727
|
/**
|
|
784
|
-
*
|
|
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,
|
|
728
|
+
* Destroys the background revalidation interval, if exists.
|
|
788
729
|
*/
|
|
789
|
-
|
|
730
|
+
destroy(): void;
|
|
790
731
|
}
|
|
791
732
|
|
|
792
733
|
/**
|
|
@@ -913,6 +854,35 @@ declare function isPriceEqual(priceA: Price, priceB: Price): boolean;
|
|
|
913
854
|
*/
|
|
914
855
|
declare function addPrices<const PriceType extends Price = Price>(...prices: [PriceType, PriceType, ...PriceType[]]): PriceType;
|
|
915
856
|
|
|
857
|
+
/**
|
|
858
|
+
* Gets the AccountId for the contract in the specified namespace, datasource, and
|
|
859
|
+
* contract name, or undefined if it is not defined or is not a single AccountId.
|
|
860
|
+
*
|
|
861
|
+
* This is useful when you want to retrieve the AccountId for a contract by its name
|
|
862
|
+
* where it may or may not actually be defined for the given namespace and datasource.
|
|
863
|
+
*
|
|
864
|
+
* @param namespaceId - The ENSNamespace identifier (e.g. 'mainnet', 'sepolia', 'holesky',
|
|
865
|
+
* 'ens-test-env')
|
|
866
|
+
* @param datasourceName - The name of the Datasource to search for contractName in
|
|
867
|
+
* @param contractName - The name of the contract to retrieve
|
|
868
|
+
* @returns The AccountId of the contract with the given namespace, datasource,
|
|
869
|
+
* and contract name, or undefined if it is not found or is not a single AccountId
|
|
870
|
+
*/
|
|
871
|
+
declare const maybeGetDatasourceContract: (namespaceId: ENSNamespaceId, datasourceName: DatasourceName, contractName: string) => AccountId | undefined;
|
|
872
|
+
/**
|
|
873
|
+
* Gets the AccountId for the contract in the specified namespace, datasource, and
|
|
874
|
+
* contract name, or throws an error if it is not defined or is not a single AccountId.
|
|
875
|
+
*
|
|
876
|
+
* @param namespaceId - The ENSNamespace identifier (e.g. 'mainnet', 'sepolia', 'holesky',
|
|
877
|
+
* 'ens-test-env')
|
|
878
|
+
* @param datasourceName - The name of the Datasource to search for contractName in
|
|
879
|
+
* @param contractName - The name of the contract to retrieve
|
|
880
|
+
* @returns The AccountId of the contract with the given namespace, datasource,
|
|
881
|
+
* and contract name
|
|
882
|
+
* @throws Error if the contract is not found or is not a single AccountId
|
|
883
|
+
*/
|
|
884
|
+
declare const getDatasourceContract: (namespaceId: ENSNamespaceId, datasourceName: DatasourceName, contractName: string) => AccountId;
|
|
885
|
+
|
|
916
886
|
/**
|
|
917
887
|
* Duration between two moments in time.
|
|
918
888
|
*/
|
|
@@ -937,13 +907,13 @@ type DatetimeISO8601 = string;
|
|
|
937
907
|
*/
|
|
938
908
|
type UrlString = string;
|
|
939
909
|
/**
|
|
940
|
-
*
|
|
910
|
+
* String representation of {@link AccountId}.
|
|
941
911
|
*
|
|
942
912
|
* Formatted as a fully lowercase CAIP-10 AccountId.
|
|
943
913
|
*
|
|
944
914
|
* @see https://chainagnostic.org/CAIPs/caip-10
|
|
945
915
|
*/
|
|
946
|
-
type
|
|
916
|
+
type AccountIdString = string;
|
|
947
917
|
|
|
948
918
|
declare function deserializeChainId(maybeChainId: ChainIdString, valueLabel?: string): ChainId;
|
|
949
919
|
declare function deserializeDatetime(maybeDatetime: string, valueLabel?: string): Datetime;
|
|
@@ -956,7 +926,7 @@ declare function deserializeBlockrange(maybeBlockrange: Partial<Blockrange>, val
|
|
|
956
926
|
};
|
|
957
927
|
declare function deserializeBlockRef(maybeBlockRef: Partial<BlockRef>, valueLabel?: string): BlockRef;
|
|
958
928
|
declare function deserializeDuration(maybeDuration: unknown, valueLabel?: string): Duration;
|
|
959
|
-
declare function
|
|
929
|
+
declare function parseAccountId(maybeAccountId: unknown, valueLabel?: string): AccountId;
|
|
960
930
|
|
|
961
931
|
/**
|
|
962
932
|
* Interprets a Literal Label, producing an Interpreted Label.
|
|
@@ -1043,13 +1013,13 @@ declare function serializePrice(price: Price): SerializedPrice;
|
|
|
1043
1013
|
*/
|
|
1044
1014
|
declare function serializePriceEth(price: PriceEth): SerializedPriceEth;
|
|
1045
1015
|
/**
|
|
1046
|
-
*
|
|
1016
|
+
* Format {@link AccountId} object as a string.
|
|
1047
1017
|
*
|
|
1048
1018
|
* Formatted as a fully lowercase CAIP-10 AccountId.
|
|
1049
1019
|
*
|
|
1050
1020
|
* @see https://chainagnostic.org/CAIPs/caip-10
|
|
1051
1021
|
*/
|
|
1052
|
-
declare function
|
|
1022
|
+
declare function formatAccountId(accountId: AccountId): AccountIdString;
|
|
1053
1023
|
|
|
1054
1024
|
declare function isHttpProtocol(url: URL): boolean;
|
|
1055
1025
|
declare function isWebSocketProtocol(url: URL): boolean;
|
|
@@ -2238,115 +2208,766 @@ type IndexingStatusRequest = {};
|
|
|
2238
2208
|
declare function serializeIndexingStatusResponse(response: IndexingStatusResponse): SerializedIndexingStatusResponse;
|
|
2239
2209
|
|
|
2240
2210
|
/**
|
|
2241
|
-
*
|
|
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}.
|
|
2211
|
+
* Deserialize a {@link NameTokensResponse} object.
|
|
2274
2212
|
*/
|
|
2275
|
-
|
|
2276
|
-
subregistryId: SerializedAccountId;
|
|
2277
|
-
}
|
|
2278
|
-
declare function serializeSubregistry(subregistry: Subregistry): SerializedSubregistry;
|
|
2213
|
+
declare function deserializedNameTokensResponse(maybeResponse: SerializedNameTokensResponse): NameTokensResponse;
|
|
2279
2214
|
|
|
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: {
|
|
2215
|
+
declare const nameTokensPrerequisites: Readonly<{
|
|
2287
2216
|
/**
|
|
2288
|
-
*
|
|
2217
|
+
* Required plugins to enable Name Tokens API routes.
|
|
2289
2218
|
*
|
|
2290
|
-
*
|
|
2291
|
-
*
|
|
2219
|
+
* 1. `registrars` plugin is required so that data in the `registrationLifecycles`
|
|
2220
|
+
* table is populated.
|
|
2221
|
+
* 2. `tokenscope` plugin is required so that data in the `nameTokens`
|
|
2222
|
+
* table is populated.
|
|
2292
2223
|
*/
|
|
2293
|
-
readonly
|
|
2224
|
+
requiredPlugins: readonly [PluginName.Registrars, PluginName.TokenScope];
|
|
2294
2225
|
/**
|
|
2295
|
-
*
|
|
2296
|
-
*
|
|
2297
|
-
* Happens when
|
|
2298
|
-
* `expiry < the current timestamp <= expiry + 90 days`.
|
|
2226
|
+
* Check if provided ENSApiPublicConfig supports the Name Tokens API.
|
|
2299
2227
|
*/
|
|
2300
|
-
|
|
2228
|
+
hasEnsIndexerConfigSupport(config: ENSIndexerPublicConfig): boolean;
|
|
2301
2229
|
/**
|
|
2302
|
-
*
|
|
2230
|
+
* Required Indexing Status IDs
|
|
2303
2231
|
*
|
|
2304
|
-
*
|
|
2305
|
-
*
|
|
2232
|
+
* Database indexes are created by the time the omnichain indexing status
|
|
2233
|
+
* is either `completed` or `following`.
|
|
2306
2234
|
*/
|
|
2307
|
-
|
|
2235
|
+
supportedIndexingStatusIds: ("omnichain-following" | "omnichain-completed")[];
|
|
2308
2236
|
/**
|
|
2309
|
-
*
|
|
2310
|
-
*
|
|
2311
|
-
* Happens when
|
|
2312
|
-
* ` expiry + 120 days < the current timestamp`.
|
|
2237
|
+
* Check if provided indexing status supports the Name Tokens API.
|
|
2313
2238
|
*/
|
|
2314
|
-
|
|
2315
|
-
}
|
|
2316
|
-
|
|
2239
|
+
hasIndexingStatusSupport(omnichainIndexingStatusId: OmnichainIndexingStatusId): boolean;
|
|
2240
|
+
}>;
|
|
2241
|
+
|
|
2317
2242
|
/**
|
|
2318
|
-
*
|
|
2243
|
+
* Represents request to Name Tokens API.
|
|
2319
2244
|
*/
|
|
2320
|
-
interface
|
|
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;
|
|
2245
|
+
interface NameTokensRequestByDomainId {
|
|
2246
|
+
domainId: Node;
|
|
2333
2247
|
/**
|
|
2334
|
-
*
|
|
2335
|
-
*
|
|
2336
|
-
* Identifies when the Registration Lifecycle is scheduled to expire.
|
|
2248
|
+
* Name for which name tokens were requested.
|
|
2337
2249
|
*/
|
|
2338
|
-
|
|
2250
|
+
name?: undefined;
|
|
2339
2251
|
}
|
|
2340
2252
|
/**
|
|
2341
|
-
*
|
|
2253
|
+
* Represents request to Name Tokens API.
|
|
2342
2254
|
*/
|
|
2343
|
-
interface
|
|
2344
|
-
|
|
2255
|
+
interface NameTokensRequestByName {
|
|
2256
|
+
domainId?: undefined;
|
|
2257
|
+
/**
|
|
2258
|
+
* Name for which name tokens were requested.
|
|
2259
|
+
*/
|
|
2260
|
+
name: Name;
|
|
2345
2261
|
}
|
|
2346
|
-
|
|
2262
|
+
type NameTokensRequest = NameTokensRequestByDomainId | NameTokensRequestByName;
|
|
2347
2263
|
|
|
2348
2264
|
/**
|
|
2349
|
-
*
|
|
2265
|
+
* An enum representing the possible CAIP-19 Asset Namespace values.
|
|
2266
|
+
*/
|
|
2267
|
+
declare const AssetNamespaces: {
|
|
2268
|
+
readonly ERC721: "erc721";
|
|
2269
|
+
readonly ERC1155: "erc1155";
|
|
2270
|
+
};
|
|
2271
|
+
type AssetNamespace = (typeof AssetNamespaces)[keyof typeof AssetNamespaces];
|
|
2272
|
+
/**
|
|
2273
|
+
* A uint256 value that identifies a specific NFT within a NFT contract.
|
|
2274
|
+
*/
|
|
2275
|
+
type TokenId = bigint;
|
|
2276
|
+
/**
|
|
2277
|
+
* Serialized representation of {@link TokenId}.
|
|
2278
|
+
*/
|
|
2279
|
+
type SerializedTokenId = string;
|
|
2280
|
+
/**
|
|
2281
|
+
* A globally unique reference to an NFT.
|
|
2282
|
+
*/
|
|
2283
|
+
interface AssetId {
|
|
2284
|
+
assetNamespace: AssetNamespace;
|
|
2285
|
+
contract: AccountId;
|
|
2286
|
+
tokenId: TokenId;
|
|
2287
|
+
}
|
|
2288
|
+
/**
|
|
2289
|
+
* Serialized representation of {@link AssetId}.
|
|
2290
|
+
*/
|
|
2291
|
+
interface SerializedAssetId extends Omit<AssetId, "tokenId"> {
|
|
2292
|
+
tokenId: SerializedTokenId;
|
|
2293
|
+
}
|
|
2294
|
+
/**
|
|
2295
|
+
* String representation of an {@link AssetId}.
|
|
2296
|
+
*
|
|
2297
|
+
* Formatted as a fully lowercase CAIP-19 AssetId.
|
|
2298
|
+
*
|
|
2299
|
+
* @see https://chainagnostic.org/CAIPs/caip-19
|
|
2300
|
+
* @example "eip155:1/erc721:0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf2caa1c2ca1d027f1ac823b529d0a67cd144264b2789fa2ea4d63a67c7103cc"
|
|
2301
|
+
* for vitalik.eth in the eth base registrar on mainnet.
|
|
2302
|
+
*/
|
|
2303
|
+
type AssetIdString = string;
|
|
2304
|
+
/**
|
|
2305
|
+
* Serializes {@link AssetId} object.
|
|
2306
|
+
*/
|
|
2307
|
+
declare function serializeAssetId(assetId: AssetId): SerializedAssetId;
|
|
2308
|
+
/**
|
|
2309
|
+
* Deserialize a {@link AssetId} object.
|
|
2310
|
+
*/
|
|
2311
|
+
declare function deserializeAssetId(maybeAssetId: unknown, valueLabel?: string): AssetId;
|
|
2312
|
+
/**
|
|
2313
|
+
* Format {@link AssetId} object as a string.
|
|
2314
|
+
*/
|
|
2315
|
+
declare function formatAssetId(assetId: AssetId): AssetIdString;
|
|
2316
|
+
/**
|
|
2317
|
+
* Parse a stringified representation of {@link AssetId} object.
|
|
2318
|
+
*/
|
|
2319
|
+
declare function parseAssetId(maybeAssetId: AssetIdString, valueLabel?: string): AssetId;
|
|
2320
|
+
/**
|
|
2321
|
+
* Builds an AssetId for the NFT represented by the given contract,
|
|
2322
|
+
* tokenId, and assetNamespace.
|
|
2323
|
+
*
|
|
2324
|
+
* @param contract - The contract that manages the NFT
|
|
2325
|
+
* @param tokenId - The tokenId of the NFT
|
|
2326
|
+
* @param assetNamespace - The assetNamespace of the NFT
|
|
2327
|
+
* @returns The AssetId for the NFT represented by the given contract,
|
|
2328
|
+
* tokenId, and assetNamespace
|
|
2329
|
+
*/
|
|
2330
|
+
declare const buildAssetId: (contract: AccountId, tokenId: TokenId, assetNamespace: AssetNamespace) => AssetId;
|
|
2331
|
+
/**
|
|
2332
|
+
* A globally unique reference to an NFT tokenizing the ownership of a domain.
|
|
2333
|
+
*/
|
|
2334
|
+
interface DomainAssetId extends AssetId {
|
|
2335
|
+
/**
|
|
2336
|
+
* The namehash (node) of the domain who's ownership is tokenized by
|
|
2337
|
+
* this `AssetId`.
|
|
2338
|
+
*/
|
|
2339
|
+
domainId: Node;
|
|
2340
|
+
}
|
|
2341
|
+
/**
|
|
2342
|
+
* Serialized representation of {@link DomainAssetId}.
|
|
2343
|
+
*/
|
|
2344
|
+
interface SerializedDomainAssetId extends SerializedAssetId {
|
|
2345
|
+
domainId: Node;
|
|
2346
|
+
}
|
|
2347
|
+
declare function serializeDomainAssetId(domainAsset: DomainAssetId): SerializedDomainAssetId;
|
|
2348
|
+
/**
|
|
2349
|
+
* An enum representing the mint status of a DomainAssetId.
|
|
2350
|
+
*
|
|
2351
|
+
* After we index a NFT we never delete it from our index. Instead, when an
|
|
2352
|
+
* indexed NFT is burned onchain we retain its record and update its mint
|
|
2353
|
+
* status as `burned`. If a NFT is minted again after it is burned its mint
|
|
2354
|
+
* status is updated to `minted`.
|
|
2355
|
+
*/
|
|
2356
|
+
declare const NFTMintStatuses: {
|
|
2357
|
+
readonly Minted: "minted";
|
|
2358
|
+
readonly Burned: "burned";
|
|
2359
|
+
};
|
|
2360
|
+
type NFTMintStatus = (typeof NFTMintStatuses)[keyof typeof NFTMintStatuses];
|
|
2361
|
+
/**
|
|
2362
|
+
* Metadata about a NFT transfer event.
|
|
2363
|
+
*
|
|
2364
|
+
* This metadata can be used for building more helpful messages when processing
|
|
2365
|
+
* NFT transfer events.
|
|
2366
|
+
*/
|
|
2367
|
+
interface NFTTransferEventMetadata {
|
|
2368
|
+
chainId: ChainId;
|
|
2369
|
+
blockNumber: bigint;
|
|
2370
|
+
transactionHash: Hex;
|
|
2371
|
+
eventHandlerName: string;
|
|
2372
|
+
nft: DomainAssetId;
|
|
2373
|
+
}
|
|
2374
|
+
declare const formatNFTTransferEventMetadata: (metadata: NFTTransferEventMetadata) => string;
|
|
2375
|
+
/**
|
|
2376
|
+
* An enum representing the type of transfer that has occurred to a DomainAssetId.
|
|
2377
|
+
*/
|
|
2378
|
+
declare const NFTTransferTypes: {
|
|
2379
|
+
/**
|
|
2380
|
+
* Initial transfer from zeroAddress to a non-zeroAddress
|
|
2381
|
+
* Can happen at most once to a NFT AssetId
|
|
2382
|
+
*
|
|
2383
|
+
* Invariants:
|
|
2384
|
+
* - NFT is not indexed and therefore has no previous mint status or owner
|
|
2385
|
+
* - new NFT mint status is `minted`
|
|
2386
|
+
* - new NFT owner is a non-zeroAddress
|
|
2387
|
+
*/
|
|
2388
|
+
readonly Mint: "mint";
|
|
2389
|
+
/**
|
|
2390
|
+
* Subsequent transfer from zeroAddress to a non-zeroAddress
|
|
2391
|
+
* Can happen any number of times to a NFT AssetId as it passes in a cycle from
|
|
2392
|
+
* mint -> burn -> remint -> burn -> remint -> ...
|
|
2393
|
+
*
|
|
2394
|
+
* Invariants:
|
|
2395
|
+
* - NFT is indexed
|
|
2396
|
+
* - previous NFT mint status was `burned`
|
|
2397
|
+
* - previous NFT owner is the zeroAddress
|
|
2398
|
+
* - new NFT mint status is `minted`
|
|
2399
|
+
* - new NFT owner is a non-zeroAddress
|
|
2400
|
+
*/
|
|
2401
|
+
readonly Remint: "remint";
|
|
2402
|
+
/**
|
|
2403
|
+
* Special transfer type for improperly implemented NFT contracts that allow a NFT
|
|
2404
|
+
* that is currently minted to be reminted before an intermediate burn.
|
|
2405
|
+
*
|
|
2406
|
+
* Transfer from zeroAddress to non-zeroAddress for an indexed NFT where the
|
|
2407
|
+
* previously indexed nft had status `minted` with a non-zeroAddress owner.
|
|
2408
|
+
*
|
|
2409
|
+
* Invariants:
|
|
2410
|
+
* - NFT is indexed
|
|
2411
|
+
* - previous NFT mint status was `minted`
|
|
2412
|
+
* - previous NFT owner was a non-zeroAddress
|
|
2413
|
+
* - new NFT mint status is `minted`
|
|
2414
|
+
* - new NFT owner is a non-zeroAddress
|
|
2415
|
+
*/
|
|
2416
|
+
readonly MintedRemint: "minted-remint";
|
|
2417
|
+
/**
|
|
2418
|
+
* Transfer from a non-zeroAddress to zeroAddress
|
|
2419
|
+
*
|
|
2420
|
+
* Invariants:
|
|
2421
|
+
* - NFT is indexed
|
|
2422
|
+
* - previous NFT mint status was `minted`
|
|
2423
|
+
* - previous NFT owner is a non-zeroAddress
|
|
2424
|
+
* - new NFT mint status is `burned`
|
|
2425
|
+
* - new NFT owner is the zeroAddress
|
|
2426
|
+
*/
|
|
2427
|
+
readonly Burn: "burn";
|
|
2428
|
+
/**
|
|
2429
|
+
* Transfer from a non-zeroAddress to a distinct non-zeroAddress
|
|
2430
|
+
*
|
|
2431
|
+
* Invariants:
|
|
2432
|
+
* - NFT is indexed
|
|
2433
|
+
* - previous and new NFT mint status is `minted`
|
|
2434
|
+
* - previous and new NFT owner are distinct non-zeroAddress
|
|
2435
|
+
*/
|
|
2436
|
+
readonly Transfer: "transfer";
|
|
2437
|
+
/**
|
|
2438
|
+
* Transfer from a non-zeroAddress to the same non-zeroAddress
|
|
2439
|
+
*
|
|
2440
|
+
* Invariants:
|
|
2441
|
+
* - NFT is indexed
|
|
2442
|
+
* - previous and new NFT mint status is `minted`
|
|
2443
|
+
* - previous and new NFT owner are equivalent non-zeroAddress
|
|
2444
|
+
*/
|
|
2445
|
+
readonly SelfTransfer: "self-transfer";
|
|
2446
|
+
/**
|
|
2447
|
+
* Transfer from zeroAddress to zeroAddress for an indexed NFT
|
|
2448
|
+
*
|
|
2449
|
+
* Invariants:
|
|
2450
|
+
* - NFT is indexed
|
|
2451
|
+
* - previous and new NFT mint status is `burned`
|
|
2452
|
+
* - previous and new NFT owner are zeroAddress
|
|
2453
|
+
*/
|
|
2454
|
+
readonly RemintBurn: "remint-burn";
|
|
2455
|
+
/**
|
|
2456
|
+
* Special transfer type for improperly implemented NFT contracts that allow a NFT
|
|
2457
|
+
* that is currently minted to be reminted again before an intermediate burn.
|
|
2458
|
+
*
|
|
2459
|
+
* Transfer from zeroAddress to zeroAddress for an indexed NFT where the
|
|
2460
|
+
* previously indexed nft had status `minted` with a non-zeroAddress owner.
|
|
2461
|
+
*
|
|
2462
|
+
* Invariants:
|
|
2463
|
+
* - NFT is indexed
|
|
2464
|
+
* - previous NFT mint status was `minted`
|
|
2465
|
+
* - previous NFT owner was a non-zeroAddress
|
|
2466
|
+
* - new NFT mint status is `burned`
|
|
2467
|
+
* - new NFT owner is the zeroAddress
|
|
2468
|
+
*/
|
|
2469
|
+
readonly MintedRemintBurn: "minted-remint-burn";
|
|
2470
|
+
/**
|
|
2471
|
+
* Transfer from zeroAddress to zeroAddress for an unindexed NFT
|
|
2472
|
+
*
|
|
2473
|
+
* Invariants:
|
|
2474
|
+
* - NFT is not indexed and therefore has no previous mint status or owner
|
|
2475
|
+
* - NFT should remain unindexed and without any mint status or owner
|
|
2476
|
+
*/
|
|
2477
|
+
readonly MintBurn: "mint-burn";
|
|
2478
|
+
};
|
|
2479
|
+
type NFTTransferType = (typeof NFTTransferTypes)[keyof typeof NFTTransferTypes];
|
|
2480
|
+
declare const getNFTTransferType: (from: Address, to: Address, allowMintedRemint: boolean, metadata: NFTTransferEventMetadata, currentlyIndexedOwner?: Address) => NFTTransferType;
|
|
2481
|
+
|
|
2482
|
+
/**
|
|
2483
|
+
* An enum representing the possible Name Token Ownership types.
|
|
2484
|
+
*/
|
|
2485
|
+
declare const NameTokenOwnershipTypes: {
|
|
2486
|
+
/**
|
|
2487
|
+
* Name Token is owned by NameWrapper account.
|
|
2488
|
+
*/
|
|
2489
|
+
readonly NameWrapper: "namewrapper";
|
|
2490
|
+
/**
|
|
2491
|
+
* Name Token is owned fully onchain.
|
|
2492
|
+
*
|
|
2493
|
+
* This ownership type can only apply to direct subnames of `.eth`
|
|
2494
|
+
*/
|
|
2495
|
+
readonly FullyOnchain: "fully-onchain";
|
|
2496
|
+
/**
|
|
2497
|
+
* Name Token ownership has been transferred to the null address.
|
|
2498
|
+
*/
|
|
2499
|
+
readonly Burned: "burned";
|
|
2500
|
+
/**
|
|
2501
|
+
* Name Token ownership is unknown.
|
|
2502
|
+
*/
|
|
2503
|
+
readonly Unknown: "unknown";
|
|
2504
|
+
};
|
|
2505
|
+
type NameTokenOwnershipType = (typeof NameTokenOwnershipTypes)[keyof typeof NameTokenOwnershipTypes];
|
|
2506
|
+
interface NameTokenOwnershipNameWrapper {
|
|
2507
|
+
ownershipType: typeof NameTokenOwnershipTypes.NameWrapper;
|
|
2508
|
+
/**
|
|
2509
|
+
* Owner
|
|
2510
|
+
*
|
|
2511
|
+
* Guarantees:
|
|
2512
|
+
* - `owner.address` is not the zero address.
|
|
2513
|
+
* - `owner.chainId` is same as the chainId of the associated NFT,
|
|
2514
|
+
* even if that NFT has been burned.
|
|
2515
|
+
*/
|
|
2516
|
+
owner: AccountId;
|
|
2517
|
+
}
|
|
2518
|
+
interface NameTokenOwnershipFullyOnchain {
|
|
2519
|
+
ownershipType: typeof NameTokenOwnershipTypes.FullyOnchain;
|
|
2520
|
+
/**
|
|
2521
|
+
* Owner
|
|
2522
|
+
*
|
|
2523
|
+
* Guarantees:
|
|
2524
|
+
* - `owner.address` is not the zero address.
|
|
2525
|
+
* - `owner.chainId` is same as the chainId of the associated NFT,
|
|
2526
|
+
* even if that NFT has been burned.
|
|
2527
|
+
*/
|
|
2528
|
+
owner: AccountId;
|
|
2529
|
+
}
|
|
2530
|
+
interface NameTokenOwnershipBurned {
|
|
2531
|
+
ownershipType: typeof NameTokenOwnershipTypes.Burned;
|
|
2532
|
+
/**
|
|
2533
|
+
* Owner
|
|
2534
|
+
*
|
|
2535
|
+
* Guarantees:
|
|
2536
|
+
* - `owner.address` is the zero address.
|
|
2537
|
+
* - `owner.chainId` is same as the chainId of the associated NFT,
|
|
2538
|
+
* even if that NFT has been burned.
|
|
2539
|
+
*/
|
|
2540
|
+
owner: AccountId;
|
|
2541
|
+
}
|
|
2542
|
+
interface NameTokenOwnershipUnknown {
|
|
2543
|
+
ownershipType: typeof NameTokenOwnershipTypes.Unknown;
|
|
2544
|
+
/**
|
|
2545
|
+
* Owner
|
|
2546
|
+
*
|
|
2547
|
+
* Guarantees:
|
|
2548
|
+
* - `owner.address` is the zero address.
|
|
2549
|
+
* - `owner.chainId` is same as the chainId of the associated NFT,
|
|
2550
|
+
* even if that NFT has been burned.
|
|
2551
|
+
*/
|
|
2552
|
+
owner: AccountId;
|
|
2553
|
+
}
|
|
2554
|
+
type NameTokenOwnership = NameTokenOwnershipNameWrapper | NameTokenOwnershipFullyOnchain | NameTokenOwnershipBurned | NameTokenOwnershipUnknown;
|
|
2555
|
+
interface NameToken {
|
|
2556
|
+
/**
|
|
2557
|
+
* Token
|
|
2558
|
+
*
|
|
2559
|
+
* References the NFT that currently or previously tokenized ownership of
|
|
2560
|
+
* `name`.
|
|
2561
|
+
*/
|
|
2562
|
+
token: AssetId;
|
|
2563
|
+
/**
|
|
2564
|
+
* Owner
|
|
2565
|
+
*
|
|
2566
|
+
* Identifies the ownership state of the token.
|
|
2567
|
+
*
|
|
2568
|
+
* Guarantees:
|
|
2569
|
+
* - The `ownership.owner.chainId` of this address is the same as is referenced
|
|
2570
|
+
* in `domainAsset.contract.chainId`.
|
|
2571
|
+
*/
|
|
2572
|
+
ownership: NameTokenOwnership;
|
|
2573
|
+
/**
|
|
2574
|
+
* The mint status of the token.
|
|
2575
|
+
*
|
|
2576
|
+
* After ENSNode indexes the token for a name, even if that token is burned,
|
|
2577
|
+
* ENSNode will never forget how the token once represented the name.
|
|
2578
|
+
* When the token for a name is burned, ENSNode remembers this token but
|
|
2579
|
+
* updates its `mintStatus` to `burned`. If this token becomes minted again
|
|
2580
|
+
* after it was burned, its `mintStatus` is updated to `minted` again.
|
|
2581
|
+
*
|
|
2582
|
+
* NOTE: Tokens managed by the .eth BaseRegistrar for
|
|
2583
|
+
* direct subnames of .eth can only be burned when undergoing
|
|
2584
|
+
* a state transition of `minted` -> `burned` -> `minted` all within
|
|
2585
|
+
* the same registrar action for the case that a direct subname of .eth
|
|
2586
|
+
* has expired and has been fully released and is now being registered again.
|
|
2587
|
+
* Since all of those mint status state transitions are processed within
|
|
2588
|
+
* a single block, once the token managed by the .eth BaseRegistrar for
|
|
2589
|
+
* a direct subname of .eth has been minted, our state model will forever
|
|
2590
|
+
* represent it as `minted`.
|
|
2591
|
+
*
|
|
2592
|
+
* Guarantees:
|
|
2593
|
+
* - The `mintStatus` will be burned if and only
|
|
2594
|
+
* if `ownership.ownershipType` is `NameTokenOwnershipTypes.Burned`.
|
|
2595
|
+
*/
|
|
2596
|
+
mintStatus: NFTMintStatus;
|
|
2597
|
+
}
|
|
2598
|
+
/**
|
|
2599
|
+
* Serialized representation of {@link NameToken}.
|
|
2600
|
+
*/
|
|
2601
|
+
interface SerializedNameToken extends Omit<NameToken, "token"> {
|
|
2602
|
+
token: SerializedAssetId;
|
|
2603
|
+
}
|
|
2604
|
+
declare function serializeNameToken(nameToken: NameToken): SerializedNameToken;
|
|
2605
|
+
/**
|
|
2606
|
+
* Get all NameWrapper accounts within provided ENS Namespace.
|
|
2607
|
+
*
|
|
2608
|
+
* Guaranteed to return at least one account for ENSRoot Datasource.
|
|
2609
|
+
*/
|
|
2610
|
+
declare function getNameWrapperAccounts(namespaceId: ENSNamespaceId): [AccountId, ...AccountId[]];
|
|
2611
|
+
/**
|
|
2612
|
+
* Get name token ownership for provided owner account within selected ENS Namespace.
|
|
2613
|
+
*/
|
|
2614
|
+
declare function getNameTokenOwnership(namespaceId: ENSNamespaceId, name: InterpretedName, owner: AccountId): NameTokenOwnership;
|
|
2615
|
+
|
|
2616
|
+
/**
|
|
2617
|
+
* Schema for {@link ErrorResponse}.
|
|
2618
|
+
*/
|
|
2619
|
+
declare const ErrorResponseSchema: z$1.ZodObject<{
|
|
2620
|
+
message: z$1.ZodString;
|
|
2621
|
+
details: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
2622
|
+
}, z$1.core.$strip>;
|
|
2623
|
+
|
|
2624
|
+
/**
|
|
2625
|
+
* API Error Response Type
|
|
2626
|
+
*/
|
|
2627
|
+
type ErrorResponse = z$1.infer<typeof ErrorResponseSchema>;
|
|
2628
|
+
|
|
2629
|
+
/**
|
|
2630
|
+
* Deserialize a {@link ErrorResponse} object.
|
|
2631
|
+
*/
|
|
2632
|
+
declare function deserializeErrorResponse(maybeErrorResponse: unknown): ErrorResponse;
|
|
2633
|
+
|
|
2634
|
+
/**
|
|
2635
|
+
* A status code for Name Tokens API responses.
|
|
2636
|
+
*/
|
|
2637
|
+
declare const NameTokensResponseCodes: {
|
|
2638
|
+
/**
|
|
2639
|
+
* Represents a response when Name Tokens API can respond with requested data.
|
|
2640
|
+
*/
|
|
2641
|
+
readonly Ok: "ok";
|
|
2642
|
+
/**
|
|
2643
|
+
* Represents a response when Name Tokens API could not respond with requested data.
|
|
2644
|
+
*/
|
|
2645
|
+
readonly Error: "error";
|
|
2646
|
+
};
|
|
2647
|
+
/**
|
|
2648
|
+
* The derived string union of possible {@link NameTokensResponseCodes}.
|
|
2649
|
+
*/
|
|
2650
|
+
type NameTokensResponseCode = (typeof NameTokensResponseCodes)[keyof typeof NameTokensResponseCodes];
|
|
2651
|
+
/**
|
|
2652
|
+
* Error codes for Name Tokens API responses with 'error' response code.
|
|
2653
|
+
*/
|
|
2654
|
+
declare const NameTokensResponseErrorCodes: {
|
|
2655
|
+
/**
|
|
2656
|
+
* Name tokens not indexed
|
|
2657
|
+
*
|
|
2658
|
+
* Represents an error when tokens for the requested name are not indexed by
|
|
2659
|
+
* the ENSNode instance's configuration.
|
|
2660
|
+
*/
|
|
2661
|
+
readonly NameTokensNotIndexed: "name-tokens-not-indexed";
|
|
2662
|
+
/**
|
|
2663
|
+
* Unsupported ENSIndexer Config
|
|
2664
|
+
*
|
|
2665
|
+
* Represents a prerequisites error when connected ENSIndexer config lacks
|
|
2666
|
+
* params required to enable Name Tokens API.
|
|
2667
|
+
*/
|
|
2668
|
+
readonly EnsIndexerConfigUnsupported: "unsupported-ensindexer-config";
|
|
2669
|
+
/**
|
|
2670
|
+
* Unsupported Indexing Status
|
|
2671
|
+
*
|
|
2672
|
+
* Represents a prerequisites error when Indexing Status has not yet reached
|
|
2673
|
+
* status required to enable Name Tokens API.
|
|
2674
|
+
*/
|
|
2675
|
+
readonly IndexingStatusUnsupported: "unsupported-indexing-status";
|
|
2676
|
+
};
|
|
2677
|
+
/**
|
|
2678
|
+
* The derived string union of possible {@link NameTokensResponseErrorCodes}.
|
|
2679
|
+
*/
|
|
2680
|
+
type NameTokensResponseErrorCode = (typeof NameTokensResponseErrorCodes)[keyof typeof NameTokensResponseErrorCodes];
|
|
2681
|
+
/**
|
|
2682
|
+
* Name Tokens for a name who's tokens are configured to
|
|
2683
|
+
* be indexed by the ENSNode instance's configuration.
|
|
2684
|
+
*/
|
|
2685
|
+
interface RegisteredNameTokens {
|
|
2686
|
+
/**
|
|
2687
|
+
* Domain ID
|
|
2688
|
+
*/
|
|
2689
|
+
domainId: Node;
|
|
2690
|
+
/**
|
|
2691
|
+
* Name
|
|
2692
|
+
*
|
|
2693
|
+
* FQDN of the name associated with `domainId`.
|
|
2694
|
+
*
|
|
2695
|
+
* Guarantees:
|
|
2696
|
+
* - `namehash(name)` is always `domainId`.
|
|
2697
|
+
*/
|
|
2698
|
+
name: InterpretedName;
|
|
2699
|
+
/**
|
|
2700
|
+
* Name Tokens associated with the `domainId`.
|
|
2701
|
+
*
|
|
2702
|
+
* It contains every tokenized representation of `name` that
|
|
2703
|
+
* has ever been indexed for the given name as of `accurateAsOf`,
|
|
2704
|
+
* even if the given token has been burned or expired.
|
|
2705
|
+
*
|
|
2706
|
+
* Guarantees:
|
|
2707
|
+
* - Always includes at least one name token.
|
|
2708
|
+
* - When it includes more than one name token, it means that:
|
|
2709
|
+
* 1) More than 1 distinct tokenized representation of the ownership of
|
|
2710
|
+
* the `name` has been indexed as of `accurateAsOf`.
|
|
2711
|
+
* 2) All possible permutations of mint statuses of these tokens are
|
|
2712
|
+
* possible:
|
|
2713
|
+
* a) Multiple could be actively minted.
|
|
2714
|
+
* b) Multiple could be burned.
|
|
2715
|
+
* c) Some could be burned, others could be minted.
|
|
2716
|
+
* - Order of name tokens follows the order of onchain events that were
|
|
2717
|
+
* indexed when a token was minted, or burned.
|
|
2718
|
+
* - Each name token has a distinct `token` value which references
|
|
2719
|
+
* the NFT that currently or previously tokenized ownership of `name`.
|
|
2720
|
+
* - Each name token has ownership type (`ownership.ownershipType`) assigned:
|
|
2721
|
+
* - If there's a name token with ownership type
|
|
2722
|
+
* {@link NameTokenOwnershipTypes.NameWrapper}, it means that there must be also
|
|
2723
|
+
* another name token with ownership type either
|
|
2724
|
+
* {@link NameTokenOwnershipTypes.FullyOnchain}, or
|
|
2725
|
+
* {@link NameTokenOwnershipTypes.Unknown}.
|
|
2726
|
+
* - There can be at most one name token with ownership type
|
|
2727
|
+
* {@link NameTokenOwnershipTypes.FullyOnchain}.
|
|
2728
|
+
* - There can be any number of name tokens with ownership type
|
|
2729
|
+
* {@link NameTokenOwnershipTypes.Burned}.
|
|
2730
|
+
*
|
|
2731
|
+
* NOTE: It can be useful to get tokenized representations of the name that
|
|
2732
|
+
* are now burned: This can be helpful for looking up historical activity for
|
|
2733
|
+
* the name, including past buy orders, sell orders, and sales.
|
|
2734
|
+
*
|
|
2735
|
+
* How will the direct subnames of .eth that are wrapped by the NameWrapper
|
|
2736
|
+
* be represented?
|
|
2737
|
+
* 1) A direct subname of .eth that has been registered but
|
|
2738
|
+
* has never been wrapped by the NameWrapper, and:
|
|
2739
|
+
* a) Is still actively minted (independent of its expiry state).
|
|
2740
|
+
* b) Has been burned by sending it to the null address.
|
|
2741
|
+
* 2) A direct subname of .eth that has been registered and
|
|
2742
|
+
* has been wrapped by the NameWrapper, and:
|
|
2743
|
+
* a) Is still actively wrapped by the NameWrapper (independent of its
|
|
2744
|
+
* expiry state).
|
|
2745
|
+
* b) Is no longer wrapped by the NameWrapper, but is still actively
|
|
2746
|
+
* minted by the BaseRegistrar (independent of its expiry state).
|
|
2747
|
+
* c) Is no longer wrapped by the NameWrapper, and is also no longer
|
|
2748
|
+
* minted by the BaseRegistrar (both tokens now burned by sending to
|
|
2749
|
+
* the null address).
|
|
2750
|
+
*/
|
|
2751
|
+
tokens: NameToken[];
|
|
2752
|
+
/**
|
|
2753
|
+
* Expiry date for the Registration Lifecycle
|
|
2754
|
+
*
|
|
2755
|
+
* The latest Registration Lifecycle for a node referenced in `domainId`.
|
|
2756
|
+
*/
|
|
2757
|
+
expiresAt: UnixTimestamp$1;
|
|
2758
|
+
/**
|
|
2759
|
+
* The {@link UnixTimestamp} of when the data used to build the {@link NameTokensResponseOk.nameTokens} was accurate as of.
|
|
2760
|
+
*/
|
|
2761
|
+
accurateAsOf: UnixTimestamp$1;
|
|
2762
|
+
}
|
|
2763
|
+
/**
|
|
2764
|
+
* A response when Name Tokens API can respond with requested data.
|
|
2765
|
+
*/
|
|
2766
|
+
type NameTokensResponseOk = {
|
|
2767
|
+
responseCode: typeof NameTokensResponseCodes.Ok;
|
|
2768
|
+
/**
|
|
2769
|
+
* Name Tokens for the requested name.
|
|
2770
|
+
*/
|
|
2771
|
+
registeredNameTokens: RegisteredNameTokens;
|
|
2772
|
+
};
|
|
2773
|
+
/**
|
|
2774
|
+
* Represents an error response when requested name was not indexed by ENSNode.
|
|
2775
|
+
*/
|
|
2776
|
+
interface NameTokensResponseErrorNameTokensNotIndexed {
|
|
2777
|
+
responseCode: typeof NameTokensResponseCodes.Error;
|
|
2778
|
+
errorCode: typeof NameTokensResponseErrorCodes.NameTokensNotIndexed;
|
|
2779
|
+
error: ErrorResponse;
|
|
2780
|
+
}
|
|
2781
|
+
/**
|
|
2782
|
+
* Represents an error response when connected ENSIndexer config lacks
|
|
2783
|
+
* params required to enable Name Tokens API.
|
|
2784
|
+
*/
|
|
2785
|
+
interface NameTokensResponseErrorEnsIndexerConfigUnsupported {
|
|
2786
|
+
responseCode: typeof NameTokensResponseCodes.Error;
|
|
2787
|
+
errorCode: typeof NameTokensResponseErrorCodes.EnsIndexerConfigUnsupported;
|
|
2788
|
+
error: ErrorResponse;
|
|
2789
|
+
}
|
|
2790
|
+
/**
|
|
2791
|
+
* Represents an error response when Indexing Status has not yet reached
|
|
2792
|
+
* status required to enable Name Tokens API.
|
|
2793
|
+
*/
|
|
2794
|
+
interface NameTokensResponseErrorIndexingStatusUnsupported {
|
|
2795
|
+
responseCode: typeof NameTokensResponseCodes.Error;
|
|
2796
|
+
errorCode: typeof NameTokensResponseErrorCodes.IndexingStatusUnsupported;
|
|
2797
|
+
error: ErrorResponse;
|
|
2798
|
+
}
|
|
2799
|
+
type NameTokensResponseError = NameTokensResponseErrorNameTokensNotIndexed | NameTokensResponseErrorEnsIndexerConfigUnsupported | NameTokensResponseErrorIndexingStatusUnsupported;
|
|
2800
|
+
/**
|
|
2801
|
+
* Name Tokens response.
|
|
2802
|
+
*
|
|
2803
|
+
* Use the `responseCode` field to determine the specific type interpretation
|
|
2804
|
+
* at runtime.
|
|
2805
|
+
*/
|
|
2806
|
+
type NameTokensResponse = NameTokensResponseOk | NameTokensResponseError;
|
|
2807
|
+
|
|
2808
|
+
/**
|
|
2809
|
+
* Serialized representation of {@link NameTokensResponseError}.
|
|
2810
|
+
*/
|
|
2811
|
+
type SerializedNameTokensResponseError = NameTokensResponseError;
|
|
2812
|
+
/**
|
|
2813
|
+
* Serialized representation of {@link RegisteredNameToken}.
|
|
2814
|
+
*/
|
|
2815
|
+
interface SerializedRegisteredNameTokens extends Omit<RegisteredNameTokens, "tokens"> {
|
|
2816
|
+
tokens: SerializedNameToken[];
|
|
2817
|
+
}
|
|
2818
|
+
/**
|
|
2819
|
+
* Serialized representation of {@link NameTokensResponseOk}.
|
|
2820
|
+
*/
|
|
2821
|
+
interface SerializedNameTokensResponseOk extends Omit<NameTokensResponseOk, "registeredNameTokens"> {
|
|
2822
|
+
registeredNameTokens: SerializedRegisteredNameTokens;
|
|
2823
|
+
}
|
|
2824
|
+
/**
|
|
2825
|
+
* Serialized representation of {@link NameTokensResponse}.
|
|
2826
|
+
*/
|
|
2827
|
+
type SerializedNameTokensResponse = SerializedNameTokensResponseOk | SerializedNameTokensResponseError;
|
|
2828
|
+
|
|
2829
|
+
declare function serializeRegisteredNameTokens({ domainId, name, tokens, expiresAt, accurateAsOf, }: RegisteredNameTokens): SerializedRegisteredNameTokens;
|
|
2830
|
+
declare function serializeNameTokensResponse(response: NameTokensResponse): SerializedNameTokensResponse;
|
|
2831
|
+
|
|
2832
|
+
/**
|
|
2833
|
+
* Gets the SubregistryId (an AccountId) of the Basenames Subregistry contract (this is the
|
|
2834
|
+
* "BaseRegistrar" contract for Basenames) for the provided namespace.
|
|
2835
|
+
*
|
|
2836
|
+
* @param namespace The ENS namespace to get the Basenames Subregistry ID for
|
|
2837
|
+
* @returns The AccountId for the Basenames Subregistry contract for the provided namespace.
|
|
2838
|
+
* @throws Error if the contract is not found for the given namespace.
|
|
2839
|
+
*/
|
|
2840
|
+
declare function getBasenamesSubregistryId(namespace: ENSNamespaceId): AccountId;
|
|
2841
|
+
/**
|
|
2842
|
+
* Get the managed name for the Basenames subregistry for the selected ENS namespace.
|
|
2843
|
+
*
|
|
2844
|
+
* @param namespaceId
|
|
2845
|
+
* @returns registrar managed name
|
|
2846
|
+
* @throws an error when no registrar managed name could be returned
|
|
2847
|
+
*/
|
|
2848
|
+
declare function getBasenamesSubregistryManagedName(namespaceId: ENSNamespaceId): Name;
|
|
2849
|
+
|
|
2850
|
+
/**
|
|
2851
|
+
* Gets the SubregistryId (an AccountId) of the Ethnames Subregistry contract (this is the
|
|
2852
|
+
* "BaseRegistrar" contract for direct subnames of .eth) for the provided namespace.
|
|
2853
|
+
*
|
|
2854
|
+
* @param namespace The ENS namespace to get the Ethnames Subregistry ID for
|
|
2855
|
+
* @returns The AccountId for the Ethnames Subregistry contract for the provided namespace.
|
|
2856
|
+
* @throws Error if the contract is not found for the given namespace.
|
|
2857
|
+
*/
|
|
2858
|
+
declare function getEthnamesSubregistryId(namespace: ENSNamespaceId): AccountId;
|
|
2859
|
+
/**
|
|
2860
|
+
* Get the managed name for the Ethnames subregistry for the selected ENS namespace.
|
|
2861
|
+
*
|
|
2862
|
+
* @param namespaceId
|
|
2863
|
+
* @returns registrar managed name
|
|
2864
|
+
*/
|
|
2865
|
+
declare function getEthnamesSubregistryManagedName(namespaceId: ENSNamespaceId): Name;
|
|
2866
|
+
|
|
2867
|
+
/**
|
|
2868
|
+
* Gets the SubregistryId (an AccountId) of the Lineanames Subregistry contract (this is the
|
|
2869
|
+
* "BaseRegistrar" contract for Lineanames) for the provided namespace.
|
|
2870
|
+
*
|
|
2871
|
+
* @param namespace The ENS namespace to get the Lineanames Subregistry ID for
|
|
2872
|
+
* @returns The AccountId for the Lineanames Subregistry contract for the provided namespace.
|
|
2873
|
+
* @throws Error if the contract is not found for the given namespace.
|
|
2874
|
+
*/
|
|
2875
|
+
declare function getLineanamesSubregistryId(namespace: ENSNamespaceId): AccountId;
|
|
2876
|
+
/**
|
|
2877
|
+
* Get the managed name for the Lineanames subregistry for the selected ENS namespace.
|
|
2878
|
+
*
|
|
2879
|
+
* @param namespaceId
|
|
2880
|
+
* @returns registrar managed name
|
|
2881
|
+
* @throws an error when no registrar managed name could be returned
|
|
2882
|
+
*/
|
|
2883
|
+
declare function getLineanamesSubregistryManagedName(namespaceId: ENSNamespaceId): Name;
|
|
2884
|
+
|
|
2885
|
+
/**
|
|
2886
|
+
* Subregistry
|
|
2887
|
+
*/
|
|
2888
|
+
interface Subregistry {
|
|
2889
|
+
/**
|
|
2890
|
+
* Subregistry ID
|
|
2891
|
+
*
|
|
2892
|
+
* The ID of the subregistry the "logical registrar action" was taken on.
|
|
2893
|
+
*
|
|
2894
|
+
* Identifies the chainId and address of the associated subregistry smart
|
|
2895
|
+
* contract.
|
|
2896
|
+
*/
|
|
2897
|
+
subregistryId: AccountId;
|
|
2898
|
+
/**
|
|
2899
|
+
* The node (namehash) of the name the subregistry manages subnames of.
|
|
2900
|
+
* Example subregistry managed names:
|
|
2901
|
+
* - `eth`
|
|
2902
|
+
* - `base.eth`
|
|
2903
|
+
* - `linea.eth`
|
|
2904
|
+
*/
|
|
2905
|
+
node: Node;
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
/**
|
|
2909
|
+
* Registration Lifecycle Stages
|
|
2910
|
+
*
|
|
2911
|
+
* Important: this definition should not be used anywhere.
|
|
2912
|
+
* It's only here to capture some ideas that were shared in the team.
|
|
2913
|
+
*/
|
|
2914
|
+
declare const RegistrationLifecycleStages: {
|
|
2915
|
+
/**
|
|
2916
|
+
* Active
|
|
2917
|
+
*
|
|
2918
|
+
* Happens when
|
|
2919
|
+
* the current timestamp <= expiry.
|
|
2920
|
+
*/
|
|
2921
|
+
readonly Active: "registrationLifecycle_active";
|
|
2922
|
+
/**
|
|
2923
|
+
* Grace Period
|
|
2924
|
+
*
|
|
2925
|
+
* Happens when
|
|
2926
|
+
* `expiry < the current timestamp <= expiry + 90 days`.
|
|
2927
|
+
*/
|
|
2928
|
+
readonly GracePeriod: "registrationLifecycle_gracePeriod";
|
|
2929
|
+
/**
|
|
2930
|
+
* Released with Temporary Premium Price
|
|
2931
|
+
*
|
|
2932
|
+
* Happens when
|
|
2933
|
+
* `expiry + 90 days < the current timestamp <= expiry + 120 days`.
|
|
2934
|
+
*/
|
|
2935
|
+
readonly ReleasedWithTempPrice: "registrationLifecycle_releasedWithTempPrice";
|
|
2936
|
+
/**
|
|
2937
|
+
* Fully Released (Regular Price)
|
|
2938
|
+
*
|
|
2939
|
+
* Happens when
|
|
2940
|
+
* ` expiry + 120 days < the current timestamp`.
|
|
2941
|
+
*/
|
|
2942
|
+
readonly FullyReleased: "registrationLifecycle_fullyReleased";
|
|
2943
|
+
};
|
|
2944
|
+
type RegistrationLifecycleStage = (typeof RegistrationLifecycleStages)[keyof typeof RegistrationLifecycleStages];
|
|
2945
|
+
/**
|
|
2946
|
+
* Registration Lifecycle
|
|
2947
|
+
*/
|
|
2948
|
+
interface RegistrationLifecycle {
|
|
2949
|
+
/**
|
|
2950
|
+
* Subregistry that manages this Registration Lifecycle.
|
|
2951
|
+
*/
|
|
2952
|
+
subregistry: Subregistry;
|
|
2953
|
+
/**
|
|
2954
|
+
* The node (namehash) of the FQDN of the domain the registration lifecycle
|
|
2955
|
+
* is associated with.
|
|
2956
|
+
*
|
|
2957
|
+
* Guaranteed to be a subname of the node (namehash) of the subregistry
|
|
2958
|
+
* identified by `subregistryId.subregistryId`.
|
|
2959
|
+
*/
|
|
2960
|
+
node: Node;
|
|
2961
|
+
/**
|
|
2962
|
+
* Expires at
|
|
2963
|
+
*
|
|
2964
|
+
* Identifies when the Registration Lifecycle is scheduled to expire.
|
|
2965
|
+
*/
|
|
2966
|
+
expiresAt: UnixTimestamp;
|
|
2967
|
+
}
|
|
2968
|
+
|
|
2969
|
+
/**
|
|
2970
|
+
* Globally unique, deterministic ID of an indexed onchain event
|
|
2350
2971
|
* associated with the "logical registrar action".
|
|
2351
2972
|
*/
|
|
2352
2973
|
type RegistrarActionEventId = string;
|
|
@@ -2637,30 +3258,100 @@ type SerializedRegistrarActionPricing = SerializedRegistrarActionPricingAvailabl
|
|
|
2637
3258
|
/**
|
|
2638
3259
|
* Serialized representation of {@link RegistrarAction}.
|
|
2639
3260
|
*/
|
|
2640
|
-
interface SerializedRegistrarAction extends Omit<RegistrarAction, "
|
|
2641
|
-
registrationLifecycle: SerializedRegistrationLifecycle;
|
|
3261
|
+
interface SerializedRegistrarAction extends Omit<RegistrarAction, "pricing"> {
|
|
2642
3262
|
pricing: SerializedRegistrarActionPricing;
|
|
2643
3263
|
}
|
|
2644
3264
|
declare function serializeRegistrarActionPricing(pricing: RegistrarActionPricing): SerializedRegistrarActionPricing;
|
|
2645
3265
|
declare function serializeRegistrarAction(registrarAction: RegistrarAction): SerializedRegistrarAction;
|
|
2646
3266
|
|
|
3267
|
+
declare const RECORDS_PER_PAGE_DEFAULT = 10;
|
|
3268
|
+
declare const RECORDS_PER_PAGE_MAX = 100;
|
|
2647
3269
|
/**
|
|
2648
|
-
*
|
|
3270
|
+
* Request page params.
|
|
2649
3271
|
*/
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
3272
|
+
interface RequestPageParams {
|
|
3273
|
+
/**
|
|
3274
|
+
* Requested page number (1-indexed)
|
|
3275
|
+
* @invariant Must be a positive integer (>= 1)
|
|
3276
|
+
* @default 1
|
|
3277
|
+
*/
|
|
3278
|
+
page?: number;
|
|
3279
|
+
/**
|
|
3280
|
+
* Maximum number of records to return per page
|
|
3281
|
+
* @invariant Must be a positive integer (>= 1) and less than or equal to {@link RECORDS_PER_PAGE_MAX}
|
|
3282
|
+
* @default {@link RECORDS_PER_PAGE_DEFAULT}
|
|
3283
|
+
*/
|
|
3284
|
+
recordsPerPage?: number;
|
|
3285
|
+
}
|
|
2654
3286
|
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
3287
|
+
interface ResponsePageContextWithNoRecords extends Required<RequestPageParams> {
|
|
3288
|
+
/**
|
|
3289
|
+
* Total number of records across all pages
|
|
3290
|
+
*/
|
|
3291
|
+
totalRecords: 0;
|
|
3292
|
+
/**
|
|
3293
|
+
* Total number of pages
|
|
3294
|
+
*/
|
|
3295
|
+
totalPages: 1;
|
|
3296
|
+
/**
|
|
3297
|
+
* Indicates if there is a next page available
|
|
3298
|
+
*/
|
|
3299
|
+
hasNext: false;
|
|
3300
|
+
/**
|
|
3301
|
+
* Indicates if there is a previous page available
|
|
3302
|
+
*/
|
|
3303
|
+
hasPrev: false;
|
|
3304
|
+
/**
|
|
3305
|
+
* The start index of the records on the page (0-indexed)
|
|
3306
|
+
*/
|
|
3307
|
+
startIndex: undefined;
|
|
3308
|
+
/**
|
|
3309
|
+
* The end index of the records on the page (0-indexed)
|
|
3310
|
+
*/
|
|
3311
|
+
endIndex: undefined;
|
|
3312
|
+
}
|
|
3313
|
+
interface ResponsePageContextWithRecords extends Required<RequestPageParams> {
|
|
3314
|
+
/**
|
|
3315
|
+
* Total number of records across all pages
|
|
3316
|
+
* @invariant Guaranteed to be a positive integer (>= 1)
|
|
3317
|
+
*/
|
|
3318
|
+
totalRecords: number;
|
|
3319
|
+
/**
|
|
3320
|
+
* Total number of pages
|
|
3321
|
+
* @invariant Guaranteed to be a positive integer (>= 1)
|
|
3322
|
+
*/
|
|
3323
|
+
totalPages: number;
|
|
3324
|
+
/**
|
|
3325
|
+
* Indicates if there is a next page available
|
|
3326
|
+
* @invariant true if and only if (`page` * `recordsPerPage` < `totalRecords`)
|
|
3327
|
+
*/
|
|
3328
|
+
hasNext: boolean;
|
|
3329
|
+
/**
|
|
3330
|
+
* Indicates if there is a previous page available
|
|
3331
|
+
* @invariant true if and only if (`page` > 1)
|
|
3332
|
+
*/
|
|
3333
|
+
hasPrev: boolean;
|
|
3334
|
+
/**
|
|
3335
|
+
* The start index of the records on the page (0-indexed)
|
|
3336
|
+
*
|
|
3337
|
+
* @invariant Guaranteed to be a non-negative integer (>= 0)
|
|
3338
|
+
*/
|
|
3339
|
+
startIndex: number;
|
|
3340
|
+
/**
|
|
3341
|
+
* The end index of the records on the page (0-indexed)
|
|
3342
|
+
*
|
|
3343
|
+
* @invariant Guaranteed to be a non-negative integer (>= 0)
|
|
3344
|
+
* @invariant Guaranteed to be greater than or equal to `startIndex`.
|
|
3345
|
+
* @invariant Guaranteed to be less than `totalRecords`.
|
|
3346
|
+
*/
|
|
3347
|
+
endIndex: number;
|
|
3348
|
+
}
|
|
3349
|
+
type ResponsePageContext = ResponsePageContextWithNoRecords | ResponsePageContextWithRecords;
|
|
2659
3350
|
|
|
2660
3351
|
/**
|
|
2661
|
-
*
|
|
3352
|
+
* Build page context from request params and total records count.
|
|
2662
3353
|
*/
|
|
2663
|
-
declare function
|
|
3354
|
+
declare function buildPageContext(page: number, recordsPerPage: number, totalRecords: number): ResponsePageContext;
|
|
2664
3355
|
|
|
2665
3356
|
/**
|
|
2666
3357
|
* A status code for Registrar Actions API responses.
|
|
@@ -2700,6 +3391,7 @@ interface NamedRegistrarAction {
|
|
|
2700
3391
|
type RegistrarActionsResponseOk = {
|
|
2701
3392
|
responseCode: typeof RegistrarActionsResponseCodes.Ok;
|
|
2702
3393
|
registrarActions: NamedRegistrarAction[];
|
|
3394
|
+
pageContext: ResponsePageContext;
|
|
2703
3395
|
};
|
|
2704
3396
|
/**
|
|
2705
3397
|
* A response when Registrar Actions are unavailable.
|
|
@@ -2748,6 +3440,7 @@ declare function deserializeRegistrarActionsResponse(maybeResponse: SerializedRe
|
|
|
2748
3440
|
declare const RegistrarActionsFilterTypes: {
|
|
2749
3441
|
readonly BySubregistryNode: "bySubregistryNode";
|
|
2750
3442
|
readonly WithEncodedReferral: "withEncodedReferral";
|
|
3443
|
+
readonly ByDecodedReferrer: "byDecodedReferrer";
|
|
2751
3444
|
};
|
|
2752
3445
|
type RegistrarActionsFilterType = (typeof RegistrarActionsFilterTypes)[keyof typeof RegistrarActionsFilterTypes];
|
|
2753
3446
|
type RegistrarActionsFilterBySubregistryNode = {
|
|
@@ -2757,7 +3450,11 @@ type RegistrarActionsFilterBySubregistryNode = {
|
|
|
2757
3450
|
type RegistrarActionsFilterWithEncodedReferral = {
|
|
2758
3451
|
filterType: typeof RegistrarActionsFilterTypes.WithEncodedReferral;
|
|
2759
3452
|
};
|
|
2760
|
-
type
|
|
3453
|
+
type RegistrarActionsFilterByDecodedReferrer = {
|
|
3454
|
+
filterType: typeof RegistrarActionsFilterTypes.ByDecodedReferrer;
|
|
3455
|
+
value: Address;
|
|
3456
|
+
};
|
|
3457
|
+
type RegistrarActionsFilter = RegistrarActionsFilterBySubregistryNode | RegistrarActionsFilterWithEncodedReferral | RegistrarActionsFilterByDecodedReferrer;
|
|
2761
3458
|
/**
|
|
2762
3459
|
* Records Orders
|
|
2763
3460
|
*/
|
|
@@ -2768,7 +3465,7 @@ type RegistrarActionsOrder = (typeof RegistrarActionsOrders)[keyof typeof Regist
|
|
|
2768
3465
|
/**
|
|
2769
3466
|
* Represents a request to Registrar Actions API.
|
|
2770
3467
|
*/
|
|
2771
|
-
|
|
3468
|
+
interface RegistrarActionsRequest extends RequestPageParams {
|
|
2772
3469
|
/**
|
|
2773
3470
|
* Filters to be applied while generating results.
|
|
2774
3471
|
*/
|
|
@@ -2777,13 +3474,7 @@ type RegistrarActionsRequest = {
|
|
|
2777
3474
|
* Order applied while generating results.
|
|
2778
3475
|
*/
|
|
2779
3476
|
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
|
-
};
|
|
3477
|
+
}
|
|
2787
3478
|
|
|
2788
3479
|
/**
|
|
2789
3480
|
* Build a "parent node" filter object for Registrar Actions query.
|
|
@@ -2795,9 +3486,15 @@ declare function byParentNode(parentNode: undefined): undefined;
|
|
|
2795
3486
|
*/
|
|
2796
3487
|
declare function withReferral(withReferral: true): RegistrarActionsFilter;
|
|
2797
3488
|
declare function withReferral(withReferral: false | undefined): undefined;
|
|
3489
|
+
/**
|
|
3490
|
+
* Build a "decoded referrer" filter object for Registrar Actions query.
|
|
3491
|
+
*/
|
|
3492
|
+
declare function byDecodedReferrer(decodedReferrer: Address): RegistrarActionsFilter;
|
|
3493
|
+
declare function byDecodedReferrer(decodedReferrer: undefined): undefined;
|
|
2798
3494
|
declare const registrarActionsFilter: {
|
|
2799
3495
|
byParentNode: typeof byParentNode;
|
|
2800
3496
|
withReferral: typeof withReferral;
|
|
3497
|
+
byDecodedReferrer: typeof byDecodedReferrer;
|
|
2801
3498
|
};
|
|
2802
3499
|
|
|
2803
3500
|
declare const registrarActionsPrerequisites: Readonly<{
|
|
@@ -3114,6 +3811,10 @@ interface MultichainPrimaryNameResolutionArgs {
|
|
|
3114
3811
|
*/
|
|
3115
3812
|
type MultichainPrimaryNameResolutionResult = Record<ChainId, Name | null>;
|
|
3116
3813
|
|
|
3814
|
+
declare const PROTOCOL_ATTRIBUTE_PREFIX = "ens";
|
|
3815
|
+
declare const ATTR_PROTOCOL_NAME = "ens.protocol";
|
|
3816
|
+
declare const ATTR_PROTOCOL_STEP = "ens.protocol.step";
|
|
3817
|
+
declare const ATTR_PROTOCOL_STEP_RESULT = "ens.protocol.step.result";
|
|
3117
3818
|
/**
|
|
3118
3819
|
* Identifiers for each traceable ENS protocol.
|
|
3119
3820
|
*/
|
|
@@ -3144,19 +3845,16 @@ declare enum ReverseResolutionProtocolStep {
|
|
|
3144
3845
|
ForwardResolveAddressRecord = "forward-resolve-address-record",
|
|
3145
3846
|
VerifyResolvedAddressMatchesAddress = "verify-resolved-address-matches-address"
|
|
3146
3847
|
}
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
declare const ATTR_PROTOCOL_STEP = "ens.protocol.step";
|
|
3150
|
-
declare const ATTR_PROTOCOL_STEP_RESULT = "ens.protocol.step.result";
|
|
3151
|
-
interface SpanAttributes {
|
|
3848
|
+
|
|
3849
|
+
interface TracingSpanAttributes {
|
|
3152
3850
|
[key: string]: unknown;
|
|
3153
3851
|
}
|
|
3154
|
-
interface
|
|
3852
|
+
interface TracingSpanEvent {
|
|
3155
3853
|
name: string;
|
|
3156
|
-
attributes:
|
|
3854
|
+
attributes: TracingSpanAttributes;
|
|
3157
3855
|
time: number;
|
|
3158
3856
|
}
|
|
3159
|
-
interface
|
|
3857
|
+
interface TracingSpan {
|
|
3160
3858
|
scope: string;
|
|
3161
3859
|
id: string;
|
|
3162
3860
|
traceId: string;
|
|
@@ -3167,23 +3865,23 @@ interface ProtocolSpan {
|
|
|
3167
3865
|
name: string;
|
|
3168
3866
|
timestamp: number;
|
|
3169
3867
|
duration: number;
|
|
3170
|
-
attributes:
|
|
3868
|
+
attributes: TracingSpanAttributes;
|
|
3171
3869
|
status: {
|
|
3172
3870
|
code: number;
|
|
3173
3871
|
message?: string;
|
|
3174
3872
|
};
|
|
3175
|
-
events:
|
|
3873
|
+
events: TracingSpanEvent[];
|
|
3176
3874
|
}
|
|
3177
|
-
type
|
|
3178
|
-
children:
|
|
3875
|
+
type TracingNode = TracingSpan & {
|
|
3876
|
+
children: TracingNode[];
|
|
3179
3877
|
};
|
|
3180
|
-
type
|
|
3878
|
+
type TracingTrace = TracingNode[];
|
|
3181
3879
|
|
|
3182
3880
|
interface TraceableRequest {
|
|
3183
3881
|
trace?: boolean;
|
|
3184
3882
|
}
|
|
3185
3883
|
interface TraceableResponse {
|
|
3186
|
-
trace?:
|
|
3884
|
+
trace?: TracingTrace;
|
|
3187
3885
|
}
|
|
3188
3886
|
interface AcceleratableRequest {
|
|
3189
3887
|
accelerate?: boolean;
|
|
@@ -3208,101 +3906,17 @@ interface ResolveRecordsResponse<SELECTION extends ResolverRecordsSelection> ext
|
|
|
3208
3906
|
*/
|
|
3209
3907
|
interface ResolvePrimaryNameRequest extends ReverseResolutionArgs, AcceleratableRequest, TraceableRequest {
|
|
3210
3908
|
}
|
|
3211
|
-
/**
|
|
3212
|
-
* Resolve Primary Name Response Type
|
|
3213
|
-
*/
|
|
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;
|
|
3225
|
-
/**
|
|
3226
|
-
* Request page params.
|
|
3227
|
-
*/
|
|
3228
|
-
interface RequestPageParams {
|
|
3229
|
-
/**
|
|
3230
|
-
* Requested page number (1-indexed)
|
|
3231
|
-
* @invariant Must be a positive integer (>= 1)
|
|
3232
|
-
* @default 1
|
|
3233
|
-
*/
|
|
3234
|
-
page?: number;
|
|
3235
|
-
/**
|
|
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}
|
|
3239
|
-
*/
|
|
3240
|
-
recordsPerPage?: number;
|
|
3241
|
-
}
|
|
3242
|
-
|
|
3243
|
-
interface ResponsePageContextWithNoRecords extends Required<RequestPageParams> {
|
|
3244
|
-
/**
|
|
3245
|
-
* Total number of records across all pages
|
|
3246
|
-
*/
|
|
3247
|
-
totalRecords: 0;
|
|
3248
|
-
/**
|
|
3249
|
-
* Total number of pages
|
|
3250
|
-
*/
|
|
3251
|
-
totalPages: 1;
|
|
3252
|
-
/**
|
|
3253
|
-
* Indicates if there is a next page available
|
|
3254
|
-
*/
|
|
3255
|
-
hasNext: false;
|
|
3256
|
-
/**
|
|
3257
|
-
* Indicates if there is a previous page available
|
|
3258
|
-
*/
|
|
3259
|
-
hasPrev: false;
|
|
3260
|
-
/**
|
|
3261
|
-
* The start index of the records on the page (0-indexed)
|
|
3262
|
-
*/
|
|
3263
|
-
startIndex: undefined;
|
|
3264
|
-
/**
|
|
3265
|
-
* The end index of the records on the page (0-indexed)
|
|
3266
|
-
*/
|
|
3267
|
-
endIndex: undefined;
|
|
3268
|
-
}
|
|
3269
|
-
interface ResponsePageContextWithRecords extends Required<RequestPageParams> {
|
|
3270
|
-
/**
|
|
3271
|
-
* Total number of records across all pages
|
|
3272
|
-
* @invariant Guaranteed to be a non-negative integer (>= 0)
|
|
3273
|
-
*/
|
|
3274
|
-
totalRecords: number;
|
|
3275
|
-
/**
|
|
3276
|
-
* Total number of pages
|
|
3277
|
-
* @invariant Guaranteed to be a positive integer (>= 1)
|
|
3278
|
-
*/
|
|
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;
|
|
3285
|
-
/**
|
|
3286
|
-
* Indicates if there is a previous page available
|
|
3287
|
-
* @invariant true if and only if (`page` > 1)
|
|
3288
|
-
*/
|
|
3289
|
-
hasPrev: boolean;
|
|
3290
|
-
/**
|
|
3291
|
-
* The start index of the records on the page (0-indexed)
|
|
3292
|
-
*
|
|
3293
|
-
* @invariant Guaranteed to be a non-negative integer (>= 0)
|
|
3294
|
-
*/
|
|
3295
|
-
startIndex: number;
|
|
3296
|
-
/**
|
|
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`.
|
|
3302
|
-
*/
|
|
3303
|
-
endIndex: number;
|
|
3909
|
+
/**
|
|
3910
|
+
* Resolve Primary Name Response Type
|
|
3911
|
+
*/
|
|
3912
|
+
interface ResolvePrimaryNameResponse extends AcceleratableResponse, TraceableResponse {
|
|
3913
|
+
name: ReverseResolutionResult;
|
|
3914
|
+
}
|
|
3915
|
+
interface ResolvePrimaryNamesRequest extends MultichainPrimaryNameResolutionArgs, AcceleratableRequest, TraceableRequest {
|
|
3916
|
+
}
|
|
3917
|
+
interface ResolvePrimaryNamesResponse extends AcceleratableResponse, TraceableResponse {
|
|
3918
|
+
names: MultichainPrimaryNameResolutionResult;
|
|
3304
3919
|
}
|
|
3305
|
-
type ResponsePageContext = ResponsePageContextWithNoRecords | ResponsePageContextWithRecords;
|
|
3306
3920
|
|
|
3307
3921
|
/**
|
|
3308
3922
|
* Request parameters for a referrer leaderboard page query.
|
|
@@ -3656,7 +4270,7 @@ declare class ENSNodeClient {
|
|
|
3656
4270
|
*
|
|
3657
4271
|
* @param request - Pagination parameters
|
|
3658
4272
|
* @param request.page - The page number to retrieve (1-indexed, default: 1)
|
|
3659
|
-
* @param request.
|
|
4273
|
+
* @param request.recordsPerPage - Number of records per page (default: 25, max: 100)
|
|
3660
4274
|
* @returns {ReferrerLeaderboardPageResponse}
|
|
3661
4275
|
*
|
|
3662
4276
|
* @throws if the ENSNode request fails
|
|
@@ -3665,28 +4279,28 @@ declare class ENSNodeClient {
|
|
|
3665
4279
|
*
|
|
3666
4280
|
* @example
|
|
3667
4281
|
* ```typescript
|
|
3668
|
-
* // Get first page with default page size (25
|
|
4282
|
+
* // Get first page with default page size (25 records)
|
|
3669
4283
|
* const response = await client.getReferrerLeaderboardPage();
|
|
3670
4284
|
* if (response.responseCode === ReferrerLeaderboardPageResponseCodes.Ok) {
|
|
3671
4285
|
* const {
|
|
3672
4286
|
* aggregatedMetrics,
|
|
3673
4287
|
* referrers,
|
|
3674
4288
|
* rules,
|
|
3675
|
-
*
|
|
4289
|
+
* pageContext,
|
|
3676
4290
|
* updatedAt
|
|
3677
4291
|
* } = response.data;
|
|
3678
4292
|
* console.log(aggregatedMetrics);
|
|
3679
4293
|
* console.log(referrers);
|
|
3680
4294
|
* console.log(rules);
|
|
3681
4295
|
* console.log(updatedAt);
|
|
3682
|
-
* console.log(`Page ${
|
|
4296
|
+
* console.log(`Page ${pageContext.page} of ${pageContext.totalPages}`);
|
|
3683
4297
|
* }
|
|
3684
4298
|
* ```
|
|
3685
4299
|
*
|
|
3686
4300
|
* @example
|
|
3687
4301
|
* ```typescript
|
|
3688
|
-
* // Get second page with 50
|
|
3689
|
-
* const response = await client.getReferrerLeaderboardPage({ page: 2,
|
|
4302
|
+
* // Get second page with 50 records per page
|
|
4303
|
+
* const response = await client.getReferrerLeaderboardPage({ page: 2, recordsPerPage: 50 });
|
|
3690
4304
|
* ```
|
|
3691
4305
|
*
|
|
3692
4306
|
* @example
|
|
@@ -3781,11 +4395,13 @@ declare class ENSNodeClient {
|
|
|
3781
4395
|
/**
|
|
3782
4396
|
* Fetch ENSNode Registrar Actions
|
|
3783
4397
|
*
|
|
3784
|
-
*
|
|
3785
|
-
*
|
|
3786
|
-
* @param
|
|
3787
|
-
* @param
|
|
3788
|
-
*
|
|
4398
|
+
* Retrieves a paginated list of registrar actions with optional filters.
|
|
4399
|
+
*
|
|
4400
|
+
* @param request is a request configuration.
|
|
4401
|
+
* @param request.page sets the page number to retrieve (1-indexed, default: 1)
|
|
4402
|
+
* @param request.recordsPerPage sets the number of records per page (default: 10, max: 100)
|
|
4403
|
+
* @param request.filters is an optional request filter configuration.
|
|
4404
|
+
* @param request.order sets the order of results in the response by field and direction.
|
|
3789
4405
|
* @returns {RegistrarActionsResponse}
|
|
3790
4406
|
*
|
|
3791
4407
|
* @throws if the ENSNode request fails
|
|
@@ -3795,23 +4411,25 @@ declare class ENSNodeClient {
|
|
|
3795
4411
|
* @example
|
|
3796
4412
|
* ```ts
|
|
3797
4413
|
* import {
|
|
3798
|
-
* registrarActionsFilter
|
|
4414
|
+
* registrarActionsFilter,
|
|
3799
4415
|
* ENSNodeClient,
|
|
3800
4416
|
* } from "@ensnode/ensnode-sdk";
|
|
3801
4417
|
* import { namehash } from "viem/ens";
|
|
3802
4418
|
*
|
|
3803
4419
|
* const client: ENSNodeClient;
|
|
3804
4420
|
*
|
|
3805
|
-
* //
|
|
3806
|
-
*
|
|
3807
|
-
*
|
|
3808
|
-
*
|
|
4421
|
+
* // Get first page with default page size (10 records)
|
|
4422
|
+
* const response = await client.registrarActions();
|
|
4423
|
+
* if (response.responseCode === RegistrarActionsResponseCodes.Ok) {
|
|
4424
|
+
* const { registrarActions, pageContext } = response;
|
|
4425
|
+
* console.log(registrarActions);
|
|
4426
|
+
* console.log(`Page ${pageContext.page} of ${pageContext.totalPages}`);
|
|
4427
|
+
* }
|
|
3809
4428
|
*
|
|
3810
|
-
* //
|
|
3811
|
-
*
|
|
3812
|
-
*
|
|
3813
|
-
*
|
|
3814
|
-
* limit: 5,
|
|
4429
|
+
* // Get second page with 25 records per page
|
|
4430
|
+
* const response = await client.registrarActions({
|
|
4431
|
+
* page: 2,
|
|
4432
|
+
* recordsPerPage: 25,
|
|
3815
4433
|
* });
|
|
3816
4434
|
*
|
|
3817
4435
|
* // get latest registrar action records associated with
|
|
@@ -3825,210 +4443,56 @@ declare class ENSNodeClient {
|
|
|
3825
4443
|
* filters: [registrarActionsFilter.withReferral(true)],
|
|
3826
4444
|
* });
|
|
3827
4445
|
*
|
|
4446
|
+
* // get latest registrar action records for a specific decoded referrer
|
|
4447
|
+
* await client.registrarActions({
|
|
4448
|
+
* filters: [registrarActionsFilter.byDecodedReferrer("0x1234567890123456789012345678901234567890")],
|
|
4449
|
+
* });
|
|
4450
|
+
*
|
|
3828
4451
|
* // get latest 10 registrar action records associated with
|
|
3829
4452
|
* // subregistry managing `base.eth` name
|
|
3830
4453
|
* await client.registrarActions({
|
|
3831
4454
|
* filters: [registrarActionsFilter.byParentNode(namehash('base.eth'))],
|
|
3832
|
-
*
|
|
4455
|
+
* recordsPerPage: 10
|
|
3833
4456
|
* });
|
|
3834
4457
|
* ```
|
|
3835
4458
|
*/
|
|
3836
4459
|
registrarActions(request?: RegistrarActionsRequest): Promise<RegistrarActionsResponse>;
|
|
3837
|
-
}
|
|
3838
|
-
|
|
3839
|
-
declare class ClientError extends Error {
|
|
3840
|
-
details?: unknown;
|
|
3841
|
-
constructor(message: string, details?: unknown);
|
|
3842
|
-
static fromErrorResponse({ message, details }: ErrorResponse): ClientError;
|
|
3843
|
-
}
|
|
3844
|
-
|
|
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
4460
|
/**
|
|
3981
|
-
*
|
|
4461
|
+
* Fetch Name Tokens for requested name.
|
|
3982
4462
|
*
|
|
3983
|
-
*
|
|
3984
|
-
*
|
|
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
|
|
4463
|
+
* @param request.name - Name for which Name Tokens will be fetched.
|
|
4464
|
+
* @returns {NameTokensResponse}
|
|
3991
4465
|
*
|
|
3992
|
-
*
|
|
3993
|
-
*
|
|
3994
|
-
*
|
|
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
|
|
4466
|
+
* @throws if the ENSNode request fails
|
|
4467
|
+
* @throws if the ENSNode API returns an error response
|
|
4468
|
+
* @throws if the ENSNode response breaks required invariants
|
|
4000
4469
|
*
|
|
4001
|
-
*
|
|
4002
|
-
*
|
|
4003
|
-
*
|
|
4004
|
-
*
|
|
4005
|
-
|
|
4006
|
-
|
|
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.
|
|
4470
|
+
* @example
|
|
4471
|
+
* ```ts
|
|
4472
|
+
* import {
|
|
4473
|
+
* ENSNodeClient,
|
|
4474
|
+
* } from "@ensnode/ensnode-sdk";
|
|
4475
|
+
* import { namehash } from "viem/ens";
|
|
4010
4476
|
*
|
|
4011
|
-
*
|
|
4012
|
-
* previously indexed nft had status `minted` with a non-zeroAddress owner.
|
|
4477
|
+
* const client: ENSNodeClient;
|
|
4013
4478
|
*
|
|
4014
|
-
*
|
|
4015
|
-
*
|
|
4016
|
-
*
|
|
4017
|
-
*
|
|
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
|
|
4479
|
+
* // get latest name token records from the indexed subregistry based on the requested name
|
|
4480
|
+
* const response = await client.nameTokens({
|
|
4481
|
+
* name: "vitalik.eth"
|
|
4482
|
+
* });
|
|
4024
4483
|
*
|
|
4025
|
-
*
|
|
4026
|
-
*
|
|
4027
|
-
*
|
|
4484
|
+
* const response = await client.nameTokens({
|
|
4485
|
+
* domainId: "0xee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835" // namehash('vitalik.eth')
|
|
4486
|
+
* })
|
|
4487
|
+
* ```
|
|
4028
4488
|
*/
|
|
4029
|
-
|
|
4030
|
-
}
|
|
4031
|
-
|
|
4032
|
-
declare
|
|
4489
|
+
nameTokens(request: NameTokensRequest): Promise<NameTokensResponse>;
|
|
4490
|
+
}
|
|
4491
|
+
|
|
4492
|
+
declare class ClientError extends Error {
|
|
4493
|
+
details?: unknown;
|
|
4494
|
+
constructor(message: string, details?: unknown);
|
|
4495
|
+
static fromErrorResponse({ message, details }: ErrorResponse): ClientError;
|
|
4496
|
+
}
|
|
4033
4497
|
|
|
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 };
|
|
4498
|
+
export { ADDR_REVERSE_NODE, ATTR_PROTOCOL_NAME, ATTR_PROTOCOL_STEP, ATTR_PROTOCOL_STEP_RESULT, type AcceleratableRequest, type AcceleratableResponse, type AccountId, type AccountIdString, type AssetId, type AssetIdString, type AssetNamespace, AssetNamespaces, BASENAMES_NODE, type BlockNumber, type BlockRef, type Blockrange, type Cache, 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, ENS_ROOT, 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 NameToken, type NameTokenOwnership, type NameTokenOwnershipBurned, type NameTokenOwnershipFullyOnchain, type NameTokenOwnershipNameWrapper, type NameTokenOwnershipType, NameTokenOwnershipTypes, type NameTokenOwnershipUnknown, type NameTokensRequest, type NameTokensRequestByDomainId, type NameTokensRequestByName, type NameTokensResponse, type NameTokensResponseCode, NameTokensResponseCodes, type NameTokensResponseError, type NameTokensResponseErrorCode, NameTokensResponseErrorCodes, type NameTokensResponseErrorEnsIndexerConfigUnsupported, type NameTokensResponseErrorIndexingStatusUnsupported, type NameTokensResponseErrorNameTokensNotIndexed, type NameTokensResponseOk, 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, 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 RegisteredNameTokens, type RegistrarAction, type RegistrarActionEventId, type RegistrarActionPricing, type RegistrarActionPricingAvailable, type RegistrarActionPricingUnknown, type RegistrarActionReferral, type RegistrarActionReferralAvailable, type RegistrarActionReferralNotApplicable, type RegistrarActionType, RegistrarActionTypes, type RegistrarActionsFilter, type RegistrarActionsFilterByDecodedReferrer, 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 SerializedAssetId, type SerializedChainIndexingStatusSnapshot, type SerializedChainIndexingStatusSnapshotBackfill, type SerializedChainIndexingStatusSnapshotCompleted, type SerializedChainIndexingStatusSnapshotFollowing, type SerializedChainIndexingStatusSnapshotQueued, type SerializedConfigResponse, type SerializedCrossChainIndexingStatusSnapshot, type SerializedCrossChainIndexingStatusSnapshotOmnichain, type SerializedCurrencyAmount, type SerializedCurrentIndexingProjectionOmnichain, type SerializedDomainAssetId, type SerializedENSApiPublicConfig, type SerializedENSIndexerPublicConfig, type SerializedENSIndexerVersionInfo, type SerializedIndexedChainIds, type SerializedIndexingStatusResponse, type SerializedIndexingStatusResponseError, type SerializedIndexingStatusResponseOk, type SerializedNameToken, type SerializedNameTokensResponse, type SerializedNameTokensResponseError, type SerializedNameTokensResponseOk, type SerializedNamedRegistrarAction, type SerializedOmnichainIndexingStatusSnapshot, type SerializedOmnichainIndexingStatusSnapshotBackfill, type SerializedOmnichainIndexingStatusSnapshotCompleted, type SerializedOmnichainIndexingStatusSnapshotFollowing, type SerializedOmnichainIndexingStatusSnapshotUnstarted, type SerializedPrice, type SerializedPriceDai, type SerializedPriceEth, type SerializedPriceUsdc, type SerializedRealtimeIndexingStatusProjection, type SerializedReferrerDetailResponse, type SerializedReferrerDetailResponseError, type SerializedReferrerDetailResponseOk, type SerializedReferrerLeaderboardPageResponse, type SerializedReferrerLeaderboardPageResponseError, type SerializedReferrerLeaderboardPageResponseOk, type SerializedRegisteredNameTokens, type SerializedRegistrarAction, type SerializedRegistrarActionPricing, type SerializedRegistrarActionPricingAvailable, type SerializedRegistrarActionPricingUnknown, type SerializedRegistrarActionsResponse, type SerializedRegistrarActionsResponseError, type SerializedRegistrarActionsResponseOk, type SerializedTokenId, type SubgraphInterpretedLabel, type SubgraphInterpretedName, type Subregistry, type TheGraphCannotFallbackReason, TheGraphCannotFallbackReasonSchema, type TheGraphFallback, TheGraphFallbackSchema, type TokenId, TraceableENSProtocol, type TraceableRequest, type TraceableResponse, type TracingNode, type TracingSpan, type TracingTrace, TtlCache, type UnixTimestamp, type UnknownIdentity, type UnnamedIdentity, type UnresolvedIdentity, type UrlString, accountIdEqual, addDuration, addPrices, addrReverseLabel, asLowerCaseAddress, beautifyName, bigIntToNumber, bigintToCoinType, buildAssetId, buildEnsRainbowClientLabelSet, buildLabelSetId, buildLabelSetVersion, buildPageContext, buildUnresolvedIdentity, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotCompleted, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotFollowing, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotUnstarted, coinTypeReverseLabel, coinTypeToEvmChainId, createIndexingConfig, createRealtimeIndexingStatusProjection, decodeDNSEncodedLiteralName, decodeDNSEncodedName, deserializeAssetId, deserializeBlockNumber, deserializeBlockRef, deserializeBlockrange, deserializeChainId, deserializeChainIndexingStatusSnapshot, deserializeConfigResponse, deserializeCrossChainIndexingStatusSnapshot, deserializeDatetime, deserializeDuration, deserializeENSApiPublicConfig, deserializeENSIndexerPublicConfig, deserializeErrorResponse, deserializeIndexingStatusResponse, deserializeOmnichainIndexingStatusSnapshot, deserializeRealtimeIndexingStatusProjection, deserializeReferrerDetailResponse, deserializeReferrerLeaderboardPageResponse, deserializeRegistrarActionsResponse, deserializeUnixTimestamp, deserializeUrl, deserializedNameTokensResponse, durationBetween, encodeLabelHash, evmChainIdToCoinType, formatAccountId, formatAssetId, formatNFTTransferEventMetadata, getBasenamesSubregistryId, getBasenamesSubregistryManagedName, getCurrencyInfo, getDatasourceContract, getEthnamesSubregistryId, getEthnamesSubregistryManagedName, getLatestIndexedBlockRef, getLineanamesSubregistryId, getLineanamesSubregistryManagedName, getNFTTransferType, getNameHierarchy, getNameTokenOwnership, getNameWrapperAccounts, getOmnichainIndexingCursor, getOmnichainIndexingStatus, getParentNameFQDN, 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, maybeGetDatasourceContract, nameTokensPrerequisites, parseAccountId, parseAssetId, parseNonNegativeInteger, parseReverseName, priceDai, priceEth, priceUsdc, registrarActionsFilter, registrarActionsPrerequisites, reverseName, serializeAssetId, serializeChainId, serializeChainIndexingSnapshots, serializeConfigResponse, serializeCrossChainIndexingStatusSnapshotOmnichain, serializeDatetime, serializeDomainAssetId, serializeENSApiPublicConfig, serializeENSIndexerPublicConfig, serializeIndexedChainIds, serializeIndexingStatusResponse, serializeNameToken, serializeNameTokensResponse, serializeNamedRegistrarAction, serializeOmnichainIndexingStatusSnapshot, serializePrice, serializePriceEth, serializeRealtimeIndexingStatusProjection, serializeReferrerDetailResponse, serializeReferrerLeaderboardPageResponse, serializeRegisteredNameTokens, serializeRegistrarAction, serializeRegistrarActionPricing, serializeRegistrarActionsResponse, serializeUrl, sortChainStatusesByStartBlockAsc, stripNullBytes, translateDefaultableChainIdToChainId, uint256ToHex32, uniq, validateSupportedLabelSetAndVersion };
|