@ensnode/ensnode-sdk 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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.
@@ -913,6 +921,35 @@ declare function isPriceEqual(priceA: Price, priceB: Price): boolean;
913
921
  */
914
922
  declare function addPrices<const PriceType extends Price = Price>(...prices: [PriceType, PriceType, ...PriceType[]]): PriceType;
915
923
 
924
+ /**
925
+ * Gets the AccountId for the contract in the specified namespace, datasource, and
926
+ * contract name, or undefined if it is not defined or is not a single AccountId.
927
+ *
928
+ * This is useful when you want to retrieve the AccountId for a contract by its name
929
+ * where it may or may not actually be defined for the given namespace and datasource.
930
+ *
931
+ * @param namespaceId - The ENSNamespace identifier (e.g. 'mainnet', 'sepolia', 'holesky',
932
+ * 'ens-test-env')
933
+ * @param datasourceName - The name of the Datasource to search for contractName in
934
+ * @param contractName - The name of the contract to retrieve
935
+ * @returns The AccountId of the contract with the given namespace, datasource,
936
+ * and contract name, or undefined if it is not found or is not a single AccountId
937
+ */
938
+ declare const maybeGetDatasourceContract: (namespaceId: ENSNamespaceId, datasourceName: DatasourceName, contractName: string) => AccountId | undefined;
939
+ /**
940
+ * Gets the AccountId for the contract in the specified namespace, datasource, and
941
+ * contract name, or throws an error if it is not defined or is not a single AccountId.
942
+ *
943
+ * @param namespaceId - The ENSNamespace identifier (e.g. 'mainnet', 'sepolia', 'holesky',
944
+ * 'ens-test-env')
945
+ * @param datasourceName - The name of the Datasource to search for contractName in
946
+ * @param contractName - The name of the contract to retrieve
947
+ * @returns The AccountId of the contract with the given namespace, datasource,
948
+ * and contract name
949
+ * @throws Error if the contract is not found or is not a single AccountId
950
+ */
951
+ declare const getDatasourceContract: (namespaceId: ENSNamespaceId, datasourceName: DatasourceName, contractName: string) => AccountId;
952
+
916
953
  /**
917
954
  * Duration between two moments in time.
918
955
  */
@@ -937,13 +974,13 @@ type DatetimeISO8601 = string;
937
974
  */
938
975
  type UrlString = string;
939
976
  /**
940
- * Serialized representation of {@link AccountId}.
977
+ * String representation of {@link AccountId}.
941
978
  *
942
979
  * Formatted as a fully lowercase CAIP-10 AccountId.
943
980
  *
944
981
  * @see https://chainagnostic.org/CAIPs/caip-10
945
982
  */
946
- type SerializedAccountId = string;
983
+ type AccountIdString = string;
947
984
 
948
985
  declare function deserializeChainId(maybeChainId: ChainIdString, valueLabel?: string): ChainId;
949
986
  declare function deserializeDatetime(maybeDatetime: string, valueLabel?: string): Datetime;
@@ -956,7 +993,7 @@ declare function deserializeBlockrange(maybeBlockrange: Partial<Blockrange>, val
956
993
  };
957
994
  declare function deserializeBlockRef(maybeBlockRef: Partial<BlockRef>, valueLabel?: string): BlockRef;
958
995
  declare function deserializeDuration(maybeDuration: unknown, valueLabel?: string): Duration;
959
- declare function deserializeAccountId(maybeAccountId: unknown, valueLabel?: string): AccountId;
996
+ declare function parseAccountId(maybeAccountId: unknown, valueLabel?: string): AccountId;
960
997
 
961
998
  /**
962
999
  * Interprets a Literal Label, producing an Interpreted Label.
@@ -1043,13 +1080,13 @@ declare function serializePrice(price: Price): SerializedPrice;
1043
1080
  */
1044
1081
  declare function serializePriceEth(price: PriceEth): SerializedPriceEth;
1045
1082
  /**
1046
- * Serializes {@link AccountId} object.
1083
+ * Format {@link AccountId} object as a string.
1047
1084
  *
1048
1085
  * Formatted as a fully lowercase CAIP-10 AccountId.
1049
1086
  *
1050
1087
  * @see https://chainagnostic.org/CAIPs/caip-10
1051
1088
  */
1052
- declare function serializeAccountId(accountId: AccountId): SerializedAccountId;
1089
+ declare function formatAccountId(accountId: AccountId): AccountIdString;
1053
1090
 
1054
1091
  declare function isHttpProtocol(url: URL): boolean;
1055
1092
  declare function isWebSocketProtocol(url: URL): boolean;
@@ -2238,143 +2275,794 @@ type IndexingStatusRequest = {};
2238
2275
  declare function serializeIndexingStatusResponse(response: IndexingStatusResponse): SerializedIndexingStatusResponse;
2239
2276
 
2240
2277
  /**
2241
- * Gets the SubregistryId (an AccountId) of the Ethnames Subregistry contract (this is the
2242
- * "BaseRegistrar" contract for direct subnames of .eth) for the provided namespace.
2243
- *
2244
- * @param namespace The ENS namespace to get the Ethnames Subregistry ID for
2245
- * @returns The AccountId for the Ethnames Subregistry contract for the provided namespace.
2246
- * @throws Error if the contract is not found for the given namespace.
2247
- */
2248
- declare function getEthnamesSubregistryId(namespace: ENSNamespaceId): AccountId;
2249
-
2250
- /**
2251
- * Subregistry
2252
- */
2253
- interface Subregistry {
2254
- /**
2255
- * Subregistry ID
2256
- *
2257
- * The ID of the subregistry the "logical registrar action" was taken on.
2258
- *
2259
- * Identifies the chainId and address of the associated subregistry smart
2260
- * contract.
2261
- */
2262
- subregistryId: AccountId;
2263
- /**
2264
- * The node (namehash) of the name the subregistry manages subnames of.
2265
- * Example subregistry managed names:
2266
- * - `eth`
2267
- * - `base.eth`
2268
- * - `linea.eth`
2269
- */
2270
- node: Node;
2271
- }
2272
- /**
2273
- * Serialized representation of {@link Subregistry}.
2278
+ * Deserialize a {@link NameTokensResponse} object.
2274
2279
  */
2275
- interface SerializedSubregistry extends Omit<Subregistry, "subregistryId"> {
2276
- subregistryId: SerializedAccountId;
2277
- }
2278
- declare function serializeSubregistry(subregistry: Subregistry): SerializedSubregistry;
2280
+ declare function deserializedNameTokensResponse(maybeResponse: SerializedNameTokensResponse): NameTokensResponse;
2279
2281
 
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: {
2282
+ declare const nameTokensPrerequisites: Readonly<{
2287
2283
  /**
2288
- * Active
2284
+ * Required plugins to enable Name Tokens API routes.
2289
2285
  *
2290
- * Happens when
2291
- * the current timestamp <= expiry.
2286
+ * 1. `registrars` plugin is required so that data in the `registrationLifecycles`
2287
+ * table is populated.
2288
+ * 2. `tokenscope` plugin is required so that data in the `nameTokens`
2289
+ * table is populated.
2292
2290
  */
2293
- readonly Active: "registrationLifecycle_active";
2291
+ requiredPlugins: readonly [PluginName.Registrars, PluginName.TokenScope];
2294
2292
  /**
2295
- * Grace Period
2296
- *
2297
- * Happens when
2298
- * `expiry < the current timestamp <= expiry + 90 days`.
2293
+ * Check if provided ENSApiPublicConfig supports the Name Tokens API.
2299
2294
  */
2300
- readonly GracePeriod: "registrationLifecycle_gracePeriod";
2295
+ hasEnsIndexerConfigSupport(config: ENSIndexerPublicConfig): boolean;
2301
2296
  /**
2302
- * Released with Temporary Premium Price
2297
+ * Required Indexing Status IDs
2303
2298
  *
2304
- * Happens when
2305
- * `expiry + 90 days < the current timestamp <= expiry + 120 days`.
2299
+ * Database indexes are created by the time the omnichain indexing status
2300
+ * is either `completed` or `following`.
2306
2301
  */
2307
- readonly ReleasedWithTempPrice: "registrationLifecycle_releasedWithTempPrice";
2302
+ supportedIndexingStatusIds: ("omnichain-following" | "omnichain-completed")[];
2308
2303
  /**
2309
- * Fully Released (Regular Price)
2310
- *
2311
- * Happens when
2312
- * ` expiry + 120 days < the current timestamp`.
2304
+ * Check if provided indexing status supports the Name Tokens API.
2313
2305
  */
2314
- readonly FullyReleased: "registrationLifecycle_fullyReleased";
2315
- };
2316
- type RegistrationLifecycleStage = (typeof RegistrationLifecycleStages)[keyof typeof RegistrationLifecycleStages];
2306
+ hasIndexingStatusSupport(omnichainIndexingStatusId: OmnichainIndexingStatusId): boolean;
2307
+ }>;
2308
+
2317
2309
  /**
2318
- * Registration Lifecycle
2310
+ * Represents request to Name Tokens API.
2319
2311
  */
