@ensnode/ensnode-sdk 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1098 -642
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +785 -324
- package/dist/index.d.ts +785 -324
- package/dist/index.js +1125 -669
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import z$1, { z } from 'zod/v4';
|
|
2
|
+
import { ENSNamespaceId } from '@ensnode/datasources';
|
|
3
|
+
export { ENSNamespaceId, ENSNamespaceIds, getENSRootChainId } from '@ensnode/datasources';
|
|
1
4
|
import { Hex, Address, ByteArray, Hash } from 'viem';
|
|
2
5
|
import { CoinType, EvmCoinType } from '@ensdomains/address-encoder';
|
|
3
6
|
export { CoinType, EvmCoinType } from '@ensdomains/address-encoder';
|
|
4
|
-
import { EncodedReferrer,
|
|
7
|
+
import { EncodedReferrer, ReferrerLeaderboardPageParams, ReferrerLeaderboardPage, ReferrerDetail } from '@namehash/ens-referrals';
|
|
5
8
|
export { EncodedReferrer, ZERO_ENCODED_REFERRER, decodeEncodedReferrer } from '@namehash/ens-referrals';
|
|
6
|
-
import z$1, { z } from 'zod/v4';
|
|
7
|
-
import { ENSNamespaceId } from '@ensnode/datasources';
|
|
8
|
-
export { ENSNamespaceId, ENSNamespaceIds, getENSRootChainId } from '@ensnode/datasources';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* A hash value that uniquely identifies a single ENS name.
|
|
@@ -2055,6 +2055,188 @@ declare function serializeChainIndexingSnapshots<ChainIndexingStatusSnapshotType
|
|
|
2055
2055
|
*/
|
|
2056
2056
|
declare function serializeOmnichainIndexingStatusSnapshot(indexingStatus: OmnichainIndexingStatusSnapshot): SerializedOmnichainIndexingStatusSnapshot;
|
|
2057
2057
|
|
|
2058
|
+
declare const TheGraphCannotFallbackReasonSchema: z.ZodEnum<{
|
|
2059
|
+
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2060
|
+
readonly NoApiKey: "no-api-key";
|
|
2061
|
+
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2062
|
+
}>;
|
|
2063
|
+
declare const TheGraphFallbackSchema: z.ZodObject<{
|
|
2064
|
+
canFallback: z.ZodBoolean;
|
|
2065
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
2066
|
+
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2067
|
+
readonly NoApiKey: "no-api-key";
|
|
2068
|
+
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2069
|
+
}>>;
|
|
2070
|
+
}, z.core.$strict>;
|
|
2071
|
+
/**
|
|
2072
|
+
* Create a Zod schema for validating a serialized ENSApiPublicConfig.
|
|
2073
|
+
*
|
|
2074
|
+
* @param valueLabel - Optional label for the value being validated (used in error messages)
|
|
2075
|
+
*/
|
|
2076
|
+
declare function makeENSApiPublicConfigSchema(valueLabel?: string): z.ZodObject<{
|
|
2077
|
+
version: z.ZodString;
|
|
2078
|
+
theGraphFallback: z.ZodObject<{
|
|
2079
|
+
canFallback: z.ZodBoolean;
|
|
2080
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
2081
|
+
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2082
|
+
readonly NoApiKey: "no-api-key";
|
|
2083
|
+
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2084
|
+
}>>;
|
|
2085
|
+
}, z.core.$strict>;
|
|
2086
|
+
ensIndexerPublicConfig: z.ZodObject<{
|
|
2087
|
+
labelSet: z.ZodObject<{
|
|
2088
|
+
labelSetId: z.ZodString;
|
|
2089
|
+
labelSetVersion: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
|
|
2090
|
+
}, z.core.$strip>;
|
|
2091
|
+
indexedChainIds: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodInt, z.ZodTransform<number, number>>>, z.ZodTransform<Set<number>, number[]>>;
|
|
2092
|
+
isSubgraphCompatible: z.ZodBoolean;
|
|
2093
|
+
namespace: z.ZodEnum<{
|
|
2094
|
+
readonly Mainnet: "mainnet";
|
|
2095
|
+
readonly Sepolia: "sepolia";
|
|
2096
|
+
readonly Holesky: "holesky";
|
|
2097
|
+
readonly EnsTestEnv: "ens-test-env";
|
|
2098
|
+
}>;
|
|
2099
|
+
plugins: z.ZodArray<z.ZodString>;
|
|
2100
|
+
databaseSchemaName: z.ZodString;
|
|
2101
|
+
versionInfo: z.ZodObject<{
|
|
2102
|
+
nodejs: z.ZodString;
|
|
2103
|
+
ponder: z.ZodString;
|
|
2104
|
+
ensDb: z.ZodString;
|
|
2105
|
+
ensIndexer: z.ZodString;
|
|
2106
|
+
ensNormalize: z.ZodString;
|
|
2107
|
+
ensRainbow: z.ZodString;
|
|
2108
|
+
ensRainbowSchema: z.ZodInt;
|
|
2109
|
+
}, z.core.$strict>;
|
|
2110
|
+
}, z.core.$strip>;
|
|
2111
|
+
}, z.core.$strict>;
|
|
2112
|
+
|
|
2113
|
+
type TheGraphCannotFallbackReason = z.infer<typeof TheGraphCannotFallbackReasonSchema>;
|
|
2114
|
+
type TheGraphFallback = z.infer<typeof TheGraphFallbackSchema>;
|
|
2115
|
+
/**
|
|
2116
|
+
* Complete public configuration object for ENSApi.
|
|
2117
|
+
*
|
|
2118
|
+
* Contains ENSApi-specific configuration at the top level and
|
|
2119
|
+
* embeds the complete ENSIndexer public configuration.
|
|
2120
|
+
*/
|
|
2121
|
+
interface ENSApiPublicConfig {
|
|
2122
|
+
/**
|
|
2123
|
+
* ENSApi service version
|
|
2124
|
+
*
|
|
2125
|
+
* @see https://ghcr.io/namehash/ensnode/ensapi
|
|
2126
|
+
*/
|
|
2127
|
+
version: string;
|
|
2128
|
+
/**
|
|
2129
|
+
* The Graph Fallback-related info.
|
|
2130
|
+
*/
|
|
2131
|
+
theGraphFallback: TheGraphFallback;
|
|
2132
|
+
/**
|
|
2133
|
+
* Complete ENSIndexer public configuration
|
|
2134
|
+
*
|
|
2135
|
+
* Contains all ENSIndexer public configuration including
|
|
2136
|
+
* namespace, plugins, version info, etc.
|
|
2137
|
+
*/
|
|
2138
|
+
ensIndexerPublicConfig: ENSIndexerPublicConfig;
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
/**
|
|
2142
|
+
* Serialized representation of {@link ENSApiPublicConfig}
|
|
2143
|
+
*/
|
|
2144
|
+
interface SerializedENSApiPublicConfig extends Omit<ENSApiPublicConfig, "ensIndexerPublicConfig"> {
|
|
2145
|
+
/**
|
|
2146
|
+
* Serialized representation of {@link ENSApiPublicConfig.ensIndexerPublicConfig}.
|
|
2147
|
+
*/
|
|
2148
|
+
ensIndexerPublicConfig: SerializedENSIndexerPublicConfig;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
/**
|
|
2152
|
+
* Deserialize a {@link ENSApiPublicConfig} object.
|
|
2153
|
+
*/
|
|
2154
|
+
declare function deserializeENSApiPublicConfig(maybeConfig: SerializedENSApiPublicConfig, valueLabel?: string): ENSApiPublicConfig;
|
|
2155
|
+
|
|
2156
|
+
/**
|
|
2157
|
+
* Serialize a {@link ENSApiPublicConfig} object.
|
|
2158
|
+
*/
|
|
2159
|
+
declare function serializeENSApiPublicConfig(config: ENSApiPublicConfig): SerializedENSApiPublicConfig;
|
|
2160
|
+
|
|
2161
|
+
/**
|
|
2162
|
+
* ENSApi Public Config Response
|
|
2163
|
+
*/
|
|
2164
|
+
type ConfigResponse = ENSApiPublicConfig;
|
|
2165
|
+
|
|
2166
|
+
type SerializedConfigResponse = SerializedENSApiPublicConfig;
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* Deserialize a {@link ConfigResponse} object.
|
|
2170
|
+
*/
|
|
2171
|
+
declare function deserializeConfigResponse(serializedResponse: SerializedConfigResponse): ConfigResponse;
|
|
2172
|
+
|
|
2173
|
+
declare function serializeConfigResponse(response: ConfigResponse): SerializedConfigResponse;
|
|
2174
|
+
|
|
2175
|
+
/**
|
|
2176
|
+
* A status code for indexing status responses.
|
|
2177
|
+
*/
|
|
2178
|
+
declare const IndexingStatusResponseCodes: {
|
|
2179
|
+
/**
|
|
2180
|
+
* Represents that the indexing status is available.
|
|
2181
|
+
*/
|
|
2182
|
+
readonly Ok: "ok";
|
|
2183
|
+
/**
|
|
2184
|
+
* Represents that the indexing status is unavailable.
|
|
2185
|
+
*/
|
|
2186
|
+
readonly Error: "error";
|
|
2187
|
+
};
|
|
2188
|
+
/**
|
|
2189
|
+
* The derived string union of possible {@link IndexingStatusResponseCodes}.
|
|
2190
|
+
*/
|
|
2191
|
+
type IndexingStatusResponseCode = (typeof IndexingStatusResponseCodes)[keyof typeof IndexingStatusResponseCodes];
|
|
2192
|
+
/**
|
|
2193
|
+
* An indexing status response when the indexing status is available.
|
|
2194
|
+
*/
|
|
2195
|
+
type IndexingStatusResponseOk = {
|
|
2196
|
+
responseCode: typeof IndexingStatusResponseCodes.Ok;
|
|
2197
|
+
realtimeProjection: RealtimeIndexingStatusProjection;
|
|
2198
|
+
};
|
|
2199
|
+
/**
|
|
2200
|
+
* An indexing status response when the indexing status is unavailable.
|
|
2201
|
+
*/
|
|
2202
|
+
type IndexingStatusResponseError = {
|
|
2203
|
+
responseCode: typeof IndexingStatusResponseCodes.Error;
|
|
2204
|
+
};
|
|
2205
|
+
/**
|
|
2206
|
+
* Indexing status response.
|
|
2207
|
+
*
|
|
2208
|
+
* Use the `responseCode` field to determine the specific type interpretation
|
|
2209
|
+
* at runtime.
|
|
2210
|
+
*/
|
|
2211
|
+
type IndexingStatusResponse = IndexingStatusResponseOk | IndexingStatusResponseError;
|
|
2212
|
+
|
|
2213
|
+
/**
|
|
2214
|
+
* Serialized representation of {@link IndexingStatusResponseError}.
|
|
2215
|
+
*/
|
|
2216
|
+
type SerializedIndexingStatusResponseError = IndexingStatusResponseError;
|
|
2217
|
+
/**
|
|
2218
|
+
* Serialized representation of {@link IndexingStatusResponseOk}.
|
|
2219
|
+
*/
|
|
2220
|
+
interface SerializedIndexingStatusResponseOk extends Omit<IndexingStatusResponseOk, "realtimeProjection"> {
|
|
2221
|
+
realtimeProjection: SerializedRealtimeIndexingStatusProjection;
|
|
2222
|
+
}
|
|
2223
|
+
/**
|
|
2224
|
+
* Serialized representation of {@link IndexingStatusResponse}.
|
|
2225
|
+
*/
|
|
2226
|
+
type SerializedIndexingStatusResponse = SerializedIndexingStatusResponseOk | SerializedIndexingStatusResponseError;
|
|
2227
|
+
|
|
2228
|
+
/**
|
|
2229
|
+
* Deserialize a {@link IndexingStatusResponse} object.
|
|
2230
|
+
*/
|
|
2231
|
+
declare function deserializeIndexingStatusResponse(maybeResponse: SerializedIndexingStatusResponse): IndexingStatusResponse;
|
|
2232
|
+
|
|
2233
|
+
/**
|
|
2234
|
+
* Represents a request to Indexing Status API.
|
|
2235
|
+
*/
|
|
2236
|
+
type IndexingStatusRequest = {};
|
|
2237
|
+
|
|
2238
|
+
declare function serializeIndexingStatusResponse(response: IndexingStatusResponse): SerializedIndexingStatusResponse;
|
|
2239
|
+
|
|
2058
2240
|
/**
|
|
2059
2241
|
* Gets the SubregistryId (an AccountId) of the Ethnames Subregistry contract (this is the
|
|
2060
2242
|
* "BaseRegistrar" contract for direct subnames of .eth) for the provided namespace.
|
|
@@ -2462,108 +2644,197 @@ interface SerializedRegistrarAction extends Omit<RegistrarAction, "registrationL
|
|
|
2462
2644
|
declare function serializeRegistrarActionPricing(pricing: RegistrarActionPricing): SerializedRegistrarActionPricing;
|
|
2463
2645
|
declare function serializeRegistrarAction(registrarAction: RegistrarAction): SerializedRegistrarAction;
|
|
2464
2646
|
|
|
2465
|
-
declare const TheGraphCannotFallbackReasonSchema: z.ZodEnum<{
|
|
2466
|
-
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2467
|
-
readonly NoApiKey: "no-api-key";
|
|
2468
|
-
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2469
|
-
}>;
|
|
2470
|
-
declare const TheGraphFallbackSchema: z.ZodObject<{
|
|
2471
|
-
canFallback: z.ZodBoolean;
|
|
2472
|
-
reason: z.ZodNullable<z.ZodEnum<{
|
|
2473
|
-
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2474
|
-
readonly NoApiKey: "no-api-key";
|
|
2475
|
-
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2476
|
-
}>>;
|
|
2477
|
-
}, z.core.$strict>;
|
|
2478
2647
|
/**
|
|
2479
|
-
*
|
|
2480
|
-
*
|
|
2481
|
-
* @param valueLabel - Optional label for the value being validated (used in error messages)
|
|
2648
|
+
* Schema for {@link ErrorResponse}.
|
|
2482
2649
|
*/
|
|
2483
|
-
declare
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
reason: z.ZodNullable<z.ZodEnum<{
|
|
2488
|
-
readonly NotSubgraphCompatible: "not-subgraph-compatible";
|
|
2489
|
-
readonly NoApiKey: "no-api-key";
|
|
2490
|
-
readonly NoSubgraphUrl: "no-subgraph-url";
|
|
2491
|
-
}>>;
|
|
2492
|
-
}, z.core.$strict>;
|
|
2493
|
-
ensIndexerPublicConfig: z.ZodObject<{
|
|
2494
|
-
labelSet: z.ZodObject<{
|
|
2495
|
-
labelSetId: z.ZodString;
|
|
2496
|
-
labelSetVersion: z.ZodPipe<z.ZodCoercedNumber<unknown>, z.ZodInt>;
|
|
2497
|
-
}, z.core.$strip>;
|
|
2498
|
-
indexedChainIds: z.ZodPipe<z.ZodArray<z.ZodPipe<z.ZodInt, z.ZodTransform<number, number>>>, z.ZodTransform<Set<number>, number[]>>;
|
|
2499
|
-
isSubgraphCompatible: z.ZodBoolean;
|
|
2500
|
-
namespace: z.ZodEnum<{
|
|
2501
|
-
readonly Mainnet: "mainnet";
|
|
2502
|
-
readonly Sepolia: "sepolia";
|
|
2503
|
-
readonly Holesky: "holesky";
|
|
2504
|
-
readonly EnsTestEnv: "ens-test-env";
|
|
2505
|
-
}>;
|
|
2506
|
-
plugins: z.ZodArray<z.ZodString>;
|
|
2507
|
-
databaseSchemaName: z.ZodString;
|
|
2508
|
-
versionInfo: z.ZodObject<{
|
|
2509
|
-
nodejs: z.ZodString;
|
|
2510
|
-
ponder: z.ZodString;
|
|
2511
|
-
ensDb: z.ZodString;
|
|
2512
|
-
ensIndexer: z.ZodString;
|
|
2513
|
-
ensNormalize: z.ZodString;
|
|
2514
|
-
ensRainbow: z.ZodString;
|
|
2515
|
-
ensRainbowSchema: z.ZodInt;
|
|
2516
|
-
}, z.core.$strict>;
|
|
2517
|
-
}, z.core.$strip>;
|
|
2518
|
-
}, z.core.$strict>;
|
|
2650
|
+
declare const ErrorResponseSchema: z$1.ZodObject<{
|
|
2651
|
+
message: z$1.ZodString;
|
|
2652
|
+
details: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
2653
|
+
}, z$1.core.$strip>;
|
|
2519
2654
|
|
|
2520
|
-
type TheGraphCannotFallbackReason = z.infer<typeof TheGraphCannotFallbackReasonSchema>;
|
|
2521
|
-
type TheGraphFallback = z.infer<typeof TheGraphFallbackSchema>;
|
|
2522
2655
|
/**
|
|
2523
|
-
*
|
|
2524
|
-
*
|
|
2525
|
-
* Contains ENSApi-specific configuration at the top level and
|
|
2526
|
-
* embeds the complete ENSIndexer public configuration.
|
|
2656
|
+
* API Error Response Type
|
|
2527
2657
|
*/
|
|
2528
|
-
|
|
2658
|
+
type ErrorResponse = z$1.infer<typeof ErrorResponseSchema>;
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* Deserialize a {@link ErrorResponse} object.
|
|
2662
|
+
*/
|
|
2663
|
+
declare function deserializeErrorResponse(maybeErrorResponse: unknown): ErrorResponse;
|
|
2664
|
+
|
|
2665
|
+
/**
|
|
2666
|
+
* A status code for Registrar Actions API responses.
|
|
2667
|
+
*/
|
|
2668
|
+
declare const RegistrarActionsResponseCodes: {
|
|
2529
2669
|
/**
|
|
2530
|
-
*
|
|
2531
|
-
*
|
|
2532
|
-
* @see https://ghcr.io/namehash/ensnode/ensapi
|
|
2670
|
+
* Represents that Registrar Actions are available.
|
|
2533
2671
|
*/
|
|
2534
|
-
|
|
2672
|
+
readonly Ok: "ok";
|
|
2535
2673
|
/**
|
|
2536
|
-
*
|
|
2674
|
+
* Represents that Registrar Actions are unavailable.
|
|
2537
2675
|
*/
|
|
2538
|
-
|
|
2676
|
+
readonly Error: "error";
|
|
2677
|
+
};
|
|
2678
|
+
/**
|
|
2679
|
+
* The derived string union of possible {@link RegistrarActionsResponseCodes}.
|
|
2680
|
+
*/
|
|
2681
|
+
type RegistrarActionsResponseCode = (typeof RegistrarActionsResponseCodes)[keyof typeof RegistrarActionsResponseCodes];
|
|
2682
|
+
/**
|
|
2683
|
+
* "Logical registrar action" with its associated name.
|
|
2684
|
+
*/
|
|
2685
|
+
interface NamedRegistrarAction {
|
|
2686
|
+
action: RegistrarAction;
|
|
2539
2687
|
/**
|
|
2540
|
-
*
|
|
2688
|
+
* Name
|
|
2541
2689
|
*
|
|
2542
|
-
*
|
|
2543
|
-
*
|
|
2690
|
+
* FQDN of the name associated with `action`.
|
|
2691
|
+
*
|
|
2692
|
+
* Guarantees:
|
|
2693
|
+
* - `namehash(name)` is always `action.registrationLifecycle.node`.
|
|
2544
2694
|
*/
|
|
2545
|
-
|
|
2695
|
+
name: InterpretedName;
|
|
2696
|
+
}
|
|
2697
|
+
/**
|
|
2698
|
+
* A response when Registrar Actions are available.
|
|
2699
|
+
*/
|
|
2700
|
+
type RegistrarActionsResponseOk = {
|
|
2701
|
+
responseCode: typeof RegistrarActionsResponseCodes.Ok;
|
|
2702
|
+
registrarActions: NamedRegistrarAction[];
|
|
2703
|
+
};
|
|
2704
|
+
/**
|
|
2705
|
+
* A response when Registrar Actions are unavailable.
|
|
2706
|
+
*/
|
|
2707
|
+
interface RegistrarActionsResponseError {
|
|
2708
|
+
responseCode: typeof IndexingStatusResponseCodes.Error;
|
|
2709
|
+
error: ErrorResponse;
|
|
2546
2710
|
}
|
|
2711
|
+
/**
|
|
2712
|
+
* Registrar Actions response.
|
|
2713
|
+
*
|
|
2714
|
+
* Use the `responseCode` field to determine the specific type interpretation
|
|
2715
|
+
* at runtime.
|
|
2716
|
+
*/
|
|
2717
|
+
type RegistrarActionsResponse = RegistrarActionsResponseOk | RegistrarActionsResponseError;
|
|
2547
2718
|
|
|
2548
2719
|
/**
|
|
2549
|
-
* Serialized representation of {@link
|
|
2720
|
+
* Serialized representation of {@link RegistrarActionsResponseError}.
|
|
2550
2721
|
*/
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2722
|
+
type SerializedRegistrarActionsResponseError = RegistrarActionsResponseError;
|
|
2723
|
+
/**
|
|
2724
|
+
* Serialized representation of {@link NamedRegistrarAction}.
|
|
2725
|
+
*/
|
|
2726
|
+
interface SerializedNamedRegistrarAction extends Omit<NamedRegistrarAction, "action"> {
|
|
2727
|
+
action: SerializedRegistrarAction;
|
|
2556
2728
|
}
|
|
2729
|
+
/**
|
|
2730
|
+
* Serialized representation of {@link RegistrarActionsResponseOk}.
|
|
2731
|
+
*/
|
|
2732
|
+
interface SerializedRegistrarActionsResponseOk extends Omit<RegistrarActionsResponseOk, "registrarActions"> {
|
|
2733
|
+
registrarActions: SerializedNamedRegistrarAction[];
|
|
2734
|
+
}
|
|
2735
|
+
/**
|
|
2736
|
+
* Serialized representation of {@link SerializedRegistrarActionsResponse}.
|
|
2737
|
+
*/
|
|
2738
|
+
type SerializedRegistrarActionsResponse = SerializedRegistrarActionsResponseOk | SerializedRegistrarActionsResponseError;
|
|
2557
2739
|
|
|
2558
2740
|
/**
|
|
2559
|
-
* Deserialize a {@link
|
|
2741
|
+
* Deserialize a {@link RegistrarActionsResponse} object.
|
|
2560
2742
|
*/
|
|
2561
|
-
declare function
|
|
2743
|
+
declare function deserializeRegistrarActionsResponse(maybeResponse: SerializedRegistrarActionsResponse): RegistrarActionsResponse;
|
|
2562
2744
|
|
|
2563
2745
|
/**
|
|
2564
|
-
*
|
|
2746
|
+
* Records Filters: Filter Types
|
|
2565
2747
|
*/
|
|
2566
|
-
declare
|
|
2748
|
+
declare const RegistrarActionsFilterTypes: {
|
|
2749
|
+
readonly BySubregistryNode: "bySubregistryNode";
|
|
2750
|
+
readonly WithEncodedReferral: "withEncodedReferral";
|
|
2751
|
+
};
|
|
2752
|
+
type RegistrarActionsFilterType = (typeof RegistrarActionsFilterTypes)[keyof typeof RegistrarActionsFilterTypes];
|
|
2753
|
+
type RegistrarActionsFilterBySubregistryNode = {
|
|
2754
|
+
filterType: typeof RegistrarActionsFilterTypes.BySubregistryNode;
|
|
2755
|
+
value: Node;
|
|
2756
|
+
};
|
|
2757
|
+
type RegistrarActionsFilterWithEncodedReferral = {
|
|
2758
|
+
filterType: typeof RegistrarActionsFilterTypes.WithEncodedReferral;
|
|
2759
|
+
};
|
|
2760
|
+
type RegistrarActionsFilter = RegistrarActionsFilterBySubregistryNode | RegistrarActionsFilterWithEncodedReferral;
|
|
2761
|
+
/**
|
|
2762
|
+
* Records Orders
|
|
2763
|
+
*/
|
|
2764
|
+
declare const RegistrarActionsOrders: {
|
|
2765
|
+
readonly LatestRegistrarActions: "orderBy[timestamp]=desc";
|
|
2766
|
+
};
|
|
2767
|
+
type RegistrarActionsOrder = (typeof RegistrarActionsOrders)[keyof typeof RegistrarActionsOrders];
|
|
2768
|
+
/**
|
|
2769
|
+
* Represents a request to Registrar Actions API.
|
|
2770
|
+
*/
|
|
2771
|
+
type RegistrarActionsRequest = {
|
|
2772
|
+
/**
|
|
2773
|
+
* Filters to be applied while generating results.
|
|
2774
|
+
*/
|
|
2775
|
+
filters?: RegistrarActionsFilter[];
|
|
2776
|
+
/**
|
|
2777
|
+
* Order applied while generating results.
|
|
2778
|
+
*/
|
|
2779
|
+
order?: RegistrarActionsOrder;
|
|
2780
|
+
/**
|
|
2781
|
+
* Limit the count of items per page to selected count of records.
|
|
2782
|
+
*
|
|
2783
|
+
* Guaranteed to be a positive integer (if defined).
|
|
2784
|
+
*/
|
|
2785
|
+
itemsPerPage?: number;
|
|
2786
|
+
};
|
|
2787
|
+
|
|
2788
|
+
/**
|
|
2789
|
+
* Build a "parent node" filter object for Registrar Actions query.
|
|
2790
|
+
*/
|
|
2791
|
+
declare function byParentNode(parentNode: Node): RegistrarActionsFilter;
|
|
2792
|
+
declare function byParentNode(parentNode: undefined): undefined;
|
|
2793
|
+
/**
|
|
2794
|
+
* Build a "with referral" filter object for Registrar Actions query.
|
|
2795
|
+
*/
|
|
2796
|
+
declare function withReferral(withReferral: true): RegistrarActionsFilter;
|
|
2797
|
+
declare function withReferral(withReferral: false | undefined): undefined;
|
|
2798
|
+
declare const registrarActionsFilter: {
|
|
2799
|
+
byParentNode: typeof byParentNode;
|
|
2800
|
+
withReferral: typeof withReferral;
|
|
2801
|
+
};
|
|
2802
|
+
|
|
2803
|
+
declare const registrarActionsPrerequisites: Readonly<{
|
|
2804
|
+
/**
|
|
2805
|
+
* Required plugins to enable Registrar Actions API routes.
|
|
2806
|
+
*
|
|
2807
|
+
* 1. `registrars` plugin is required so that data in the `registrarActions`
|
|
2808
|
+
* table is populated.
|
|
2809
|
+
* 2. `subgraph`, `basenames`, and `lineanames` are required to get the data
|
|
2810
|
+
* for the name associated with each registrar action.
|
|
2811
|
+
* 3. In theory not all of `subgraph`, `basenames`, and `lineanames` plugins
|
|
2812
|
+
* might be required. Ex: At least one, but the current logic in
|
|
2813
|
+
* the `registrars` plugin always indexes registrar actions across
|
|
2814
|
+
* Ethnames (subgraph), Basenames, and Lineanames and therefore we need to
|
|
2815
|
+
* ensure each value in the registrar actions table has
|
|
2816
|
+
* an associated record in the domains table.
|
|
2817
|
+
*/
|
|
2818
|
+
requiredPlugins: readonly [PluginName.Subgraph, PluginName.Basenames, PluginName.Lineanames, PluginName.Registrars];
|
|
2819
|
+
/**
|
|
2820
|
+
* Check if provided ENSApiPublicConfig supports the Registrar Actions API.
|
|
2821
|
+
*/
|
|
2822
|
+
hasEnsIndexerConfigSupport(config: ENSIndexerPublicConfig): boolean;
|
|
2823
|
+
/**
|
|
2824
|
+
* Required Indexing Status IDs
|
|
2825
|
+
*
|
|
2826
|
+
* Database indexes are created by the time the omnichain indexing status
|
|
2827
|
+
* is either `completed` or `following`.
|
|
2828
|
+
*/
|
|
2829
|
+
supportedIndexingStatusIds: ("omnichain-following" | "omnichain-completed")[];
|
|
2830
|
+
/**
|
|
2831
|
+
* Check if provided indexing status supports the Registrar Actions API.
|
|
2832
|
+
*/
|
|
2833
|
+
hasIndexingStatusSupport(omnichainIndexingStatusId: OmnichainIndexingStatusId): boolean;
|
|
2834
|
+
}>;
|
|
2835
|
+
|
|
2836
|
+
declare function serializeNamedRegistrarAction({ action, name, }: NamedRegistrarAction): SerializedNamedRegistrarAction;
|
|
2837
|
+
declare function serializeRegistrarActionsResponse(response: RegistrarActionsResponse): SerializedRegistrarActionsResponse;
|
|
2567
2838
|
|
|
2568
2839
|
/**
|
|
2569
2840
|
* The resolution status for an `Identity`.
|
|
@@ -2908,15 +3179,6 @@ type ProtocolSpanTreeNode = ProtocolSpan & {
|
|
|
2908
3179
|
};
|
|
2909
3180
|
type ProtocolTrace = ProtocolSpanTreeNode[];
|
|
2910
3181
|
|
|
2911
|
-
declare const ErrorResponseSchema: z$1.ZodObject<{
|
|
2912
|
-
message: z$1.ZodString;
|
|
2913
|
-
details: z$1.ZodOptional<z$1.ZodUnknown>;
|
|
2914
|
-
}, z$1.core.$strip>;
|
|
2915
|
-
|
|
2916
|
-
/**
|
|
2917
|
-
* API Error Response Type
|
|
2918
|
-
*/
|
|
2919
|
-
type ErrorResponse = z$1.infer<typeof ErrorResponseSchema>;
|
|
2920
3182
|
interface TraceableRequest {
|
|
2921
3183
|
trace?: boolean;
|
|
2922
3184
|
}
|
|
@@ -2957,285 +3219,181 @@ interface ResolvePrimaryNamesRequest extends MultichainPrimaryNameResolutionArgs
|
|
|
2957
3219
|
interface ResolvePrimaryNamesResponse extends AcceleratableResponse, TraceableResponse {
|
|
2958
3220
|
names: MultichainPrimaryNameResolutionResult;
|
|
2959
3221
|
}
|
|
3222
|
+
|
|
3223
|
+
declare const RECORDS_PER_PAGE_DEFAULT = 10;
|
|
3224
|
+
declare const RECORDS_PER_PAGE_MAX = 100;
|
|
2960
3225
|
/**
|
|
2961
|
-
*
|
|
3226
|
+
* Request page params.
|
|
2962
3227
|
*/
|
|
2963
|
-
|
|
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;
|
|
3304
|
+
}
|
|
3305
|
+
type ResponsePageContext = ResponsePageContextWithNoRecords | ResponsePageContextWithRecords;
|
|
3306
|
+
|
|
2964
3307
|
/**
|
|
2965
|
-
*
|
|
3308
|
+
* Request parameters for a referrer leaderboard page query.
|
|
2966
3309
|
*/
|
|
2967
|
-
|
|
3310
|
+
interface ReferrerLeaderboardPageRequest extends ReferrerLeaderboardPageParams {
|
|
3311
|
+
}
|
|
2968
3312
|
/**
|
|
2969
|
-
* A status code for
|
|
3313
|
+
* A status code for a referrer leaderboard page API response.
|
|
2970
3314
|
*/
|
|
2971
|
-
declare const
|
|
3315
|
+
declare const ReferrerLeaderboardPageResponseCodes: {
|
|
2972
3316
|
/**
|
|
2973
|
-
* Represents that the
|
|
3317
|
+
* Represents that the requested referrer leaderboard page is available.
|
|
2974
3318
|
*/
|
|
2975
3319
|
readonly Ok: "ok";
|
|
2976
3320
|
/**
|
|
2977
|
-
* Represents that the
|
|
3321
|
+
* Represents that the referrer leaderboard data is not available.
|
|
2978
3322
|
*/
|
|
2979
3323
|
readonly Error: "error";
|
|
2980
3324
|
};
|
|
2981
3325
|
/**
|
|
2982
|
-
* The derived string union of possible {@link
|
|
3326
|
+
* The derived string union of possible {@link ReferrerLeaderboardPageResponseCodes}.
|
|
2983
3327
|
*/
|
|
2984
|
-
type
|
|
3328
|
+
type ReferrerLeaderboardPageResponseCode = (typeof ReferrerLeaderboardPageResponseCodes)[keyof typeof ReferrerLeaderboardPageResponseCodes];
|
|
2985
3329
|
/**
|
|
2986
|
-
*
|
|
3330
|
+
* A referrer leaderboard page response when the data is available.
|
|
2987
3331
|
*/
|
|
2988
|
-
type
|
|
2989
|
-
responseCode: typeof
|
|
2990
|
-
|
|
3332
|
+
type ReferrerLeaderboardPageResponseOk = {
|
|
3333
|
+
responseCode: typeof ReferrerLeaderboardPageResponseCodes.Ok;
|
|
3334
|
+
data: ReferrerLeaderboardPage;
|
|
2991
3335
|
};
|
|
2992
3336
|
/**
|
|
2993
|
-
*
|
|
3337
|
+
* A referrer leaderboard page response when the data is not available.
|
|
2994
3338
|
*/
|
|
2995
|
-
type
|
|
2996
|
-
responseCode: typeof
|
|
3339
|
+
type ReferrerLeaderboardPageResponseError = {
|
|
3340
|
+
responseCode: typeof ReferrerLeaderboardPageResponseCodes.Error;
|
|
3341
|
+
error: string;
|
|
3342
|
+
errorMessage: string;
|
|
2997
3343
|
};
|
|
2998
3344
|
/**
|
|
2999
|
-
*
|
|
3345
|
+
* A referrer leaderboard page API response.
|
|
3000
3346
|
*
|
|
3001
3347
|
* Use the `responseCode` field to determine the specific type interpretation
|
|
3002
3348
|
* at runtime.
|
|
3003
3349
|
*/
|
|
3004
|
-
type
|
|
3350
|
+
type ReferrerLeaderboardPageResponse = ReferrerLeaderboardPageResponseOk | ReferrerLeaderboardPageResponseError;
|
|
3005
3351
|
/**
|
|
3006
|
-
*
|
|
3352
|
+
* Request parameters for referrer detail query.
|
|
3007
3353
|
*/
|
|
3354
|
+
interface ReferrerDetailRequest {
|
|
3355
|
+
/** The Ethereum address of the referrer to query */
|
|
3356
|
+
referrer: Address;
|
|
3357
|
+
}
|
|
3008
3358
|
/**
|
|
3009
|
-
*
|
|
3359
|
+
* A status code for referrer detail API responses.
|
|
3010
3360
|
*/
|
|
3011
|
-
declare const
|
|
3012
|
-
readonly BySubregistryNode: "bySubregistryNode";
|
|
3013
|
-
readonly WithEncodedReferral: "withEncodedReferral";
|
|
3014
|
-
};
|
|
3015
|
-
type RegistrarActionsFilterType = (typeof RegistrarActionsFilterTypes)[keyof typeof RegistrarActionsFilterTypes];
|
|
3016
|
-
type RegistrarActionsFilterBySubregistryNode = {
|
|
3017
|
-
filterType: typeof RegistrarActionsFilterTypes.BySubregistryNode;
|
|
3018
|
-
value: Node;
|
|
3019
|
-
};
|
|
3020
|
-
type RegistrarActionsFilterWithEncodedReferral = {
|
|
3021
|
-
filterType: typeof RegistrarActionsFilterTypes.WithEncodedReferral;
|
|
3022
|
-
};
|
|
3023
|
-
type RegistrarActionsFilter = RegistrarActionsFilterBySubregistryNode | RegistrarActionsFilterWithEncodedReferral;
|
|
3024
|
-
/**
|
|
3025
|
-
* Records Orders
|
|
3026
|
-
*/
|
|
3027
|
-
declare const RegistrarActionsOrders: {
|
|
3028
|
-
readonly LatestRegistrarActions: "orderBy[timestamp]=desc";
|
|
3029
|
-
};
|
|
3030
|
-
type RegistrarActionsOrder = (typeof RegistrarActionsOrders)[keyof typeof RegistrarActionsOrders];
|
|
3031
|
-
/**
|
|
3032
|
-
* Represents a request to Registrar Actions API.
|
|
3033
|
-
*/
|
|
3034
|
-
type RegistrarActionsRequest = {
|
|
3035
|
-
/**
|
|
3036
|
-
* Filters to be applied while generating results.
|
|
3037
|
-
*/
|
|
3038
|
-
filters?: RegistrarActionsFilter[];
|
|
3039
|
-
/**
|
|
3040
|
-
* Order applied while generating results.
|
|
3041
|
-
*/
|
|
3042
|
-
order?: RegistrarActionsOrder;
|
|
3043
|
-
/**
|
|
3044
|
-
* Limit the count of items per page to selected count of records.
|
|
3045
|
-
*
|
|
3046
|
-
* Guaranteed to be a positive integer (if defined).
|
|
3047
|
-
*/
|
|
3048
|
-
itemsPerPage?: number;
|
|
3049
|
-
};
|
|
3050
|
-
/**
|
|
3051
|
-
* A status code for Registrar Actions API responses.
|
|
3052
|
-
*/
|
|
3053
|
-
declare const RegistrarActionsResponseCodes: {
|
|
3361
|
+
declare const ReferrerDetailResponseCodes: {
|
|
3054
3362
|
/**
|
|
3055
|
-
* Represents that
|
|
3363
|
+
* Represents that the referrer detail data is available.
|
|
3056
3364
|
*/
|
|
3057
3365
|
readonly Ok: "ok";
|
|
3058
3366
|
/**
|
|
3059
|
-
* Represents that
|
|
3367
|
+
* Represents that an error occurred while fetching the data.
|
|
3060
3368
|
*/
|
|
3061
3369
|
readonly Error: "error";
|
|
3062
3370
|
};
|
|
3063
3371
|
/**
|
|
3064
|
-
* The derived string union of possible {@link
|
|
3372
|
+
* The derived string union of possible {@link ReferrerDetailResponseCodes}.
|
|
3065
3373
|
*/
|
|
3066
|
-
type
|
|
3374
|
+
type ReferrerDetailResponseCode = (typeof ReferrerDetailResponseCodes)[keyof typeof ReferrerDetailResponseCodes];
|
|
3067
3375
|
/**
|
|
3068
|
-
*
|
|
3376
|
+
* A referrer detail response when the data is available for a referrer on the leaderboard.
|
|
3069
3377
|
*/
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
* Name
|
|
3074
|
-
*
|
|
3075
|
-
* FQDN of the name associated with `action`.
|
|
3076
|
-
*
|
|
3077
|
-
* Guarantees:
|
|
3078
|
-
* - `namehash(name)` is always `action.registrationLifecycle.node`.
|
|
3079
|
-
*/
|
|
3080
|
-
name: InterpretedName;
|
|
3081
|
-
}
|
|
3082
|
-
/**
|
|
3083
|
-
* A response when Registrar Actions are available.
|
|
3084
|
-
*/
|
|
3085
|
-
type RegistrarActionsResponseOk = {
|
|
3086
|
-
responseCode: typeof RegistrarActionsResponseCodes.Ok;
|
|
3087
|
-
registrarActions: NamedRegistrarAction[];
|
|
3378
|
+
type ReferrerDetailResponseOk = {
|
|
3379
|
+
responseCode: typeof ReferrerDetailResponseCodes.Ok;
|
|
3380
|
+
data: ReferrerDetail;
|
|
3088
3381
|
};
|
|
3089
3382
|
/**
|
|
3090
|
-
* A response when
|
|
3091
|
-
*/
|
|
3092
|
-
interface RegistrarActionsResponseError {
|
|
3093
|
-
responseCode: typeof IndexingStatusResponseCodes.Error;
|
|
3094
|
-
error: ErrorResponse;
|
|
3095
|
-
}
|
|
3096
|
-
/**
|
|
3097
|
-
* Registrar Actions response.
|
|
3098
|
-
*
|
|
3099
|
-
* Use the `responseCode` field to determine the specific type interpretation
|
|
3100
|
-
* at runtime.
|
|
3101
|
-
*/
|
|
3102
|
-
type RegistrarActionsResponse = RegistrarActionsResponseOk | RegistrarActionsResponseError;
|
|
3103
|
-
|
|
3104
|
-
/**
|
|
3105
|
-
* Serialized representation of {@link IndexingStatusResponseError}.
|
|
3106
|
-
*/
|
|
3107
|
-
type SerializedIndexingStatusResponseError = IndexingStatusResponseError;
|
|
3108
|
-
/**
|
|
3109
|
-
* Serialized representation of {@link IndexingStatusResponseOk}.
|
|
3110
|
-
*/
|
|
3111
|
-
interface SerializedIndexingStatusResponseOk extends Omit<IndexingStatusResponseOk, "realtimeProjection"> {
|
|
3112
|
-
realtimeProjection: SerializedRealtimeIndexingStatusProjection;
|
|
3113
|
-
}
|
|
3114
|
-
/**
|
|
3115
|
-
* Serialized representation of {@link IndexingStatusResponse}.
|
|
3116
|
-
*/
|
|
3117
|
-
type SerializedIndexingStatusResponse = SerializedIndexingStatusResponseOk | SerializedIndexingStatusResponseError;
|
|
3118
|
-
/**
|
|
3119
|
-
* Serialized representation of {@link RegistrarActionsResponseError}.
|
|
3120
|
-
*/
|
|
3121
|
-
type SerializedRegistrarActionsResponseError = RegistrarActionsResponseError;
|
|
3122
|
-
/**
|
|
3123
|
-
* Serialized representation of {@link NamedRegistrarAction}.
|
|
3124
|
-
*/
|
|
3125
|
-
interface SerializedNamedRegistrarAction extends Omit<NamedRegistrarAction, "action"> {
|
|
3126
|
-
action: SerializedRegistrarAction;
|
|
3127
|
-
}
|
|
3128
|
-
/**
|
|
3129
|
-
* Serialized representation of {@link RegistrarActionsResponseOk}.
|
|
3130
|
-
*/
|
|
3131
|
-
interface SerializedRegistrarActionsResponseOk extends Omit<RegistrarActionsResponseOk, "registrarActions"> {
|
|
3132
|
-
registrarActions: SerializedNamedRegistrarAction[];
|
|
3133
|
-
}
|
|
3134
|
-
/**
|
|
3135
|
-
* Serialized representation of {@link SerializedRegistrarActionsResponse}.
|
|
3136
|
-
*/
|
|
3137
|
-
type SerializedRegistrarActionsResponse = SerializedRegistrarActionsResponseOk | SerializedRegistrarActionsResponseError;
|
|
3138
|
-
|
|
3139
|
-
declare function deserializeErrorResponse(maybeErrorResponse: unknown): ErrorResponse;
|
|
3140
|
-
declare function deserializeIndexingStatusResponse(maybeResponse: SerializedIndexingStatusResponse): IndexingStatusResponse;
|
|
3141
|
-
declare function deserializeRegistrarActionsResponse(maybeResponse: SerializedRegistrarActionsResponse): RegistrarActionsResponse;
|
|
3142
|
-
|
|
3143
|
-
/**
|
|
3144
|
-
* Build a "parent node" filter object for Registrar Actions query.
|
|
3145
|
-
*/
|
|
3146
|
-
declare function byParentNode(parentNode: Node): RegistrarActionsFilter;
|
|
3147
|
-
declare function byParentNode(parentNode: undefined): undefined;
|
|
3148
|
-
/**
|
|
3149
|
-
* Build a "with referral" filter object for Registrar Actions query.
|
|
3383
|
+
* A referrer detail response when an error occurs.
|
|
3150
3384
|
*/
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
declare const registrarActionsFilter: {
|
|
3154
|
-
byParentNode: typeof byParentNode;
|
|
3155
|
-
withReferral: typeof withReferral;
|
|
3156
|
-
};
|
|
3157
|
-
|
|
3158
|
-
declare const registrarActionsPrerequisites: Readonly<{
|
|
3159
|
-
/**
|
|
3160
|
-
* Required plugins to enable Registrar Actions API routes.
|
|
3161
|
-
*
|
|
3162
|
-
* 1. `registrars` plugin is required so that data in the `registrarActions`
|
|
3163
|
-
* table is populated.
|
|
3164
|
-
* 2. `subgraph`, `basenames`, and `lineanames` are required to get the data
|
|
3165
|
-
* for the name associated with each registrar action.
|
|
3166
|
-
* 3. In theory not all of `subgraph`, `basenames`, and `lineanames` plugins
|
|
3167
|
-
* might be required. Ex: At least one, but the current logic in
|
|
3168
|
-
* the `registrars` plugin always indexes registrar actions across
|
|
3169
|
-
* Ethnames (subgraph), Basenames, and Lineanames and therefore we need to
|
|
3170
|
-
* ensure each value in the registrar actions table has
|
|
3171
|
-
* an associated record in the domains table.
|
|
3172
|
-
*/
|
|
3173
|
-
requiredPlugins: readonly [PluginName.Subgraph, PluginName.Basenames, PluginName.Lineanames, PluginName.Registrars];
|
|
3174
|
-
/**
|
|
3175
|
-
* Check if provided ENSApiPublicConfig supports the Registrar Actions API.
|
|
3176
|
-
*/
|
|
3177
|
-
hasEnsIndexerConfigSupport(config: ENSIndexerPublicConfig): boolean;
|
|
3178
|
-
/**
|
|
3179
|
-
* Required Indexing Status IDs
|
|
3180
|
-
*
|
|
3181
|
-
* Database indexes are created by the time the omnichain indexing status
|
|
3182
|
-
* is either `completed` or `following`.
|
|
3183
|
-
*/
|
|
3184
|
-
supportedIndexingStatusIds: ("omnichain-following" | "omnichain-completed")[];
|
|
3185
|
-
/**
|
|
3186
|
-
* Check if provided indexing status supports the Registrar Actions API.
|
|
3187
|
-
*/
|
|
3188
|
-
hasIndexingStatusSupport(omnichainIndexingStatusId: OmnichainIndexingStatusId): boolean;
|
|
3189
|
-
}>;
|
|
3190
|
-
|
|
3191
|
-
declare function serializeIndexingStatusResponse(response: IndexingStatusResponse): SerializedIndexingStatusResponse;
|
|
3192
|
-
declare function serializeNamedRegistrarAction({ action, name, }: NamedRegistrarAction): SerializedNamedRegistrarAction;
|
|
3193
|
-
declare function serializeRegistrarActionsResponse(response: RegistrarActionsResponse): SerializedRegistrarActionsResponse;
|
|
3194
|
-
|
|
3195
|
-
/**
|
|
3196
|
-
* Request parameters for a referrer leaderboard page query.
|
|
3197
|
-
*/
|
|
3198
|
-
interface ReferrerLeaderboardPaginationRequest extends ReferrerLeaderboardPaginationParams {
|
|
3199
|
-
}
|
|
3200
|
-
/**
|
|
3201
|
-
* A status code for a referrer leaderboard page API response.
|
|
3202
|
-
*/
|
|
3203
|
-
declare const ReferrerLeaderboardPageResponseCodes: {
|
|
3204
|
-
/**
|
|
3205
|
-
* Represents that the requested referrer leaderboard page is available.
|
|
3206
|
-
*/
|
|
3207
|
-
readonly Ok: "ok";
|
|
3208
|
-
/**
|
|
3209
|
-
* Represents that the referrer leaderboard data is not available.
|
|
3210
|
-
*/
|
|
3211
|
-
readonly Error: "error";
|
|
3212
|
-
};
|
|
3213
|
-
/**
|
|
3214
|
-
* The derived string union of possible {@link ReferrerLeaderboardPageResponseCodes}.
|
|
3215
|
-
*/
|
|
3216
|
-
type ReferrerLeaderboardPageResponseCode = (typeof ReferrerLeaderboardPageResponseCodes)[keyof typeof ReferrerLeaderboardPageResponseCodes];
|
|
3217
|
-
/**
|
|
3218
|
-
* A referrer leaderboard page response when the data is available.
|
|
3219
|
-
*/
|
|
3220
|
-
type ReferrerLeaderboardPageResponseOk = {
|
|
3221
|
-
responseCode: typeof ReferrerLeaderboardPageResponseCodes.Ok;
|
|
3222
|
-
data: ReferrerLeaderboardPage;
|
|
3223
|
-
};
|
|
3224
|
-
/**
|
|
3225
|
-
* A referrer leaderboard page response when the data is not available.
|
|
3226
|
-
*/
|
|
3227
|
-
type ReferrerLeaderboardPageResponseError = {
|
|
3228
|
-
responseCode: typeof ReferrerLeaderboardPageResponseCodes.Error;
|
|
3385
|
+
type ReferrerDetailResponseError = {
|
|
3386
|
+
responseCode: typeof ReferrerDetailResponseCodes.Error;
|
|
3229
3387
|
error: string;
|
|
3230
3388
|
errorMessage: string;
|
|
3231
3389
|
};
|
|
3232
3390
|
/**
|
|
3233
|
-
* A referrer
|
|
3391
|
+
* A referrer detail API response.
|
|
3234
3392
|
*
|
|
3235
3393
|
* Use the `responseCode` field to determine the specific type interpretation
|
|
3236
3394
|
* at runtime.
|
|
3237
3395
|
*/
|
|
3238
|
-
type
|
|
3396
|
+
type ReferrerDetailResponse = ReferrerDetailResponseOk | ReferrerDetailResponseError;
|
|
3239
3397
|
|
|
3240
3398
|
/**
|
|
3241
3399
|
* Serialized representation of {@link ReferrerLeaderboardPageResponseError}.
|
|
@@ -3253,6 +3411,24 @@ type SerializedReferrerLeaderboardPageResponseOk = ReferrerLeaderboardPageRespon
|
|
|
3253
3411
|
* Serialized representation of {@link ReferrerLeaderboardPageResponse}.
|
|
3254
3412
|
*/
|
|
3255
3413
|
type SerializedReferrerLeaderboardPageResponse = SerializedReferrerLeaderboardPageResponseOk | SerializedReferrerLeaderboardPageResponseError;
|
|
3414
|
+
/**
|
|
3415
|
+
* Serialized representation of {@link ReferrerDetailResponseOk}.
|
|
3416
|
+
*
|
|
3417
|
+
* Note: All fields in ReferrerDetailRanked and ReferrerDetailUnranked
|
|
3418
|
+
* (rules, referrer metrics, aggregatedMetrics, and timestamp) are already serializable primitives.
|
|
3419
|
+
* The rank field can be either a number or null, both of which are valid JSON primitives.
|
|
3420
|
+
*/
|
|
3421
|
+
type SerializedReferrerDetailResponseOk = ReferrerDetailResponseOk;
|
|
3422
|
+
/**
|
|
3423
|
+
* Serialized representation of {@link ReferrerDetailResponseError}.
|
|
3424
|
+
*
|
|
3425
|
+
* Note: All fields are already serializable, so this type is identical to the source type.
|
|
3426
|
+
*/
|
|
3427
|
+
type SerializedReferrerDetailResponseError = ReferrerDetailResponseError;
|
|
3428
|
+
/**
|
|
3429
|
+
* Serialized representation of {@link ReferrerDetailResponse}.
|
|
3430
|
+
*/
|
|
3431
|
+
type SerializedReferrerDetailResponse = SerializedReferrerDetailResponseOk | SerializedReferrerDetailResponseError;
|
|
3256
3432
|
|
|
3257
3433
|
/**
|
|
3258
3434
|
* Deserialize a {@link ReferrerLeaderboardPageResponse} object.
|
|
@@ -3263,6 +3439,15 @@ type SerializedReferrerLeaderboardPageResponse = SerializedReferrerLeaderboardPa
|
|
|
3263
3439
|
* responses from the API.
|
|
3264
3440
|
*/
|
|
3265
3441
|
declare function deserializeReferrerLeaderboardPageResponse(maybeResponse: SerializedReferrerLeaderboardPageResponse, valueLabel?: string): ReferrerLeaderboardPageResponse;
|
|
3442
|
+
/**
|
|
3443
|
+
* Deserialize a {@link ReferrerDetailResponse} object.
|
|
3444
|
+
*
|
|
3445
|
+
* Note: While the serialized and deserialized types are identical (all fields
|
|
3446
|
+
* are primitives), this function performs critical validation using Zod schemas
|
|
3447
|
+
* to enforce invariants on the data. This ensures data integrity when receiving
|
|
3448
|
+
* responses from the API.
|
|
3449
|
+
*/
|
|
3450
|
+
declare function deserializeReferrerDetailResponse(maybeResponse: SerializedReferrerDetailResponse, valueLabel?: string): ReferrerDetailResponse;
|
|
3266
3451
|
|
|
3267
3452
|
/**
|
|
3268
3453
|
* Serialize a {@link ReferrerLeaderboardPageResponse} object.
|
|
@@ -3273,6 +3458,16 @@ declare function deserializeReferrerLeaderboardPageResponse(maybeResponse: Seria
|
|
|
3273
3458
|
* throughout the codebase.
|
|
3274
3459
|
*/
|
|
3275
3460
|
declare function serializeReferrerLeaderboardPageResponse(response: ReferrerLeaderboardPageResponse): SerializedReferrerLeaderboardPageResponse;
|
|
3461
|
+
/**
|
|
3462
|
+
* Serialize a {@link ReferrerDetailResponse} object.
|
|
3463
|
+
*
|
|
3464
|
+
* Note: Since all fields in ReferrerDetailRanked and ReferrerDetailUnranked
|
|
3465
|
+
* (rules, referrer metrics, aggregatedMetrics, and timestamp) are already
|
|
3466
|
+
* serializable primitives, this function performs an identity transformation.
|
|
3467
|
+
* The rank field can be either a number or null, both of which are valid JSON primitives.
|
|
3468
|
+
* It exists to maintain consistency with the serialization pattern used throughout the codebase.
|
|
3469
|
+
*/
|
|
3470
|
+
declare function serializeReferrerDetailResponse(response: ReferrerDetailResponse): SerializedReferrerDetailResponse;
|
|
3276
3471
|
|
|
3277
3472
|
/**
|
|
3278
3473
|
* Configuration options for ENSNode API client
|
|
@@ -3471,7 +3666,7 @@ declare class ENSNodeClient {
|
|
|
3471
3666
|
* @example
|
|
3472
3667
|
* ```typescript
|
|
3473
3668
|
* // Get first page with default page size (25 items)
|
|
3474
|
-
* const response = await client.
|
|
3669
|
+
* const response = await client.getReferrerLeaderboardPage();
|
|
3475
3670
|
* if (response.responseCode === ReferrerLeaderboardPageResponseCodes.Ok) {
|
|
3476
3671
|
* const {
|
|
3477
3672
|
* aggregatedMetrics,
|
|
@@ -3491,13 +3686,13 @@ declare class ENSNodeClient {
|
|
|
3491
3686
|
* @example
|
|
3492
3687
|
* ```typescript
|
|
3493
3688
|
* // Get second page with 50 items per page
|
|
3494
|
-
* const response = await client.
|
|
3689
|
+
* const response = await client.getReferrerLeaderboardPage({ page: 2, itemsPerPage: 50 });
|
|
3495
3690
|
* ```
|
|
3496
3691
|
*
|
|
3497
3692
|
* @example
|
|
3498
3693
|
* ```typescript
|
|
3499
3694
|
* // Handle error response, ie. when Referrer Leaderboard is not currently available.
|
|
3500
|
-
* const response = await client.
|
|
3695
|
+
* const response = await client.getReferrerLeaderboardPage();
|
|
3501
3696
|
*
|
|
3502
3697
|
* if (response.responseCode === ReferrerLeaderboardPageResponseCodes.Error) {
|
|
3503
3698
|
* console.error(response.error);
|
|
@@ -3505,7 +3700,84 @@ declare class ENSNodeClient {
|
|
|
3505
3700
|
* }
|
|
3506
3701
|
* ```
|
|
3507
3702
|
*/
|
|
3508
|
-
|
|
3703
|
+
getReferrerLeaderboardPage(request?: ReferrerLeaderboardPageRequest): Promise<ReferrerLeaderboardPageResponse>;
|
|
3704
|
+
/**
|
|
3705
|
+
* Fetch Referrer Detail
|
|
3706
|
+
*
|
|
3707
|
+
* Retrieves detailed information about a specific referrer, whether they are on the
|
|
3708
|
+
* leaderboard or not.
|
|
3709
|
+
*
|
|
3710
|
+
* The response data is a discriminated union type with a `type` field:
|
|
3711
|
+
*
|
|
3712
|
+
* **For referrers on the leaderboard** (`ReferrerDetailRanked`):
|
|
3713
|
+
* - `type`: {@link ReferrerDetailTypeIds.Ranked}
|
|
3714
|
+
* - `referrer`: The `AwardedReferrerMetrics` from @namehash/ens-referrals
|
|
3715
|
+
* - `rules`: The referral program rules
|
|
3716
|
+
* - `aggregatedMetrics`: Aggregated metrics for all referrers on the leaderboard
|
|
3717
|
+
* - `accurateAsOf`: Unix timestamp indicating when the data was last updated
|
|
3718
|
+
*
|
|
3719
|
+
* **For referrers NOT on the leaderboard** (`ReferrerDetailUnranked`):
|
|
3720
|
+
* - `type`: {@link ReferrerDetailTypeIds.Unranked}
|
|
3721
|
+
* - `referrer`: The `UnrankedReferrerMetrics` from @namehash/ens-referrals
|
|
3722
|
+
* - `rules`: The referral program rules
|
|
3723
|
+
* - `aggregatedMetrics`: Aggregated metrics for all referrers on the leaderboard
|
|
3724
|
+
* - `accurateAsOf`: Unix timestamp indicating when the data was last updated
|
|
3725
|
+
*
|
|
3726
|
+
* @see {@link https://www.npmjs.com/package/@namehash/ens-referrals|@namehash/ens-referrals} for calculation details
|
|
3727
|
+
*
|
|
3728
|
+
* @param request The referrer address to query
|
|
3729
|
+
* @returns {ReferrerDetailResponse} Returns the referrer detail response
|
|
3730
|
+
*
|
|
3731
|
+
* @throws if the ENSNode request fails
|
|
3732
|
+
* @throws if the response data is malformed
|
|
3733
|
+
*
|
|
3734
|
+
* @example
|
|
3735
|
+
* ```typescript
|
|
3736
|
+
* // Get referrer detail for a specific address
|
|
3737
|
+
* const response = await client.getReferrerDetail({
|
|
3738
|
+
* referrer: "0x1234567890123456789012345678901234567890"
|
|
3739
|
+
* });
|
|
3740
|
+
* if (response.responseCode === ReferrerDetailResponseCodes.Ok) {
|
|
3741
|
+
* const { type, referrer, rules, aggregatedMetrics, accurateAsOf } = response.data;
|
|
3742
|
+
* console.log(type); // ReferrerDetailTypeIds.Ranked or ReferrerDetailTypeIds.Unranked
|
|
3743
|
+
* console.log(referrer);
|
|
3744
|
+
* console.log(accurateAsOf);
|
|
3745
|
+
* }
|
|
3746
|
+
* ```
|
|
3747
|
+
*
|
|
3748
|
+
* @example
|
|
3749
|
+
* ```typescript
|
|
3750
|
+
* // Use discriminated union to check if referrer is ranked
|
|
3751
|
+
* const response = await client.getReferrerDetail({
|
|
3752
|
+
* referrer: "0x1234567890123456789012345678901234567890"
|
|
3753
|
+
* });
|
|
3754
|
+
* if (response.responseCode === ReferrerDetailResponseCodes.Ok) {
|
|
3755
|
+
* if (response.data.type === ReferrerDetailTypeIds.Ranked) {
|
|
3756
|
+
* // TypeScript knows this is ReferrerDetailRanked
|
|
3757
|
+
* console.log(`Rank: ${response.data.referrer.rank}`);
|
|
3758
|
+
* console.log(`Qualified: ${response.data.referrer.isQualified}`);
|
|
3759
|
+
* console.log(`Award Pool Share: ${response.data.referrer.awardPoolShare * 100}%`);
|
|
3760
|
+
* } else {
|
|
3761
|
+
* // TypeScript knows this is ReferrerDetailUnranked
|
|
3762
|
+
* console.log("Referrer is not on the leaderboard (no referrals yet)");
|
|
3763
|
+
* }
|
|
3764
|
+
* }
|
|
3765
|
+
* ```
|
|
3766
|
+
*
|
|
3767
|
+
* @example
|
|
3768
|
+
* ```typescript
|
|
3769
|
+
* // Handle error response, ie. when Referrer Detail is not currently available.
|
|
3770
|
+
* const response = await client.getReferrerDetail({
|
|
3771
|
+
* referrer: "0x1234567890123456789012345678901234567890"
|
|
3772
|
+
* });
|
|
3773
|
+
*
|
|
3774
|
+
* if (response.responseCode === ReferrerDetailResponseCodes.Error) {
|
|
3775
|
+
* console.error(response.error);
|
|
3776
|
+
* console.error(response.errorMessage);
|
|
3777
|
+
* }
|
|
3778
|
+
* ```
|
|
3779
|
+
*/
|
|
3780
|
+
getReferrerDetail(request: ReferrerDetailRequest): Promise<ReferrerDetailResponse>;
|
|
3509
3781
|
/**
|
|
3510
3782
|
* Fetch ENSNode Registrar Actions
|
|
3511
3783
|
*
|
|
@@ -3570,4 +3842,193 @@ declare class ClientError extends Error {
|
|
|
3570
3842
|
static fromErrorResponse({ message, details }: ErrorResponse): ClientError;
|
|
3571
3843
|
}
|
|
3572
3844
|
|
|
3573
|
-
|
|
3845
|
+
/**
|
|
3846
|
+
* An enum representing the possible CAIP-19 Asset Namespace values.
|
|
3847
|
+
*/
|
|
3848
|
+
declare const AssetNamespaces: {
|
|
3849
|
+
readonly ERC721: "erc721";
|
|
3850
|
+
readonly ERC1155: "erc1155";
|
|
3851
|
+
};
|
|
3852
|
+
type AssetNamespace = (typeof AssetNamespaces)[keyof typeof AssetNamespaces];
|
|
3853
|
+
/**
|
|
3854
|
+
* A uint256 value that identifies a specific NFT within a NFT contract.
|
|
3855
|
+
*/
|
|
3856
|
+
type TokenId = bigint;
|
|
3857
|
+
/**
|
|
3858
|
+
* A globally unique reference to an NFT.
|
|
3859
|
+
*/
|
|
3860
|
+
interface AssetId {
|
|
3861
|
+
assetNamespace: AssetNamespace;
|
|
3862
|
+
contract: AccountId;
|
|
3863
|
+
tokenId: TokenId;
|
|
3864
|
+
}
|
|
3865
|
+
/**
|
|
3866
|
+
* Serialized representation of an {@link AssetId}.
|
|
3867
|
+
*
|
|
3868
|
+
* Formatted as a fully lowercase CAIP-19 AssetId.
|
|
3869
|
+
*
|
|
3870
|
+
* @see https://chainagnostic.org/CAIPs/caip-19
|
|
3871
|
+
* @example "eip155:1/erc721:0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xaf2caa1c2ca1d027f1ac823b529d0a67cd144264b2789fa2ea4d63a67c7103cc"
|
|
3872
|
+
* for vitalik.eth in the eth base registrar on mainnet.
|
|
3873
|
+
*/
|
|
3874
|
+
type SerializedAssetId = string;
|
|
3875
|
+
/**
|
|
3876
|
+
* Serializes {@link AssetId} object.
|
|
3877
|
+
*/
|
|
3878
|
+
declare function serializeAssetId(assetId: AssetId): SerializedAssetId;
|
|
3879
|
+
/**
|
|
3880
|
+
* Builds an AssetId for the NFT represented by the given contract,
|
|
3881
|
+
* tokenId, and assetNamespace.
|
|
3882
|
+
*
|
|
3883
|
+
* @param contract - The contract that manages the NFT
|
|
3884
|
+
* @param tokenId - The tokenId of the NFT
|
|
3885
|
+
* @param assetNamespace - The assetNamespace of the NFT
|
|
3886
|
+
* @returns The AssetId for the NFT represented by the given contract,
|
|
3887
|
+
* tokenId, and assetNamespace
|
|
3888
|
+
*/
|
|
3889
|
+
declare const buildAssetId: (contract: AccountId, tokenId: TokenId, assetNamespace: AssetNamespace) => AssetId;
|
|
3890
|
+
/**
|
|
3891
|
+
* A globally unique reference to an NFT tokenizing the ownership of a domain.
|
|
3892
|
+
*/
|
|
3893
|
+
interface DomainAssetId extends AssetId {
|
|
3894
|
+
/**
|
|
3895
|
+
* The namehash (node) of the domain who's ownership is tokenized by
|
|
3896
|
+
* this `AssetId`.
|
|
3897
|
+
*/
|
|
3898
|
+
domainId: Node;
|
|
3899
|
+
}
|
|
3900
|
+
/**
|
|
3901
|
+
* An enum representing the mint status of a DomainAssetId.
|
|
3902
|
+
*
|
|
3903
|
+
* After we index a NFT we never delete it from our index. Instead, when an
|
|
3904
|
+
* indexed NFT is burned onchain we retain its record and update its mint
|
|
3905
|
+
* status as `burned`. If a NFT is minted again after it is burned its mint
|
|
3906
|
+
* status is updated to `minted`.
|
|
3907
|
+
*/
|
|
3908
|
+
declare const NFTMintStatuses: {
|
|
3909
|
+
readonly Minted: "minted";
|
|
3910
|
+
readonly Burned: "burned";
|
|
3911
|
+
};
|
|
3912
|
+
type NFTMintStatus = (typeof NFTMintStatuses)[keyof typeof NFTMintStatuses];
|
|
3913
|
+
/**
|
|
3914
|
+
* Metadata about a NFT transfer event.
|
|
3915
|
+
*
|
|
3916
|
+
* This metadata can be used for building more helpful messages when processing
|
|
3917
|
+
* NFT transfer events.
|
|
3918
|
+
*/
|
|
3919
|
+
interface NFTTransferEventMetadata {
|
|
3920
|
+
chainId: ChainId;
|
|
3921
|
+
blockNumber: bigint;
|
|
3922
|
+
transactionHash: Hex;
|
|
3923
|
+
eventHandlerName: string;
|
|
3924
|
+
nft: DomainAssetId;
|
|
3925
|
+
}
|
|
3926
|
+
declare const formatNFTTransferEventMetadata: (metadata: NFTTransferEventMetadata) => string;
|
|
3927
|
+
/**
|
|
3928
|
+
* An enum representing the type of transfer that has occurred to a DomainAssetId.
|
|
3929
|
+
*/
|
|
3930
|
+
declare const NFTTransferTypes: {
|
|
3931
|
+
/**
|
|
3932
|
+
* Initial transfer from zeroAddress to a non-zeroAddress
|
|
3933
|
+
* Can happen at most once to a NFT AssetId
|
|
3934
|
+
*
|
|
3935
|
+
* Invariants:
|
|
3936
|
+
* - NFT is not indexed and therefore has no previous mint status or owner
|
|
3937
|
+
* - new NFT mint status is `minted`
|
|
3938
|
+
* - new NFT owner is a non-zeroAddress
|
|
3939
|
+
*/
|
|
3940
|
+
readonly Mint: "mint";
|
|
3941
|
+
/**
|
|
3942
|
+
* Subsequent transfer from zeroAddress to a non-zeroAddress
|
|
3943
|
+
* Can happen any number of times to a NFT AssetId as it passes in a cycle from
|
|
3944
|
+
* mint -> burn -> remint -> burn -> remint -> ...
|
|
3945
|
+
*
|
|
3946
|
+
* Invariants:
|
|
3947
|
+
* - NFT is indexed
|
|
3948
|
+
* - previous NFT mint status was `burned`
|
|
3949
|
+
* - previous NFT owner is the zeroAddress
|
|
3950
|
+
* - new NFT mint status is `minted`
|
|
3951
|
+
* - new NFT owner is a non-zeroAddress
|
|
3952
|
+
*/
|
|
3953
|
+
readonly Remint: "remint";
|
|
3954
|
+
/**
|
|
3955
|
+
* Special transfer type for improperly implemented NFT contracts that allow a NFT
|
|
3956
|
+
* that is currently minted to be reminted before an intermediate burn.
|
|
3957
|
+
*
|
|
3958
|
+
* Transfer from zeroAddress to non-zeroAddress for an indexed NFT where the
|
|
3959
|
+
* previously indexed nft had status `minted` with a non-zeroAddress owner.
|
|
3960
|
+
*
|
|
3961
|
+
* Invariants:
|
|
3962
|
+
* - NFT is indexed
|
|
3963
|
+
* - previous NFT mint status was `minted`
|
|
3964
|
+
* - previous NFT owner was a non-zeroAddress
|
|
3965
|
+
* - new NFT mint status is `minted`
|
|
3966
|
+
* - new NFT owner is a non-zeroAddress
|
|
3967
|
+
*/
|
|
3968
|
+
readonly MintedRemint: "minted-remint";
|
|
3969
|
+
/**
|
|
3970
|
+
* Transfer from a non-zeroAddress to zeroAddress
|
|
3971
|
+
*
|
|
3972
|
+
* Invariants:
|
|
3973
|
+
* - NFT is indexed
|
|
3974
|
+
* - previous NFT mint status was `minted`
|
|
3975
|
+
* - previous NFT owner is a non-zeroAddress
|
|
3976
|
+
* - new NFT mint status is `burned`
|
|
3977
|
+
* - new NFT owner is the zeroAddress
|
|
3978
|
+
*/
|
|
3979
|
+
readonly Burn: "burn";
|
|
3980
|
+
/**
|
|
3981
|
+
* Transfer from a non-zeroAddress to a distinct non-zeroAddress
|
|
3982
|
+
*
|
|
3983
|
+
* Invariants:
|
|
3984
|
+
* - NFT is indexed
|
|
3985
|
+
* - previous and new NFT mint status is `minted`
|
|
3986
|
+
* - previous and new NFT owner are distinct non-zeroAddress
|
|
3987
|
+
*/
|
|
3988
|
+
readonly Transfer: "transfer";
|
|
3989
|
+
/**
|
|
3990
|
+
* Transfer from a non-zeroAddress to the same non-zeroAddress
|
|
3991
|
+
*
|
|
3992
|
+
* Invariants:
|
|
3993
|
+
* - NFT is indexed
|
|
3994
|
+
* - previous and new NFT mint status is `minted`
|
|
3995
|
+
* - previous and new NFT owner are equivalent non-zeroAddress
|
|
3996
|
+
*/
|
|
3997
|
+
readonly SelfTransfer: "self-transfer";
|
|
3998
|
+
/**
|
|
3999
|
+
* Transfer from zeroAddress to zeroAddress for an indexed NFT
|
|
4000
|
+
*
|
|
4001
|
+
* Invariants:
|
|
4002
|
+
* - NFT is indexed
|
|
4003
|
+
* - previous and new NFT mint status is `burned`
|
|
4004
|
+
* - previous and new NFT owner are zeroAddress
|
|
4005
|
+
*/
|
|
4006
|
+
readonly RemintBurn: "remint-burn";
|
|
4007
|
+
/**
|
|
4008
|
+
* Special transfer type for improperly implemented NFT contracts that allow a NFT
|
|
4009
|
+
* that is currently minted to be reminted again before an intermediate burn.
|
|
4010
|
+
*
|
|
4011
|
+
* Transfer from zeroAddress to zeroAddress for an indexed NFT where the
|
|
4012
|
+
* previously indexed nft had status `minted` with a non-zeroAddress owner.
|
|
4013
|
+
*
|
|
4014
|
+
* Invariants:
|
|
4015
|
+
* - NFT is indexed
|
|
4016
|
+
* - previous NFT mint status was `minted`
|
|
4017
|
+
* - previous NFT owner was a non-zeroAddress
|
|
4018
|
+
* - new NFT mint status is `burned`
|
|
4019
|
+
* - new NFT owner is the zeroAddress
|
|
4020
|
+
*/
|
|
4021
|
+
readonly MintedRemintBurn: "minted-remint-burn";
|
|
4022
|
+
/**
|
|
4023
|
+
* Transfer from zeroAddress to zeroAddress for an unindexed NFT
|
|
4024
|
+
*
|
|
4025
|
+
* Invariants:
|
|
4026
|
+
* - NFT is not indexed and therefore has no previous mint status or owner
|
|
4027
|
+
* - NFT should remain unindexed and without any mint status or owner
|
|
4028
|
+
*/
|
|
4029
|
+
readonly MintBurn: "mint-burn";
|
|
4030
|
+
};
|
|
4031
|
+
type NFTTransferType = (typeof NFTTransferTypes)[keyof typeof NFTTransferTypes];
|
|
4032
|
+
declare const getNFTTransferType: (from: Address, to: Address, allowMintedRemint: boolean, metadata: NFTTransferEventMetadata, currentlyIndexedOwner?: Address) => NFTTransferType;
|
|
4033
|
+
|
|
4034
|
+
export { ADDR_REVERSE_NODE, ATTR_PROTOCOL_NAME, ATTR_PROTOCOL_STEP, ATTR_PROTOCOL_STEP_RESULT, type AcceleratableRequest, type AcceleratableResponse, type AccountId, type AssetId, type AssetNamespace, AssetNamespaces, BASENAMES_NODE, type BlockNumber, type BlockRef, type Blockrange, type Cache, type CachedValue, type ChainId, type ChainIdString, type ChainIndexingConfig, type ChainIndexingConfigDefinite, type ChainIndexingConfigIndefinite, type ChainIndexingConfigTypeId, ChainIndexingConfigTypeIds, type ChainIndexingStatusId, ChainIndexingStatusIds, type ChainIndexingStatusSnapshot, type ChainIndexingStatusSnapshotBackfill, type ChainIndexingStatusSnapshotCompleted, type ChainIndexingStatusSnapshotFollowing, type ChainIndexingStatusSnapshotForOmnichainIndexingStatusSnapshotBackfill, type ChainIndexingStatusSnapshotQueued, ClientError, type ClientOptions, type ConfigResponse, type CrossChainIndexingStatusSnapshot, type CrossChainIndexingStatusSnapshotOmnichain, type CrossChainIndexingStrategyId, CrossChainIndexingStrategyIds, type CurrencyAmount, type CurrencyId, CurrencyIds, type CurrencyInfo, DEFAULT_EVM_CHAIN_ID, DEFAULT_EVM_COIN_TYPE, type DNSEncodedLiteralName, type DNSEncodedName, type DNSEncodedPartiallyInterpretedName, type Datetime, type DatetimeISO8601, type DeepPartial, type DefaultableChainId, type DomainAssetId, type Duration, type ENSApiPublicConfig, type ENSIndexerPublicConfig, type ENSIndexerVersionInfo, ENSNodeClient, ETH_COIN_TYPE, ETH_NODE, type EncodedLabelHash, type EnsRainbowClientLabelSet, type EnsRainbowServerLabelSet, type ErrorResponse, type ForwardResolutionArgs, ForwardResolutionProtocolStep, type ForwardResolutionResult, type Identity, type IndexingStatusRequest, type IndexingStatusResponse, type IndexingStatusResponseCode, IndexingStatusResponseCodes, type IndexingStatusResponseError, type IndexingStatusResponseOk, type InterpretedLabel, type InterpretedName, LINEANAMES_NODE, type Label, type LabelHash, type LabelSetId, type LabelSetVersion, type LiteralLabel, type LiteralName, LruCache, type MultichainPrimaryNameResolutionArgs, type MultichainPrimaryNameResolutionResult, type NFTMintStatus, NFTMintStatuses, type NFTTransferEventMetadata, type NFTTransferType, NFTTransferTypes, type Name, type NamedIdentity, type NamedRegistrarAction, type Node, type NormalizedName, type OmnichainIndexingStatusId, OmnichainIndexingStatusIds, type OmnichainIndexingStatusSnapshot, type OmnichainIndexingStatusSnapshotBackfill, type OmnichainIndexingStatusSnapshotCompleted, type OmnichainIndexingStatusSnapshotFollowing, type OmnichainIndexingStatusSnapshotUnstarted, PROTOCOL_ATTRIBUTE_PREFIX, PluginName, type Price, type PriceDai, type PriceEth, type PriceUsdc, type ProtocolSpan, type ProtocolSpanTreeNode, type ProtocolTrace, RECORDS_PER_PAGE_DEFAULT, RECORDS_PER_PAGE_MAX, ROOT_NODE, type RealtimeIndexingStatusProjection, type ReferrerDetailRequest, type ReferrerDetailResponse, type ReferrerDetailResponseCode, ReferrerDetailResponseCodes, type ReferrerDetailResponseError, type ReferrerDetailResponseOk, type ReferrerLeaderboardPageRequest, type ReferrerLeaderboardPageResponse, type ReferrerLeaderboardPageResponseCode, ReferrerLeaderboardPageResponseCodes, type ReferrerLeaderboardPageResponseError, type ReferrerLeaderboardPageResponseOk, type RegistrarAction, type RegistrarActionEventId, type RegistrarActionPricing, type RegistrarActionPricingAvailable, type RegistrarActionPricingUnknown, type RegistrarActionReferral, type RegistrarActionReferralAvailable, type RegistrarActionReferralNotApplicable, type RegistrarActionType, RegistrarActionTypes, type RegistrarActionsFilter, type RegistrarActionsFilterBySubregistryNode, type RegistrarActionsFilterType, RegistrarActionsFilterTypes, type RegistrarActionsFilterWithEncodedReferral, type RegistrarActionsOrder, RegistrarActionsOrders, type RegistrarActionsRequest, type RegistrarActionsResponse, type RegistrarActionsResponseCode, RegistrarActionsResponseCodes, type RegistrarActionsResponseError, type RegistrarActionsResponseOk, type RegistrationLifecycle, type RegistrationLifecycleStage, type RequestPageParams, type ResolutionStatusId, ResolutionStatusIds, type ResolvePrimaryNameRequest, type ResolvePrimaryNameResponse, type ResolvePrimaryNamesRequest, type ResolvePrimaryNamesResponse, type ResolveRecordsRequest, type ResolveRecordsResponse, type ResolvedIdentity, type ResolverRecordsResponse, type ResolverRecordsResponseBase, type ResolverRecordsSelection, type ResponsePageContext, type ResponsePageContextWithNoRecords, type ResponsePageContextWithRecords, type ReverseResolutionArgs, ReverseResolutionProtocolStep, type ReverseResolutionResult, type RpcUrl, SWRCache, type SWRCacheOptions, type SerializedAccountId, type SerializedAssetId, type SerializedChainIndexingStatusSnapshot, type SerializedChainIndexingStatusSnapshotBackfill, type SerializedChainIndexingStatusSnapshotCompleted, type SerializedChainIndexingStatusSnapshotFollowing, type SerializedChainIndexingStatusSnapshotQueued, type SerializedConfigResponse, type SerializedCrossChainIndexingStatusSnapshot, type SerializedCrossChainIndexingStatusSnapshotOmnichain, type SerializedCurrencyAmount, type SerializedCurrentIndexingProjectionOmnichain, type SerializedENSApiPublicConfig, type SerializedENSIndexerPublicConfig, type SerializedENSIndexerVersionInfo, type SerializedIndexedChainIds, type SerializedIndexingStatusResponse, type SerializedIndexingStatusResponseError, type SerializedIndexingStatusResponseOk, type SerializedNamedRegistrarAction, type SerializedOmnichainIndexingStatusSnapshot, type SerializedOmnichainIndexingStatusSnapshotBackfill, type SerializedOmnichainIndexingStatusSnapshotCompleted, type SerializedOmnichainIndexingStatusSnapshotFollowing, type SerializedOmnichainIndexingStatusSnapshotUnstarted, type SerializedPrice, type SerializedPriceDai, type SerializedPriceEth, type SerializedPriceUsdc, type SerializedRealtimeIndexingStatusProjection, type SerializedReferrerDetailResponse, type SerializedReferrerDetailResponseError, type SerializedReferrerDetailResponseOk, type SerializedReferrerLeaderboardPageResponse, type SerializedReferrerLeaderboardPageResponseError, type SerializedReferrerLeaderboardPageResponseOk, type SerializedRegistrarAction, type SerializedRegistrarActionPricing, type SerializedRegistrarActionPricingAvailable, type SerializedRegistrarActionPricingUnknown, type SerializedRegistrarActionsResponse, type SerializedRegistrarActionsResponseError, type SerializedRegistrarActionsResponseOk, type SerializedRegistrationLifecycle, type SerializedSubregistry, type SubgraphInterpretedLabel, type SubgraphInterpretedName, type Subregistry, type TheGraphCannotFallbackReason, TheGraphCannotFallbackReasonSchema, type TheGraphFallback, TheGraphFallbackSchema, type TokenId, TraceableENSProtocol, type TraceableRequest, type TraceableResponse, TtlCache, type UnixTimestamp, type UnknownIdentity, type UnnamedIdentity, type UnresolvedIdentity, type UrlString, accountIdEqual, addDuration, addPrices, addrReverseLabel, asLowerCaseAddress, beautifyName, bigIntToNumber, bigintToCoinType, buildAssetId, buildEnsRainbowClientLabelSet, buildLabelSetId, buildLabelSetVersion, buildUnresolvedIdentity, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotBackfill, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotCompleted, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotFollowing, checkChainIndexingStatusSnapshotsForOmnichainStatusSnapshotUnstarted, coinTypeReverseLabel, coinTypeToEvmChainId, createIndexingConfig, createRealtimeIndexingStatusProjection, decodeDNSEncodedLiteralName, decodeDNSEncodedName, deserializeAccountId, deserializeBlockNumber, deserializeBlockRef, deserializeBlockrange, deserializeChainId, deserializeChainIndexingStatusSnapshot, deserializeConfigResponse, deserializeCrossChainIndexingStatusSnapshot, deserializeDatetime, deserializeDuration, deserializeENSApiPublicConfig, deserializeENSIndexerPublicConfig, deserializeErrorResponse, deserializeIndexingStatusResponse, deserializeOmnichainIndexingStatusSnapshot, deserializeRealtimeIndexingStatusProjection, deserializeReferrerDetailResponse, deserializeReferrerLeaderboardPageResponse, deserializeRegistrarActionsResponse, deserializeUnixTimestamp, deserializeUrl, durationBetween, encodeLabelHash, evmChainIdToCoinType, formatNFTTransferEventMetadata, getCurrencyInfo, getEthnamesSubregistryId, getLatestIndexedBlockRef, getNFTTransferType, getNameHierarchy, getOmnichainIndexingCursor, getOmnichainIndexingStatus, getResolvePrimaryNameChainIdParam, getTimestampForHighestOmnichainKnownBlock, getTimestampForLowestOmnichainStartBlock, hasNullByte, interpretedLabelsToInterpretedName, isEncodedLabelHash, isHttpProtocol, isLabelHash, isNormalizedLabel, isNormalizedName, isPriceCurrencyEqual, isPriceEqual, isRegistrarActionPricingAvailable, isRegistrarActionReferralAvailable, isResolvedIdentity, isSelectionEmpty, isSubgraphCompatible, isWebSocketProtocol, labelHashToBytes, labelhashLiteralLabel, literalLabelToInterpretedLabel, literalLabelsToInterpretedName, literalLabelsToLiteralName, makeENSApiPublicConfigSchema, makeSubdomainNode, parseNonNegativeInteger, parseReverseName, priceDai, priceEth, priceUsdc, registrarActionsFilter, registrarActionsPrerequisites, reverseName, serializeAccountId, serializeAssetId, serializeChainId, serializeChainIndexingSnapshots, serializeConfigResponse, serializeCrossChainIndexingStatusSnapshotOmnichain, serializeDatetime, serializeENSApiPublicConfig, serializeENSIndexerPublicConfig, serializeIndexedChainIds, serializeIndexingStatusResponse, serializeNamedRegistrarAction, serializeOmnichainIndexingStatusSnapshot, serializePrice, serializePriceEth, serializeRealtimeIndexingStatusProjection, serializeReferrerDetailResponse, serializeReferrerLeaderboardPageResponse, serializeRegistrarAction, serializeRegistrarActionPricing, serializeRegistrarActionsResponse, serializeRegistrationLifecycle, serializeSubregistry, serializeUrl, sortChainStatusesByStartBlockAsc, stripNullBytes, translateDefaultableChainIdToChainId, uint256ToHex32, uniq, validateSupportedLabelSetAndVersion };
|