2320
- interface RegistrationLifecycle {
2321
- /**
2322
- * Subregistry that manages this Registration Lifecycle.
2323
- */
2324
- subregistry: Subregistry;
2325
- /**
2326
- * The node (namehash) of the FQDN of the domain the registration lifecycle
2327
- * is associated with.
2328
- *
2329
- * Guaranteed to be a subname of the node (namehash) of the subregistry
2330
- * identified by `subregistryId.subregistryId`.
2331
- */
2332
- node: Node;
2312
+ interface NameTokensRequestByDomainId {
2313
+ domainId: Node;
2333
2314
  /**
2334
- * Expires at
2335
- *
2336
- * Identifies when the Registration Lifecycle is scheduled to expire.
2315
+ * Name for which name tokens were requested.
2337
2316
  */
2338
- expiresAt: UnixTimestamp;
2317
+ name?: undefined;
2339
2318
  }
2340
2319
  /**
2341
- * Serialized representation of {@link RegistrationLifecycle}.
2320
+ * Represents request to Name Tokens API.
2342
2321
  */
2343
- interface SerializedRegistrationLifecycle extends Omit<RegistrationLifecycle, "subregistry"> {
2344
- subregistry: SerializedSubregistry;
2322
+ interface NameTokensRequestByName {
2323
+ domainId?: undefined;
2324
+ /**
2325
+ * Name for which name tokens were requested.
2326
+ */
2327
+ name: Name;
2345
2328
  }
2346
- declare function serializeRegistrationLifecycle(registrationLifecycle: RegistrationLifecycle): SerializedRegistrationLifecycle;
2329
+ type NameTokensRequest = NameTokensRequestByDomainId | NameTokensRequestByName;
2347
2330
 
2348
2331
  /**
2349
- * Globally unique, deterministic ID of an indexed onchain event
2350
- * associated with the "logical registrar action".
2332
+ * An enum representing the possible CAIP-19 Asset Namespace values.
2351
2333
  */
2352
- type RegistrarActionEventId = string;
2334
+ declare const AssetNamespaces: {
2335
+ readonly ERC721: "erc721";
2336
+ readonly ERC1155: "erc1155";
2337
+ };
2338
+ type AssetNamespace = (typeof AssetNamespaces)[keyof typeof AssetNamespaces];
2353
2339
  /**
2354
- * Types of "logical registrar action".
2340
+ * A uint256 value that identifies a specific NFT within a NFT contract.
2355
2341
  */
2356
- declare const RegistrarActionTypes: {
2357
- readonly Registration: "registration";
2358
- readonly Renewal: "renewal";
2359
- };
2360
- type RegistrarActionType = (typeof RegistrarActionTypes)[keyof typeof RegistrarActionTypes];
2342
+ type TokenId = bigint;
2361
2343
  /**
2362
- * Pricing information for a "logical registrar action".
2344
+ * Serialized representation of {@link TokenId}.
2363
2345
  */
2364
- interface RegistrarActionPricingAvailable {
2365
- /**
2366
- * Base cost
2367
- *
2368
- * Base cost (before any `premium`) of Ether measured in units of Wei
2369
- * paid to execute the "logical registrar action".
2370
- *
2371
- * May be 0.
2372
- */
2373
- baseCost: PriceEth;
2374
- /**
2375
- * Premium
2376
- *
2377
- * "premium" cost (in excesses of the `baseCost`) of Ether measured in
2346
+ type SerializedTokenId = string;
2347
+ /**
2348
+ * A globally unique reference to an NFT.
2349
+ */
2350
+ interface AssetId {
2351
+ assetNamespace: AssetNamespace;
2352
+ contract: AccountId;
2353
+ tokenId: TokenId;
2354
+ }
2355
+ /**
2356
+ * Serialized representation of {@link AssetId}.
2357
+ */
2358
+ interface SerializedAssetId extends Omit<AssetId, "tokenId"> {
2359
+ tokenId: SerializedTokenId;
2360
+ }
2361
+ /**
2362
+ * String representation of an {@link AssetId}.
2363
+ *
2364
+ * Formatted as a fully lowercase CAIP-19 AssetId.
2365
+ *
2366
+ * @see https://chainagnostic.org/CAIPs/caip-19
2367
+ * @example "eip155:1/erc721:0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf2caa1c2ca1d027f1ac823b529d0a67cd144264b2789fa2ea4d63a67c7103cc"
2368
+ * for vitalik.eth in the eth base registrar on mainnet.
2369
+ */
2370
+ type AssetIdString = string;
2371
+ /**
2372
+ * Serializes {@link AssetId} object.
2373
+ */
2374
+ declare function serializeAssetId(assetId: AssetId): SerializedAssetId;
2375
+ /**
2376
+ * Deserialize a {@link AssetId} object.
2377
+ */
2378
+ declare function deserializeAssetId(maybeAssetId: unknown, valueLabel?: string): AssetId;
2379
+ /**
2380
+ * Format {@link AssetId} object as a string.
2381
+ */
2382
+ declare function formatAssetId(assetId: AssetId): AssetIdString;
2383
+ /**
2384
+ * Parse a stringified representation of {@link AssetId} object.
2385
+ */
2386
+ declare function parseAssetId(maybeAssetId: AssetIdString, valueLabel?: string): AssetId;
2387
+ /**
2388
+ * Builds an AssetId for the NFT represented by the given contract,
2389
+ * tokenId, and assetNamespace.
2390
+ *
2391
+ * @param contract - The contract that manages the NFT
2392
+ * @param tokenId - The tokenId of the NFT
2393
+ * @param assetNamespace - The assetNamespace of the NFT
2394
+ * @returns The AssetId for the NFT represented by the given contract,
2395
+ * tokenId, and assetNamespace
2396
+ */
2397
+ declare const buildAssetId: (contract: AccountId, tokenId: TokenId, assetNamespace: AssetNamespace) => AssetId;
2398
+ /**
2399
+ * A globally unique reference to an NFT tokenizing the ownership of a domain.
2400
+ */
2401
+ interface DomainAssetId extends AssetId {
2402
+ /**
2403
+ * The namehash (node) of the domain who's ownership is tokenized by
2404
+ * this `AssetId`.
2405
+ */
2406
+ domainId: Node;
2407
+ }
2408
+ /**
2409
+ * Serialized representation of {@link DomainAssetId}.
2410
+ */
2411
+ interface SerializedDomainAssetId extends SerializedAssetId {
2412
+ domainId: Node;
2413
+ }
2414
+ declare function serializeDomainAssetId(domainAsset: DomainAssetId): SerializedDomainAssetId;
2415
+ /**
2416
+ * An enum representing the mint status of a DomainAssetId.
2417
+ *
2418
+ * After we index a NFT we never delete it from our index. Instead, when an
2419
+ * indexed NFT is burned onchain we retain its record and update its mint
2420
+ * status as `burned`. If a NFT is minted again after it is burned its mint
2421
+ * status is updated to `minted`.
2422
+ */
2423
+ declare const NFTMintStatuses: {
2424
+ readonly Minted: "minted";
2425
+ readonly Burned: "burned";
2426
+ };
2427
+ type NFTMintStatus = (typeof NFTMintStatuses)[keyof typeof NFTMintStatuses];
2428
+ /**
2429
+ * Metadata about a NFT transfer event.
2430
+ *
2431
+ * This metadata can be used for building more helpful messages when processing
2432
+ * NFT transfer events.
2433
+ */
2434
+ interface NFTTransferEventMetadata {
2435
+ chainId: ChainId;
2436
+ blockNumber: bigint;
2437
+ transactionHash: Hex;
2438
+ eventHandlerName: string;
2439
+ nft: DomainAssetId;
2440
+ }
2441
+ declare const formatNFTTransferEventMetadata: (metadata: NFTTransferEventMetadata) => string;
2442
+ /**
2443
+ * An enum representing the type of transfer that has occurred to a DomainAssetId.
2444
+ */
2445
+ declare const NFTTransferTypes: {
2446
+ /**
2447
+ * Initial transfer from zeroAddress to a non-zeroAddress
2448
+ * Can happen at most once to a NFT AssetId
2449
+ *
2450
+ * Invariants:
2451
+ * - NFT is not indexed and therefore has no previous mint status or owner
2452
+ * - new NFT mint status is `minted`
2453
+ * - new NFT owner is a non-zeroAddress
2454
+ */
2455
+ readonly Mint: "mint";
2456
+ /**
2457
+ * Subsequent transfer from zeroAddress to a non-zeroAddress
2458
+ * Can happen any number of times to a NFT AssetId as it passes in a cycle from
2459
+ * mint -> burn -> remint -> burn -> remint -> ...
2460
+ *
2461
+ * Invariants:
2462
+ * - NFT is indexed
2463
+ * - previous NFT mint status was `burned`
2464
+ * - previous NFT owner is the zeroAddress
2465
+ * - new NFT mint status is `minted`
2466
+ * - new NFT owner is a non-zeroAddress
2467
+ */
2468
+ readonly Remint: "remint";
2469
+ /**
2470
+ * Special transfer type for improperly implemented NFT contracts that allow a NFT
2471
+ * that is currently minted to be reminted before an intermediate burn.
2472
+ *
2473
+ * Transfer from zeroAddress to non-zeroAddress for an indexed NFT where the
2474
+ * previously indexed nft had status `minted` with a non-zeroAddress owner.
2475
+ *
2476
+ * Invariants:
2477
+ * - NFT is indexed
2478
+ * - previous NFT mint status was `minted`
2479
+ * - previous NFT owner was a non-zeroAddress
2480
+ * - new NFT mint status is `minted`
2481
+ * - new NFT owner is a non-zeroAddress
2482
+ */
2483
+ readonly MintedRemint: "minted-remint";
2484
+ /**
2485
+ * Transfer from a non-zeroAddress to zeroAddress
2486
+ *
2487
+ * Invariants:
2488
+ * - NFT is indexed
2489
+ * - previous NFT mint status was `minted`
2490
+ * - previous NFT owner is a non-zeroAddress
2491
+ * - new NFT mint status is `burned`
2492
+ * - new NFT owner is the zeroAddress
2493
+ */
2494
+ readonly Burn: "burn";
2495
+ /**
2496
+ * Transfer from a non-zeroAddress to a distinct non-zeroAddress
2497
+ *
2498
+ * Invariants:
2499
+ * - NFT is indexed
2500
+ * - previous and new NFT mint status is `minted`
2501
+ * - previous and new NFT owner are distinct non-zeroAddress
2502
+ */
2503
+ readonly Transfer: "transfer";
2504
+ /**
2505
+ * Transfer from a non-zeroAddress to the same non-zeroAddress
2506
+ *
2507
+ * Invariants:
2508
+ * - NFT is indexed
2509
+ * - previous and new NFT mint status is `minted`
2510
+ * - previous and new NFT owner are equivalent non-zeroAddress
2511
+ */
2512
+ readonly SelfTransfer: "self-transfer";
2513
+ /**
2514
+ * Transfer from zeroAddress to zeroAddress for an indexed NFT
2515
+ *
2516
+ * Invariants:
2517
+ * - NFT is indexed
2518
+ * - previous and new NFT mint status is `burned`
2519
+ * - previous and new NFT owner are zeroAddress
2520
+ */
2521
+ readonly RemintBurn: "remint-burn";
2522
+ /**
2523
+ * Special transfer type for improperly implemented NFT contracts that allow a NFT
2524
+ * that is currently minted to be reminted again before an intermediate burn.
2525
+ *
2526
+ * Transfer from zeroAddress to zeroAddress for an indexed NFT where the
2527
+ * previously indexed nft had status `minted` with a non-zeroAddress owner.
2528
+ *
2529
+ * Invariants:
2530
+ * - NFT is indexed
2531
+ * - previous NFT mint status was `minted`
2532
+ * - previous NFT owner was a non-zeroAddress
2533
+ * - new NFT mint status is `burned`
2534
+ * - new NFT owner is the zeroAddress
2535
+ */
2536
+ readonly MintedRemintBurn: "minted-remint-burn";
2537
+ /**
2538
+ * Transfer from zeroAddress to zeroAddress for an unindexed NFT
2539
+ *
2540
+ * Invariants:
2541
+ * - NFT is not indexed and therefore has no previous mint status or owner
2542
+ * - NFT should remain unindexed and without any mint status or owner
2543
+ */
2544
+ readonly MintBurn: "mint-burn";
2545
+ };
2546
+ type NFTTransferType = (typeof NFTTransferTypes)[keyof typeof NFTTransferTypes];
2547
+ declare const getNFTTransferType: (from: Address, to: Address, allowMintedRemint: boolean, metadata: NFTTransferEventMetadata, currentlyIndexedOwner?: Address) => NFTTransferType;
2548
+
2549
+ /**
2550
+ * An enum representing the possible Name Token Ownership types.
2551
+ */
2552
+ declare const NameTokenOwnershipTypes: {
2553
+ /**
2554
+ * Name Token is owned by NameWrapper account.
2555
+ */
2556
+ readonly NameWrapper: "namewrapper";
2557
+ /**
2558
+ * Name Token is owned fully onchain.
2559
+ *
2560
+ * This ownership type can only apply to direct subnames of `.eth`
2561
+ */
2562
+ readonly FullyOnchain: "fully-onchain";
2563
+ /**
2564
+ * Name Token ownership has been transferred to the null address.
2565
+ */
2566
+ readonly Burned: "burned";
2567
+ /**
2568
+ * Name Token ownership is unknown.
2569
+ */
2570
+ readonly Unknown: "unknown";
2571
+ };
2572
+ type NameTokenOwnershipType = (typeof NameTokenOwnershipTypes)[keyof typeof NameTokenOwnershipTypes];
2573
+ interface NameTokenOwnershipNameWrapper {
2574
+ ownershipType: typeof NameTokenOwnershipTypes.NameWrapper;
2575
+ /**
2576
+ * Owner
2577
+ *
2578
+ * Guarantees:
2579
+ * - `owner.address` is not the zero address.
2580
+ * - `owner.chainId` is same as the chainId of the associated NFT,
2581
+ * even if that NFT has been burned.
2582
+ */
2583
+ owner: AccountId;
2584
+ }
2585
+ interface NameTokenOwnershipFullyOnchain {
2586
+ ownershipType: typeof NameTokenOwnershipTypes.FullyOnchain;
2587
+ /**
2588
+ * Owner
2589
+ *
2590
+ * Guarantees:
2591
+ * - `owner.address` is not the zero address.
2592
+ * - `owner.chainId` is same as the chainId of the associated NFT,
2593
+ * even if that NFT has been burned.
2594
+ */
2595
+ owner: AccountId;
2596
+ }
2597
+ interface NameTokenOwnershipBurned {
2598
+ ownershipType: typeof NameTokenOwnershipTypes.Burned;
2599
+ /**
2600
+ * Owner
2601
+ *
2602
+ * Guarantees:
2603
+ * - `owner.address` is the zero address.
2604
+ * - `owner.chainId` is same as the chainId of the associated NFT,
2605
+ * even if that NFT has been burned.
2606
+ */
2607
+ owner: AccountId;
2608
+ }
2609
+ interface NameTokenOwnershipUnknown {
2610
+ ownershipType: typeof NameTokenOwnershipTypes.Unknown;
2611
+ /**
2612
+ * Owner
2613
+ *
2614
+ * Guarantees:
2615
+ * - `owner.address` is the zero address.
2616
+ * - `owner.chainId` is same as the chainId of the associated NFT,
2617
+ * even if that NFT has been burned.
2618
+ */
2619
+ owner: AccountId;
2620
+ }
2621
+ type NameTokenOwnership = NameTokenOwnershipNameWrapper | NameTokenOwnershipFullyOnchain | NameTokenOwnershipBurned | NameTokenOwnershipUnknown;
2622
+ interface NameToken {
2623
+ /**
2624
+ * Token
2625
+ *
2626
+ * References the NFT that currently or previously tokenized ownership of
2627
+ * `name`.
2628
+ */
2629
+ token: AssetId;
2630
+ /**
2631
+ * Owner
2632
+ *
2633
+ * Identifies the ownership state of the token.
2634
+ *
2635
+ * Guarantees:
2636
+ * - The `ownership.owner.chainId` of this address is the same as is referenced
2637
+ * in `domainAsset.contract.chainId`.
2638
+ */
2639
+ ownership: NameTokenOwnership;
2640
+ /**
2641
+ * The mint status of the token.
2642
+ *
2643
+ * After ENSNode indexes the token for a name, even if that token is burned,
2644
+ * ENSNode will never forget how the token once represented the name.
2645
+ * When the token for a name is burned, ENSNode remembers this token but
2646
+ * updates its `mintStatus` to `burned`. If this token becomes minted again
2647
+ * after it was burned, its `mintStatus` is updated to `minted` again.
2648
+ *
2649
+ * NOTE: Tokens managed by the .eth BaseRegistrar for
2650
+ * direct subnames of .eth can only be burned when undergoing
2651
+ * a state transition of `minted` -> `burned` -> `minted` all within
2652
+ * the same registrar action for the case that a direct subname of .eth
2653
+ * has expired and has been fully released and is now being registered again.
2654
+ * Since all of those mint status state transitions are processed within
2655
+ * a single block, once the token managed by the .eth BaseRegistrar for
2656
+ * a direct subname of .eth has been minted, our state model will forever
2657
+ * represent it as `minted`.
2658
+ *
2659
+ * Guarantees:
2660
+ * - The `mintStatus` will be burned if and only
2661
+ * if `ownership.ownershipType` is `NameTokenOwnershipTypes.Burned`.
2662
+ */
2663
+ mintStatus: NFTMintStatus;
2664
+ }
2665
+ /**
2666
+ * Serialized representation of {@link NameToken}.
2667
+ */
2668
+ interface SerializedNameToken extends Omit<NameToken, "token"> {
2669
+ token: SerializedAssetId;
2670
+ }
2671
+ declare function serializeNameToken(nameToken: NameToken): SerializedNameToken;
2672
+ /**
2673
+ * Get all NameWrapper accounts within provided ENS Namespace.
2674
+ *
2675
+ * Guaranteed to return at least one account for ENSRoot Datasource.
2676
+ */
2677
+ declare function getNameWrapperAccounts(namespaceId: ENSNamespaceId): [AccountId, ...AccountId[]];
2678
+ /**
2679
+ * Get name token ownership for provided owner account within selected ENS Namespace.
2680
+ */
2681
+ declare function getNameTokenOwnership(namespaceId: ENSNamespaceId, name: InterpretedName, owner: AccountId): NameTokenOwnership;
2682
+
2683
+ /**
2684
+ * Schema for {@link ErrorResponse}.
2685
+ */
2686
+ declare const ErrorResponseSchema: z$1.ZodObject<{
2687
+ message: z$1.ZodString;
2688
+ details: z$1.ZodOptional<z$1.ZodUnknown>;
2689
+ }, z$1.core.$strip>;
2690
+
2691
+ /**
2692
+ * API Error Response Type
2693
+ */
2694
+ type ErrorResponse = z$1.infer<typeof ErrorResponseSchema>;
2695
+
2696
+ /**
2697
+ * Deserialize a {@link ErrorResponse} object.
2698
+ */
2699
+ declare function deserializeErrorResponse(maybeErrorResponse: unknown): ErrorResponse;
2700
+
2701
+ /**
2702
+ * A status code for Name Tokens API responses.
2703
+ */
2704
+ declare const NameTokensResponseCodes: {
2705
+ /**
2706
+ * Represents a response when Name Tokens API can respond with requested data.
2707
+ */
2708
+ readonly Ok: "ok";
2709
+ /**
2710
+ * Represents a response when Name Tokens API could not respond with requested data.
2711
+ */
2712
+ readonly Error: "error";
2713
+ };
2714
+ /**
2715
+ * The derived string union of possible {@link NameTokensResponseCodes}.
2716
+ */
2717
+ type NameTokensResponseCode = (typeof NameTokensResponseCodes)[keyof typeof NameTokensResponseCodes];
2718
+ /**
2719
+ * Error codes for Name Tokens API responses with 'error' response code.
2720
+ */
2721
+ declare const NameTokensResponseErrorCodes: {
2722
+ /**
2723
+ * Name tokens not indexed
2724
+ *
2725
+ * Represents an error when tokens for the requested name are not indexed by
2726
+ * the ENSNode instance's configuration.
2727
+ */
2728
+ readonly NameTokensNotIndexed: "name-tokens-not-indexed";
2729
+ /**
2730
+ * Unsupported ENSIndexer Config
2731
+ *
2732
+ * Represents a prerequisites error when connected ENSIndexer config lacks
2733
+ * params required to enable Name Tokens API.
2734
+ */
2735
+ readonly EnsIndexerConfigUnsupported: "unsupported-ensindexer-config";
2736
+ /**
2737
+ * Unsupported Indexing Status
2738
+ *
2739
+ * Represents a prerequisites error when Indexing Status has not yet reached
2740
+ * status required to enable Name Tokens API.
2741
+ */
2742
+ readonly IndexingStatusUnsupported: "unsupported-indexing-status";
2743
+ };
2744
+ /**
2745
+ * The derived string union of possible {@link NameTokensResponseErrorCodes}.
2746
+ */
2747
+ type NameTokensResponseErrorCode = (typeof NameTokensResponseErrorCodes)[keyof typeof NameTokensResponseErrorCodes];
2748
+ /**
2749
+ * Name Tokens for a name who's tokens are configured to
2750
+ * be indexed by the ENSNode instance's configuration.
2751
+ */
2752
+ interface RegisteredNameTokens {
2753
+ /**
2754
+ * Domain ID
2755
+ */
2756
+ domainId: Node;
2757
+ /**
2758
+ * Name
2759
+ *
2760
+ * FQDN of the name associated with `domainId`.
2761
+ *
2762
+ * Guarantees:
2763
+ * - `namehash(name)` is always `domainId`.
2764
+ */
2765
+ name: InterpretedName;
2766
+ /**
2767
+ * Name Tokens associated with the `domainId`.
2768
+ *
2769
+ * It contains every tokenized representation of `name` that
2770
+ * has ever been indexed for the given name as of `accurateAsOf`,
2771
+ * even if the given token has been burned or expired.
2772
+ *
2773
+ * Guarantees:
2774
+ * - Always includes at least one name token.
2775
+ * - When it includes more than one name token, it means that:
2776
+ * 1) More than 1 distinct tokenized representation of the ownership of
2777
+ * the `name` has been indexed as of `accurateAsOf`.
2778
+ * 2) All possible permutations of mint statuses of these tokens are
2779
+ * possible:
2780
+ * a) Multiple could be actively minted.
2781
+ * b) Multiple could be burned.
2782
+ * c) Some could be burned, others could be minted.
2783
+ * - Order of name tokens follows the order of onchain events that were
2784
+ * indexed when a token was minted, or burned.
2785
+ * - Each name token has a distinct `token` value which references
2786
+ * the NFT that currently or previously tokenized ownership of `name`.
2787
+ * - Each name token has ownership type (`ownership.ownershipType`) assigned:
2788
+ * - If there's a name token with ownership type
2789
+ * {@link NameTokenOwnershipTypes.NameWrapper}, it means that there must be also
2790
+ * another name token with ownership type either
2791
+ * {@link NameTokenOwnershipTypes.FullyOnchain}, or
2792
+ * {@link NameTokenOwnershipTypes.Unknown}.
2793
+ * - There can be at most one name token with ownership type
2794
+ * {@link NameTokenOwnershipTypes.FullyOnchain}.
2795
+ * - There can be any number of name tokens with ownership type
2796
+ * {@link NameTokenOwnershipTypes.Burned}.
2797
+ *
2798
+ * NOTE: It can be useful to get tokenized representations of the name that
2799
+ * are now burned: This can be helpful for looking up historical activity for
2800
+ * the name, including past buy orders, sell orders, and sales.
2801
+ *
2802
+ * How will the direct subnames of .eth that are wrapped by the NameWrapper
2803
+ * be represented?
2804
+ * 1) A direct subname of .eth that has been registered but
2805
+ * has never been wrapped by the NameWrapper, and:
2806
+ * a) Is still actively minted (independent of its expiry state).
2807
+ * b) Has been burned by sending it to the null address.
2808
+ * 2) A direct subname of .eth that has been registered and
2809
+ * has been wrapped by the NameWrapper, and:
2810
+ * a) Is still actively wrapped by the NameWrapper (independent of its
2811
+ * expiry state).
2812
+ * b) Is no longer wrapped by the NameWrapper, but is still actively
2813
+ * minted by the BaseRegistrar (independent of its expiry state).
2814
+ * c) Is no longer wrapped by the NameWrapper, and is also no longer
2815
+ * minted by the BaseRegistrar (both tokens now burned by sending to
2816
+ * the null address).
2817
+ */
2818
+ tokens: NameToken[];
2819
+ /**
2820
+ * Expiry date for the Registration Lifecycle
2821
+ *
2822
+ * The latest Registration Lifecycle for a node referenced in `domainId`.
2823
+ */
2824
+ expiresAt: UnixTimestamp$1;
2825
+ /**
2826
+ * The {@link UnixTimestamp} of when the data used to build the {@link NameTokensResponseOk.nameTokens} was accurate as of.
2827
+ */
2828
+ accurateAsOf: UnixTimestamp$1;
2829
+ }
2830
+ /**
2831
+ * A response when Name Tokens API can respond with requested data.
2832
+ */
2833
+ type NameTokensResponseOk = {
2834
+ responseCode: typeof NameTokensResponseCodes.Ok;
2835
+ /**
2836
+ * Name Tokens for the requested name.
2837
+ */
2838
+ registeredNameTokens: RegisteredNameTokens;
2839
+ };
2840
+ /**
2841
+ * Represents an error response when requested name was not indexed by ENSNode.
2842
+ */
2843
+ interface NameTokensResponseErrorNameTokensNotIndexed {
2844
+ responseCode: typeof NameTokensResponseCodes.Error;
2845
+ errorCode: typeof NameTokensResponseErrorCodes.NameTokensNotIndexed;
2846
+ error: ErrorResponse;
2847
+ }
2848
+ /**
2849
+ * Represents an error response when connected ENSIndexer config lacks
2850
+ * params required to enable Name Tokens API.
2851
+ */
2852
+ interface NameTokensResponseErrorEnsIndexerConfigUnsupported {
2853
+ responseCode: typeof NameTokensResponseCodes.Error;
2854
+ errorCode: typeof NameTokensResponseErrorCodes.EnsIndexerConfigUnsupported;
2855
+ error: ErrorResponse;
2856
+ }
2857
+ /**
2858
+ * Represents an error response when Indexing Status has not yet reached
2859
+ * status required to enable Name Tokens API.
2860
+ */
2861
+ interface NameTokensResponseErrorIndexingStatusUnsupported {
2862
+ responseCode: typeof NameTokensResponseCodes.Error;
2863
+ errorCode: typeof NameTokensResponseErrorCodes.IndexingStatusUnsupported;
2864
+ error: ErrorResponse;
2865
+ }
2866
+ type NameTokensResponseError = NameTokensResponseErrorNameTokensNotIndexed | NameTokensResponseErrorEnsIndexerConfigUnsupported | NameTokensResponseErrorIndexingStatusUnsupported;
2867
+ /**
2868
+ * Name Tokens response.
2869
+ *
2870
+ * Use the `responseCode` field to determine the specific type interpretation
2871
+ * at runtime.
2872
+ */
2873
+ type NameTokensResponse = NameTokensResponseOk | NameTokensResponseError;
2874
+
2875
+ /**
2876
+ * Serialized representation of {@link NameTokensResponseError}.
2877
+ */
2878
+ type SerializedNameTokensResponseError = NameTokensResponseError;
2879
+ /**
2880
+ * Serialized representation of {@link RegisteredNameToken}.
2881
+ */
2882
+ interface SerializedRegisteredNameTokens extends Omit<RegisteredNameTokens, "tokens"> {
2883
+ tokens: SerializedNameToken[];
2884
+ }
2885
+ /**
2886
+ * Serialized representation of {@link NameTokensResponseOk}.
2887
+ */
2888
+ interface SerializedNameTokensResponseOk extends Omit<NameTokensResponseOk, "registeredNameTokens"> {
2889
+ registeredNameTokens: SerializedRegisteredNameTokens;
2890
+ }
2891
+ /**
2892
+ * Serialized representation of {@link NameTokensResponse}.
2893
+ */
2894
+ type SerializedNameTokensResponse = SerializedNameTokensResponseOk | SerializedNameTokensResponseError;
2895
+
2896
+ declare function serializeRegisteredNameTokens({ domainId, name, tokens, expiresAt, accurateAsOf, }: RegisteredNameTokens): SerializedRegisteredNameTokens;
2897
+ declare function serializeNameTokensResponse(response: NameTokensResponse): SerializedNameTokensResponse;
2898
+
2899
+ /**
2900
+ * Gets the SubregistryId (an AccountId) of the Basenames Subregistry contract (this is the
2901
+ * "BaseRegistrar" contract for Basenames) for the provided namespace.
2902
+ *
2903
+ * @param namespace The ENS namespace to get the Basenames Subregistry ID for
2904
+ * @returns The AccountId for the Basenames Subregistry contract for the provided namespace.
2905
+ * @throws Error if the contract is not found for the given namespace.
2906
+ */
2907
+ declare function getBasenamesSubregistryId(namespace: ENSNamespaceId): AccountId;
2908
+ /**
2909
+ * Get the managed name for the Basenames subregistry for the selected ENS namespace.
2910
+ *
2911
+ * @param namespaceId
2912
+ * @returns registrar managed name
2913
+ * @throws an error when no registrar managed name could be returned
2914
+ */
2915
+ declare function getBasenamesSubregistryManagedName(namespaceId: ENSNamespaceId): Name;
2916
+
2917
+ /**
2918
+ * Gets the SubregistryId (an AccountId) of the Ethnames Subregistry contract (this is the
2919
+ * "BaseRegistrar" contract for direct subnames of .eth) for the provided namespace.
2920
+ *
2921
+ * @param namespace The ENS namespace to get the Ethnames Subregistry ID for
2922
+ * @returns The AccountId for the Ethnames Subregistry contract for the provided namespace.
2923
+ * @throws Error if the contract is not found for the given namespace.
2924
+ */
2925
+ declare function getEthnamesSubregistryId(namespace: ENSNamespaceId): AccountId;
2926
+ /**
2927
+ * Get the managed name for the Ethnames subregistry for the selected ENS namespace.
2928
+ *
2929
+ * @param namespaceId
2930
+ * @returns registrar managed name
2931
+ */
2932
+ declare function getEthnamesSubregistryManagedName(namespaceId: ENSNamespaceId): Name;
2933
+
2934
+ /**
2935
+ * Gets the SubregistryId (an AccountId) of the Lineanames Subregistry contract (this is the
2936
+ * "BaseRegistrar" contract for Lineanames) for the provided namespace.
2937
+ *
2938
+ * @param namespace The ENS namespace to get the Lineanames Subregistry ID for
2939
+ * @returns The AccountId for the Lineanames Subregistry contract for the provided namespace.
2940
+ * @throws Error if the contract is not found for the given namespace.
2941
+ */
2942
+ declare function getLineanamesSubregistryId(namespace: ENSNamespaceId): AccountId;
2943
+ /**
2944
+ * Get the managed name for the Lineanames subregistry for the selected ENS namespace.
2945
+ *
2946
+ * @param namespaceId
2947
+ * @returns registrar managed name
2948
+ * @throws an error when no registrar managed name could be returned
2949
+ */
2950
+ declare function getLineanamesSubregistryManagedName(namespaceId: ENSNamespaceId): Name;
2951
+
2952
+ /**
2953
+ * Subregistry
2954
+ */
2955
+ interface Subregistry {
2956
+ /**
2957
+ * Subregistry ID
2958
+ *
2959
+ * The ID of the subregistry the "logical registrar action" was taken on.
2960
+ *
2961
+ * Identifies the chainId and address of the associated subregistry smart
2962
+ * contract.
2963
+ */
2964
+ subregistryId: AccountId;
2965
+ /**
2966
+ * The node (namehash) of the name the subregistry manages subnames of.
2967
+ * Example subregistry managed names:
2968
+ * - `eth`
2969
+ * - `base.eth`
2970
+ * - `linea.eth`
2971
+ */
2972
+ node: Node;
2973
+ }
2974
+
2975
+ /**
2976
+ * Registration Lifecycle Stages
2977
+ *
2978
+ * Important: this definition should not be used anywhere.
2979
+ * It's only here to capture some ideas that were shared in the team.
2980
+ */
2981
+ declare const RegistrationLifecycleStages: {
2982
+ /**
2983
+ * Active
2984
+ *
2985
+ * Happens when
2986
+ * the current timestamp <= expiry.
2987
+ */
2988
+ readonly Active: "registrationLifecycle_active";
2989
+ /**
2990
+ * Grace Period
2991
+ *
2992
+ * Happens when
2993
+ * `expiry < the current timestamp <= expiry + 90 days`.
2994
+ */
2995
+ readonly GracePeriod: "registrationLifecycle_gracePeriod";
2996
+ /**
2997
+ * Released with Temporary Premium Price
2998
+ *
2999
+ * Happens when
3000
+ * `expiry + 90 days < the current timestamp <= expiry + 120 days`.
3001
+ */
3002
+ readonly ReleasedWithTempPrice: "registrationLifecycle_releasedWithTempPrice";
3003
+ /**
3004
+ * Fully Released (Regular Price)
3005
+ *
3006
+ * Happens when
3007
+ * ` expiry + 120 days < the current timestamp`.
3008
+ */
3009
+ readonly FullyReleased: "registrationLifecycle_fullyReleased";
3010
+ };
3011
+ type RegistrationLifecycleStage = (typeof RegistrationLifecycleStages)[keyof typeof RegistrationLifecycleStages];
3012
+ /**
3013
+ * Registration Lifecycle
3014
+ */
3015
+ interface RegistrationLifecycle {
3016
+ /**
3017
+ * Subregistry that manages this Registration Lifecycle.
3018
+ */
3019
+ subregistry: Subregistry;
3020
+ /**
3021
+ * The node (namehash) of the FQDN of the domain the registration lifecycle
3022
+ * is associated with.
3023
+ *
3024
+ * Guaranteed to be a subname of the node (namehash) of the subregistry
3025
+ * identified by `subregistryId.subregistryId`.
3026
+ */
3027
+ node: Node;
3028
+ /**
3029
+ * Expires at
3030
+ *
3031
+ * Identifies when the Registration Lifecycle is scheduled to expire.
3032
+ */
3033
+ expiresAt: UnixTimestamp;
3034
+ }
3035
+
3036
+ /**
3037
+ * Globally unique, deterministic ID of an indexed onchain event
3038
+ * associated with the "logical registrar action".
3039
+ */
3040
+ type RegistrarActionEventId = string;
3041
+ /**
3042
+ * Types of "logical registrar action".
3043
+ */
3044
+ declare const RegistrarActionTypes: {
3045
+ readonly Registration: "registration";
3046
+ readonly Renewal: "renewal";
3047
+ };
3048
+ type RegistrarActionType = (typeof RegistrarActionTypes)[keyof typeof RegistrarActionTypes];
3049
+ /**
3050
+ * Pricing information for a "logical registrar action".
3051
+ */
3052
+ interface RegistrarActionPricingAvailable {
3053
+ /**
3054
+ * Base cost
3055
+ *
3056
+ * Base cost (before any `premium`) of Ether measured in units of Wei
3057
+ * paid to execute the "logical registrar action".
3058
+ *
3059
+ * May be 0.
3060
+ */
3061
+ baseCost: PriceEth;
3062
+ /**
3063
+ * Premium
3064
+ *
3065
+ * "premium" cost (in excesses of the `baseCost`) of Ether measured in
2378
3066
  * units of Wei paid to execute the "logical registrar action".
2379
3067
  *
2380
3068
  * May be 0.
@@ -2637,30 +3325,100 @@ type SerializedRegistrarActionPricing = SerializedRegistrarActionPricingAvailabl
2637
3325
  /**
2638
3326
  * Serialized representation of {@link RegistrarAction}.
2639
3327
  */
2640
- interface SerializedRegistrarAction extends Omit<RegistrarAction, "registrationLifecycle" | "pricing"> {
2641
- registrationLifecycle: SerializedRegistrationLifecycle;
3328
+ interface SerializedRegistrarAction extends Omit<RegistrarAction, "pricing"> {
2642
3329
  pricing: SerializedRegistrarActionPricing;
2643
3330
  }
2644
3331
  declare function serializeRegistrarActionPricing(pricing: RegistrarActionPricing): SerializedRegistrarActionPricing;
2645
3332
  declare function serializeRegistrarAction(registrarAction: RegistrarAction): SerializedRegistrarAction;
2646
3333
 
3334
+ declare const RECORDS_PER_PAGE_DEFAULT = 10;
3335
+ declare const RECORDS_PER_PAGE_MAX = 100;
2647
3336
  /**
2648
- * Schema for {@link ErrorResponse}.
3337
+ * Request page params.
2649
3338
  */
2650
- declare const ErrorResponseSchema: z$1.ZodObject<{
2651
- message: z$1.ZodString;
2652
- details: z$1.ZodOptional<z$1.ZodUnknown>;
2653
- }, z$1.core.$strip>;
3339
+ interface RequestPageParams {
3340
+ /**
3341
+ * Requested page number (1-indexed)
3342
+ * @invariant Must be a positive integer (>= 1)
3343
+ * @default 1
3344
+ */
3345
+ page?: number;
3346
+ /**
3347
+ * Maximum number of records to return per page
3348
+ * @invariant Must be a positive integer (>= 1) and less than or equal to {@link RECORDS_PER_PAGE_MAX}
3349
+ * @default {@link RECORDS_PER_PAGE_DEFAULT}
3350
+ */
3351
+ recordsPerPage?: number;
3352
+ }
2654
3353
 
2655
- /**
2656
- * API Error Response Type
2657
- */
2658
- type ErrorResponse = z$1.infer<typeof ErrorResponseSchema>;
3354
+ interface ResponsePageContextWithNoRecords extends Required<RequestPageParams> {
3355
+ /**
3356
+ * Total number of records across all pages
3357
+ */
3358
+ totalRecords: 0;
3359
+ /**
3360
+ * Total number of pages
3361
+ */
3362
+ totalPages: 1;
3363
+ /**
3364
+ * Indicates if there is a next page available
3365
+ */
3366
+ hasNext: false;
3367
+ /**
3368
+ * Indicates if there is a previous page available
3369
+ */
3370
+ hasPrev: false;
3371
+ /**
3372
+ * The start index of the records on the page (0-indexed)
3373
+ */
3374
+ startIndex: undefined;
3375
+ /**
3376
+ * The end index of the records on the page (0-indexed)
3377
+ */
3378
+ endIndex: undefined;
3379
+ }
3380
+ interface ResponsePageContextWithRecords extends Required<RequestPageParams> {
3381
+ /**
3382
+ * Total number of records across all pages
3383
+ * @invariant Guaranteed to be a positive integer (>= 1)
3384
+ */
3385
+ totalRecords: number;
3386
+ /**
3387
+ * Total number of pages
3388
+ * @invariant Guaranteed to be a positive integer (>= 1)
3389
+ */
3390
+ totalPages: number;
3391
+ /**
3392
+ * Indicates if there is a next page available
3393
+ * @invariant true if and only if (`page` * `recordsPerPage` < `totalRecords`)
3394
+ */
3395
+ hasNext: boolean;
3396
+ /**
3397
+ * Indicates if there is a previous page available
3398
+ * @invariant true if and only if (`page` > 1)
3399
+ */
3400
+ hasPrev: boolean;
3401
+ /**
3402
+ * The start index of the records on the page (0-indexed)
3403
+ *
3404
+ * @invariant Guaranteed to be a non-negative integer (>= 0)
3405
+ */
3406
+ startIndex: number;
3407
+ /**
3408
+ * The end index of the records on the page (0-indexed)
3409
+ *
3410
+ * @invariant Guaranteed to be a non-negative integer (>= 0)
3411
+ * @invariant Guaranteed to be greater than or equal to `startIndex`.
3412
+ * @invariant Guaranteed to be less than `totalRecords`.
3413
+ */
3414
+ endIndex: number;
3415
+ }
3416
+ type ResponsePageContext = ResponsePageContextWithNoRecords | ResponsePageContextWithRecords;
2659
3417
 
2660
3418
  /**
2661
- * Deserialize a {@link ErrorResponse} object.
3419
+ * Build page context from request params and total records count.
2662
3420
  */
2663
- declare function deserializeErrorResponse(maybeErrorResponse: unknown): ErrorResponse;
3421
+ declare function buildPageContext(page: number, recordsPerPage: number, totalRecords: number): ResponsePageContext;
2664
3422
 
2665
3423
  /**
2666
3424
  * A status code for Registrar Actions API responses.
@@ -2700,6 +3458,7 @@ interface NamedRegistrarAction {
2700
3458
  type RegistrarActionsResponseOk = {
2701
3459
  responseCode: typeof RegistrarActionsResponseCodes.Ok;
2702
3460
  registrarActions: NamedRegistrarAction[];
3461
+ pageContext: ResponsePageContext;
2703
3462
  };
2704
3463
  /**
2705
3464
  * A response when Registrar Actions are unavailable.
@@ -2748,6 +3507,7 @@ declare function deserializeRegistrarActionsResponse(maybeResponse: SerializedRe
2748
3507
  declare const RegistrarActionsFilterTypes: {
2749
3508
  readonly BySubregistryNode: "bySubregistryNode";
2750
3509
  readonly WithEncodedReferral: "withEncodedReferral";
3510
+ readonly ByDecodedReferrer: "byDecodedReferrer";
2751
3511
  };
2752
3512
  type RegistrarActionsFilterType = (typeof RegistrarActionsFilterTypes)[keyof typeof RegistrarActionsFilterTypes];
2753
3513
  type RegistrarActionsFilterBySubregistryNode = {
@@ -2757,7 +3517,11 @@ type RegistrarActionsFilterBySubregistryNode = {
2757
3517
  type RegistrarActionsFilterWithEncodedReferral = {
2758
3518
  filterType: typeof RegistrarActionsFilterTypes.WithEncodedReferral;
2759
3519
  };
2760
- type RegistrarActionsFilter = RegistrarActionsFilterBySubregistryNode | RegistrarActionsFilterWithEncodedReferral;
3520
+ type RegistrarActionsFilterByDecodedReferrer = {
3521
+ filterType: typeof RegistrarActionsFilterTypes.ByDecodedReferrer;
3522
+ value: Address;
3523
+ };
3524
+ type RegistrarActionsFilter = RegistrarActionsFilterBySubregistryNode | RegistrarActionsFilterWithEncodedReferral | RegistrarActionsFilterByDecodedReferrer;
2761
3525
  /**
2762
3526
  * Records Orders
2763
3527
  */
@@ -2768,7 +3532,7 @@ type RegistrarActionsOrder = (typeof RegistrarActionsOrders)[keyof typeof Regist
2768
3532
  /**
2769
3533
  * Represents a request to Registrar Actions API.
2770
3534
  */
2771
- type RegistrarActionsRequest = {
3535
+ interface RegistrarActionsRequest extends RequestPageParams {
2772
3536
  /**
2773
3537
  * Filters to be applied while generating results.
2774
3538
  */
@@ -2777,13 +3541,7 @@ type RegistrarActionsRequest = {
2777
3541
  * Order applied while generating results.
2778
3542
  */
2779
3543
  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
- };
3544
+ }
2787
3545
 
2788
3546
  /**
2789
3547
  * Build a "parent node" filter object for Registrar Actions query.
@@ -2795,9 +3553,15 @@ declare function byParentNode(parentNode: undefined): undefined;
2795
3553
  */
2796
3554
  declare function withReferral(withReferral: true): RegistrarActionsFilter;
2797
3555
  declare function withReferral(withReferral: false | undefined): undefined;
3556
+ /**
3557
+ * Build a "decoded referrer" filter object for Registrar Actions query.
3558
+ */
3559
+ declare function byDecodedReferrer(decodedReferrer: Address): RegistrarActionsFilter;
3560
+ declare function byDecodedReferrer(decodedReferrer: undefined): undefined;
2798
3561
  declare const registrarActionsFilter: {
2799
3562
  byParentNode: typeof byParentNode;
2800
3563
  withReferral: typeof withReferral;
3564
+ byDecodedReferrer: typeof byDecodedReferrer;
2801
3565
  };
2802
3566
 
2803
3567
  declare const registrarActionsPrerequisites: Readonly<{
@@ -3208,101 +3972,17 @@ interface ResolveRecordsResponse<SELECTION extends ResolverRecordsSelection> ext
3208
3972
  */
3209
3973
  interface ResolvePrimaryNameRequest extends ReverseResolutionArgs, AcceleratableRequest, TraceableRequest {
3210
3974
  }
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;
3975
+ /**
3976
+ * Resolve Primary Name Response Type
3977
+ */
3978
+ interface ResolvePrimaryNameResponse extends AcceleratableResponse, TraceableResponse {
3979
+ name: ReverseResolutionResult;
3980
+ }
3981
+ interface ResolvePrimaryNamesRequest extends MultichainPrimaryNameResolutionArgs, AcceleratableRequest, TraceableRequest {
3982
+ }
3983
+ interface ResolvePrimaryNamesResponse extends AcceleratableResponse, TraceableResponse {
3984
+ names: MultichainPrimaryNameResolutionResult;
3304
3985
  }
3305
- type ResponsePageContext = ResponsePageContextWithNoRecords | ResponsePageContextWithRecords;
3306
3986
 
3307
3987
  /**
3308
3988
  * Request parameters for a referrer leaderboard page query.
@@ -3656,7 +4336,7 @@ declare class ENSNodeClient {
3656
4336
  *
3657
4337
  * @param request - Pagination parameters
3658
4338
  * @param request.page - The page number to retrieve (1-indexed, default: 1)
3659
- * @param request.itemsPerPage - Number of items per page (default: 25, max: 100)
4339
+ * @param request.recordsPerPage - Number of records per page (default: 25, max: 100)
3660
4340
  * @returns {ReferrerLeaderboardPageResponse}
3661
4341
  *
3662
4342
  * @throws if the ENSNode request fails
@@ -3665,28 +4345,28 @@ declare class ENSNodeClient {
3665
4345
  *
3666
4346
  * @example
3667
4347
  * ```typescript
3668
- * // Get first page with default page size (25 items)
4348
+ * // Get first page with default page size (25 records)
3669
4349
  * const response = await client.getReferrerLeaderboardPage();
3670
4350
  * if (response.responseCode === ReferrerLeaderboardPageResponseCodes.Ok) {
3671
4351
  * const {
3672
4352
  * aggregatedMetrics,
3673
4353
  * referrers,
3674
4354
  * rules,
3675
- * paginationContext,
4355
+ * pageContext,
3676
4356
  * updatedAt
3677
4357
  * } = response.data;
3678
4358
  * console.log(aggregatedMetrics);
3679
4359
  * console.log(referrers);
3680
4360
  * console.log(rules);
3681
4361
  * console.log(updatedAt);
3682
- * console.log(`Page ${paginationContext.page} of ${paginationContext.totalPages}`);
4362
+ * console.log(`Page ${pageContext.page} of ${pageContext.totalPages}`);
3683
4363
  * }
3684
4364
  * ```
3685
4365
  *
3686
4366
  * @example
3687
4367
  * ```typescript
3688
- * // Get second page with 50 items per page
3689
- * const response = await client.getReferrerLeaderboardPage({ page: 2, itemsPerPage: 50 });
4368
+ * // Get second page with 50 records per page
4369
+ * const response = await client.getReferrerLeaderboardPage({ page: 2, recordsPerPage: 50 });
3690
4370
  * ```
3691
4371
  *
3692
4372
  * @example
@@ -3781,11 +4461,13 @@ declare class ENSNodeClient {
3781
4461
  /**
3782
4462
  * Fetch ENSNode Registrar Actions
3783
4463
  *
3784
- * @param {RegistrarActionsRequestFilter} request.filter is
3785
- * an optional request filter configuration.
3786
- * @param {number} request.limit sets the maximum count of results in the response.
3787
- * @param {RegistrarActionsRequestOrder} request.order sets the order of
3788
- * results in the response by field and direction.
4464
+ * Retrieves a paginated list of registrar actions with optional filters.
4465
+ *
4466
+ * @param request is a request configuration.
4467
+ * @param request.page sets the page number to retrieve (1-indexed, default: 1)
4468
+ * @param request.recordsPerPage sets the number of records per page (default: 10, max: 100)
4469
+ * @param request.filters is an optional request filter configuration.
4470
+ * @param request.order sets the order of results in the response by field and direction.
3789
4471
  * @returns {RegistrarActionsResponse}
3790
4472
  *
3791
4473
  * @throws if the ENSNode request fails
@@ -3795,23 +4477,25 @@ declare class ENSNodeClient {
3795
4477
  * @example
3796
4478
  * ```ts
3797
4479
  * import {
3798
- * registrarActionsFilter,,
4480
+ * registrarActionsFilter,
3799
4481
  * ENSNodeClient,
3800
4482
  * } from "@ensnode/ensnode-sdk";
3801
4483
  * import { namehash } from "viem/ens";
3802
4484
  *
3803
4485
  * const client: ENSNodeClient;
3804
4486
  *
3805
- * // get latest registrar action records across all indexed subregistries
3806
- * // NOTE: when no `limit` value is passed,
3807
- * // the default RESPONSE_ITEMS_PER_PAGE_DEFAULT applies.
3808
- * const registrarActions = await client.registrarActions();
4487
+ * // Get first page with default page size (10 records)
4488
+ * const response = await client.registrarActions();
4489
+ * if (response.responseCode === RegistrarActionsResponseCodes.Ok) {
4490
+ * const { registrarActions, pageContext } = response;
4491
+ * console.log(registrarActions);
4492
+ * console.log(`Page ${pageContext.page} of ${pageContext.totalPages}`);
4493
+ * }
3809
4494
  *
3810
- * // get latest 5 registrar action records across all indexed subregistries
3811
- * // NOTE: when a `limit` value is passed, it must be lower than or equal to
3812
- * // the RESPONSE_ITEMS_PER_PAGE_MAX value.
3813
- * const registrarActions = await client.registrarActions({
3814
- * limit: 5,
4495
+ * // Get second page with 25 records per page
4496
+ * const response = await client.registrarActions({
4497
+ * page: 2,
4498
+ * recordsPerPage: 25,
3815
4499
  * });
3816
4500
  *
3817
4501
  * // get latest registrar action records associated with
@@ -3825,210 +4509,56 @@ declare class ENSNodeClient {
3825
4509
  * filters: [registrarActionsFilter.withReferral(true)],
3826
4510
  * });
3827
4511
  *
4512
+ * // get latest registrar action records for a specific decoded referrer
4513
+ * await client.registrarActions({
4514
+ * filters: [registrarActionsFilter.byDecodedReferrer("0x1234567890123456789012345678901234567890")],
4515
+ * });
4516
+ *
3828
4517
  * // get latest 10 registrar action records associated with
3829
4518
  * // subregistry managing `base.eth` name
3830
4519
  * await client.registrarActions({
3831
4520
  * filters: [registrarActionsFilter.byParentNode(namehash('base.eth'))],
3832
- * limit: 10
4521
+ * recordsPerPage: 10
3833
4522
  * });
3834
4523
  * ```
3835
4524
  */
3836
4525
  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
4526
  /**
3981
- * Transfer from a non-zeroAddress to a distinct non-zeroAddress
4527
+ * Fetch Name Tokens for requested name.
3982
4528
  *
3983
- * Invariants:
3984
- * - NFT is indexed
3985
- * - previous and new NFT mint status is `minted`
3986
- * - previous and new NFT owner are distinct non-zeroAddress
3987
- */
3988
- readonly Transfer: "transfer";
3989
- /**
3990
- * Transfer from a non-zeroAddress to the same non-zeroAddress
4529
+ * @param request.name - Name for which Name Tokens will be fetched.
4530
+ * @returns {NameTokensResponse}
3991
4531
  *
3992
- * Invariants:
3993
- * - NFT is indexed
3994
- * - previous and new NFT mint status is `minted`
3995
- * - previous and new NFT owner are equivalent non-zeroAddress
3996
- */
3997
- readonly SelfTransfer: "self-transfer";
3998
- /**
3999
- * Transfer from zeroAddress to zeroAddress for an indexed NFT
4532
+ * @throws if the ENSNode request fails
4533
+ * @throws if the ENSNode API returns an error response
4534
+ * @throws if the ENSNode response breaks required invariants
4000
4535
  *
4001
- * Invariants:
4002
- * - NFT is indexed
4003
- * - previous and new NFT mint status is `burned`
4004
- * - previous and new NFT owner are zeroAddress
4005
- */
4006
- readonly RemintBurn: "remint-burn";
4007
- /**
4008
- * Special transfer type for improperly implemented NFT contracts that allow a NFT
4009
- * that is currently minted to be reminted again before an intermediate burn.
4536
+ * @example
4537
+ * ```ts
4538
+ * import {
4539
+ * ENSNodeClient,
4540
+ * } from "@ensnode/ensnode-sdk";
4541
+ * import { namehash } from "viem/ens";
4010
4542
  *
4011
- * Transfer from zeroAddress to zeroAddress for an indexed NFT where the
4012
- * previously indexed nft had status `minted` with a non-zeroAddress owner.
4543
+ * const client: ENSNodeClient;
4013
4544
  *
4014
- * Invariants:
4015
- * - NFT is indexed
4016
- * - previous NFT mint status was `minted`
4017
- * - previous NFT owner was a non-zeroAddress
4018
- * - new NFT mint status is `burned`
4019
- * - new NFT owner is the zeroAddress
4020
- */
4021
- readonly MintedRemintBurn: "minted-remint-burn";
4022
- /**
4023
- * Transfer from zeroAddress to zeroAddress for an unindexed NFT
4545
+ * // get latest name token records from the indexed subregistry based on the requested name
4546
+ * const response = await client.nameTokens({
4547
+ * name: "vitalik.eth"
4548
+ * });
4024
4549
  *
4025
- * Invariants:
4026
- * - NFT is not indexed and therefore has no previous mint status or owner
4027
- * - NFT should remain unindexed and without any mint status or owner
4550
+ * const response = await client.nameTokens({
4551
+ * domainId: "0xee6c4522aab0003e8d14cd40a6af439055fd2577951148c14b6cea9a53475835" // namehash('vitalik.eth')
4552
+ * })
4553
+ * ```
4028
4554
  */
4029
- readonly MintBurn: "mint-burn";
4030
- };
4031
- type NFTTransferType = (typeof NFTTransferTypes)[keyof typeof NFTTransferTypes];
4032
- declare const getNFTTransferType: (from: Address, to: Address, allowMintedRemint: boolean, metadata: NFTTransferEventMetadata, currentlyIndexedOwner?: Address) => NFTTransferType;
4555
+ nameTokens(request: NameTokensRequest): Promise<NameTokensResponse>;
4556
+ }
4557
+
4558
+ declare class ClientError extends Error {
4559
+ details?: unknown;
4560
+ constructor(message: string, details?: unknown);
4561
+ static fromErrorResponse({ message, details }: ErrorResponse): ClientError;
4562
+ }
4033
4563
 
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 };
4564
+ 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 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, 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, 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 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, 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 };