diff --git a/.changeset/humble-mice-listen.md b/.changeset/humble-mice-listen.md new file mode 100644 index 0000000000..468e96461a --- /dev/null +++ b/.changeset/humble-mice-listen.md @@ -0,0 +1,5 @@ +--- +"enskit": minor +--- + +Introduce the enskit/react submodule export for React components and (in the future) hooks. diff --git a/AGENTS.md b/AGENTS.md index 26a094ee18..674d9db830 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -39,10 +39,11 @@ Runnable commands for validating changes; lint and format with Biome. - Install dependencies: `pnpm install` - Run all tests: `pnpm test` -- Run tests for a single package/app: `pnpm --filter test` (e.g. `pnpm --filter ensapi test`) + - Run tests for a single project: `pnpm test --project ` (e.g. `pnpm test --project ensapi`) + - Run tests for a single file: `pnpm test ` - Lint and format: `pnpm lint` (fixes where applicable); CI lint: `pnpm lint:ci` - Type checking: `pnpm typecheck` (runs typecheck in all workspaces) - - Always prefer `pnpm -F typecheck` over `tsc` + - Always use `pnpm -F typecheck`, never call `tsc` or `tsgo` directly ## Testing @@ -76,7 +77,7 @@ Fail fast and loudly on invalid inputs. ## Workflow - Add a changeset when your PR includes a logical change that should bump versions or be communicated in release notes: https://ensnode.io/docs/contributing/prs#changesets -- Before declaring work complete, run validation in the affected packages: - 1. `pnpm -F typecheck` +- Before declaring work complete, run validation in the affected project(s): + 1. `pnpm -F typecheck` 2. `pnpm lint` - 3. `pnpm -F test` + 3. `pnpm test --project [--project ]` diff --git a/apps/ensadmin/src/app/mock/display-identity/page.tsx b/apps/ensadmin/src/app/mock/display-identity/page.tsx index 5ebe54dda0..fe9ffe0682 100644 --- a/apps/ensadmin/src/app/mock/display-identity/page.tsx +++ b/apps/ensadmin/src/app/mock/display-identity/page.tsx @@ -6,7 +6,7 @@ import { getEnsManagerAddressDetailsUrl, } from "@namehash/namehash-ui"; import type { Address, ChainId, DefaultableChainId, Name } from "enssdk"; -import { asLowerCaseAddress, DEFAULT_EVM_CHAIN_ID } from "enssdk"; +import { DEFAULT_EVM_CHAIN_ID, toNormalizedAddress } from "enssdk"; import { useState } from "react"; import { isAddress } from "viem"; @@ -76,7 +76,7 @@ export default function MockDisplayIdentityPage() { } // at a data-model level, we always represent addresses fully in lowercase. - selectedAddress = asLowerCaseAddress(selectedAddress); + selectedAddress = toNormalizedAddress(selectedAddress); // fallback to selecting the default name if // selectedRawName is an empty string diff --git a/apps/ensadmin/src/app/mock/registrar-actions/mocks.ts b/apps/ensadmin/src/app/mock/registrar-actions/mocks.ts index c7e40fa2cc..41a7e4fe6f 100644 --- a/apps/ensadmin/src/app/mock/registrar-actions/mocks.ts +++ b/apps/ensadmin/src/app/mock/registrar-actions/mocks.ts @@ -1,6 +1,7 @@ +import type { Duration } from "enssdk"; import { asInterpretedName } from "enssdk"; -import { type Duration, type NamedRegistrarAction } from "@ensnode/ensnode-sdk"; +import { type NamedRegistrarAction } from "@ensnode/ensnode-sdk"; export const registrationWithReferral = { action: { diff --git a/apps/ensadmin/src/components/indexing-status/backfill-status.tsx b/apps/ensadmin/src/components/indexing-status/backfill-status.tsx index a4f5ff77ae..a5a6bf0dbe 100644 --- a/apps/ensadmin/src/components/indexing-status/backfill-status.tsx +++ b/apps/ensadmin/src/components/indexing-status/backfill-status.tsx @@ -4,6 +4,7 @@ */ import { AbsoluteTime } from "@namehash/namehash-ui"; +import type { UnixTimestamp } from "enssdk"; import { Clock } from "lucide-react"; import { @@ -12,7 +13,6 @@ import { getTimestampForLowestOmnichainStartBlock, type RealtimeIndexingStatusProjection, sortChainStatusesByStartBlockAsc, - type UnixTimestamp, } from "@ensnode/ensnode-sdk"; import { diff --git a/apps/ensadmin/src/components/indexing-status/projection-info.tsx b/apps/ensadmin/src/components/indexing-status/projection-info.tsx index 9c18b1b375..519fd2277b 100644 --- a/apps/ensadmin/src/components/indexing-status/projection-info.tsx +++ b/apps/ensadmin/src/components/indexing-status/projection-info.tsx @@ -1,11 +1,9 @@ "use client"; import { formatRelativeTime, RelativeTime, useNow } from "@namehash/namehash-ui"; -import type { UnixTimestamp } from "enssdk"; +import type { Duration, UnixTimestamp } from "enssdk"; import { InfoIcon } from "lucide-react"; -import type { Duration } from "@ensnode/ensnode-sdk"; - import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; /** diff --git a/apps/ensadmin/src/components/indexing-status/use-indexing-status-with-swr.ts b/apps/ensadmin/src/components/indexing-status/use-indexing-status-with-swr.ts index ba9d80cc28..0ae81e9423 100644 --- a/apps/ensadmin/src/components/indexing-status/use-indexing-status-with-swr.ts +++ b/apps/ensadmin/src/components/indexing-status/use-indexing-status-with-swr.ts @@ -2,6 +2,7 @@ import { useNow } from "@namehash/namehash-ui"; import { secondsToMilliseconds } from "date-fns"; +import type { Duration } from "enssdk"; import { useCallback, useMemo } from "react"; import { @@ -15,7 +16,6 @@ import { import { CrossChainIndexingStatusSnapshotOmnichain, createRealtimeIndexingStatusProjection, - Duration, type IndexingStatusRequest, IndexingStatusResponseCodes, IndexingStatusResponseOk, diff --git a/apps/ensapi/package.json b/apps/ensapi/package.json index 154e6024a1..60f54ace8c 100644 --- a/apps/ensapi/package.json +++ b/apps/ensapi/package.json @@ -67,7 +67,6 @@ "@ensnode/shared-configs": "workspace:*", "@types/node": "catalog:", "@types/prismjs": "^1.26.6", - "@urql/introspection": "^1.2.1", "chalk": "^5.6.2", "graphql-request": "^7.4.0", "pino-pretty": "^13.1.2", diff --git a/apps/ensapi/src/handlers/api/explore/name-tokens-api.ts b/apps/ensapi/src/handlers/api/explore/name-tokens-api.ts index 490c41c5af..7e5a733771 100644 --- a/apps/ensapi/src/handlers/api/explore/name-tokens-api.ts +++ b/apps/ensapi/src/handlers/api/explore/name-tokens-api.ts @@ -2,8 +2,7 @@ import config from "@/config"; import { asInterpretedName, - ENS_ROOT, - getParentNameFQDN, + getParentInterpretedName, type Node, namehashInterpretedName, } from "enssdk"; @@ -70,9 +69,10 @@ app.openapi(getNameTokensRoute, async (c) => { if (request.name !== undefined) { const name = asInterpretedName(request.name); + const parentName = getParentInterpretedName(name); - // return 404 when the requested name was the ENS Root - if (name === ENS_ROOT) { + // return 404 when the requested name was the ENS Root (which does not have a parent) + if (parentName === null) { return c.json( serializeNameTokensResponse( makeNameTokensNotIndexedResponse( @@ -83,7 +83,7 @@ app.openapi(getNameTokensRoute, async (c) => { ); } - const parentNode = namehashInterpretedName(getParentNameFQDN(name)); + const parentNode = namehashInterpretedName(parentName); const subregistry = indexedSubregistries.find((s) => s.node === parentNode); // Return 404 response with error code for Name Tokens Not Indexed when diff --git a/apps/ensapi/src/handlers/api/explore/registrar-actions-api.routes.ts b/apps/ensapi/src/handlers/api/explore/registrar-actions-api.routes.ts index b9f70c9835..6c42f2823f 100644 --- a/apps/ensapi/src/handlers/api/explore/registrar-actions-api.routes.ts +++ b/apps/ensapi/src/handlers/api/explore/registrar-actions-api.routes.ts @@ -6,8 +6,8 @@ import { RegistrarActionsOrders, } from "@ensnode/ensnode-sdk"; import { - makeLowercaseAddressSchema, makeNodeSchema, + makeNormalizedAddressSchema, makePositiveIntegerSchema, makeUnixTimestampSchema, } from "@ensnode/ensnode-sdk/internal"; @@ -51,7 +51,7 @@ export const registrarActionsQuerySchema = z .describe("Filter to only include actions with referrals") .openapi({ default: false }), - decodedReferrer: makeLowercaseAddressSchema("decodedReferrer") + decodedReferrer: makeNormalizedAddressSchema("decodedReferrer") .optional() .describe("Filter by decoded referrer address"), diff --git a/apps/ensapi/src/handlers/api/meta/realtime-api.routes.ts b/apps/ensapi/src/handlers/api/meta/realtime-api.routes.ts index 56fd2f5419..91fc7f3cff 100644 --- a/apps/ensapi/src/handlers/api/meta/realtime-api.routes.ts +++ b/apps/ensapi/src/handlers/api/meta/realtime-api.routes.ts @@ -1,7 +1,7 @@ import { createRoute, z } from "@hono/zod-openapi"; import { minutesToSeconds } from "date-fns"; +import type { Duration } from "enssdk"; -import type { Duration } from "@ensnode/ensnode-sdk"; import { makeDurationSchema } from "@ensnode/ensnode-sdk/internal"; import { params } from "@/lib/handlers/params.schema"; diff --git a/apps/ensapi/src/handlers/api/meta/realtime-api.test.ts b/apps/ensapi/src/handlers/api/meta/realtime-api.test.ts index e59bd6458d..afb303c427 100644 --- a/apps/ensapi/src/handlers/api/meta/realtime-api.test.ts +++ b/apps/ensapi/src/handlers/api/meta/realtime-api.test.ts @@ -1,9 +1,9 @@ +import type { UnixTimestamp } from "enssdk"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { type CrossChainIndexingStatusSnapshot, createRealtimeIndexingStatusProjection, - type UnixTimestamp, } from "@ensnode/ensnode-sdk"; import { createApp } from "@/lib/hono-factory"; diff --git a/apps/ensapi/src/handlers/api/resolution/resolution-api.ts b/apps/ensapi/src/handlers/api/resolution/resolution-api.ts index 9aabc9bd81..edfce56114 100644 --- a/apps/ensapi/src/handlers/api/resolution/resolution-api.ts +++ b/apps/ensapi/src/handlers/api/resolution/resolution-api.ts @@ -1,5 +1,6 @@ +import type { Duration } from "enssdk"; + import type { - Duration, ResolvePrimaryNameResponse, ResolvePrimaryNamesResponse, ResolveRecordsResponse, diff --git a/apps/ensapi/src/handlers/ensanalytics/ensanalytics-api-v1.routes.ts b/apps/ensapi/src/handlers/ensanalytics/ensanalytics-api-v1.routes.ts index 003682e37b..e2932c8b8d 100644 --- a/apps/ensapi/src/handlers/ensanalytics/ensanalytics-api-v1.routes.ts +++ b/apps/ensapi/src/handlers/ensanalytics/ensanalytics-api-v1.routes.ts @@ -8,7 +8,7 @@ import { makeReferrerMetricsEditionsArraySchema, } from "@namehash/ens-referrals/v1/internal"; -import { makeLowercaseAddressSchema } from "@ensnode/ensnode-sdk/internal"; +import { makeNormalizedAddressSchema } from "@ensnode/ensnode-sdk/internal"; export const basePath = "/v1/ensanalytics"; @@ -39,7 +39,7 @@ const referrerLeaderboardPageQuerySchema = z.object({ // Referrer address parameter schema const referrerAddressSchema = z.object({ - referrer: makeLowercaseAddressSchema("Referrer address").describe("Referrer Ethereum address"), + referrer: makeNormalizedAddressSchema("Referrer address").describe("Referrer Ethereum address"), }); // Editions query parameter schema diff --git a/apps/ensapi/src/handlers/ensanalytics/ensanalytics-api.routes.ts b/apps/ensapi/src/handlers/ensanalytics/ensanalytics-api.routes.ts index cb14bac2b7..15503d1d6d 100644 --- a/apps/ensapi/src/handlers/ensanalytics/ensanalytics-api.routes.ts +++ b/apps/ensapi/src/handlers/ensanalytics/ensanalytics-api.routes.ts @@ -1,7 +1,7 @@ import { createRoute, z } from "@hono/zod-openapi"; import { REFERRERS_PER_LEADERBOARD_PAGE_MAX } from "@namehash/ens-referrals"; -import { makeLowercaseAddressSchema } from "@ensnode/ensnode-sdk/internal"; +import { makeNormalizedAddressSchema } from "@ensnode/ensnode-sdk/internal"; export const basePath = "/ensanalytics"; @@ -28,7 +28,7 @@ const paginationQuerySchema = z.object({ // Referrer address parameter schema const referrerAddressSchema = z.object({ - referrer: makeLowercaseAddressSchema("Referrer address").describe("Referrer Ethereum address"), + referrer: makeNormalizedAddressSchema("Referrer address").describe("Referrer Ethereum address"), }); export const getReferrerLeaderboardRoute = createRoute({ diff --git a/apps/ensapi/src/handlers/subgraph/subgraph-api.ts b/apps/ensapi/src/handlers/subgraph/subgraph-api.ts index 2a83909601..b0b01929c1 100644 --- a/apps/ensapi/src/handlers/subgraph/subgraph-api.ts +++ b/apps/ensapi/src/handlers/subgraph/subgraph-api.ts @@ -1,5 +1,6 @@ import config from "@/config"; +import type { Duration } from "enssdk"; import { createDocumentationMiddleware } from "ponder-enrich-gql-docs-middleware"; // FIXME: use the import from: @@ -7,7 +8,7 @@ import { createDocumentationMiddleware } from "ponder-enrich-gql-docs-middleware // Once the lazy proxy implemented for `ensIndexerSchema` export is improved // to support Drizzle ORM in `ponder-subgraph` package. import * as ensIndexerSchema from "@ensnode/ensdb-sdk/ensindexer-abstract"; -import { type Duration, hasSubgraphApiConfigSupport } from "@ensnode/ensnode-sdk"; +import { hasSubgraphApiConfigSupport } from "@ensnode/ensnode-sdk"; import { subgraphGraphQLMiddleware } from "@ensnode/ponder-subgraph"; import { createApp } from "@/lib/hono-factory"; diff --git a/apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/closeout.ts b/apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/closeout.ts index 33226faf8a..5d8fe2ecef 100644 --- a/apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/closeout.ts +++ b/apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/closeout.ts @@ -1,8 +1,8 @@ import type { ReferralProgramRules } from "@namehash/ens-referrals/v1"; import { minutesToSeconds } from "date-fns"; -import type { UnixTimestamp } from "enssdk"; +import type { Duration, UnixTimestamp } from "enssdk"; -import { addDuration, type Duration } from "@ensnode/ensnode-sdk"; +import { addDuration } from "@ensnode/ensnode-sdk"; /** * Duration after which we assume a closed edition is safe from chain reorganizations. diff --git a/apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/database-v1.ts b/apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/database-v1.ts index b78e803c5c..863d143220 100644 --- a/apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/database-v1.ts +++ b/apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/database-v1.ts @@ -5,7 +5,7 @@ import { type ReferrerMetrics, } from "@namehash/ens-referrals/v1"; import { and, asc, count, desc, eq, gte, isNotNull, lte, ne, sql, sum } from "drizzle-orm"; -import { type Address, stringifyAccountId } from "enssdk"; +import { type NormalizedAddress, stringifyAccountId } from "enssdk"; import { zeroAddress } from "viem"; import { deserializeDuration, priceEth } from "@ensnode/ensnode-sdk"; @@ -77,7 +77,7 @@ export const getReferrerMetrics = async ( // 2. `totalIncrementalDuration` is guaranteed to be non-null as it is the sum of non-null bigint values // 3. `totalRevenueContribution` is guaranteed to be non-null due to COALESCE with 0 interface NonNullRecord { - referrer: Address; + referrer: NormalizedAddress; totalReferrals: number; totalIncrementalDuration: string; totalRevenueContribution: string; @@ -144,7 +144,7 @@ export const getReferralEvents = async (rules: ReferralProgramRules): Promise { return withActiveSpanAsync( tracer, @@ -147,7 +145,8 @@ async function findResolverWithUniversalResolver( } // UniversalResolver returns the offset in bytes within the DNS Encoded Name where the activeName begins - const activeName: Name = bytesToPacket(dnsEncodedNameBytes.slice(offset)); + // Invariant: the decoded name is a LiteralName that must conform to InterpretedName + const activeName = asInterpretedName(bytesToPacket(dnsEncodedNameBytes.slice(offset))); return { activeName, @@ -175,7 +174,7 @@ async function findResolverWithUniversalResolver( */ async function findResolverWithIndex( registry: AccountId, - name: NormalizedName, + name: InterpretedName, ): Promise { return withActiveSpanAsync( tracer, @@ -194,7 +193,7 @@ async function findResolverWithIndex( // 2. compute domainId of each node // NOTE: this is currently ENSv1-specific - const nodes = names.map((name) => namehashInterpretedName(asInterpretedName(name)) as Node); + const nodes = names.map((name) => namehashInterpretedName(name)); const domainIds = nodes as DomainId[]; // 3. for each domain, find its associated resolver in the selected registry diff --git a/apps/ensapi/src/lib/protocol-acceleration/get-primary-name-from-index.ts b/apps/ensapi/src/lib/protocol-acceleration/get-primary-name-from-index.ts index 98abb92506..c35ea44ddd 100644 --- a/apps/ensapi/src/lib/protocol-acceleration/get-primary-name-from-index.ts +++ b/apps/ensapi/src/lib/protocol-acceleration/get-primary-name-from-index.ts @@ -1,10 +1,10 @@ import { trace } from "@opentelemetry/api"; import { - type Address, type CoinType, coinTypeReverseLabel, DEFAULT_EVM_COIN_TYPE, type Name, + type NormalizedAddress, } from "enssdk"; import { ensDb } from "@/lib/ensdb/singleton"; @@ -15,7 +15,7 @@ const tracer = trace.getTracer("get-primary-name"); const DEFAULT_EVM_COIN_TYPE_BIGINT = BigInt(DEFAULT_EVM_COIN_TYPE); export async function getENSIP19ReverseNameRecordFromIndex( - address: Address, + address: NormalizedAddress, coinType: CoinType, ): Promise { const _coinType = BigInt(coinType); diff --git a/apps/ensapi/src/lib/resolution/forward-resolution.ts b/apps/ensapi/src/lib/resolution/forward-resolution.ts index ccd2dec8b1..b8b86db748 100644 --- a/apps/ensapi/src/lib/resolution/forward-resolution.ts +++ b/apps/ensapi/src/lib/resolution/forward-resolution.ts @@ -5,10 +5,10 @@ import { replaceBigInts } from "@ponder/utils"; import { type AccountId, asInterpretedName, + type InterpretedName, isNormalizedName, type Node, namehashInterpretedName, - normalizeName, parseReverseName, } from "enssdk"; @@ -57,10 +57,6 @@ import { const logger = makeLogger("forward-resolution"); const tracer = trace.getTracer("forward-resolution"); -// NOTE: normalize generic name to force the normalization lib to lazy-load itself (otherwise the -// first trace generated here would be unusually slow) -normalizeName("example.eth"); - /** * Implements Forward Resolution of record values for a specified ENS Name. * @@ -95,9 +91,12 @@ export async function resolveForward selection: ForwardResolutionArgs["selection"], options: Omit[2], "registry">, ): Promise> { + // Invariant: Name must be an InterpretedName + const interpretedName = asInterpretedName(name); + // NOTE: `resolveForward` is just `_resolveForward` with the enforcement that `registry` must - // initially be ENS Root Chain's Registry: see `_resolveForward` for additional context. - return _resolveForward(name, selection, { + // initially be ENS Root Registry: see `_resolveForward` for additional context. + return _resolveForward(interpretedName, selection, { ...options, registry: getENSv1Registry(config.namespace), }); @@ -108,7 +107,7 @@ export async function resolveForward * `registry`. */ async function _resolveForward( - name: ForwardResolutionArgs["name"], + name: InterpretedName, selection: ForwardResolutionArgs["selection"], options: { registry: AccountId; accelerate: boolean; canAccelerate: boolean }, ): Promise> { @@ -141,18 +140,19 @@ async function _resolveForward( // Validate Input ////////////////////////////////////////////////// - // Invariant: Name must be normalized + // TODO: technically InterpretedNames are not resolvable, since ENS contracts are not + // encoded-labelhash-aware; so we add a temporary additional constraint on name that it + // must be fully normalized (and therefore not contain encoded labelhash segments) + // (this will be improved in a future pr https://github.com/namehash/ensnode/issues/1920) if (!isNormalizedName(name)) { - throw new Error(`Invariant: Name "${name}" must be normalized.`); + throw new Error(`'${name}' must be normalized to be resolvable.`); } - const node: Node = namehashInterpretedName(asInterpretedName(name)); + const node: Node = namehashInterpretedName(name); span.setAttribute("node", node); // if selection is empty, give them what they asked for - if (isSelectionEmpty(selection)) { - return makeEmptyResolverRecordsResponse(selection); - } + if (isSelectionEmpty(selection)) return makeEmptyResolverRecordsResponse(selection); // construct the set of resolve() calls indicated by selection const calls = makeResolveCalls(node, selection); @@ -224,9 +224,7 @@ async function _resolveForward( !!activeResolver, ); // we're unable to find an active resolver for this name, return empty response - if (!activeResolver) { - return makeEmptyResolverRecordsResponse(selection); - } + if (!activeResolver) return makeEmptyResolverRecordsResponse(selection); // set some attributes on the span for easy reference span.setAttribute("activeResolver", activeResolver); diff --git a/apps/ensapi/src/lib/resolution/packetToBytes.test.ts b/apps/ensapi/src/lib/resolution/packetToBytes.test.ts new file mode 100644 index 0000000000..d30b0186fb --- /dev/null +++ b/apps/ensapi/src/lib/resolution/packetToBytes.test.ts @@ -0,0 +1,42 @@ +import { + asInterpretedLabel, + asInterpretedName, + asLiteralLabel, + encodeLabelHash, + interpretedLabelsToInterpretedName, + labelhashLiteralLabel, +} from "enssdk"; +import { bytesToHex, stringToHex } from "viem"; +import { packetToBytes } from "viem/ens"; +import { describe, expect, it } from "vitest"; + +const TEST_LABEL = asLiteralLabel("test"); +const ENCODED_LABEL_HASH = asInterpretedLabel(encodeLabelHash(labelhashLiteralLabel(TEST_LABEL))); + +describe("packetToBytes", () => { + it("correctly DNS-encodes an InterpretedName containing an encoded labelhash label", () => { + const name = asInterpretedName( + interpretedLabelsToInterpretedName([ENCODED_LABEL_HASH, asInterpretedLabel("eth")]), + ); + const expectedLabelHex = stringToHex(ENCODED_LABEL_HASH).slice(2); + + // The encoded labelhash label (e.g. "[9c22ff...b658]") is 66 characters and should + // be DNS-encoded as a single label: length prefix 0x42 (66) followed by its UTF-8 bytes, + // followed by the 'eth' label with length (03 65 74 68) and null terminator (00) + const result = bytesToHex(packetToBytes(name)); + expect(result).toEqual(`0x42${expectedLabelHex}0365746800`); + }); + + it("encodes an encoded labelhash label differently from the plaintext label", () => { + const fromPlaintext = bytesToHex(packetToBytes(`${TEST_LABEL}.eth`)); + const fromEncodedLabelHash = bytesToHex(packetToBytes(`${ENCODED_LABEL_HASH}.eth`)); + + // The plaintext "test" label is 4 bytes (length prefix 0x04), while the encoded + // labelhash "[9c22ff...b658]" is 66 bytes (length prefix 0x42). These produce + // different DNS encodings because the resolver uses the labelhash to look up + // records when the original label is unknown. + expect(fromPlaintext).toMatch(/^0x04/); + expect(fromEncodedLabelHash).toMatch(/^0x42/); + expect(fromEncodedLabelHash).not.toEqual(fromPlaintext); + }); +}); diff --git a/apps/ensapi/src/lib/resolution/resolve-calls-and-results.ts b/apps/ensapi/src/lib/resolution/resolve-calls-and-results.ts index f9c57c6a95..34ecba37f9 100644 --- a/apps/ensapi/src/lib/resolution/resolve-calls-and-results.ts +++ b/apps/ensapi/src/lib/resolution/resolve-calls-and-results.ts @@ -1,5 +1,5 @@ import { trace } from "@opentelemetry/api"; -import type { Address, Name, Node } from "enssdk"; +import { type Address, asLiteralName, type Name, type Node } from "enssdk"; import { ContractFunctionExecutionError, decodeAbiParameters, @@ -96,9 +96,7 @@ export function makeResolveCalls( /** * Execute a set of ResolveCalls against the provided `resolverAddress`. * - * NOTE: viem#readContract implements CCIP-Read, so we get that behavior for free - * NOTE: viem#multicall _doesn't_ implement CCIP-Read so maybe this can be optimized further - * + * @dev viem#readContract implements CCIP-Read, so we get that behavior for free * TODO: CCIP-Read Gateways can fail, should likely implement retries? */ export async function executeResolveCalls({ @@ -194,14 +192,15 @@ export async function executeResolveCalls ({ + default: { + namespace: ENSNamespaceIds.EnsTestEnv, + rpcConfigs: new Map([[ensTestEnvChain.id, { httpRPCs: [new URL("http://localhost:8545")] }]]), + }, +})); + +import { + asInterpretedLabel, + asInterpretedName, + asLiteralLabel, + encodeLabelHash, + interpretedLabelsToInterpretedName, + labelhashLiteralLabel, + namehashInterpretedName, +} from "enssdk"; +import { describe, expect, it } from "vitest"; + +import { getPublicClient } from "@/lib/public-client"; +import { makeResolveCalls } from "@/lib/resolution/resolve-calls-and-results"; + +import { executeResolveCallsWithUniversalResolver } from "./resolve-with-universal-resolver"; + +const NAME = asInterpretedName("example.eth"); +const NAME_WITH_ENCODED_LABELHASHES = interpretedLabelsToInterpretedName([ + asInterpretedLabel(encodeLabelHash(labelhashLiteralLabel(asLiteralLabel("example")))), + asInterpretedLabel("eth"), +]); + +const EXPECTED_DESCRIPTION = "example.eth"; + +const publicClient = getPublicClient(ensTestEnvChain.id); + +describe("executeResolveCallsWithUniversalResolver", () => { + it("should resolve interpreted name without encoded labelhashes", async () => { + await expect( + executeResolveCallsWithUniversalResolver({ + name: NAME, + calls: makeResolveCalls(namehashInterpretedName(NAME), { texts: ["description"] }), + publicClient, + }), + ).resolves.toMatchObject([{ result: EXPECTED_DESCRIPTION }]); + }); + + /** + * NOTE(shrugs): This was contrary to my expectations, but the NameCoder (in both ENSv1 and ENSv2) + * is NOT EncodedLabelHash-aware: all label segments are hashed indiscriminately as LiteralLabels + * to traverse the nametree, meaning that InterpretedNames (which may include EncodedLabelHash + * segments for labels that are unknown, too long, or unnormalized) are explicitly unresolvable! + * + * Or, more technically, they resolve to an incorrect name, one addressed by, for example: + * [root, labelhash("eth"), labelhash("[6fd43e7cffc31bb581d7421c8698e29aa2bd8e7186a394b85299908b4eb9b175]")] + * + * Which likely doesn't have the appropriate records set. + */ + it("should NOT resolve interpreted name with encoded labelhashes", async () => { + await expect( + executeResolveCallsWithUniversalResolver({ + name: NAME_WITH_ENCODED_LABELHASHES, + calls: makeResolveCalls(namehashInterpretedName(NAME_WITH_ENCODED_LABELHASHES), { + texts: ["description"], + }), + publicClient, + }), + ).resolves.toMatchObject([{ result: null }]); + }); +}); diff --git a/apps/ensapi/src/lib/resolution/resolve-with-universal-resolver.ts b/apps/ensapi/src/lib/resolution/resolve-with-universal-resolver.ts index 515c6102eb..0965ce984f 100644 --- a/apps/ensapi/src/lib/resolution/resolve-with-universal-resolver.ts +++ b/apps/ensapi/src/lib/resolution/resolve-with-universal-resolver.ts @@ -1,6 +1,6 @@ import config from "@/config"; -import type { Name } from "enssdk"; +import type { InterpretedName } from "enssdk"; import { bytesToHex, ContractFunctionExecutionError, @@ -19,15 +19,13 @@ import { type ResolverRecordsSelection, } from "@ensnode/ensnode-sdk"; -import { lazy, lazyProxy } from "@/lib/lazy"; +import { lazy } from "@/lib/lazy"; import type { ResolveCalls, ResolveCallsAndRawResults, } from "@/lib/resolution/resolve-calls-and-results"; -// lazyProxy defers construction until first use so that this module can be -// imported without env vars being present (e.g. during OpenAPI generation). -const universalResolver = lazyProxy(() => +const getUniversalResolverV1 = lazy(() => getDatasourceContract(config.namespace, DatasourceNames.ENSRoot, "UniversalResolver"), ); @@ -45,7 +43,7 @@ export async function executeResolveCallsWithUniversalResolver< calls, publicClient, }: { - name: Name; + name: InterpretedName; calls: ResolveCalls; publicClient: PublicClient; }): Promise> { @@ -60,7 +58,7 @@ export async function executeResolveCallsWithUniversalResolver< abi: UniversalResolverABI, // NOTE(ensv2-transition): if UniversalResolverV2 is defined, prefer it over UniversalResolver // TODO(ensv2-transition): confirm this is correct - address: getUniversalResolverV2()?.address ?? universalResolver.address, + address: getUniversalResolverV2()?.address ?? getUniversalResolverV1().address, functionName: "resolve", args: [encodedName, encodedMethod], }); diff --git a/apps/ensapi/src/lib/resolution/reverse-resolution.ts b/apps/ensapi/src/lib/resolution/reverse-resolution.ts index b9cc05b8a2..677d16188f 100644 --- a/apps/ensapi/src/lib/resolution/reverse-resolution.ts +++ b/apps/ensapi/src/lib/resolution/reverse-resolution.ts @@ -126,7 +126,7 @@ export async function resolveReverse( span.setAttribute("resolvedAddress", resolvedAddress); // Step 8.2 — if the resolvedAddress is not an EVM address, no Primary Name - const resolvedAddressIsEVMAddress = isAddress(resolvedAddress); + const resolvedAddressIsEVMAddress = isAddress(resolvedAddress, { strict: false }); if (!resolvedAddressIsEVMAddress) { addProtocolStepEvent( protocolTracingSpan, diff --git a/apps/ensapi/src/middleware/is-realtime.middleware.ts b/apps/ensapi/src/middleware/is-realtime.middleware.ts index 7490799db7..272e971805 100644 --- a/apps/ensapi/src/middleware/is-realtime.middleware.ts +++ b/apps/ensapi/src/middleware/is-realtime.middleware.ts @@ -1,4 +1,4 @@ -import type { Duration } from "@ensnode/ensnode-sdk"; +import type { Duration } from "enssdk"; import { factory, producing } from "@/lib/hono-factory"; import { makeLogger } from "@/lib/logger"; diff --git a/apps/ensapi/src/omnigraph-api/builder.test.ts b/apps/ensapi/src/omnigraph-api/builder.test.ts new file mode 100644 index 0000000000..fe5f9cdc56 --- /dev/null +++ b/apps/ensapi/src/omnigraph-api/builder.test.ts @@ -0,0 +1,13 @@ +import type { OmnigraphScalars } from "enssdk/omnigraph"; +import { describe, expectTypeOf, it } from "vitest"; + +import type { BuilderScalars } from "./builder"; + +type BuilderScalarNames = Record; +type OmnigraphScalarNames = Record; + +describe("BuilderScalars", () => { + it("defines the same scalar names as OmnigraphScalars from enssdk", () => { + expectTypeOf().toEqualTypeOf(); + }); +}); diff --git a/apps/ensapi/src/omnigraph-api/builder.ts b/apps/ensapi/src/omnigraph-api/builder.ts index 16b1097d1a..9eebd9b443 100644 --- a/apps/ensapi/src/omnigraph-api/builder.ts +++ b/apps/ensapi/src/omnigraph-api/builder.ts @@ -13,6 +13,7 @@ import type { InterpretedLabel, InterpretedName, Node, + NormalizedAddress, PermissionsId, PermissionsResourceId, PermissionsUserId, @@ -55,28 +56,30 @@ const createSpan = createOpenTelemetryWrapper(tracer, { }, }); +export type BuilderScalars = { + ID: { Input: string; Output: string }; + BigInt: { Input: bigint; Output: bigint }; + Address: { Input: Address; Output: NormalizedAddress }; + Hex: { Input: Hex; Output: Hex }; + ChainId: { Input: ChainId; Output: ChainId }; + CoinType: { Input: CoinType; Output: CoinType }; + Node: { Input: Node; Output: Node }; + InterpretedName: { Input: InterpretedName; Output: InterpretedName }; + InterpretedLabel: { Input: InterpretedLabel; Output: InterpretedLabel }; + DomainId: { Input: DomainId; Output: DomainId }; + RegistryId: { Input: RegistryId; Output: RegistryId }; + ResolverId: { Input: ResolverId; Output: ResolverId }; + PermissionsId: { Input: PermissionsId; Output: PermissionsId }; + PermissionsResourceId: { Input: PermissionsResourceId; Output: PermissionsResourceId }; + PermissionsUserId: { Input: PermissionsUserId; Output: PermissionsUserId }; + RegistrationId: { Input: RegistrationId; Output: RegistrationId }; + RenewalId: { Input: RenewalId; Output: RenewalId }; + ResolverRecordsId: { Input: ResolverRecordsId; Output: ResolverRecordsId }; +}; + export const builder = new SchemaBuilder<{ Context: ReturnType; - Scalars: { - // make sure to keep these scalars up to date with packages/enssdk/src/omnigraph/graphql.ts ! - BigInt: { Input: bigint; Output: bigint }; - Address: { Input: Address; Output: Address }; - Hex: { Input: Hex; Output: Hex }; - ChainId: { Input: ChainId; Output: ChainId }; - CoinType: { Input: CoinType; Output: CoinType }; - Node: { Input: Node; Output: Node }; - InterpretedName: { Input: InterpretedName; Output: InterpretedName }; - InterpretedLabel: { Input: InterpretedLabel; Output: InterpretedLabel }; - DomainId: { Input: DomainId; Output: DomainId }; - RegistryId: { Input: RegistryId; Output: RegistryId }; - ResolverId: { Input: ResolverId; Output: ResolverId }; - PermissionsId: { Input: PermissionsId; Output: PermissionsId }; - PermissionsResourceId: { Input: PermissionsResourceId; Output: PermissionsResourceId }; - PermissionsUserId: { Input: PermissionsUserId; Output: PermissionsUserId }; - RegistrationId: { Input: RegistrationId; Output: RegistrationId }; - RenewalId: { Input: RenewalId; Output: RenewalId }; - ResolverRecordsId: { Input: ResolverRecordsId; Output: ResolverRecordsId }; - }; + Scalars: BuilderScalars; // the following ensures via typechecker that every t.connection returns a totalCount field Connection: { diff --git a/apps/ensapi/src/omnigraph-api/lib/find-domains/layers/base-domain-set.ts b/apps/ensapi/src/omnigraph-api/lib/find-domains/layers/base-domain-set.ts index ec3e2fdebd..b70ca89534 100644 --- a/apps/ensapi/src/omnigraph-api/lib/find-domains/layers/base-domain-set.ts +++ b/apps/ensapi/src/omnigraph-api/lib/find-domains/layers/base-domain-set.ts @@ -1,6 +1,6 @@ import { and, eq, sql } from "drizzle-orm"; import { alias, unionAll } from "drizzle-orm/pg-core"; -import type { Address, DomainId } from "enssdk"; +import type { DomainId, NormalizedAddress } from "enssdk"; import { ensDb, ensIndexerSchema } from "@/lib/ensdb/singleton"; @@ -30,7 +30,7 @@ export function domainsBase() { ensDb .select({ domainId: sql`${ensIndexerSchema.v1Domain.id}`.as("domainId"), - ownerId: sql
`${ensIndexerSchema.v1Domain.ownerId}`.as("ownerId"), + ownerId: sql`${ensIndexerSchema.v1Domain.ownerId}`.as("ownerId"), registryId: sql`NULL::text`.as("registryId"), parentId: sql`${ensIndexerSchema.v1Domain.parentId}`.as("parentId"), labelHash: sql`${ensIndexerSchema.v1Domain.labelHash}`.as("labelHash"), @@ -46,7 +46,7 @@ export function domainsBase() { ensDb .select({ domainId: sql`${ensIndexerSchema.v2Domain.id}`.as("domainId"), - ownerId: sql
`${ensIndexerSchema.v2Domain.ownerId}`.as("ownerId"), + ownerId: sql`${ensIndexerSchema.v2Domain.ownerId}`.as("ownerId"), registryId: sql`${ensIndexerSchema.v2Domain.registryId}`.as("registryId"), parentId: sql`${v2ParentDomain.id}`.as("parentId"), labelHash: sql`${ensIndexerSchema.v2Domain.labelHash}`.as("labelHash"), diff --git a/apps/ensapi/src/omnigraph-api/lib/find-domains/layers/filter-by-owner.ts b/apps/ensapi/src/omnigraph-api/lib/find-domains/layers/filter-by-owner.ts index 5c040ddfef..34476dfd27 100644 --- a/apps/ensapi/src/omnigraph-api/lib/find-domains/layers/filter-by-owner.ts +++ b/apps/ensapi/src/omnigraph-api/lib/find-domains/layers/filter-by-owner.ts @@ -1,5 +1,5 @@ import { eq } from "drizzle-orm"; -import type { Address } from "enssdk"; +import type { NormalizedAddress } from "enssdk"; import { ensDb } from "@/lib/ensdb/singleton"; @@ -8,7 +8,7 @@ import { type BaseDomainSet, selectBase } from "./base-domain-set"; /** * Filter a base domain set by owner address. */ -export function filterByOwner(base: BaseDomainSet, owner: Address) { +export function filterByOwner(base: BaseDomainSet, owner: NormalizedAddress) { return ensDb // .select(selectBase(base)) .from(base) diff --git a/apps/ensapi/src/omnigraph-api/lib/get-canonical-path.ts b/apps/ensapi/src/omnigraph-api/lib/get-canonical-path.ts index b3ba0a107e..1fc25c60f9 100644 --- a/apps/ensapi/src/omnigraph-api/lib/get-canonical-path.ts +++ b/apps/ensapi/src/omnigraph-api/lib/get-canonical-path.ts @@ -4,10 +4,10 @@ import { sql } from "drizzle-orm"; import { type CanonicalPath, type DomainId, + ENS_ROOT_NODE, type ENSv1DomainId, type ENSv2DomainId, type RegistryId, - ROOT_NODE, } from "enssdk"; import { maybeGetENSv2RootRegistryId } from "@ensnode/ensnode-sdk"; @@ -61,9 +61,9 @@ export async function getV1CanonicalPath(domainId: ENSv1DomainId): Promise { type AccountDomainsResult = { - account: { domains: GraphQLConnection<{ name: Name | null }> }; + account: { domains: GraphQLConnection<{ name: InterpretedName | null }> }; }; const AccountDomains = gql` @@ -101,9 +101,8 @@ describe("Account.events", () => { expect(events.length).toBeGreaterThan(0); - // all events should have from === deployer address (case-insensitive) for (const event of events) { - expect(event.from.toLowerCase()).toBe(DEVNET_DEPLOYER.toLowerCase()); + expect(event.from).toBe(DEVNET_DEPLOYER); } }); }); @@ -150,7 +149,7 @@ describe("Account.events filtering (AccountEventsWhereInput)", () => { expect(events.length).toBeGreaterThan(0); for (const event of events) { - expect(event.topics[0]?.toLowerCase()).toBe(targetSelector.toLowerCase()); + expect(event.topics[0]).toBe(targetSelector); } }); @@ -236,7 +235,7 @@ describe("Account.events filtering (AccountEventsWhereInput)", () => { expect(events.length).toBeGreaterThan(0); expect(events.length).toBeLessThanOrEqual(allEvents.length); for (const event of events) { - expect(event.topics[0]?.toLowerCase()).toBe(targetSelector.toLowerCase()); + expect(event.topics[0]).toBe(targetSelector); expect(BigInt(event.timestamp)).toBeGreaterThanOrEqual(BigInt(midTimestamp)); } }); diff --git a/apps/ensapi/src/omnigraph-api/schema/domain.integration.test.ts b/apps/ensapi/src/omnigraph-api/schema/domain.integration.test.ts index 3b937066ca..b9ee706b89 100644 --- a/apps/ensapi/src/omnigraph-api/schema/domain.integration.test.ts +++ b/apps/ensapi/src/omnigraph-api/schema/domain.integration.test.ts @@ -1,4 +1,4 @@ -import type { InterpretedLabel, Name } from "enssdk"; +import type { InterpretedLabel, InterpretedName } from "enssdk"; import { beforeAll, describe, expect, it } from "vitest"; import { DEVNET_ETH_LABELS } from "@/test/integration/devnet-names"; @@ -27,7 +27,7 @@ describe("Domain.subdomains", () => { type SubdomainsResult = { domain: { subdomains: GraphQLConnection<{ - name: Name | null; + name: InterpretedName | null; label: { interpreted: InterpretedLabel }; }>; }; @@ -135,7 +135,7 @@ describe("Domain.events filtering (EventsWhereInput)", () => { expect(events.length).toBeGreaterThan(0); for (const event of events) { - expect(event.topics[0]?.toLowerCase()).toBe(targetSelector.toLowerCase()); + expect(event.topics[0]).toBe(targetSelector); } }); @@ -215,7 +215,7 @@ describe("Domain.events filtering (EventsWhereInput)", () => { expect(events.length).toBeGreaterThan(0); for (const event of events) { - expect(event.from.toLowerCase()).toBe(targetFrom.toLowerCase()); + expect(event.from).toBe(targetFrom); } }); @@ -236,7 +236,7 @@ describe("Domain.events filtering (EventsWhereInput)", () => { expect(events.length).toBeGreaterThan(0); expect(events.length).toBeLessThanOrEqual(allEvents.length); for (const event of events) { - expect(event.topics[0]?.toLowerCase()).toBe(targetSelector.toLowerCase()); + expect(event.topics[0]).toBe(targetSelector); expect(BigInt(event.timestamp)).toBeGreaterThanOrEqual(BigInt(midTimestamp)); } }); diff --git a/apps/ensapi/src/omnigraph-api/schema/permissions.integration.test.ts b/apps/ensapi/src/omnigraph-api/schema/permissions.integration.test.ts index 44b1a1c38f..69e2df7c1f 100644 --- a/apps/ensapi/src/omnigraph-api/schema/permissions.integration.test.ts +++ b/apps/ensapi/src/omnigraph-api/schema/permissions.integration.test.ts @@ -1,4 +1,11 @@ -import type { Address } from "enssdk"; +import type { + AccountId, + NormalizedAddress, + PermissionsId, + PermissionsResourceId, + PermissionsUserId, + RegistryId, +} from "enssdk"; import { toEventSelector } from "viem"; import { beforeAll, describe, expect, it } from "vitest"; @@ -19,9 +26,11 @@ import { } from "@/test/integration/graphql-utils"; import { gql } from "@/test/integration/omnigraph-api-client"; -const namespace = "ens-test-env"; - -const V2_ETH_REGISTRY = getDatasourceContract(namespace, DatasourceNames.ENSv2Root, "ETHRegistry"); +const V2_ETH_REGISTRY = getDatasourceContract( + "ens-test-env", + DatasourceNames.ENSv2Root, + "ETHRegistry", +); const NAME_WITH_RESOLVER = "example.eth"; @@ -31,30 +40,28 @@ const EAC_ROLES_CHANGED_SELECTOR = toEventSelector( )!, ); +// the type of the PermissionUser returned by the omnigraph, to DRY up the types below +type PermissionUser = { + id: PermissionsUserId; + resource: string; + user: { address: NormalizedAddress }; + roles: string; +}; + describe("Permissions", () => { type PermissionsResult = { permissions: { - id: string; - contract: { chainId: number; address: Address }; + id: PermissionsId; + contract: AccountId; root: { - id: string; + id: PermissionsResourceId; resource: string; - users: GraphQLConnection<{ - id: string; - resource: string; - user: { address: Address }; - roles: string; - }>; + users: GraphQLConnection; }; resources: GraphQLConnection<{ - id: string; + id: PermissionsResourceId; resource: string; - users: GraphQLConnection<{ - id: string; - resource: string; - user: { address: Address }; - roles: string; - }>; + users: GraphQLConnection; }>; }; }; @@ -126,7 +133,10 @@ describe("Registry.permissions", () => { it("resolves permissions from a registry", async () => { const result = await request<{ registry: { - permissions: { id: string; contract: { chainId: number; address: Address } }; + permissions: { + id: PermissionsId; + contract: AccountId; + }; }; }>(RegistryPermissions, { contract: V2_ETH_REGISTRY }); @@ -138,12 +148,7 @@ describe("Registry.permissions", () => { describe("Domain.permissions", () => { type DomainPermissionsResult = { domain: { - permissions: GraphQLConnection<{ - id: string; - resource: string; - user: { address: Address }; - roles: string; - }>; + permissions: GraphQLConnection; }; }; @@ -157,7 +162,7 @@ describe("Domain.permissions", () => { } `; - let allUsers: { id: string; resource: string; user: { address: Address }; roles: string }[]; + let allUsers: PermissionUser[]; beforeAll(async () => { const result = await request(DomainPermissions, { @@ -199,7 +204,7 @@ describe("Domain.permissions", () => { expect(filteredUsers.length).toBeGreaterThan(0); for (const user of filteredUsers) { - expect(user.user.address.toLowerCase()).toBe(targetUser.toLowerCase()); + expect(user.user.address).toBe(targetUser); } }); }); @@ -229,12 +234,12 @@ describe("Account.permissions and Account.registryPermissions", () => { } `; - let targetAddress: Address; + let targetAddress: NormalizedAddress; beforeAll(async () => { const rootResult = await request<{ permissions: { - root: { users: GraphQLConnection<{ user: { address: Address } }> }; + root: { users: GraphQLConnection<{ user: { address: NormalizedAddress } }> }; }; }>(PermissionsRootUsers, { contract: V2_ETH_REGISTRY }); @@ -246,12 +251,7 @@ describe("Account.permissions and Account.registryPermissions", () => { it("resolves permissions for an account with known roles", async () => { const result = await request<{ account: { - permissions: GraphQLConnection<{ - id: string; - resource: string; - user: { address: Address }; - roles: string; - }>; + permissions: GraphQLConnection; }; }>(AccountPermissions, { address: targetAddress }); @@ -259,20 +259,14 @@ describe("Account.permissions and Account.registryPermissions", () => { expect(permissions.length).toBeGreaterThan(0); for (const p of permissions) { - expect(p.user.address.toLowerCase()).toBe(targetAddress.toLowerCase()); + expect(p.user.address).toBe(targetAddress); } }); it("resolves registry-scoped permissions for an account", async () => { const result = await request<{ account: { - registryPermissions: GraphQLConnection<{ - id: string; - registry: { id: string }; - resource: string; - user: { address: Address }; - roles: string; - }>; + registryPermissions: GraphQLConnection; }; }>(AccountRegistryPermissions, { address: targetAddress }); @@ -281,7 +275,7 @@ describe("Account.permissions and Account.registryPermissions", () => { for (const p of permissions) { expect(p.registry.id).toBeTruthy(); - expect(p.user.address.toLowerCase()).toBe(targetAddress.toLowerCase()); + expect(p.user.address).toBe(targetAddress); } }); }); @@ -299,7 +293,10 @@ describe("Resolver.permissions", () => { const result = await request<{ domain: { resolver: { - permissions: { id: string; contract: { chainId: number; address: Address } }; + permissions: { + id: PermissionsId; + contract: AccountId; + }; }; }; }>(ResolverPermissions, { name: NAME_WITH_RESOLVER }); @@ -340,14 +337,12 @@ describe("Permissions.events", () => { it("returns events scoped to the ETHRegistry contract", () => { for (const event of allEvents) { - expect(event.address.toLowerCase()).toBe(V2_ETH_REGISTRY.address); + expect(event.address).toBe(V2_ETH_REGISTRY.address); } }); it("includes EACRolesChanged events", () => { - const rolesChangedEvents = allEvents.filter( - (e) => e.topics[0]?.toLowerCase() === EAC_ROLES_CHANGED_SELECTOR, - ); + const rolesChangedEvents = allEvents.filter((e) => e.topics[0] === EAC_ROLES_CHANGED_SELECTOR); expect(rolesChangedEvents.length).toBeGreaterThan(0); }); }); @@ -394,7 +389,7 @@ describe("Permissions.events filtering (EventsWhereInput)", () => { expect(events.length).toBeGreaterThan(0); for (const event of events) { - expect(event.topics[0]?.toLowerCase()).toBe(EAC_ROLES_CHANGED_SELECTOR); + expect(event.topics[0]).toBe(EAC_ROLES_CHANGED_SELECTOR); } }); @@ -476,7 +471,7 @@ describe("Permissions.events filtering (EventsWhereInput)", () => { expect(events.length).toBeGreaterThan(0); for (const event of events) { - expect(event.from.toLowerCase()).toBe(targetFrom.toLowerCase()); + expect(event.from).toBe(targetFrom); } }); @@ -492,7 +487,7 @@ describe("Permissions.events filtering (EventsWhereInput)", () => { expect(events.length).toBeGreaterThan(0); expect(events.length).toBeLessThanOrEqual(allEvents.length); for (const event of events) { - expect(event.topics[0]?.toLowerCase()).toBe(EAC_ROLES_CHANGED_SELECTOR); + expect(event.topics[0]).toBe(EAC_ROLES_CHANGED_SELECTOR); expect(BigInt(event.timestamp)).toBeGreaterThanOrEqual(BigInt(midTimestamp)); } }); diff --git a/apps/ensapi/src/omnigraph-api/schema/query.integration.test.ts b/apps/ensapi/src/omnigraph-api/schema/query.integration.test.ts index 267ceec9f0..20a3da699d 100644 --- a/apps/ensapi/src/omnigraph-api/schema/query.integration.test.ts +++ b/apps/ensapi/src/omnigraph-api/schema/query.integration.test.ts @@ -1,5 +1,4 @@ import { - type Address, asInterpretedLabel, asInterpretedName, type DomainId, @@ -9,6 +8,7 @@ import { makeENSv2DomainId, makeStorageId, type Name, + type NormalizedAddress, namehashInterpretedName, } from "enssdk"; import { describe, expect, it } from "vitest"; @@ -59,7 +59,7 @@ describe("Query.domains", () => { id: DomainId; name: Name; label: { interpreted: InterpretedLabel }; - owner: { address: Address }; + owner: { address: NormalizedAddress }; }>; }; diff --git a/apps/ensapi/src/omnigraph-api/schema/resolver.integration.test.ts b/apps/ensapi/src/omnigraph-api/schema/resolver.integration.test.ts index 967a0c347a..e532dce946 100644 --- a/apps/ensapi/src/omnigraph-api/schema/resolver.integration.test.ts +++ b/apps/ensapi/src/omnigraph-api/schema/resolver.integration.test.ts @@ -1,3 +1,4 @@ +import { asInterpretedName } from "enssdk"; import { describe, expect, it } from "vitest"; import { @@ -16,7 +17,7 @@ import { gql } from "@/test/integration/omnigraph-api-client"; // TODO: once the devnet has deterministic resolver addresses, we can resolver(by: { contract }) // but until then we'll access by a domain's assigned resolver -const DEVNET_NAME_WITH_OWNED_RESOLVER = "example.eth"; +const DEVNET_NAME_WITH_OWNED_RESOLVER = asInterpretedName("example.eth"); describe("Resolver.events", () => { type ResolverEventsResult = { diff --git a/apps/ensapi/src/omnigraph-api/schema/scalars.ts b/apps/ensapi/src/omnigraph-api/schema/scalars.ts index 55b8f43370..9ccbbf235a 100644 --- a/apps/ensapi/src/omnigraph-api/schema/scalars.ts +++ b/apps/ensapi/src/omnigraph-api/schema/scalars.ts @@ -1,15 +1,15 @@ import { - type Address, asInterpretedLabel, asInterpretedName, type ChainId, type CoinType, type DomainId, type Hex, - isInterpetedLabel, + isInterpretedLabel, isInterpretedName, type Name, type Node, + type NormalizedAddress, type PermissionsId, type PermissionsResourceId, type PermissionsUserId, @@ -25,7 +25,7 @@ import { z } from "zod/v4"; import { makeChainIdSchema, makeCoinTypeSchema, - makeLowercaseAddressSchema, + makeNormalizedAddressSchema, } from "@ensnode/ensnode-sdk/internal"; import { builder } from "@/omnigraph-api/builder"; @@ -37,14 +37,14 @@ builder.scalarType("BigInt", { }); builder.scalarType("Address", { - description: "Address represents a lowercase (unchecksummed) viem#Address.", - serialize: (value: Address) => value.toString(), - parseValue: (value) => makeLowercaseAddressSchema("Address").parse(value), + description: "Address represents an EVM Address in all lowercase.", + serialize: (value: NormalizedAddress) => value, + parseValue: (value) => makeNormalizedAddressSchema("Address").parse(value), }); builder.scalarType("Hex", { description: "Hex represents viem#Hex.", - serialize: (value: Hex) => value.toString(), + serialize: (value: Hex) => value, parseValue: (value) => z.coerce .string() @@ -62,19 +62,19 @@ builder.scalarType("Hex", { }); builder.scalarType("ChainId", { - description: "ChainId represents a @ensnode/ensnode-sdk#ChainId.", + description: "ChainId represents a enssdk#ChainId.", serialize: (value: ChainId) => value, parseValue: (value) => makeChainIdSchema("ChainId").parse(value), }); builder.scalarType("CoinType", { - description: "CoinType represents a @ensnode/ensnode-sdk#CoinType.", + description: "CoinType represents a enssdk#CoinType.", serialize: (value: CoinType) => value, parseValue: (value) => makeCoinTypeSchema("CoinType").parse(value), }); builder.scalarType("Node", { - description: "Node represents a @ensnode/ensnode-sdk#Node.", + description: "Node represents a enssdk#Node.", serialize: (value: Node) => value, parseValue: (value) => z.coerce @@ -93,7 +93,7 @@ builder.scalarType("Node", { }); builder.scalarType("InterpretedName", { - description: "InterpretedName represents a @ensnode/ensnode-sdk#InterpretedName.", + description: "InterpretedName represents a enssdk#InterpretedName.", serialize: (value: Name) => value, parseValue: (value) => z.coerce @@ -113,13 +113,13 @@ builder.scalarType("InterpretedName", { }); builder.scalarType("InterpretedLabel", { - description: "InterpretedLabel represents a @ensnode/ensnode-sdk#InterpretedLabel.", + description: "InterpretedLabel represents a enssdk#InterpretedLabel.", serialize: (value: Name) => value, parseValue: (value) => z.coerce .string() .check((ctx) => { - if (!isInterpetedLabel(ctx.value)) { + if (!isInterpretedLabel(ctx.value)) { ctx.issues.push({ code: "custom", message: "InterpretedLabel must be an Encoded LabelHash or normalized.", @@ -132,7 +132,7 @@ builder.scalarType("InterpretedLabel", { }); builder.scalarType("DomainId", { - description: "DomainId represents a @ensnode/ensnode-sdk#DomainId.", + description: "DomainId represents a enssdk#DomainId.", serialize: (value: DomainId) => value, parseValue: (value) => z.coerce @@ -142,7 +142,7 @@ builder.scalarType("DomainId", { }); builder.scalarType("RegistryId", { - description: "RegistryId represents a @ensnode/ensnode-sdk#RegistryId.", + description: "RegistryId represents a enssdk#RegistryId.", serialize: (value: RegistryId) => value, parseValue: (value) => z.coerce @@ -152,7 +152,7 @@ builder.scalarType("RegistryId", { }); builder.scalarType("ResolverId", { - description: "ResolverId represents a @ensnode/ensnode-sdk#ResolverId.", + description: "ResolverId represents a enssdk#ResolverId.", serialize: (value: ResolverId) => value, parseValue: (value) => z.coerce @@ -162,7 +162,7 @@ builder.scalarType("ResolverId", { }); builder.scalarType("PermissionsId", { - description: "PermissionsId represents a @ensnode/ensnode-sdk#PermissionsId.", + description: "PermissionsId represents a enssdk#PermissionsId.", serialize: (value: PermissionsId) => value, parseValue: (value) => z.coerce @@ -172,7 +172,7 @@ builder.scalarType("PermissionsId", { }); builder.scalarType("PermissionsResourceId", { - description: "PermissionsResourceId represents a @ensnode/ensnode-sdk#PermissionsResourceId.", + description: "PermissionsResourceId represents a enssdk#PermissionsResourceId.", serialize: (value: PermissionsResourceId) => value, parseValue: (value) => z.coerce @@ -182,7 +182,7 @@ builder.scalarType("PermissionsResourceId", { }); builder.scalarType("PermissionsUserId", { - description: "PermissionsUserId represents a @ensnode/ensnode-sdk#PermissionsUserId.", + description: "PermissionsUserId represents a enssdk#PermissionsUserId.", serialize: (value: PermissionsUserId) => value, parseValue: (value) => z.coerce @@ -192,7 +192,7 @@ builder.scalarType("PermissionsUserId", { }); builder.scalarType("RegistrationId", { - description: "RegistrationId represents a @ensnode/ensnode-sdk#RegistrationId.", + description: "RegistrationId represents a enssdk#RegistrationId.", serialize: (value: RegistrationId) => value, parseValue: (value) => z.coerce @@ -202,7 +202,7 @@ builder.scalarType("RegistrationId", { }); builder.scalarType("RenewalId", { - description: "RenewalId represents a @ensnode/ensnode-sdk#RenewalId.", + description: "RenewalId represents a enssdk#RenewalId.", serialize: (value: RenewalId) => value, parseValue: (value) => z.coerce @@ -212,7 +212,7 @@ builder.scalarType("RenewalId", { }); builder.scalarType("ResolverRecordsId", { - description: "ResolverRecordsId represents a @ensnode/ensnode-sdk#ResolverRecordsId.", + description: "ResolverRecordsId represents a enssdk#ResolverRecordsId.", serialize: (value: ResolverRecordsId) => value, parseValue: (value) => z.coerce diff --git a/apps/ensapi/src/test/integration/find-domains/domain-pagination-queries.ts b/apps/ensapi/src/test/integration/find-domains/domain-pagination-queries.ts index ea4fcc26af..4a251fa848 100644 --- a/apps/ensapi/src/test/integration/find-domains/domain-pagination-queries.ts +++ b/apps/ensapi/src/test/integration/find-domains/domain-pagination-queries.ts @@ -1,4 +1,4 @@ -import type { InterpretedLabel, Name } from "enssdk"; +import type { DomainId, InterpretedLabel, Name } from "enssdk"; import { gql } from "@/test/integration/omnigraph-api-client"; @@ -24,7 +24,7 @@ const PaginatedDomainFragment = gql` `; export type PaginatedDomainResult = { - id: string; + id: DomainId; name: Name | null; label: { interpreted: InterpretedLabel }; registration: { diff --git a/apps/ensapi/src/test/integration/find-events/event-pagination-queries.ts b/apps/ensapi/src/test/integration/find-events/event-pagination-queries.ts index 89b54f6edd..265515ec75 100644 --- a/apps/ensapi/src/test/integration/find-events/event-pagination-queries.ts +++ b/apps/ensapi/src/test/integration/find-events/event-pagination-queries.ts @@ -1,3 +1,5 @@ +import type { ChainId, Hex, NormalizedAddress } from "enssdk"; + import { gql } from "@/test/integration/omnigraph-api-client"; const PageInfoFragment = gql` @@ -29,18 +31,18 @@ export const EventFragment = gql` export type EventResult = { id: string; - chainId: number; + chainId: ChainId; blockNumber: string; - blockHash: string; + blockHash: Hex; timestamp: string; - transactionHash: string; + transactionHash: Hex; transactionIndex: number; - from: string; - to: string | null; - address: string; + from: NormalizedAddress; + to: NormalizedAddress | null; + address: NormalizedAddress; logIndex: number; - topics: string[]; - data: string; + topics: Hex[]; + data: Hex; }; export const DomainEventsPaginated = gql` diff --git a/apps/ensindexer/src/config/validations.ts b/apps/ensindexer/src/config/validations.ts index 168c0d9ce3..5b95c74996 100644 --- a/apps/ensindexer/src/config/validations.ts +++ b/apps/ensindexer/src/config/validations.ts @@ -1,6 +1,4 @@ -import type { Address } from "enssdk"; -import { asLowerCaseAddress } from "enssdk"; -import { isAddress } from "viem"; +import { isNormalizedAddress } from "enssdk"; import { type DatasourceName, type ENSNamespace, getENSNamespace } from "@ensnode/datasources"; import { PluginName } from "@ensnode/ensnode-sdk"; @@ -125,15 +123,11 @@ export function invariant_validContractConfigs( // Invariant: `contracts` must provide valid addresses if a filter is not provided for (const [contractName, contractConfig] of Object.entries(datasource.contracts)) { + // only ContractConfigs with `address` defined if ("address" in contractConfig && typeof contractConfig.address === "string") { - // only ContractConfigs with `address` defined - const isValidAddress = - isAddress(contractConfig.address as Address, { strict: false }) && // must be a valid `Address` - contractConfig.address === asLowerCaseAddress(contractConfig.address); // and in lowercase format - - if (!isValidAddress) { + if (!isNormalizedAddress(contractConfig.address)) { throw new Error( - `The '${config.namespace}' namespace's '${datasourceName}' Datasource does not define a valid address for ${contractName}: '${contractConfig.address}'. This occurs if the address property of any ContractConfig in the Datasource is malformed (i.e. not a lowercase viem#Address). This is only likely to occur if you are actively editing the Datasource and typo'd an address.`, + `The '${config.namespace}' namespace's '${datasourceName}' Datasource does not define a valid address for ${contractName}: '${contractConfig.address}'. This occurs if the address property of any ContractConfig in the Datasource is malformed (i.e. not an enssdk#NormalizedAddress). This is only likely to occur if you are actively editing the Datasource and typo'd an address.`, ); } } diff --git a/apps/ensindexer/src/lib/ensdb-writer-worker/ensdb-writer-worker.ts b/apps/ensindexer/src/lib/ensdb-writer-worker/ensdb-writer-worker.ts index 7204dd535d..38aa6d12de 100644 --- a/apps/ensindexer/src/lib/ensdb-writer-worker/ensdb-writer-worker.ts +++ b/apps/ensindexer/src/lib/ensdb-writer-worker/ensdb-writer-worker.ts @@ -1,11 +1,11 @@ import { getUnixTime, secondsToMilliseconds } from "date-fns"; +import type { Duration } from "enssdk"; import pRetry from "p-retry"; import type { EnsDbWriter } from "@ensnode/ensdb-sdk"; import { buildCrossChainIndexingStatusSnapshotOmnichain, type CrossChainIndexingStatusSnapshot, - type Duration, type EnsIndexerPublicConfig, OmnichainIndexingStatusIds, type OmnichainIndexingStatusSnapshot, diff --git a/apps/ensindexer/src/lib/heal-addr-reverse-subname-label.ts b/apps/ensindexer/src/lib/heal-addr-reverse-subname-label.ts index 2a8ad5138e..6e21dce0c1 100644 --- a/apps/ensindexer/src/lib/heal-addr-reverse-subname-label.ts +++ b/apps/ensindexer/src/lib/heal-addr-reverse-subname-label.ts @@ -1,6 +1,6 @@ import config from "@/config"; -import type { Address, LabelHash, LiteralLabel } from "enssdk"; +import type { LabelHash, LiteralLabel, NormalizedAddress } from "enssdk"; import { getENSRootChainId } from "@ensnode/datasources"; @@ -21,7 +21,7 @@ import { */ export async function healAddrReverseSubnameLabel( context: IndexingEngineContext, - event: EventWithArgs<{ owner: Address }>, + event: EventWithArgs<{ owner: NormalizedAddress }>, labelHash: LabelHash, ): Promise { if (context.chain.id !== getENSRootChainId(config.namespace)) { diff --git a/apps/ensindexer/src/lib/maybe-heal-label-by-addr-reverse-subname.test.ts b/apps/ensindexer/src/lib/maybe-heal-label-by-addr-reverse-subname.test.ts index b4a3178203..9fbbcdf7c6 100644 --- a/apps/ensindexer/src/lib/maybe-heal-label-by-addr-reverse-subname.test.ts +++ b/apps/ensindexer/src/lib/maybe-heal-label-by-addr-reverse-subname.test.ts @@ -1,16 +1,17 @@ import { - type Address, addrReverseLabel, type InterpretedLabel, labelhashInterpretedLabel, labelhashLiteralLabel, + toNormalizedAddress, } from "enssdk"; import { describe, expect, it } from "vitest"; import { maybeHealLabelByAddrReverseSubname } from "./maybe-heal-label-by-addr-reverse-subname"; +const address = toNormalizedAddress("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"); + describe("maybeHealLabelByAddrReverseSubname", () => { - const address: Address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; const reverseAddressSubname = addrReverseLabel(address); const labelHash = labelhashLiteralLabel(reverseAddressSubname); const notMatchingLabelHash = labelhashInterpretedLabel("test.eth" as InterpretedLabel); diff --git a/apps/ensindexer/src/lib/maybe-heal-label-by-addr-reverse-subname.ts b/apps/ensindexer/src/lib/maybe-heal-label-by-addr-reverse-subname.ts index 8985383964..0fd70f1f30 100644 --- a/apps/ensindexer/src/lib/maybe-heal-label-by-addr-reverse-subname.ts +++ b/apps/ensindexer/src/lib/maybe-heal-label-by-addr-reverse-subname.ts @@ -1,9 +1,9 @@ import { - type Address, addrReverseLabel, type LabelHash, type LiteralLabel, labelhashLiteralLabel, + type NormalizedAddress, } from "enssdk"; /** @@ -13,7 +13,7 @@ import { */ export const maybeHealLabelByAddrReverseSubname = ( labelHash: LabelHash, - address: Address, + address: NormalizedAddress, ): LiteralLabel | null => { // construct an addr.reverse subname label from the provided address const maybeLabel = addrReverseLabel(address); diff --git a/apps/ensindexer/src/lib/protocol-acceleration/resolver-db-helpers.ts b/apps/ensindexer/src/lib/protocol-acceleration/resolver-db-helpers.ts index 40164c3958..a43d4d19c6 100644 --- a/apps/ensindexer/src/lib/protocol-acceleration/resolver-db-helpers.ts +++ b/apps/ensindexer/src/lib/protocol-acceleration/resolver-db-helpers.ts @@ -2,6 +2,7 @@ import { type AccountId, type Address, type CoinType, + type LiteralName, makeResolverId, makeResolverRecordsId, type Node, @@ -82,7 +83,7 @@ export async function ensureResolverRecords( export async function handleResolverNameUpdate( context: IndexingEngineContext, resolverRecordsKey: ResolverRecordsCompositeKey, - name: string, + name: LiteralName, ) { const resolverRecordsId = makeResolverRecordsId( { chainId: resolverRecordsKey.chainId, address: resolverRecordsKey.address }, diff --git a/apps/ensindexer/src/lib/subgraph/subgraph-helpers.ts b/apps/ensindexer/src/lib/subgraph/subgraph-helpers.ts index bf6a5308f3..68f613c23f 100644 --- a/apps/ensindexer/src/lib/subgraph/subgraph-helpers.ts +++ b/apps/ensindexer/src/lib/subgraph/subgraph-helpers.ts @@ -1,6 +1,6 @@ import config from "@/config"; -import { type Node, ROOT_NODE } from "enssdk"; +import { ENS_ROOT_NODE, type Node } from "enssdk"; import { isAddressEqual, zeroAddress } from "viem"; import { ensIndexerSchema, type IndexingEngineContext } from "@/lib/indexing-engines/ponder"; @@ -26,7 +26,7 @@ export async function setupRootNode({ context }: { context: IndexingEngineContex await context.ensDb .insert(ensIndexerSchema.subgraph_domain) .values({ - id: ROOT_NODE, + id: ENS_ROOT_NODE, ownerId: zeroAddress, createdAt: 0n, diff --git a/apps/ensindexer/src/lib/tokenscope/seaport-types.ts b/apps/ensindexer/src/lib/tokenscope/seaport-types.ts index 7bc523104c..8c1bdbe2a9 100644 --- a/apps/ensindexer/src/lib/tokenscope/seaport-types.ts +++ b/apps/ensindexer/src/lib/tokenscope/seaport-types.ts @@ -1,4 +1,4 @@ -import type { Address, Hex } from "enssdk"; +import type { Address, Hex, NormalizedAddress } from "enssdk"; import type { EventWithArgs } from "@/lib/ponder-helpers"; @@ -33,7 +33,7 @@ export type OrderFulfilledEvent = EventWithArgs<{ * The address of the account that created and signed the original order. * This is the party offering items for trade. */ - offerer: Address; + offerer: NormalizedAddress; /** * The address of the zone contract that implements custom validation rules. @@ -41,13 +41,13 @@ export type OrderFulfilledEvent = EventWithArgs<{ * or other custom logic before order fulfillment. Can be zero address if * no additional validation is required. */ - zone: Address; + zone: NormalizedAddress; /** * The address that receives the offered items from the order. * This is typically the order fulfiller or their designated recipient. */ - recipient: Address; + recipient: NormalizedAddress; /** * Array of items that the offerer is giving up in this order. diff --git a/apps/ensindexer/src/lib/trace-transaction-helpers.ts b/apps/ensindexer/src/lib/trace-transaction-helpers.ts index b847b6a68f..58877ede0c 100644 --- a/apps/ensindexer/src/lib/trace-transaction-helpers.ts +++ b/apps/ensindexer/src/lib/trace-transaction-helpers.ts @@ -1,5 +1,5 @@ -import { type Address, asLowerCaseAddress, type Hex } from "enssdk"; -import { type Hash, isAddress } from "viem"; +import { type Hex, type NormalizedAddress, toNormalizedAddress } from "enssdk"; +import type { Address, Hash } from "viem"; /** * Options for the `callTracer` tracer. This tracer is used to enlist @@ -69,9 +69,9 @@ interface Trace { * @param trace The transaction trace to extract addresses from * @returns An array of unique addresses found in the trace. */ -export function getAddressesFromTrace(trace: Trace): Set
{ +export function getAddressesFromTrace(trace: Trace): Set { const text = JSON.stringify(trace); - const uniqueAddresses = new Set
(); + const uniqueAddresses = new Set(); // Helper function to search for plain addresses (0x followed by 40 hex characters) const searchForPlainAddresses = (text: string) => { @@ -84,12 +84,10 @@ export function getAddressesFromTrace(trace: Trace): Set
{ // if matches are found, normalize them and return unique addresses if (matches) { for (const maybeAddress of matches) { - if (isAddress(maybeAddress)) { - // Normalize the address - const normalizedAddr = asLowerCaseAddress(maybeAddress); + try { // Add the normalized address to the set - uniqueAddresses.add(normalizedAddr); - } else { + uniqueAddresses.add(toNormalizedAddress(maybeAddress)); + } catch { // Ignore invalid addresses } } @@ -109,19 +107,13 @@ export function getAddressesFromTrace(trace: Trace): Set
{ // match[1] contains the extracted address part (without the 24 zeroes) const maybePartialAddress = match[1]; - if (!maybePartialAddress) { - // If no address part is found, skip this match - continue; - } - - const maybeAddress = `0x${maybePartialAddress}`; + // If no address part is found, skip this match + if (!maybePartialAddress) continue; - if (isAddress(maybeAddress)) { - // Add 0x prefix and normalize the address - const normalizedAddr = asLowerCaseAddress(maybeAddress); + try { // Add the normalized address to the set - uniqueAddresses.add(normalizedAddr); - } else { + uniqueAddresses.add(toNormalizedAddress(`0x${maybePartialAddress}`)); + } catch { // Ignore invalid addresses } } diff --git a/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/BaseRegistrar.ts b/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/BaseRegistrar.ts index 041706dbd4..396774865f 100644 --- a/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/BaseRegistrar.ts +++ b/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/BaseRegistrar.ts @@ -1,9 +1,11 @@ import { GRACE_PERIOD_SECONDS } from "@ensdomains/ensjs/utils"; import { - type Address, interpretTokenIdAsLabelHash, makeENSv1DomainId, makeSubdomainNode, + type NormalizedAddress, + type TokenId, + type UnixTimestampBigInt, } from "enssdk"; import { isAddressEqual, zeroAddress } from "viem"; @@ -52,9 +54,9 @@ export default function () { }: { context: IndexingEngineContext; event: EventWithArgs<{ - from: Address; - to: Address; - tokenId: bigint; + from: NormalizedAddress; + to: NormalizedAddress; + tokenId: TokenId; }>; }) => { const { from, to, tokenId } = event.args; @@ -97,9 +99,9 @@ export default function () { }: { context: IndexingEngineContext; event: EventWithArgs<{ - id: bigint; - owner: Address; - expires: bigint; + id: TokenId; + owner: NormalizedAddress; + expires: UnixTimestampBigInt; }>; }) { const { id: tokenId, owner, expires: expiry } = event.args; @@ -161,7 +163,7 @@ export default function () { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ id: bigint; expires: bigint }>; + event: EventWithArgs<{ id: TokenId; expires: UnixTimestampBigInt }>; }) => { const { id: tokenId, expires: expiry } = event.args; diff --git a/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/ENSv1Registry.ts b/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/ENSv1Registry.ts index 64dbf7a6d7..cfa08dd330 100644 --- a/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/ENSv1Registry.ts +++ b/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/ENSv1Registry.ts @@ -2,12 +2,12 @@ import config from "@/config"; import { ADDR_REVERSE_NODE, - type Address, + ENS_ROOT_NODE, type LabelHash, makeENSv1DomainId, makeSubdomainNode, type Node, - ROOT_NODE, + type NormalizedAddress, } from "enssdk"; import { isAddressEqual, zeroAddress } from "viem"; @@ -46,7 +46,7 @@ export default function () { node: Node; // NOTE: `label` event arg represents a `LabelHash` for the sub-node under `node` label: LabelHash; - owner: Address; + owner: NormalizedAddress; }>; }) { const { label: labelHash, node: parentNode, owner } = event.args; @@ -104,12 +104,12 @@ export default function () { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; owner: Address }>; + event: EventWithArgs<{ node: Node; owner: NormalizedAddress }>; }) { const { node, owner } = event.args; // ENSv2 model does not include root node, no-op - if (node === ROOT_NODE) return; + if (node === ENS_ROOT_NODE) return; const domainId = makeENSv1DomainId(node); @@ -141,7 +141,7 @@ export default function () { const domainId = makeENSv1DomainId(node); // ENSv2 model does not include root node, no-op - if (node === ROOT_NODE) return; + if (node === ENS_ROOT_NODE) return; // push event to domain history await ensureDomainEvent(context, event, domainId); @@ -158,7 +158,7 @@ export default function () { const domainId = makeENSv1DomainId(node); // ENSv2 model does not include root node, no-op - if (node === ROOT_NODE) return; + if (node === ENS_ROOT_NODE) return; // NOTE: Domain-Resolver relations are handled by the protocol-acceleration plugin and are not // directly indexed here diff --git a/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/NameWrapper.ts b/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/NameWrapper.ts index 0431da02f8..2002c49a4f 100644 --- a/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/NameWrapper.ts +++ b/apps/ensindexer/src/plugins/ensv2/handlers/ensv1/NameWrapper.ts @@ -1,5 +1,4 @@ import { - type Address, type DNSEncodedLiteralName, type DNSEncodedName, decodeDNSEncodedLiteralName, @@ -9,6 +8,9 @@ import { makeENSv1DomainId, makeSubdomainNode, type Node, + type NormalizedAddress, + type TokenId, + type UnixTimestampBigInt, } from "enssdk"; import { isAddressEqual, zeroAddress } from "viem"; @@ -47,7 +49,8 @@ const pluginName = PluginName.ENSv2; /** * NameWrapper emits expiry as 0 to mean 'doesn't expire', so we interpret as null. */ -const interpretExpiry = (expiry: bigint): bigint | null => (expiry === 0n ? null : expiry); +const interpretExpiry = (expiry: UnixTimestampBigInt): UnixTimestampBigInt | null => + expiry === 0n ? null : expiry; // registrar is source of truth for expiry if eth 2LD // otherwise namewrapper is registrar and source of truth for expiry @@ -98,10 +101,10 @@ export default function () { }: { context: IndexingEngineContext; event: EventWithArgs<{ - operator: Address; - from: Address; - to: Address; - id: bigint; + operator: NormalizedAddress; + from: NormalizedAddress; + to: NormalizedAddress; + id: TokenId; }>; }) { const { from, to, id: tokenId } = event.args; @@ -155,9 +158,9 @@ export default function () { event: EventWithArgs<{ node: Node; name: DNSEncodedName; - owner: Address; + owner: NormalizedAddress; fuses: number; - expiry: bigint; + expiry: UnixTimestampBigInt; }>; }) => { const { node, name: _name, owner, fuses, expiry: _expiry } = event.args; @@ -272,7 +275,7 @@ export default function () { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; owner: Address }>; + event: EventWithArgs<{ node: Node; owner: NormalizedAddress }>; }) => { const { node } = event.args; @@ -349,7 +352,7 @@ export default function () { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; expiry: bigint }>; + event: EventWithArgs<{ node: Node; expiry: UnixTimestampBigInt }>; }) => { const { node, expiry: _expiry } = event.args; const expiry = interpretExpiry(_expiry); diff --git a/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ENSv2Registry.ts b/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ENSv2Registry.ts index 1b88a4d5aa..a2d20d6fb0 100644 --- a/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ENSv2Registry.ts +++ b/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ENSv2Registry.ts @@ -1,12 +1,14 @@ import { type AccountId, - type Address, asLiteralLabel, type LabelHash, labelhashLiteralLabel, makeENSv2DomainId, makeRegistryId, makeStorageId, + type NormalizedAddress, + type TokenId, + type UnixTimestampBigInt, } from "enssdk"; import { hexToBigInt } from "viem"; @@ -42,13 +44,13 @@ export default function () { }: { context: IndexingEngineContext; event: EventWithArgs<{ - tokenId: bigint; + tokenId: TokenId; labelHash: LabelHash; label: string; // NOTE: marking `owner` as optional to handle both LabelRegistered and LabelReserved events - owner?: Address; - expiry: bigint; - sender: Address; + owner?: NormalizedAddress; + expiry: UnixTimestampBigInt; + sender: NormalizedAddress; }>; }) { const { tokenId, labelHash, owner, expiry, sender: registrant } = event.args; @@ -155,8 +157,8 @@ export default function () { }: { context: IndexingEngineContext; event: EventWithArgs<{ - tokenId: bigint; - sender: Address; + tokenId: TokenId; + sender: NormalizedAddress; }>; }) => { const { tokenId, sender: unregistrant } = event.args; @@ -203,9 +205,9 @@ export default function () { }: { context: IndexingEngineContext; event: EventWithArgs<{ - tokenId: bigint; - newExpiry: bigint; - sender: Address; + tokenId: TokenId; + newExpiry: UnixTimestampBigInt; + sender: NormalizedAddress; }>; }) => { // biome-ignore lint/correctness/noUnusedVariables: not sure if we care to index sender @@ -247,8 +249,8 @@ export default function () { }: { context: IndexingEngineContext; event: EventWithArgs<{ - tokenId: bigint; - subregistry: Address; + tokenId: TokenId; + subregistry: NormalizedAddress; }>; }) => { const { tokenId, subregistry: _subregistry } = event.args; @@ -303,8 +305,8 @@ export default function () { }: { context: IndexingEngineContext; event: EventWithArgs<{ - oldTokenId: bigint; - newTokenId: bigint; + oldTokenId: TokenId; + newTokenId: TokenId; }>; }) => { const { oldTokenId, newTokenId } = event.args; @@ -332,7 +334,7 @@ export default function () { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ id: bigint; to: Address }>; + event: EventWithArgs<{ id: TokenId; to: NormalizedAddress }>; }) { const { id: tokenId, to: owner } = event.args; diff --git a/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ETHRegistrar.ts b/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ETHRegistrar.ts index 038d0d9987..d484bdf90d 100644 --- a/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ETHRegistrar.ts +++ b/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/ETHRegistrar.ts @@ -1,9 +1,12 @@ import { type AccountId, - type Address, + type DurationBigInt, makeENSv2DomainId, makeStorageId, + type NormalizedAddress, type TokenId, + type UnixTimestampBigInt, + type Wei, } from "enssdk"; import { @@ -54,14 +57,14 @@ export default function () { event: EventWithArgs<{ tokenId: TokenId; label: string; - owner: Address; - subregistry: Address; - resolver: Address; - duration: bigint; + owner: NormalizedAddress; + subregistry: NormalizedAddress; + resolver: NormalizedAddress; + duration: DurationBigInt; referrer: EncodedReferrer; - paymentToken: Address; - base: bigint; - premium: bigint; + paymentToken: NormalizedAddress; + base: Wei; + premium: Wei; }>; }) => { // biome-ignore lint/correctness/noUnusedVariables: TODO(paymentToken) @@ -133,11 +136,11 @@ export default function () { event: EventWithArgs<{ tokenId: TokenId; label: string; - duration: bigint; - newExpiry: bigint; + duration: DurationBigInt; + newExpiry: UnixTimestampBigInt; referrer: EncodedReferrer; - paymentToken: Address; - base: bigint; + paymentToken: NormalizedAddress; + base: Wei; }>; }) => { // biome-ignore lint/correctness/noUnusedVariables: TODO(paymentToken) diff --git a/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/EnhancedAccessControl.ts b/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/EnhancedAccessControl.ts index 2ee4ee0d9e..b039a7f28c 100644 --- a/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/EnhancedAccessControl.ts +++ b/apps/ensindexer/src/plugins/ensv2/handlers/ensv2/EnhancedAccessControl.ts @@ -1,10 +1,10 @@ import { - type Address, type EACResource, type EACRoleBitmap, makePermissionsId, makePermissionsResourceId, makePermissionsUserId, + type NormalizedAddress, } from "enssdk"; import { isAddressEqual, zeroAddress } from "viem"; @@ -62,7 +62,7 @@ export default function () { context: IndexingEngineContext; event: EventWithArgs<{ resource: EACResource; - account: Address; + account: NormalizedAddress; oldRoleBitmap: EACRoleBitmap; newRoleBitmap: EACRoleBitmap; }>; diff --git a/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv1Registry.ts b/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv1Registry.ts index a6737a654c..2055bcd237 100644 --- a/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv1Registry.ts +++ b/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv1Registry.ts @@ -1,11 +1,11 @@ import config from "@/config"; import { - type Address, type LabelHash, makeENSv1DomainId, makeSubdomainNode, type Node, + type NormalizedAddress, } from "enssdk"; import { getENSRootChainId } from "@ensnode/datasources"; @@ -33,7 +33,7 @@ export default function () { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; resolver: Address }>; + event: EventWithArgs<{ node: Node; resolver: NormalizedAddress }>; }) { const { node, resolver } = event.args; @@ -59,7 +59,7 @@ export default function () { node: Node; // NOTE: `label` event arg represents a `LabelHash` for the sub-node under `node` label: LabelHash; - owner: Address; + owner: NormalizedAddress; }>; }) => { // no-op because we only track registry migration status on ENS Root Chain @@ -82,7 +82,7 @@ export default function () { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; resolver: Address }>; + event: EventWithArgs<{ node: Node; resolver: NormalizedAddress }>; }) => { // ignore the event on ENSv1RegistryOld if node is migrated to new Registry const shouldIgnoreEvent = await nodeIsMigrated(context, event.args.node); diff --git a/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv2Registry.ts b/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv2Registry.ts index 27570f739b..eec246efee 100644 --- a/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv2Registry.ts +++ b/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ENSv2Registry.ts @@ -1,4 +1,4 @@ -import { type Address, makeENSv2DomainId, makeStorageId } from "enssdk"; +import { makeENSv2DomainId, makeStorageId, type NormalizedAddress } from "enssdk"; import { PluginName } from "@ensnode/ensnode-sdk"; @@ -20,7 +20,7 @@ export default function () { context: IndexingEngineContext; event: EventWithArgs<{ tokenId: bigint; - resolver: Address; + resolver: NormalizedAddress; }>; }) => { const { tokenId, resolver } = event.args; diff --git a/apps/ensindexer/src/plugins/protocol-acceleration/handlers/Resolver.ts b/apps/ensindexer/src/plugins/protocol-acceleration/handlers/Resolver.ts index d9ccf4667b..21bcf04390 100644 --- a/apps/ensindexer/src/plugins/protocol-acceleration/handlers/Resolver.ts +++ b/apps/ensindexer/src/plugins/protocol-acceleration/handlers/Resolver.ts @@ -1,4 +1,4 @@ -import { bigintToCoinType, type CoinType, ETH_COIN_TYPE } from "enssdk"; +import { asLiteralName, bigintToCoinType, type CoinType, ETH_COIN_TYPE } from "enssdk"; import { ResolverABI } from "@ensnode/datasources"; import { PluginName } from "@ensnode/ensnode-sdk"; @@ -64,7 +64,7 @@ export default function () { addOnchainEventListener( namespaceContract(pluginName, "Resolver:NameChanged"), async ({ context, event }) => { - const { name } = event.args; + const name = asLiteralName(event.args.name); const resolver = getThisAccountId(context, event); await ensureResolver(context, resolver); diff --git a/apps/ensindexer/src/plugins/protocol-acceleration/handlers/StandaloneReverseRegistrar.ts b/apps/ensindexer/src/plugins/protocol-acceleration/handlers/StandaloneReverseRegistrar.ts index 9ac866ad16..92ba70fd2f 100644 --- a/apps/ensindexer/src/plugins/protocol-acceleration/handlers/StandaloneReverseRegistrar.ts +++ b/apps/ensindexer/src/plugins/protocol-acceleration/handlers/StandaloneReverseRegistrar.ts @@ -1,6 +1,6 @@ import config from "@/config"; -import { DEFAULT_EVM_COIN_TYPE, evmChainIdToCoinType } from "enssdk"; +import { asLiteralName, DEFAULT_EVM_COIN_TYPE, evmChainIdToCoinType } from "enssdk"; import { getENSRootChainId } from "@ensnode/datasources"; import { PluginName } from "@ensnode/ensnode-sdk"; @@ -21,7 +21,8 @@ export default function () { "StandaloneReverseRegistrar:NameForAddrChanged", ), async ({ context, event }) => { - const { addr: address, name } = event.args; + const { addr: address } = event.args; + const name = asLiteralName(event.args.name); // The DefaultReverseRegistrar on the ENS Root chain manages 'default' names under the default coinType. // On any other chain, the L2ReverseRegistrar manages names for that chain's coinType. diff --git a/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ThreeDNSToken.ts b/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ThreeDNSToken.ts index 1dc82f3da0..3d680f0674 100644 --- a/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ThreeDNSToken.ts +++ b/apps/ensindexer/src/plugins/protocol-acceleration/handlers/ThreeDNSToken.ts @@ -7,6 +7,7 @@ import { makeENSv1DomainId, makeSubdomainNode, type Node, + type NormalizedAddress, } from "enssdk"; import { DatasourceNames, maybeGetDatasource } from "@ensnode/datasources"; @@ -50,7 +51,7 @@ export default function () { node: Node; // NOTE: `label` event arg represents a `LabelHash` for the sub-node under `node` label: LabelHash; - owner: Address; + owner: NormalizedAddress; }>; }) => { const { label: labelHash, node: parentNode } = event.args; diff --git a/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-action.ts b/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-action.ts index ea6b3ce706..a140e00f59 100644 --- a/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-action.ts +++ b/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-action.ts @@ -18,6 +18,8 @@ export type LogicalEventKey = string; /** * Make a logical event key for a "logical registrar action". + * + * @dev the .toLowerCase() is just a sanity check */ export function makeLogicalEventKey({ node, diff --git a/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-controller-events.ts b/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-controller-events.ts index 61913d1e9c..d8e756e92c 100644 --- a/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-controller-events.ts +++ b/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-controller-events.ts @@ -1,4 +1,4 @@ -import type { Address, Node } from "enssdk"; +import type { Node, NormalizedAddress } from "enssdk"; import type { Hash } from "viem"; import { @@ -99,7 +99,7 @@ export async function handleRegistrarControllerEvent( // 4. Prepare referral info let encodedReferrer: EncodedReferrer | null; - let decodedReferrer: Address | null; + let decodedReferrer: NormalizedAddress | null; if (isRegistrarActionReferralAvailable(referral)) { encodedReferrer = referral.encodedReferrer; diff --git a/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-events.ts b/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-events.ts index 72c2777f45..79ad629f8e 100644 --- a/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-events.ts +++ b/apps/ensindexer/src/plugins/registrars/shared/lib/registrar-events.ts @@ -2,7 +2,13 @@ * This file contains handlers used in event handlers for a Registrar contract. */ -import { type AccountId, type Address, type Node, stringifyAccountId } from "enssdk"; +import { + type AccountId, + type Address, + type Node, + stringifyAccountId, + type UnixTimestamp, +} from "enssdk"; import type { Hash } from "viem"; import { @@ -10,7 +16,6 @@ import { bigIntToNumber, durationBetween, RegistrarActionTypes, - type UnixTimestamp, } from "@ensnode/ensnode-sdk"; import type { IndexingEngineContext, IndexingEngineEvent } from "@/lib/indexing-engines/ponder"; diff --git a/apps/ensindexer/src/plugins/subgraph/plugins/subgraph/handlers/Registry.ts b/apps/ensindexer/src/plugins/subgraph/plugins/subgraph/handlers/Registry.ts index 8ea1c5230e..5fae5affbb 100644 --- a/apps/ensindexer/src/plugins/subgraph/plugins/subgraph/handlers/Registry.ts +++ b/apps/ensindexer/src/plugins/subgraph/plugins/subgraph/handlers/Registry.ts @@ -1,4 +1,4 @@ -import { makeSubdomainNode, type Node, ROOT_NODE } from "enssdk"; +import { ENS_ROOT_NODE, makeSubdomainNode, type Node } from "enssdk"; import { PluginName } from "@ensnode/ensnode-sdk"; @@ -56,7 +56,7 @@ export default function () { namespaceContract(pluginName, "ENSv1RegistryOld:NewResolver"), async ({ context, event }) => { const shouldIgnoreEvent = await shouldIgnoreRegistryOldEvents(context, event.args.node); - const isRootNode = event.args.node === ROOT_NODE; + const isRootNode = event.args.node === ENS_ROOT_NODE; // inverted logic of https://github.com/ensdomains/ens-subgraph/blob/c844791/src/ensRegistry.ts#L246 // NOTE: the subgraph must include an exception here for the root node because it starts out @@ -80,10 +80,10 @@ export default function () { addOnchainEventListener( namespaceContract(pluginName, "ENSv1RegistryOld:Transfer"), async ({ context, event }) => { - // NOTE: this logic derived from the subgraph introduces a bug for queries with a blockheight + // NOTE: this logic derived from the subgraph introduces a minor bug for queries with a blockheight // below 9380380, when the new Registry was deployed, as it implicitly ignores Transfer events - // of the ROOT_NODE. as a result, the root node's owner is always zeroAddress until the new - // Registry events are picked up. for backwards compatibility this beahvior is re-implemented + // of the ENS_ROOT_NODE. as a result, the root node's owner is always zeroAddress until the new + // Registry events are picked up. for backwards compatibility this behavior is re-implemented // here. const shouldIgnoreEvent = await shouldIgnoreRegistryOldEvents(context, event.args.node); diff --git a/apps/ensindexer/src/plugins/subgraph/shared-handlers/NameWrapper.ts b/apps/ensindexer/src/plugins/subgraph/shared-handlers/NameWrapper.ts index 812d98ae7f..0711938f02 100644 --- a/apps/ensindexer/src/plugins/subgraph/shared-handlers/NameWrapper.ts +++ b/apps/ensindexer/src/plugins/subgraph/shared-handlers/NameWrapper.ts @@ -16,7 +16,6 @@ import config from "@/config"; */ import { checkPccBurned as isPccFuseUnset } from "@ensdomains/ensjs/utils"; import { - type Address, type DNSEncodedLiteralName, type DNSEncodedName, decodeDNSEncodedLiteralName, @@ -26,8 +25,11 @@ import { literalLabelsToInterpretedName, literalLabelToInterpretedLabel, type Node, + type NormalizedAddress, type SubgraphInterpretedLabel, type SubgraphInterpretedName, + type TokenId, + type UnixTimestampBigInt, } from "enssdk"; import { subgraph_decodeDNSEncodedLiteralName } from "@/lib/dns-helpers"; @@ -120,8 +122,8 @@ export const makeNameWrapperHandlers = () => { context: IndexingEngineContext, event: EventWithArgs, eventId: string, - tokenId: bigint, - to: Address, + tokenId: TokenId, + to: NormalizedAddress, ) { await upsertAccount(context, to); @@ -174,9 +176,9 @@ export const makeNameWrapperHandlers = () => { context: IndexingEngineContext; event: EventWithArgs<{ node: Node; - owner: Address; + owner: NormalizedAddress; fuses: number; - expiry: bigint; + expiry: UnixTimestampBigInt; name: DNSEncodedName; }>; }) { @@ -237,7 +239,7 @@ export const makeNameWrapperHandlers = () => { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; owner: Address }>; + event: EventWithArgs<{ node: Node; owner: NormalizedAddress }>; }) { const { node, owner } = event.args; @@ -303,7 +305,7 @@ export const makeNameWrapperHandlers = () => { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; expiry: bigint }>; + event: EventWithArgs<{ node: Node; expiry: UnixTimestampBigInt }>; }) { const { node, expiry } = event.args; @@ -334,7 +336,7 @@ export const makeNameWrapperHandlers = () => { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ id: bigint; to: Address }>; + event: EventWithArgs<{ id: TokenId; to: NormalizedAddress }>; }) { const { id: tokenId, to } = event.args; @@ -356,7 +358,7 @@ export const makeNameWrapperHandlers = () => { event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ ids: readonly bigint[]; to: Address }>; + event: EventWithArgs<{ ids: readonly TokenId[]; to: NormalizedAddress }>; }) { const { ids: tokenIds, to } = event.args; diff --git a/apps/ensindexer/src/plugins/subgraph/shared-handlers/Registrar.ts b/apps/ensindexer/src/plugins/subgraph/shared-handlers/Registrar.ts index c70744c9dc..c8f12af0b3 100644 --- a/apps/ensindexer/src/plugins/subgraph/shared-handlers/Registrar.ts +++ b/apps/ensindexer/src/plugins/subgraph/shared-handlers/Registrar.ts @@ -1,7 +1,6 @@ import config from "@/config"; import { - type Address, asInterpretedLabel, asLiteralLabel, constructSubInterpretedName, @@ -13,8 +12,11 @@ import { type LiteralLabel, literalLabelToInterpretedLabel, makeSubdomainNode, + type NormalizedAddress, type SubgraphInterpretedLabel, type SubgraphInterpretedName, + type UnixTimestampBigInt, + type Wei, } from "enssdk"; import type { PluginName } from "@ensnode/ensnode-sdk"; @@ -43,7 +45,7 @@ export const makeRegistrarHandlers = ({ pluginName }: { pluginName: PluginName } event: EventWithArgs<{ label: LiteralLabel; labelHash: LabelHash; - cost: bigint; + cost: Wei; }>, ) { const { label, labelHash, cost } = event.args; @@ -94,8 +96,8 @@ export const makeRegistrarHandlers = ({ pluginName }: { pluginName: PluginName } context: IndexingEngineContext; event: EventWithArgs<{ labelHash: LabelHash; - owner: Address; - expires: bigint; + owner: NormalizedAddress; + expires: UnixTimestampBigInt; }>; }) { const { labelHash, owner, expires } = event.args; @@ -225,7 +227,7 @@ export const makeRegistrarHandlers = ({ pluginName }: { pluginName: PluginName } event: EventWithArgs<{ label: Label; labelHash: LabelHash; - cost: bigint; + cost: Wei; }>; }) { const { labelHash, cost } = event.args; @@ -242,7 +244,7 @@ export const makeRegistrarHandlers = ({ pluginName }: { pluginName: PluginName } event: EventWithArgs<{ label: Label; labelHash: LabelHash; - cost: bigint; + cost: Wei; }>; }) { const { labelHash, cost } = event.args; @@ -256,7 +258,7 @@ export const makeRegistrarHandlers = ({ pluginName }: { pluginName: PluginName } event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ labelHash: LabelHash; expires: bigint }>; + event: EventWithArgs<{ labelHash: LabelHash; expires: UnixTimestampBigInt }>; }) { const { labelHash, expires } = event.args; @@ -287,7 +289,11 @@ export const makeRegistrarHandlers = ({ pluginName }: { pluginName: PluginName } event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ labelHash: LabelHash; from: Address; to: Address }>; + event: EventWithArgs<{ + labelHash: LabelHash; + from: NormalizedAddress; + to: NormalizedAddress; + }>; }) { const { labelHash, to } = event.args; diff --git a/apps/ensindexer/src/plugins/subgraph/shared-handlers/Registry.ts b/apps/ensindexer/src/plugins/subgraph/shared-handlers/Registry.ts index ac04ed6c1e..6a996a3503 100644 --- a/apps/ensindexer/src/plugins/subgraph/shared-handlers/Registry.ts +++ b/apps/ensindexer/src/plugins/subgraph/shared-handlers/Registry.ts @@ -2,7 +2,6 @@ import config from "@/config"; import { ADDR_REVERSE_NODE, - type Address, asInterpretedLabel, constructSubInterpretedName, encodeLabelHash, @@ -12,6 +11,7 @@ import { literalLabelToInterpretedLabel, makeSubdomainNode, type Node, + type NormalizedAddress, type SubgraphInterpretedLabel, type SubgraphInterpretedName, } from "enssdk"; @@ -44,7 +44,7 @@ export const handleNewOwner = node: Node; // NOTE: `label` event arg represents a `LabelHash` for the sub-node under `node` label: LabelHash; - owner: Address; + owner: NormalizedAddress; }>; }) => { const { label: labelHash, node: parentNode, owner } = event.args; @@ -178,7 +178,7 @@ export async function handleTransfer({ event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; owner: Address }>; + event: EventWithArgs<{ node: Node; owner: NormalizedAddress }>; }) { const { node, owner } = event.args; @@ -231,7 +231,7 @@ export async function handleNewResolver({ event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; resolver: Address }>; + event: EventWithArgs<{ node: Node; resolver: NormalizedAddress }>; }) { const { node, resolver: resolverAddress } = event.args; diff --git a/apps/ensindexer/src/plugins/subgraph/shared-handlers/Resolver.ts b/apps/ensindexer/src/plugins/subgraph/shared-handlers/Resolver.ts index e1f288acbf..ec13946165 100644 --- a/apps/ensindexer/src/plugins/subgraph/shared-handlers/Resolver.ts +++ b/apps/ensindexer/src/plugins/subgraph/shared-handlers/Resolver.ts @@ -1,6 +1,6 @@ import config from "@/config"; -import type { Address, Hex, Node } from "enssdk"; +import type { Hex, Node, NormalizedAddress } from "enssdk"; import type { Hash } from "viem"; import { hasNullByte, stripNullBytes, uniq } from "@ensnode/ensnode-sdk"; @@ -26,7 +26,7 @@ export async function handleAddrChanged({ event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; a: Address }>; + event: EventWithArgs<{ node: Node; a: NormalizedAddress }>; }) { const { a: address, node } = event.args; await upsertAccount(context, address); @@ -60,7 +60,7 @@ export async function handleAddressChanged({ event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; coinType: bigint; newAddress: Address }>; + event: EventWithArgs<{ node: Node; coinType: bigint; newAddress: NormalizedAddress }>; }) { const { node, coinType, newAddress } = event.args; @@ -265,7 +265,7 @@ export async function handleAuthorisationChanged({ context: IndexingEngineContext; event: EventWithArgs<{ node: Node; - owner: Address; + owner: NormalizedAddress; target: Hex; isAuthorised: boolean; }>; diff --git a/apps/ensindexer/src/plugins/subgraph/shared-handlers/ThreeDNSToken.ts b/apps/ensindexer/src/plugins/subgraph/shared-handlers/ThreeDNSToken.ts index fca6a120f9..634ec5c4ae 100644 --- a/apps/ensindexer/src/plugins/subgraph/shared-handlers/ThreeDNSToken.ts +++ b/apps/ensindexer/src/plugins/subgraph/shared-handlers/ThreeDNSToken.ts @@ -4,6 +4,7 @@ import { constructSubInterpretedName, type DNSEncodedLiteralName, type DNSEncodedName, + type DurationBigInt, decodeDNSEncodedLiteralName, encodeLabelHash, type InterpretedLabel, @@ -15,6 +16,8 @@ import { literalLabelToInterpretedLabel, makeSubdomainNode, type Node, + type NormalizedAddress, + type UnixTimestampBigInt, } from "enssdk"; import { isAddressEqual, zeroAddress, zeroHash } from "viem"; @@ -110,7 +113,7 @@ export async function handleNewOwner({ node: Node; // NOTE: `label` event arg represents a `LabelHash` for the sub-node under `node` label: LabelHash; - owner: Address; + owner: NormalizedAddress; }>; }) { const { label: labelHash, node: parentNode, owner } = event.args; @@ -210,7 +213,7 @@ export async function handleTransfer({ event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; owner: Address }>; + event: EventWithArgs<{ node: Node; owner: NormalizedAddress }>; }) { const { node, owner } = event.args; @@ -245,9 +248,9 @@ export async function handleRegistrationCreated({ // NOTE: `tld` event arg represents a `Node` that is the parent of `node` tld: Node; fqdn: DNSEncodedName; - registrant: Address; + registrant: NormalizedAddress; controlBitmap: number; - expiry: bigint; + expiry: UnixTimestampBigInt; }>; }) { const { node, tld, fqdn, registrant, expiry } = event.args; @@ -306,7 +309,7 @@ export async function handleRegistrationExtended({ event, }: { context: IndexingEngineContext; - event: EventWithArgs<{ node: Node; duration: bigint; newExpiry: bigint }>; + event: EventWithArgs<{ node: Node; duration: DurationBigInt; newExpiry: UnixTimestampBigInt }>; }) { const { node, newExpiry } = event.args; diff --git a/apps/ensrainbow/src/commands/convert-csv-command.test.ts b/apps/ensrainbow/src/commands/convert-csv-command.test.ts index 1ac1f42bbf..6a781dcecb 100644 --- a/apps/ensrainbow/src/commands/convert-csv-command.test.ts +++ b/apps/ensrainbow/src/commands/convert-csv-command.test.ts @@ -12,6 +12,11 @@ import { ENSRainbowDB } from "@/lib/database"; import { convertCsvCommand } from "./convert-csv-command"; +/** Shorthand: compute the labelhash bytes for a given label string. */ +function hashLabel(label: string) { + return labelHashToBytes(labelhashLiteralLabel(asLiteralLabel(label))); +} + // Path to test fixtures const TEST_FIXTURES_DIR = join(__dirname, "..", "..", "test", "fixtures"); @@ -53,21 +58,12 @@ describe("convert-csv-command", () => { await cli.parse(["ingest-ensrainbow", "--input-file", outputFile, "--data-dir", dataDir]); const db = await ENSRainbowDB.open(dataDir); - expect(await db.validate()).toBe(true); - const recordsCount = await db.getPrecalculatedRainbowRecordCount(); - expect(recordsCount).toBe(11); - expect( - ( - await db.getVersionedRainbowRecord( - labelHashToBytes(labelhashLiteralLabel(asLiteralLabel("123"))), - ) - )?.label, - ).toBe("123"); - expect( - await db.getVersionedRainbowRecord( - labelHashToBytes(labelhashLiteralLabel(asLiteralLabel("1234"))), - ), - ).toBe(null); + await expect(db.validate()).resolves.toBe(true); + await expect(db.getPrecalculatedRainbowRecordCount()).resolves.toBe(11); + await expect(db.getVersionedRainbowRecord(hashLabel("123"))).resolves.toMatchObject({ + label: "123", + }); + await expect(db.getVersionedRainbowRecord(hashLabel("1234"))).resolves.toBe(null); await db.close(); }); @@ -94,9 +90,8 @@ describe("convert-csv-command", () => { await cli.parse(["ingest-ensrainbow", "--input-file", outputFile, "--data-dir", dataDir]); const db = await ENSRainbowDB.open(dataDir); - expect(await db.validate()).toBe(true); - const recordsCount = await db.getPrecalculatedRainbowRecordCount(); - expect(recordsCount).toBe(10); + await expect(db.validate()).resolves.toBe(true); + await expect(db.getPrecalculatedRainbowRecordCount()).resolves.toBe(10); const labels = [ "🔥emoji-label🚀", 'special"quotes"inside', @@ -104,16 +99,11 @@ describe("convert-csv-command", () => { "label-with-null\0byte", // null byte ].map(asLiteralLabel); for (const label of labels) { - expect( - (await db.getVersionedRainbowRecord(labelHashToBytes(labelhashLiteralLabel(label)))) - ?.label, - ).toBe(label); + await expect(db.getVersionedRainbowRecord(hashLabel(label))).resolves.toMatchObject({ + label, + }); } - expect( - await db.getVersionedRainbowRecord( - labelHashToBytes(labelhashLiteralLabel(asLiteralLabel("1234"))), - ), - ).toBe(null); + await expect(db.getVersionedRainbowRecord(hashLabel("1234"))).resolves.toBe(null); await db.close(); }); }); @@ -193,9 +183,8 @@ describe("convert-csv-command", () => { // Verify initial database const db = await ENSRainbowDB.open(dataDir); - expect(await db.validate()).toBe(true); - const initialCount = await db.getPrecalculatedRainbowRecordCount(); - expect(initialCount).toBe(11); + await expect(db.validate()).resolves.toBe(true); + await expect(db.getPrecalculatedRainbowRecordCount()).resolves.toBe(11); await db.close(); // Now convert the same CSV file again, but with filtering enabled @@ -251,41 +240,14 @@ describe("convert-csv-command", () => { await cli.parse(["ingest-ensrainbow", "--input-file", outputFile, "--data-dir", dataDir]); const db = await ENSRainbowDB.open(dataDir); - expect(await db.validate()).toBe(true); - - // Should have 4 unique labels (label1, label2, label3, label4) - const recordsCount = await db.getPrecalculatedRainbowRecordCount(); - expect(recordsCount).toBe(4); - - // Verify specific labels exist - expect( - ( - await db.getVersionedRainbowRecord( - labelHashToBytes(labelhashLiteralLabel(asLiteralLabel("label1"))), - ) - )?.label, - ).toBe("label1"); - expect( - ( - await db.getVersionedRainbowRecord( - labelHashToBytes(labelhashLiteralLabel(asLiteralLabel("label2"))), - ) - )?.label, - ).toBe("label2"); - expect( - ( - await db.getVersionedRainbowRecord( - labelHashToBytes(labelhashLiteralLabel(asLiteralLabel("label3"))), - ) - )?.label, - ).toBe("label3"); - expect( - ( - await db.getVersionedRainbowRecord( - labelHashToBytes(labelhashLiteralLabel(asLiteralLabel("label4"))), - ) - )?.label, - ).toBe("label4"); + await expect(db.validate()).resolves.toBe(true); + await expect(db.getPrecalculatedRainbowRecordCount()).resolves.toBe(4); + + for (const label of ["label1", "label2", "label3", "label4"]) { + await expect(db.getVersionedRainbowRecord(hashLabel(label))).resolves.toMatchObject({ + label, + }); + } await db.close(); }); @@ -332,9 +294,8 @@ describe("convert-csv-command", () => { // Verify initial database was created const db = await ENSRainbowDB.open(dataDir); - expect(await db.validate()).toBe(true); - const labelSet = await db.getLabelSet(); - expect(labelSet.labelSetId).toBe("test-label-set-a"); + await expect(db.validate()).resolves.toBe(true); + await expect(db.getLabelSet()).resolves.toMatchObject({ labelSetId: "test-label-set-a" }); await db.close(); // Now try to convert with a different label set ID and the existing database path @@ -501,9 +462,8 @@ describe("convert-csv-command", () => { await cli.parse(["ingest-ensrainbow", "--input-file", outputFile, "--data-dir", dataDir]); const db = await ENSRainbowDB.open(dataDir); - expect(await db.validate()).toBe(true); - const recordsCount = await db.getPrecalculatedRainbowRecordCount(); - expect(recordsCount).toBe(0); + await expect(db.validate()).resolves.toBe(true); + await expect(db.getPrecalculatedRainbowRecordCount()).resolves.toBe(0); await db.close(); }); @@ -550,10 +510,9 @@ describe("convert-csv-command", () => { await cli.parse(["ingest-ensrainbow", "--input-file", outputFile, "--data-dir", dataDir]); const db = await ENSRainbowDB.open(dataDir); - expect(await db.validate()).toBe(true); - const recordsCount = await db.getPrecalculatedRainbowRecordCount(); + await expect(db.validate()).resolves.toBe(true); // Should have 3 records: "label", "label1", "label2" - expect(recordsCount).toBe(3); + await expect(db.getPrecalculatedRainbowRecordCount()).resolves.toBe(3); await db.close(); }); @@ -603,27 +562,14 @@ describe("convert-csv-command", () => { await cli.parse(["ingest-ensrainbow", "--input-file", outputFile, "--data-dir", dataDir]); const db = await ENSRainbowDB.open(dataDir); - expect(await db.validate()).toBe(true); - const recordsCount = await db.getPrecalculatedRainbowRecordCount(); - expect(recordsCount).toBe(2); - - // Verify the labels were stored correctly - const label1 = "label,with,commas"; - const label2 = "another,label"; - expect( - ( - await db.getVersionedRainbowRecord( - labelHashToBytes(labelhashLiteralLabel(asLiteralLabel(label1))), - ) - )?.label, - ).toBe(label1); - expect( - ( - await db.getVersionedRainbowRecord( - labelHashToBytes(labelhashLiteralLabel(asLiteralLabel(label2))), - ) - )?.label, - ).toBe(label2); + await expect(db.validate()).resolves.toBe(true); + await expect(db.getPrecalculatedRainbowRecordCount()).resolves.toBe(2); + + for (const label of ["label,with,commas", "another,label"]) { + await expect(db.getVersionedRainbowRecord(hashLabel(label))).resolves.toMatchObject({ + label, + }); + } await db.close(); }); diff --git a/examples/enskit-react-example/src/DomainView.tsx b/examples/enskit-react-example/src/DomainView.tsx index 2e6c4ed775..0cd4b79403 100644 --- a/examples/enskit-react-example/src/DomainView.tsx +++ b/examples/enskit-react-example/src/DomainView.tsx @@ -1,6 +1,7 @@ +import { EnsureInterpretedName } from "enskit/react"; import { type FragmentOf, graphql, readFragment, useOmnigraphQuery } from "enskit/react/omnigraph"; -import { asInterpretedName } from "enssdk"; -import { Link, useParams } from "react-router"; +import { asLiteralName, getParentInterpretedName, type InterpretedName } from "enssdk"; +import { Link, Navigate, useParams } from "react-router"; const DomainFragment = graphql(` fragment DomainFragment on Domain { @@ -39,10 +40,7 @@ function SubdomainLink({ data }: { data: FragmentOf }) { ); } -export function DomainView() { - const params = useParams(); - const name = asInterpretedName(params.name ?? "eth"); - +function RenderDomain({ name }: { name: InterpretedName }) { const [result] = useOmnigraphQuery({ query: DomainByNameQuery, variables: { name }, @@ -52,14 +50,14 @@ export function DomainView() { if (fetching) return

Loading...

; if (error) return

Error: {error.message}

; - if (!data?.domain) return

Not found

; + if (!data?.domain) return

No domain was found with name '{name}'.

; const domain = readFragment(DomainFragment, data.domain); - const parentName = name.includes(".") ? name.slice(name.indexOf(".") + 1) : null; + const parentName = getParentInterpretedName(name); return (
-

{domain.name}

+

{domain.name ?? name}

Owner: {domain.owner?.address ?? "none"}

{parentName && ( @@ -78,3 +76,46 @@ export function DomainView() {
); } + +export function DomainView() { + const params = useParams(); + + // if a user accesses '/domain' directly, redirect to '/domain/eth' + // TODO: render the set of tlds + if (params.name === undefined || params.name === "") return ; + + // here we ensure that the provided /domain/:name parameter is an InterpretedName + return ( + } + // + // this name can't conform to InterpretedName nor can it be coerced: it is malformed: show an error + malformed={(name) => ( +
+

Invalid name: '{name}'

+ Back to 'eth' Domain. +
+ )} + > + {(name) => } +
+ ); +} diff --git a/packages/datasources/src/invariants.test.ts b/packages/datasources/src/invariants.test.ts index 5da2fcf5b5..e8524e2628 100644 --- a/packages/datasources/src/invariants.test.ts +++ b/packages/datasources/src/invariants.test.ts @@ -19,10 +19,11 @@ describe("datasource invariants", () => { `The ContractConfig '${namespace}' > '${datasourceName}' > '${contractName}' > '${contractConfig.address}' is not a viem#Address. This occurs if the address property of any ContractConfig in the Datasource is malformed (i.e. not a viem#Address).`, ).toBe(true); - // must be lowercase adddress + // must be lowercase expect( + // TODO: could use enssdk#isNormalizedAddress here contractConfig.address === contractConfig.address.toLowerCase(), - `The ContractConfig '${namespace}' > '${datasourceName}' > '${contractName}' > '${contractConfig.address}' is not is lowercase format.`, + `The Address '${namespace}' > '${datasourceName}' > '${contractName}' > '${contractConfig.address}' is not an enssdk#NormalizedAddress (i.e. is not fully lowercase).`, ).toBe(true); } } diff --git a/packages/ens-referrals/src/address.ts b/packages/ens-referrals/src/address.ts index bcc9b4fc28..2580243b7a 100644 --- a/packages/ens-referrals/src/address.ts +++ b/packages/ens-referrals/src/address.ts @@ -1,16 +1,8 @@ -import type { Address } from "enssdk"; -import { isAddress } from "viem"; +import type { NormalizedAddress } from "enssdk"; +import { isNormalizedAddress } from "enssdk"; -export const validateLowercaseAddress = (address: Address): void => { - if (!isAddress(address, { strict: false })) { - throw new Error(`Invalid address: ${address}. Address must be a valid EVM address.`); +export const validateAddress = (address: NormalizedAddress): void => { + if (!isNormalizedAddress(address)) { + throw new Error(`Invalid address: '${address}'. Address must be a lowercase EVM Address.`); } - - if (address !== address.toLowerCase()) { - throw new Error(`Invalid address: ${address}. Address must be in lowercase format.`); - } -}; - -export const normalizeAddress = (address: Address): Address => { - return address.toLowerCase() as Address; }; diff --git a/packages/ens-referrals/src/aggregations.ts b/packages/ens-referrals/src/aggregations.ts index 3ab23edc92..1cde5b5079 100644 --- a/packages/ens-referrals/src/aggregations.ts +++ b/packages/ens-referrals/src/aggregations.ts @@ -1,4 +1,4 @@ -import type { Duration } from "@ensnode/ensnode-sdk"; +import type { Duration } from "enssdk"; import { validateNonNegativeInteger } from "./number"; import type { RankedReferrerMetrics } from "./referrer-metrics"; diff --git a/packages/ens-referrals/src/api/zod-schemas.ts b/packages/ens-referrals/src/api/zod-schemas.ts index d025ab1ebd..d8a4d58b29 100644 --- a/packages/ens-referrals/src/api/zod-schemas.ts +++ b/packages/ens-referrals/src/api/zod-schemas.ts @@ -13,8 +13,8 @@ import { makeAccountIdSchema, makeDurationSchema, makeFiniteNonNegativeNumberSchema, - makeLowercaseAddressSchema, makeNonNegativeIntegerSchema, + makeNormalizedAddressSchema, makePositiveIntegerSchema, makeUnixTimestampSchema, } from "@ensnode/ensnode-sdk/internal"; @@ -53,7 +53,7 @@ export const makeReferralProgramRulesSchema = (valueLabel: string = "ReferralPro */ export const makeAwardedReferrerMetricsSchema = (valueLabel: string = "AwardedReferrerMetrics") => z.object({ - referrer: makeLowercaseAddressSchema(`${valueLabel}.referrer`), + referrer: makeNormalizedAddressSchema(`${valueLabel}.referrer`), totalReferrals: makeNonNegativeIntegerSchema(`${valueLabel}.totalReferrals`), totalIncrementalDuration: makeDurationSchema(`${valueLabel}.totalIncrementalDuration`), totalRevenueContribution: makeRevenueContributionSchema( @@ -79,7 +79,7 @@ export const makeAwardedReferrerMetricsSchema = (valueLabel: string = "AwardedRe */ export const makeUnrankedReferrerMetricsSchema = (valueLabel: string = "UnrankedReferrerMetrics") => z.object({ - referrer: makeLowercaseAddressSchema(`${valueLabel}.referrer`), + referrer: makeNormalizedAddressSchema(`${valueLabel}.referrer`), totalReferrals: makeNonNegativeIntegerSchema(`${valueLabel}.totalReferrals`), totalIncrementalDuration: makeDurationSchema(`${valueLabel}.totalIncrementalDuration`), totalRevenueContribution: makeRevenueContributionSchema( diff --git a/packages/ens-referrals/src/rank.ts b/packages/ens-referrals/src/rank.ts index d2d3d95571..eb7fa2b4bb 100644 --- a/packages/ens-referrals/src/rank.ts +++ b/packages/ens-referrals/src/rank.ts @@ -1,6 +1,4 @@ -import type { Address } from "enssdk"; - -import type { Duration } from "@ensnode/ensnode-sdk"; +import type { Duration, NormalizedAddress } from "enssdk"; import { isPositiveInteger } from "./number"; import type { ReferralProgramRules } from "./rules"; @@ -87,11 +85,9 @@ export interface ReferrerMetricsForComparison { totalIncrementalDuration: Duration; /** - * The fully lowercase Ethereum address of the referrer. - * - * @invariant Guaranteed to be a valid EVM address in lowercase format. + * The Ethereum address of the referrer, as a {@link NormalizedAddress}. */ - referrer: Address; + referrer: NormalizedAddress; } export const compareReferrerMetrics = ( diff --git a/packages/ens-referrals/src/referrer-detail.ts b/packages/ens-referrals/src/referrer-detail.ts index 9bd52b8f3e..c725b7549f 100644 --- a/packages/ens-referrals/src/referrer-detail.ts +++ b/packages/ens-referrals/src/referrer-detail.ts @@ -1,4 +1,4 @@ -import type { Address, UnixTimestamp } from "enssdk"; +import type { NormalizedAddress, UnixTimestamp } from "enssdk"; import type { AggregatedReferrerMetrics } from "./aggregations"; import type { ReferrerLeaderboard } from "./leaderboard"; @@ -128,7 +128,7 @@ export type ReferrerDetail = ReferrerDetailRanked | ReferrerDetailUnranked; * @returns The appropriate {@link ReferrerDetail} (ranked or unranked) */ export const getReferrerDetail = ( - referrer: Address, + referrer: NormalizedAddress, leaderboard: ReferrerLeaderboard, ): ReferrerDetail => { const awardedReferrerMetrics = leaderboard.referrers.get(referrer); diff --git a/packages/ens-referrals/src/referrer-metrics.ts b/packages/ens-referrals/src/referrer-metrics.ts index 837dce6a39..c5d2b2bd4b 100644 --- a/packages/ens-referrals/src/referrer-metrics.ts +++ b/packages/ens-referrals/src/referrer-metrics.ts @@ -1,8 +1,6 @@ -import type { Address } from "enssdk"; +import type { Duration, NormalizedAddress } from "enssdk"; -import type { Duration } from "@ensnode/ensnode-sdk"; - -import { normalizeAddress, validateLowercaseAddress } from "./address"; +import { validateAddress } from "./address"; import type { AggregatedReferrerMetrics } from "./aggregations"; import type { USDQuantity } from "./currency"; import { validateNonNegativeInteger } from "./number"; @@ -25,11 +23,9 @@ import { validateDuration } from "./time"; */ export interface ReferrerMetrics { /** - * The fully lowercase Ethereum address of the referrer. - * - * @invariant Guaranteed to be a valid EVM address in lowercase format + * The Ethereum address of the referrer, as a {@link NormalizedAddress}. */ - referrer: Address; + referrer: NormalizedAddress; /** * The total number of referrals made by the referrer within the {@link ReferralProgramRules}. @@ -57,13 +53,13 @@ export interface ReferrerMetrics { } export const buildReferrerMetrics = ( - referrer: Address, + referrer: NormalizedAddress, totalReferrals: number, totalIncrementalDuration: Duration, totalRevenueContribution: RevenueContribution, ): ReferrerMetrics => { const result = { - referrer: normalizeAddress(referrer), + referrer, totalReferrals, totalIncrementalDuration, totalRevenueContribution, @@ -74,7 +70,7 @@ export const buildReferrerMetrics = ( }; export const validateReferrerMetrics = (metrics: ReferrerMetrics): void => { - validateLowercaseAddress(metrics.referrer); + validateAddress(metrics.referrer); validateNonNegativeInteger(metrics.totalReferrals); validateDuration(metrics.totalIncrementalDuration); validateRevenueContribution(metrics.totalRevenueContribution); @@ -373,7 +369,9 @@ export const validateUnrankedReferrerMetrics = (metrics: UnrankedReferrerMetrics * @param referrer - The referrer address * @returns An {@link UnrankedReferrerMetrics} with zero values for all metrics and null rank */ -export const buildUnrankedReferrerMetrics = (referrer: Address): UnrankedReferrerMetrics => { +export const buildUnrankedReferrerMetrics = ( + referrer: NormalizedAddress, +): UnrankedReferrerMetrics => { const baseMetrics = buildReferrerMetrics(referrer, 0, 0, 0n); const scoredMetrics = buildScoredReferrerMetrics(baseMetrics); diff --git a/packages/ens-referrals/src/score.ts b/packages/ens-referrals/src/score.ts index 5995b6e1dc..6690e0f308 100644 --- a/packages/ens-referrals/src/score.ts +++ b/packages/ens-referrals/src/score.ts @@ -1,4 +1,4 @@ -import type { Duration } from "@ensnode/ensnode-sdk"; +import type { Duration } from "enssdk"; import { SECONDS_PER_YEAR } from "./time"; diff --git a/packages/ens-referrals/src/time.ts b/packages/ens-referrals/src/time.ts index 228465341f..a72b180ca9 100644 --- a/packages/ens-referrals/src/time.ts +++ b/packages/ens-referrals/src/time.ts @@ -1,6 +1,4 @@ -import type { UnixTimestamp } from "enssdk"; - -import type { Duration } from "@ensnode/ensnode-sdk"; +import type { Duration, UnixTimestamp } from "enssdk"; import { isInteger, isNonNegativeInteger } from "./number"; diff --git a/packages/ens-referrals/src/v1/address.ts b/packages/ens-referrals/src/v1/address.ts index bcc9b4fc28..22c19c20e9 100644 --- a/packages/ens-referrals/src/v1/address.ts +++ b/packages/ens-referrals/src/v1/address.ts @@ -1,16 +1,8 @@ -import type { Address } from "enssdk"; -import { isAddress } from "viem"; +import type { NormalizedAddress } from "enssdk"; +import { isNormalizedAddress } from "enssdk"; -export const validateLowercaseAddress = (address: Address): void => { - if (!isAddress(address, { strict: false })) { - throw new Error(`Invalid address: ${address}. Address must be a valid EVM address.`); +export const validateAddress = (address: NormalizedAddress): void => { + if (!isNormalizedAddress(address)) { + throw new Error(`Invalid address: '${address}'. Address must be a NormalizedAddress.`); } - - if (address !== address.toLowerCase()) { - throw new Error(`Invalid address: ${address}. Address must be in lowercase format.`); - } -}; - -export const normalizeAddress = (address: Address): Address => { - return address.toLowerCase() as Address; }; diff --git a/packages/ens-referrals/src/v1/api/zod-schemas.ts b/packages/ens-referrals/src/v1/api/zod-schemas.ts index 6b5a0b54ec..e65730a5c2 100644 --- a/packages/ens-referrals/src/v1/api/zod-schemas.ts +++ b/packages/ens-referrals/src/v1/api/zod-schemas.ts @@ -9,7 +9,7 @@ import z from "zod/v4"; -import { makeLowercaseAddressSchema } from "@ensnode/ensnode-sdk/internal"; +import { makeNormalizedAddressSchema } from "@ensnode/ensnode-sdk/internal"; import { makeReferralProgramEditionSummaryPieSplitSchema, @@ -243,7 +243,7 @@ export const makeReferrerMetricsEditionsRequestSchema = ( valueLabel: string = "ReferrerMetricsEditionsRequest", ) => z.object({ - referrer: makeLowercaseAddressSchema(`${valueLabel}.referrer`), + referrer: makeNormalizedAddressSchema(`${valueLabel}.referrer`), editions: makeReferrerMetricsEditionsArraySchema(`${valueLabel}.editions`), }); diff --git a/packages/ens-referrals/src/v1/award-models/pie-split/aggregations.ts b/packages/ens-referrals/src/v1/award-models/pie-split/aggregations.ts index 072bbc2f53..d363fe0d98 100644 --- a/packages/ens-referrals/src/v1/award-models/pie-split/aggregations.ts +++ b/packages/ens-referrals/src/v1/award-models/pie-split/aggregations.ts @@ -1,4 +1,6 @@ -import { type Duration, type PriceEth, priceEth } from "@ensnode/ensnode-sdk"; +import type { Duration } from "enssdk"; + +import { type PriceEth, priceEth } from "@ensnode/ensnode-sdk"; import { makePriceEthSchema } from "@ensnode/ensnode-sdk/internal"; import { validateNonNegativeInteger } from "../../number"; diff --git a/packages/ens-referrals/src/v1/award-models/pie-split/api/zod-schemas.ts b/packages/ens-referrals/src/v1/award-models/pie-split/api/zod-schemas.ts index ab03f5376d..457e5bcc17 100644 --- a/packages/ens-referrals/src/v1/award-models/pie-split/api/zod-schemas.ts +++ b/packages/ens-referrals/src/v1/award-models/pie-split/api/zod-schemas.ts @@ -3,8 +3,8 @@ import z from "zod/v4"; import { makeDurationSchema, makeFiniteNonNegativeNumberSchema, - makeLowercaseAddressSchema, makeNonNegativeIntegerSchema, + makeNormalizedAddressSchema, makePositiveIntegerSchema, makePriceEthSchema, makePriceUsdcSchema, @@ -39,7 +39,7 @@ export const makeAwardedReferrerMetricsPieSplitSchema = ( valueLabel: string = "AwardedReferrerMetricsPieSplit", ) => z.object({ - referrer: makeLowercaseAddressSchema(`${valueLabel}.referrer`), + referrer: makeNormalizedAddressSchema(`${valueLabel}.referrer`), totalReferrals: makeNonNegativeIntegerSchema(`${valueLabel}.totalReferrals`), totalIncrementalDuration: makeDurationSchema(`${valueLabel}.totalIncrementalDuration`), totalRevenueContribution: makePriceEthSchema(`${valueLabel}.totalRevenueContribution`), @@ -65,7 +65,7 @@ export const makeUnrankedReferrerMetricsPieSplitSchema = ( valueLabel: string = "UnrankedReferrerMetricsPieSplit", ) => z.object({ - referrer: makeLowercaseAddressSchema(`${valueLabel}.referrer`), + referrer: makeNormalizedAddressSchema(`${valueLabel}.referrer`), totalReferrals: makeNonNegativeIntegerSchema(`${valueLabel}.totalReferrals`), totalIncrementalDuration: makeDurationSchema(`${valueLabel}.totalIncrementalDuration`), totalRevenueContribution: makePriceEthSchema(`${valueLabel}.totalRevenueContribution`), diff --git a/packages/ens-referrals/src/v1/award-models/pie-split/metrics.ts b/packages/ens-referrals/src/v1/award-models/pie-split/metrics.ts index 2d859288f5..37ff2b6195 100644 --- a/packages/ens-referrals/src/v1/award-models/pie-split/metrics.ts +++ b/packages/ens-referrals/src/v1/award-models/pie-split/metrics.ts @@ -1,4 +1,4 @@ -import type { Address } from "enssdk"; +import type { NormalizedAddress } from "enssdk"; import { type PriceUsdc, priceEth, priceUsdc, scalePrice } from "@ensnode/ensnode-sdk"; import { makePriceEthSchema, makePriceUsdcSchema } from "@ensnode/ensnode-sdk/internal"; @@ -316,7 +316,7 @@ export const validateUnrankedReferrerMetricsPieSplit = ( * @returns An {@link UnrankedReferrerMetricsPieSplit} with zero values for all metrics and null rank */ export const buildUnrankedReferrerMetricsPieSplit = ( - referrer: Address, + referrer: NormalizedAddress, ): UnrankedReferrerMetricsPieSplit => { const metrics = buildReferrerMetrics(referrer, 0, 0, priceEth(0n)); const scoredMetrics = buildScoredReferrerMetricsPieSplit(metrics); diff --git a/packages/ens-referrals/src/v1/award-models/pie-split/rank.ts b/packages/ens-referrals/src/v1/award-models/pie-split/rank.ts index 652af4f47f..d4aac8695e 100644 --- a/packages/ens-referrals/src/v1/award-models/pie-split/rank.ts +++ b/packages/ens-referrals/src/v1/award-models/pie-split/rank.ts @@ -1,4 +1,4 @@ -import type { Duration } from "@ensnode/ensnode-sdk"; +import type { Duration } from "enssdk"; import type { ReferrerRank } from "../shared/rank"; import type { ReferrerScore } from "../shared/score"; diff --git a/packages/ens-referrals/src/v1/award-models/pie-split/score.ts b/packages/ens-referrals/src/v1/award-models/pie-split/score.ts index 755ad8976d..369add2d9b 100644 --- a/packages/ens-referrals/src/v1/award-models/pie-split/score.ts +++ b/packages/ens-referrals/src/v1/award-models/pie-split/score.ts @@ -1,4 +1,4 @@ -import type { Duration } from "@ensnode/ensnode-sdk"; +import type { Duration } from "enssdk"; import { SECONDS_PER_YEAR } from "../../time"; import type { ReferrerScore } from "../shared/score"; diff --git a/packages/ens-referrals/src/v1/award-models/rev-share-cap/aggregations.ts b/packages/ens-referrals/src/v1/award-models/rev-share-cap/aggregations.ts index 4a1462c47a..9d15f20f65 100644 --- a/packages/ens-referrals/src/v1/award-models/rev-share-cap/aggregations.ts +++ b/packages/ens-referrals/src/v1/award-models/rev-share-cap/aggregations.ts @@ -1,4 +1,6 @@ -import { type Duration, type PriceEth, type PriceUsdc, priceEth } from "@ensnode/ensnode-sdk"; +import type { Duration } from "enssdk"; + +import { type PriceEth, type PriceUsdc, priceEth } from "@ensnode/ensnode-sdk"; import { makePriceEthSchema, makePriceUsdcSchema } from "@ensnode/ensnode-sdk/internal"; import { validateNonNegativeInteger } from "../../number"; diff --git a/packages/ens-referrals/src/v1/award-models/rev-share-cap/api/zod-schemas.ts b/packages/ens-referrals/src/v1/award-models/rev-share-cap/api/zod-schemas.ts index 30a6a1ab79..57e0901f6d 100644 --- a/packages/ens-referrals/src/v1/award-models/rev-share-cap/api/zod-schemas.ts +++ b/packages/ens-referrals/src/v1/award-models/rev-share-cap/api/zod-schemas.ts @@ -3,15 +3,14 @@ import z from "zod/v4"; import { makeDurationSchema, makeFiniteNonNegativeNumberSchema, - makeLowercaseAddressSchema, makeNonNegativeIntegerSchema, + makeNormalizedAddressSchema, makePositiveIntegerSchema, makePriceEthSchema, makePriceUsdcSchema, makeUnixTimestampSchema, } from "@ensnode/ensnode-sdk/internal"; -import { normalizeAddress } from "../../../address"; import { makeBaseReferralProgramEditionSummarySchema, makeBaseReferralProgramRulesSchema, @@ -28,7 +27,7 @@ export const makeReferralProgramEditionDisqualificationSchema = ( valueLabel = "ReferralProgramEditionDisqualification", ) => z.object({ - referrer: makeLowercaseAddressSchema(`${valueLabel}.referrer`), + referrer: makeNormalizedAddressSchema(`${valueLabel}.referrer`), reason: z.string().trim().min(1, `${valueLabel}.reason must not be empty`), }); @@ -53,10 +52,11 @@ export const makeReferralProgramRulesRevShareCapSchema = ( .array( makeReferralProgramEditionDisqualificationSchema(`${valueLabel}.disqualifications[item]`), ) + // NOTE: addresses are already normalized, so string equivalence here is accurate .refine( (items) => { - const addresses = items.map((item) => normalizeAddress(item.referrer)); - return new Set(addresses).size === addresses.length; + const referrers = items.map((d) => d.referrer); + return new Set(referrers).size === referrers.length; }, { message: `${valueLabel}.disqualifications must not contain duplicate referrer addresses`, @@ -73,7 +73,7 @@ export const makeAwardedReferrerMetricsRevShareCapSchema = ( ) => z .object({ - referrer: makeLowercaseAddressSchema(`${valueLabel}.referrer`), + referrer: makeNormalizedAddressSchema(`${valueLabel}.referrer`), totalReferrals: makeNonNegativeIntegerSchema(`${valueLabel}.totalReferrals`), totalIncrementalDuration: makeDurationSchema(`${valueLabel}.totalIncrementalDuration`), totalRevenueContribution: makePriceEthSchema(`${valueLabel}.totalRevenueContribution`), @@ -120,7 +120,7 @@ export const makeUnrankedReferrerMetricsRevShareCapSchema = ( ) => z .object({ - referrer: makeLowercaseAddressSchema(`${valueLabel}.referrer`), + referrer: makeNormalizedAddressSchema(`${valueLabel}.referrer`), totalReferrals: makeNonNegativeIntegerSchema(`${valueLabel}.totalReferrals`), totalIncrementalDuration: makeDurationSchema(`${valueLabel}.totalIncrementalDuration`), totalRevenueContribution: makePriceEthSchema(`${valueLabel}.totalRevenueContribution`), diff --git a/packages/ens-referrals/src/v1/award-models/rev-share-cap/leaderboard.ts b/packages/ens-referrals/src/v1/award-models/rev-share-cap/leaderboard.ts index e5aacbbf2c..04fdf86a16 100644 --- a/packages/ens-referrals/src/v1/award-models/rev-share-cap/leaderboard.ts +++ b/packages/ens-referrals/src/v1/award-models/rev-share-cap/leaderboard.ts @@ -1,14 +1,7 @@ -import type { Address } from "enssdk"; +import type { Duration, NormalizedAddress, UnixTimestamp } from "enssdk"; + +import { priceEth, priceUsdc, scalePrice } from "@ensnode/ensnode-sdk"; -import { - type Duration, - priceEth, - priceUsdc, - scalePrice, - type UnixTimestamp, -} from "@ensnode/ensnode-sdk"; - -import { normalizeAddress } from "../../address"; import { buildReferrerMetrics } from "../../referrer-metrics"; import { SECONDS_PER_YEAR } from "../../time"; import type { ReferralProgramAwardModels } from "../shared/rules"; @@ -60,7 +53,7 @@ export interface ReferrerLeaderboardRevShareCap { * @invariant Each value in this map is guaranteed to have a non-zero * `totalReferrals` and `totalIncrementalDuration`. */ - referrers: Map; + referrers: Map; /** * The {@link UnixTimestamp} of when the data used to build the {@link ReferrerLeaderboardRevShareCap} was accurate as of. @@ -103,11 +96,11 @@ export const buildReferrerLeaderboardRevShareCap = ( const sortedEvents = sortReferralEvents(events); // 2. Process events sequentially to run the race. - const referrerStates = new Map(); + const referrerStates = new Map(); let awardPoolRemaining = rules.awardPool.amount; for (const event of sortedEvents) { - const referrer = normalizeAddress(event.referrer); + const referrer = event.referrer; let state = referrerStates.get(referrer); if (!state) { diff --git a/packages/ens-referrals/src/v1/award-models/rev-share-cap/metrics.ts b/packages/ens-referrals/src/v1/award-models/rev-share-cap/metrics.ts index 7bd6daf47e..146c3c594c 100644 --- a/packages/ens-referrals/src/v1/award-models/rev-share-cap/metrics.ts +++ b/packages/ens-referrals/src/v1/award-models/rev-share-cap/metrics.ts @@ -1,4 +1,4 @@ -import type { Address } from "enssdk"; +import type { NormalizedAddress } from "enssdk"; import { type PriceUsdc, priceEth, priceUsdc } from "@ensnode/ensnode-sdk"; import { makePriceEthSchema, makePriceUsdcSchema } from "@ensnode/ensnode-sdk/internal"; @@ -340,7 +340,7 @@ export const validateUnrankedReferrerMetricsRevShareCap = ( * Build an unranked zero-metrics rev-share-cap referrer record for an address not on the leaderboard. */ export const buildUnrankedReferrerMetricsRevShareCap = ( - referrer: Address, + referrer: NormalizedAddress, rules: ReferralProgramRulesRevShareCap, ): UnrankedReferrerMetricsRevShareCap => { const metrics = buildReferrerMetrics(referrer, 0, 0, priceEth(0n)); diff --git a/packages/ens-referrals/src/v1/award-models/rev-share-cap/referral-event.ts b/packages/ens-referrals/src/v1/award-models/rev-share-cap/referral-event.ts index 289ea63e54..af8b7e4621 100644 --- a/packages/ens-referrals/src/v1/award-models/rev-share-cap/referral-event.ts +++ b/packages/ens-referrals/src/v1/award-models/rev-share-cap/referral-event.ts @@ -1,6 +1,6 @@ -import type { Address, UnixTimestamp } from "enssdk"; +import type { Duration, NormalizedAddress, UnixTimestamp } from "enssdk"; -import type { Duration, PriceEth } from "@ensnode/ensnode-sdk"; +import type { PriceEth } from "@ensnode/ensnode-sdk"; /** * Represents a single raw referral event. @@ -10,9 +10,9 @@ import type { Duration, PriceEth } from "@ensnode/ensnode-sdk"; */ export interface ReferralEvent { /** - * The fully lowercase Ethereum address of the referrer. + * The Ethereum address of the referrer, as a {@link NormalizedAddress}. */ - referrer: Address; + referrer: NormalizedAddress; /** * Unix seconds block timestamp. diff --git a/packages/ens-referrals/src/v1/award-models/rev-share-cap/rules.ts b/packages/ens-referrals/src/v1/award-models/rev-share-cap/rules.ts index 857b2b113a..2781a15cc2 100644 --- a/packages/ens-referrals/src/v1/award-models/rev-share-cap/rules.ts +++ b/packages/ens-referrals/src/v1/award-models/rev-share-cap/rules.ts @@ -1,9 +1,9 @@ -import type { AccountId, Address, UnixTimestamp } from "enssdk"; +import type { AccountId, NormalizedAddress, UnixTimestamp } from "enssdk"; import type { PriceUsdc } from "@ensnode/ensnode-sdk"; import { makePriceUsdcSchema } from "@ensnode/ensnode-sdk/internal"; -import { normalizeAddress, validateLowercaseAddress } from "../../address"; +import { validateAddress } from "../../address"; import { type BaseReferralProgramRules, ReferralProgramAwardModels, @@ -15,11 +15,9 @@ import { */ export interface ReferralProgramEditionDisqualification { /** - * The address of the disqualified referrer. - * - * @invariant Guaranteed to be a valid EVM address in lowercase format. + * The Ethereum address of the disqualified referrer, as a {@link NormalizedAddress}. */ - referrer: Address; + referrer: NormalizedAddress; /** * A human-readable explanation of why the referrer was disqualified. @@ -104,7 +102,7 @@ export const validateReferralProgramRulesRevShareCap = ( } for (const d of rules.disqualifications) { - validateLowercaseAddress(d.referrer); + validateAddress(d.referrer); if (d.reason.trim().length === 0) { throw new Error( "ReferralProgramRulesRevShareCap: disqualification reason must not be empty.", @@ -164,14 +162,11 @@ export const buildReferralProgramRulesRevShareCap = ( * @param rules - The rev-share-cap rules of the referral program. */ export function isReferrerQualifiedRevShareCap( - referrer: Address, + referrer: NormalizedAddress, totalBaseRevenueContribution: PriceUsdc, rules: ReferralProgramRulesRevShareCap, ): boolean { - const normalizedReferrer = normalizeAddress(referrer); - const isAdminDisqualified = rules.disqualifications.some( - (d) => d.referrer === normalizedReferrer, - ); + const isAdminDisqualified = rules.disqualifications.some((d) => d.referrer === referrer); return ( totalBaseRevenueContribution.amount >= rules.minBaseRevenueContribution.amount && !isAdminDisqualified diff --git a/packages/ens-referrals/src/v1/award-models/shared/rank.ts b/packages/ens-referrals/src/v1/award-models/shared/rank.ts index 6f25960e53..d4a9f11b0b 100644 --- a/packages/ens-referrals/src/v1/award-models/shared/rank.ts +++ b/packages/ens-referrals/src/v1/award-models/shared/rank.ts @@ -1,6 +1,4 @@ -import type { Address } from "enssdk"; - -import type { Duration } from "@ensnode/ensnode-sdk"; +import type { Duration, NormalizedAddress } from "enssdk"; import { isPositiveInteger } from "../../number"; import type { ReferrerMetrics } from "../../referrer-metrics"; @@ -27,11 +25,9 @@ export interface ReferrerMetricsForComparison { totalIncrementalDuration: Duration; /** - * The fully lowercase Ethereum address of the referrer. - * - * @invariant Guaranteed to be a valid EVM address in lowercase format. + * The Ethereum address of the referrer, as a {@link NormalizedAddress}. */ - referrer: Address; + referrer: NormalizedAddress; } export const compareReferrerMetrics = ( diff --git a/packages/ens-referrals/src/v1/edition-metrics.ts b/packages/ens-referrals/src/v1/edition-metrics.ts index 0431572c01..8a7e3eb3b3 100644 --- a/packages/ens-referrals/src/v1/edition-metrics.ts +++ b/packages/ens-referrals/src/v1/edition-metrics.ts @@ -1,4 +1,4 @@ -import type { Address } from "enssdk"; +import type { NormalizedAddress } from "enssdk"; import type { ReferrerEditionMetricsPieSplit, @@ -43,7 +43,7 @@ export type ReferrerEditionMetrics = * @param leaderboard - The referrer leaderboard to query */ export const getReferrerEditionMetrics = ( - referrer: Address, + referrer: NormalizedAddress, leaderboard: ReferrerLeaderboard, ): ReferrerEditionMetrics => { switch (leaderboard.awardModel) { diff --git a/packages/ens-referrals/src/v1/referrer-metrics.ts b/packages/ens-referrals/src/v1/referrer-metrics.ts index e447e7b6fe..b0b5ee1983 100644 --- a/packages/ens-referrals/src/v1/referrer-metrics.ts +++ b/packages/ens-referrals/src/v1/referrer-metrics.ts @@ -1,9 +1,9 @@ -import type { Address } from "enssdk"; +import type { Duration, NormalizedAddress } from "enssdk"; -import type { Duration, PriceEth } from "@ensnode/ensnode-sdk"; +import type { PriceEth } from "@ensnode/ensnode-sdk"; import { makePriceEthSchema } from "@ensnode/ensnode-sdk/internal"; -import { normalizeAddress, validateLowercaseAddress } from "./address"; +import { validateAddress } from "./address"; import { validateNonNegativeInteger } from "./number"; import { ReferralProgramRules } from "./rules"; import { validateDuration } from "./time"; @@ -14,11 +14,9 @@ import { validateDuration } from "./time"; */ export interface ReferrerMetrics { /** - * The fully lowercase Ethereum address of the referrer. - * - * @invariant Guaranteed to be a valid EVM address in lowercase format + * The Ethereum address of the referrer, as a {@link NormalizedAddress}. */ - referrer: Address; + referrer: NormalizedAddress; /** * The total number of referrals made by the referrer within the {@link ReferralProgramRules}. @@ -46,13 +44,13 @@ export interface ReferrerMetrics { } export const buildReferrerMetrics = ( - referrer: Address, + referrer: NormalizedAddress, totalReferrals: number, totalIncrementalDuration: Duration, totalRevenueContribution: PriceEth, ): ReferrerMetrics => { const result = { - referrer: normalizeAddress(referrer), + referrer, totalReferrals, totalIncrementalDuration, totalRevenueContribution, @@ -63,7 +61,7 @@ export const buildReferrerMetrics = ( }; export const validateReferrerMetrics = (metrics: ReferrerMetrics): void => { - validateLowercaseAddress(metrics.referrer); + validateAddress(metrics.referrer); validateNonNegativeInteger(metrics.totalReferrals); validateDuration(metrics.totalIncrementalDuration); diff --git a/packages/ens-referrals/src/v1/time.ts b/packages/ens-referrals/src/v1/time.ts index 228465341f..a72b180ca9 100644 --- a/packages/ens-referrals/src/v1/time.ts +++ b/packages/ens-referrals/src/v1/time.ts @@ -1,6 +1,4 @@ -import type { UnixTimestamp } from "enssdk"; - -import type { Duration } from "@ensnode/ensnode-sdk"; +import type { Duration, UnixTimestamp } from "enssdk"; import { isInteger, isNonNegativeInteger } from "./number"; diff --git a/packages/ensdb-sdk/src/ensindexer-abstract/protocol-acceleration.schema.ts b/packages/ensdb-sdk/src/ensindexer-abstract/protocol-acceleration.schema.ts index 2230813918..a1b335f1bb 100644 --- a/packages/ensdb-sdk/src/ensindexer-abstract/protocol-acceleration.schema.ts +++ b/packages/ensdb-sdk/src/ensindexer-abstract/protocol-acceleration.schema.ts @@ -2,7 +2,15 @@ * Schema Definitions that power Protocol Acceleration in the Resolution API. */ -import type { Address, ChainId, DomainId, Node, ResolverId, ResolverRecordsId } from "enssdk"; +import type { + Address, + ChainId, + DomainId, + InterpretedName, + Node, + ResolverId, + ResolverRecordsId, +} from "enssdk"; import { onchainTable, primaryKey, relations, uniqueIndex } from "ponder"; /** @@ -28,13 +36,9 @@ export const reverseNameRecord = onchainTable( /** * Represents the ENSIP-19 Reverse Name Record for a given (address, coinType). * - * The value of this field is guaranteed to be a non-empty-string normalized ENS name (see - * `interpretNameRecordValue` for additional context and specific guarantees). Unnormalized - * names and empty string values are interpreted as a deletion of the associated Reverse Name - * Record entity (represented in the schema as the _absence_ of a relevant Reverse Name Record - * entity). + * The value of this field is guaranteed to be a non-empty {@link InterpretedName}. */ - value: t.text().notNull(), + value: t.text().notNull().$type(), }), (t) => ({ pk: primaryKey({ columns: [t.address, t.coinType] }), @@ -124,14 +128,9 @@ export const resolverRecords = onchainTable( /** * Represents the value of the reverse-resolution (ENSIP-3) name() record, used for Reverse Resolution. * - * The emitted record values are interpreted according to `interpretNameRecordValue` — unnormalized - * names and empty string values are interpreted as a deletion of the associated record (represented - * here as `null`). - * - * If set, the value of this field is guaranteed to be a non-empty-string normalized ENS name - * (see `interpretNameRecordValue` for additional context and specific guarantees). + * If present, the value of this field is guaranteed to be a non-empty {@link InterpretedName}. */ - name: t.text(), + name: t.text().$type(), }), (t) => ({ byId: uniqueIndex().on(t.chainId, t.address, t.node), @@ -257,5 +256,5 @@ export const resolverTextRecordRelations = relations(resolverTextRecord, ({ one * Registry migration logic. */ export const migratedNode = onchainTable("migrated_nodes", (t) => ({ - node: t.hex().primaryKey(), + node: t.hex().primaryKey().$type(), })); diff --git a/packages/ensdb-sdk/src/ensindexer-abstract/registrars.schema.ts b/packages/ensdb-sdk/src/ensindexer-abstract/registrars.schema.ts index 3bb7000cc9..4fd51f294d 100644 --- a/packages/ensdb-sdk/src/ensindexer-abstract/registrars.schema.ts +++ b/packages/ensdb-sdk/src/ensindexer-abstract/registrars.schema.ts @@ -2,6 +2,7 @@ * Schema Definitions for tracking of ENS registrars. */ +import type { NormalizedAddress } from "enssdk"; import { index, onchainEnum, onchainTable, relations, uniqueIndex } from "ponder"; /** @@ -353,7 +354,7 @@ export const registrarActions = onchainTable( * 3) May be the "zero address" to represent that an `encodedReferrer` is * defined but that it is interpreted as no referrer. */ - decodedReferrer: t.hex(), + decodedReferrer: t.hex().$type(), /** * Number of the block that includes the "logical registrar action". diff --git a/packages/enskit/biome.jsonc b/packages/enskit/biome.jsonc index 3bac83229a..e28987dc5c 100644 --- a/packages/enskit/biome.jsonc +++ b/packages/enskit/biome.jsonc @@ -4,7 +4,7 @@ "overrides": [ // ignore unused resolver args { - "includes": ["src/react/omnigraph/lib/cache-exchange.ts"], + "includes": ["src/react/omnigraph/_lib/*.ts"], "linter": { "rules": { "correctness": { diff --git a/packages/enskit/package.json b/packages/enskit/package.json index eadc9e7898..cab4321ed7 100644 --- a/packages/enskit/package.json +++ b/packages/enskit/package.json @@ -20,11 +20,16 @@ "dist" ], "exports": { + "./react": "./src/react/index.ts", "./react/omnigraph": "./src/react/omnigraph/index.ts" }, "publishConfig": { "access": "public", "exports": { + "./react": { + "types": "./dist/react/index.d.ts", + "default": "./dist/react/index.js" + }, "./react/omnigraph": { "types": "./dist/react/omnigraph/index.d.ts", "default": "./dist/react/omnigraph/index.js" diff --git a/packages/enskit/src/react/components/ensure-interpreted-name.tsx b/packages/enskit/src/react/components/ensure-interpreted-name.tsx new file mode 100644 index 0000000000..4b9e77e9e5 --- /dev/null +++ b/packages/enskit/src/react/components/ensure-interpreted-name.tsx @@ -0,0 +1,59 @@ +import { type InterpretedName, type LiteralName, literalNameToInterpretedName } from "enssdk"; +import type { ReactNode } from "react"; + +type MalformedNameRenderer = (name: string) => ReactNode; +type InterpretedNameRenderer = (name: InterpretedName) => ReactNode; + +/** + * Renders a {@link LiteralName} by ensuring it is an {@link InterpretedName}. This is useful for + * ensuring that downstream components get the guarantees of an {@link InterpretedName}. + * + * @param name - The user-provided {@link LiteralName} to render. + * @param children - Render prop called with the {@link InterpretedName} when `name` is already interpreted. + * @param coerced - Render prop called with the coerced {@link InterpretedName} when `name` was not already + * interpreted but could be successfully coerced under `options`. Typically used to redirect the user to the + * canonical URL. + * @param malformed - Render prop called with the original literal string when `name` cannot be coerced into an + * {@link InterpretedName} under `options`. + * @param options - Forwarded to {@link literalNameToInterpretedName}. Controls how the interpretation handles edge + * cases. When `options.allowENSRootName` is `true`, an empty `name` is accepted and rendered via `children`; when + * `false` (default), an empty `name` falls through to `malformed`. When `options.allowEncodedLabelHashes` is + * `true`, a Label already formatted as an EncodedLabelHash is preserved verbatim; when `false` (default), such a + * Label is treated like any other input and passed through normalization, which will fail and fall through to the + * unnormalizable-Label handling. When `options.coerceUnnormalizedLabelsToNormalizedLabels` is `true` (default), an + * unnormalized Label is passed through ENSIP-15 normalization (e.g. `"Vitalik"` → `"vitalik"`); when `false`, any + * unnormalized Label causes `malformed` to be invoked — no normalization is attempted and + * `coerceUnnormalizableLabelsToEncodedLabelHashes` is not consulted. When + * `options.coerceUnnormalizableLabelsToEncodedLabelHashes` is `true`, a Label that cannot be normalized is replaced + * with the EncodedLabelHash of its literal bytes and `coerced` is invoked; when `false` (default), encountering + * such a Label causes `malformed` to be invoked. Only consulted when + * `coerceUnnormalizedLabelsToNormalizedLabels` is `true`. + */ +export function EnsureInterpretedName({ + name, + children, + coerced, + malformed, + options, +}: { + name: LiteralName; + children: InterpretedNameRenderer; + coerced: InterpretedNameRenderer; + malformed: MalformedNameRenderer; + options?: Parameters[1]; +}) { + // attempt to convert the LiteralName to an InterpretedName + let interpreted: InterpretedName; + try { + interpreted = literalNameToInterpretedName(name, options); + } catch { + // this name can't conform to InterpretedName: it is malformed or contains unnormalizable Labels + return malformed(name); + } + + // from here, the name is either already interpreted or was coerced; check with string equality + if ((name as string) !== (interpreted as string)) return coerced(interpreted); + + // the name was already interpreted, render the happy path + return children(interpreted); +} diff --git a/packages/enskit/src/react/components/index.tsx b/packages/enskit/src/react/components/index.tsx new file mode 100644 index 0000000000..6d57c3771c --- /dev/null +++ b/packages/enskit/src/react/components/index.tsx @@ -0,0 +1 @@ +export * from "./ensure-interpreted-name"; diff --git a/packages/enskit/src/react/index.ts b/packages/enskit/src/react/index.ts new file mode 100644 index 0000000000..40b494c5f8 --- /dev/null +++ b/packages/enskit/src/react/index.ts @@ -0,0 +1 @@ +export * from "./components"; diff --git a/packages/enskit/src/react/omnigraph/_lib/README.md b/packages/enskit/src/react/omnigraph/_lib/README.md new file mode 100644 index 0000000000..f361ba38f8 --- /dev/null +++ b/packages/enskit/src/react/omnigraph/_lib/README.md @@ -0,0 +1,3 @@ +# enskit/react/omnigraph/_lib + +enskit/react/omnigraph libs or helpers not meant for export to consumers diff --git a/packages/enskit/src/react/omnigraph/_lib/by-id-lookup-resolvers.ts b/packages/enskit/src/react/omnigraph/_lib/by-id-lookup-resolvers.ts new file mode 100644 index 0000000000..8a46901dce --- /dev/null +++ b/packages/enskit/src/react/omnigraph/_lib/by-id-lookup-resolvers.ts @@ -0,0 +1,68 @@ +import type { Cache, ResolveInfo, Resolver, Variables } from "@urql/exchange-graphcache"; +import { + type AccountId, + type Address, + makePermissionsId, + makeRegistryId, + makeResolverId, + type PermissionsId, + type RegistryId, + type ResolverId, +} from "enssdk"; + +/** + * This local resolver delegates to graphcache's built-in cache resolution with the full argument set, + * effectively telling urql 'not found locally' and to fetch from the network. + */ +const passthrough = (args: Variables, cache: Cache, info: ResolveInfo) => + cache.resolve(info.parentTypeName, info.fieldName, args); + +export const byIdLookupResolvers: Record> = { + Query: { + domain(parent, args, cache, info) { + const by = args.by as { id?: string; name?: string }; + + if (by.id) { + const v1Key = cache.keyOfEntity({ __typename: "ENSv1Domain", id: by.id }); + if (v1Key && cache.resolve(v1Key, "id")) return v1Key; + + const v2Key = cache.keyOfEntity({ __typename: "ENSv2Domain", id: by.id }); + if (v2Key && cache.resolve(v2Key, "id")) return v2Key; + } + + return passthrough(args, cache, info); + }, + account(parent, args, cache, info) { + const by = args.by as { id?: Address; address?: Address }; + + if (by.id) return { __typename: "Account", id: by.id }; + if (by.address) return { __typename: "Account", id: by.address }; + + return passthrough(args, cache, info); + }, + registry(parent, args, cache, info) { + const by = args.by as { id?: RegistryId; contract?: AccountId }; + + if (by.id) return { __typename: "Registry", id: by.id }; + if (by.contract) return { __typename: "Registry", id: makeRegistryId(by.contract) }; + + return passthrough(args, cache, info); + }, + resolver(parent, args, cache, info) { + const by = args.by as { id?: ResolverId; contract?: AccountId }; + + if (by.id) return { __typename: "Resolver", id: by.id }; + if (by.contract) return { __typename: "Resolver", id: makeResolverId(by.contract) }; + + return passthrough(args, cache, info); + }, + permissions(parent, args, cache, info) { + const by = args.by as { id?: PermissionsId; contract?: AccountId }; + + if (by.id) return { __typename: "Permissions", id: by.id }; + if (by.contract) return { __typename: "Permissions", id: makePermissionsId(by.contract) }; + + return passthrough(args, cache, info); + }, + }, +}; diff --git a/packages/enskit/src/react/omnigraph/_lib/cache-exchange.ts b/packages/enskit/src/react/omnigraph/_lib/cache-exchange.ts new file mode 100644 index 0000000000..d2b0fd5a47 --- /dev/null +++ b/packages/enskit/src/react/omnigraph/_lib/cache-exchange.ts @@ -0,0 +1,48 @@ +import { cacheExchange } from "@urql/exchange-graphcache"; +import type { AccountId } from "enssdk"; +import { stringifyAccountId } from "enssdk"; +import { introspection } from "enssdk/omnigraph"; + +import { byIdLookupResolvers } from "./by-id-lookup-resolvers"; +import { localBigIntResolvers } from "./local-bigint-resolvers"; +import { localConnectionResolvers } from "./local-connection-resolvers"; +import { mergeResolverMaps } from "./merge-resolver-maps"; + +/** + * Entities without keys are 'Embedded Data', and we tell graphcache about them to avoid warnings + * about the inability to normalize them. + * + * @see https://nearform.com/open-source/urql/docs/graphcache/normalized-caching/#custom-keys-and-non-keyable-entities + */ +const EMBEDDED_DATA = () => null; + +export const omnigraphCacheExchange = cacheExchange({ + schema: introspection, + keys: { + // by default, all Entities are assumed to match the Relay spec, and graphcache treats + // them as keyable by `id`. if it encounters an Entity with no `id` field and no other + // special handling here in the cacheExchange.keys definitions, it will issue a warning. + + // AccountIds are keyable by stringifying them + AccountId: (data) => { + if (!data.address) return null; + if (!data.chainId) return null; + + return stringifyAccountId(data as unknown as AccountId); + }, + + // These entities are Embedded Data and don't have a relevant key + Label: EMBEDDED_DATA, + WrappedBaseRegistrarRegistration: EMBEDDED_DATA, + }, + resolvers: mergeResolverMaps( + // produce relayPagination() local resolvers for each t.connection in the schema + localConnectionResolvers(introspection), + + // produce local resolvers that parse BigInt scalar fields from cached strings into native bigint + localBigIntResolvers(introspection), + + // produce local cache resolvers for the Query.entity(by: { }) lookups + byIdLookupResolvers, + ), +}); diff --git a/packages/enskit/src/react/omnigraph/_lib/introspection-helpers.ts b/packages/enskit/src/react/omnigraph/_lib/introspection-helpers.ts new file mode 100644 index 0000000000..a2540383a8 --- /dev/null +++ b/packages/enskit/src/react/omnigraph/_lib/introspection-helpers.ts @@ -0,0 +1,26 @@ +export interface IntrospectionTypeRef { + readonly kind: string; + readonly name?: string; + readonly ofType?: IntrospectionTypeRef | null; +} + +export interface IntrospectionField { + readonly name: string; + readonly type: IntrospectionTypeRef; +} + +export interface IntrospectionType { + readonly kind: string; + readonly name: string; + readonly fields?: readonly IntrospectionField[] | null; +} + +export interface IntrospectionSchema { + readonly __schema: { + readonly types: readonly IntrospectionType[]; + }; +} + +export function unwrapType(type: IntrospectionTypeRef): IntrospectionTypeRef { + return type.ofType ? unwrapType(type.ofType) : type; +} diff --git a/packages/enskit/src/react/omnigraph/_lib/local-bigint-resolvers.test.ts b/packages/enskit/src/react/omnigraph/_lib/local-bigint-resolvers.test.ts new file mode 100644 index 0000000000..8abd834945 --- /dev/null +++ b/packages/enskit/src/react/omnigraph/_lib/local-bigint-resolvers.test.ts @@ -0,0 +1,94 @@ +import { describe, expect, expectTypeOf, it, vi } from "vitest"; + +import { createOmnigraphUrqlClient } from "../client"; +import { graphql } from "../graphql"; +import { localBigIntResolvers } from "./local-bigint-resolvers"; + +const mockFetch = vi.fn(); +const client = createOmnigraphUrqlClient({ url: "http://whatever", fetch: mockFetch }); + +const BIGINT_VALUE = 1234567890n; +const BIGINT_STRING = BIGINT_VALUE.toString(); + +describe("localBigIntResolvers", () => { + it("deserializes BigInt scalars as bigint", async () => { + mockFetch.mockResolvedValueOnce( + new Response( + JSON.stringify({ + data: { + domain: { + __typename: "ENSv1Domain", + id: "test-domain-id", + registration: { + __typename: "BaseRegistrarRegistration", + id: "test-registration-id", + start: BIGINT_STRING, + }, + }, + }, + }), + { + status: 200, + headers: { "content-type": "application/json" }, + }, + ), + ); + + const { data } = await client.query( + graphql(` + query localBigIntResolvers { + domain(by: { name: "example.eth" }) { + id + registration { + id + start + } + } + } + `), + {}, + ); + + expect(data!.domain!.registration!.start).toEqual(BIGINT_VALUE); + expectTypeOf(data!.domain!.registration!.start).toEqualTypeOf(); + }); + + it("element-wise deserializes list-wrapped BigInt scalars", () => { + // synthetic introspection with a [BigInt!]! field, since no current schema field is list-wrapped BigInt + const schema = { + __schema: { + types: [ + { + kind: "OBJECT", + name: "Thing", + fields: [ + { + name: "values", + type: { + kind: "NON_NULL", + ofType: { + kind: "LIST", + ofType: { + kind: "NON_NULL", + ofType: { kind: "SCALAR", name: "BigInt" }, + }, + }, + }, + }, + ], + }, + ], + }, + }; + + const resolvers = localBigIntResolvers(schema); + const resolver = resolvers.Thing!.values!; + const result = resolver( + { values: ["1", "2", "3"] }, + {}, + {} as never, + { fieldName: "values" } as never, + ); + expect(result).toEqual([1n, 2n, 3n]); + }); +}); diff --git a/packages/enskit/src/react/omnigraph/_lib/local-bigint-resolvers.ts b/packages/enskit/src/react/omnigraph/_lib/local-bigint-resolvers.ts new file mode 100644 index 0000000000..c409882db2 --- /dev/null +++ b/packages/enskit/src/react/omnigraph/_lib/local-bigint-resolvers.ts @@ -0,0 +1,58 @@ +import type { Resolver, ScalarObject } from "@urql/exchange-graphcache"; + +import { + type IntrospectionSchema, + type IntrospectionTypeRef, + unwrapType, +} from "./introspection-helpers"; + +// graphcache's ResolverResult type doesn't include bigint, but the value is stored +// in the normalized cache and returned to the consumer as-is, so bigint works at runtime +// the load-bearing piece of type inference is in packages/enskit/src/react/omnigraph/graphql.ts where +// the GraphQL BigInt Scalar is mapped to the `bigint` primitive, which is only supported by these +// runtime local resolvers. +const toBigInt: Resolver = (parent, args, cache, info) => { + const value = parent[info.fieldName]; + if (value == null) return value; + return BigInt(value as string) as unknown as ScalarObject; +}; + +const toBigIntList: Resolver = (parent, args, cache, info) => { + const value = parent[info.fieldName]; + if (value == null) return value; + + // now we know value is a (string | null)[], so map to a (bigint | null)[] + return (value as readonly (string | null)[]).map((v) => (v == null ? v : BigInt(v))); +}; + +function isBigIntType(type: IntrospectionTypeRef) { + return unwrapType(type).name === "BigInt"; +} + +// NOTE: the recursion is to handle not-null-wrapped lists +function isListType(type: IntrospectionTypeRef): boolean { + if (type.kind === "LIST") return true; + return type.ofType ? isListType(type.ofType) : false; +} + +/** + * Derives local resolvers that parse BigInt scalar fields from cached strings into native bigint. + */ +export function localBigIntResolvers( + schema: IntrospectionSchema, +): Record> { + const resolvers: Record> = {}; + + for (const type of schema.__schema.types) { + if (type.kind !== "OBJECT" || type.name.startsWith("__")) continue; + + for (const field of type.fields ?? []) { + if (!isBigIntType(field.type)) continue; + + resolvers[type.name] ??= {}; + resolvers[type.name][field.name] = isListType(field.type) ? toBigIntList : toBigInt; + } + } + + return resolvers; +} diff --git a/packages/enskit/src/react/omnigraph/lib/local-connection-resolvers.ts b/packages/enskit/src/react/omnigraph/_lib/local-connection-resolvers.ts similarity index 56% rename from packages/enskit/src/react/omnigraph/lib/local-connection-resolvers.ts rename to packages/enskit/src/react/omnigraph/_lib/local-connection-resolvers.ts index 2b777bae25..abc49a5c82 100644 --- a/packages/enskit/src/react/omnigraph/lib/local-connection-resolvers.ts +++ b/packages/enskit/src/react/omnigraph/_lib/local-connection-resolvers.ts @@ -1,32 +1,7 @@ import type { Resolver } from "@urql/exchange-graphcache"; import { relayPagination } from "@urql/exchange-graphcache/extras"; -interface IntrospectionTypeRef { - readonly kind: string; - readonly name?: string; - readonly ofType?: IntrospectionTypeRef | null; -} - -interface IntrospectionField { - readonly name: string; - readonly type: IntrospectionTypeRef; -} - -interface IntrospectionType { - readonly kind: string; - readonly name: string; - readonly fields?: readonly IntrospectionField[] | null; -} - -interface IntrospectionSchema { - readonly __schema: { - readonly types: readonly IntrospectionType[]; - }; -} - -function unwrapType(type: IntrospectionTypeRef): IntrospectionTypeRef { - return type.ofType ? unwrapType(type.ofType) : type; -} +import { type IntrospectionSchema, unwrapType } from "./introspection-helpers"; /** * Derives `relayPagination()` local resolvers for all connection fields in the schema. diff --git a/packages/enskit/src/react/omnigraph/_lib/merge-resolver-maps.ts b/packages/enskit/src/react/omnigraph/_lib/merge-resolver-maps.ts new file mode 100644 index 0000000000..67447ceb6b --- /dev/null +++ b/packages/enskit/src/react/omnigraph/_lib/merge-resolver-maps.ts @@ -0,0 +1,16 @@ +import type { Resolver } from "@urql/exchange-graphcache"; + +/** + * deep-merge resolver maps so types appearing in both get all their field resolvers + */ +export function mergeResolverMaps( + ...maps: Record>[] +): Record> { + const result: Record> = {}; + for (const map of maps) { + for (const [typeName, fields] of Object.entries(map)) { + result[typeName] = { ...result[typeName], ...fields }; + } + } + return result; +} diff --git a/packages/enskit/src/react/omnigraph/client.ts b/packages/enskit/src/react/omnigraph/client.ts index 0438d7bdaf..f405eb6ef2 100644 --- a/packages/enskit/src/react/omnigraph/client.ts +++ b/packages/enskit/src/react/omnigraph/client.ts @@ -1,13 +1,11 @@ import { Client, fetchExchange } from "@urql/core"; import type { EnsNodeClientConfig } from "enssdk/core"; -import { omnigraphCacheExchange } from "./lib/cache-exchange"; - -export function createOmnigraphUrqlClient(config: EnsNodeClientConfig): Client { - const url = new URL("/api/omnigraph", config.url).href; +import { omnigraphCacheExchange } from "./_lib/cache-exchange"; +export function createOmnigraphUrqlClient(config: EnsNodeClientConfig) { return new Client({ - url, + url: new URL("/api/omnigraph", config.url).href, fetch: config.fetch, exchanges: [omnigraphCacheExchange, fetchExchange], }); diff --git a/packages/enskit/src/react/omnigraph/graphql.ts b/packages/enskit/src/react/omnigraph/graphql.ts new file mode 100644 index 0000000000..2b8fa1881f --- /dev/null +++ b/packages/enskit/src/react/omnigraph/graphql.ts @@ -0,0 +1,13 @@ +import type { introspection, OmnigraphScalars } from "enssdk/omnigraph"; +import { initGraphQLTada } from "gql.tada"; + +export const graphql = initGraphQLTada<{ + introspection: typeof introspection; + scalars: Omit & { + // override the default Omnigraph Scalar definitions to include a deserialized BigInt (see cache-exchange.ts) + BigInt: bigint; + }; +}>(); + +export type { FragmentOf, ResultOf, VariablesOf } from "gql.tada"; +export { readFragment } from "gql.tada"; diff --git a/packages/enskit/src/react/omnigraph/index.ts b/packages/enskit/src/react/omnigraph/index.ts index 24f3c8750f..ef4984c1a8 100644 --- a/packages/enskit/src/react/omnigraph/index.ts +++ b/packages/enskit/src/react/omnigraph/index.ts @@ -1,6 +1,3 @@ -// export the gql.tada subset of enssdk/omnigraph so consumers only need the one dependency -export type { FragmentOf, ResultOf, VariablesOf } from "enssdk/omnigraph"; -export { graphql, readFragment } from "enssdk/omnigraph"; - +export * from "./graphql"; export * from "./hooks"; export * from "./provider"; diff --git a/packages/enskit/src/react/omnigraph/lib/cache-exchange.ts b/packages/enskit/src/react/omnigraph/lib/cache-exchange.ts deleted file mode 100644 index dfcc3ff6bc..0000000000 --- a/packages/enskit/src/react/omnigraph/lib/cache-exchange.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { - type Cache, - cacheExchange, - type ResolveInfo, - type Variables, -} from "@urql/exchange-graphcache"; -import type { AccountId, Address, PermissionsId, RegistryId, ResolverId } from "enssdk"; -import { makePermissionsId, makeRegistryId, makeResolverId, stringifyAccountId } from "enssdk"; -import { introspection } from "enssdk/omnigraph"; - -import { localConnectionResolvers } from "./local-connection-resolvers"; - -/** - * Entities without keys are 'Embedded Data', and we tell graphcache about them to avoid warnings - * about the inability to normalize them. - * - * @see https://nearform.com/open-source/urql/docs/graphcache/normalized-caching/#custom-keys-and-non-keyable-entities - */ -const EMBEDDED_DATA = () => null; - -/** - * This local resolver delegates to graphcache's built-in cache resolution with the full argument set, - * effectively telling urql 'not found locally' and to fetch from the network. - */ -const passthrough = (args: Variables, cache: Cache, info: ResolveInfo) => - cache.resolve(info.parentTypeName, info.fieldName, args); - -// produce relayPagination() local resolvers for each t.connection in the schema -const connectionResolvers = localConnectionResolvers(introspection); - -// TODO: add bigint parsing to the relevant scalar fields ala localConnectionResolvers -// @see https://nearform.com/open-source/urql/docs/graphcache/local-resolvers/#transforming-records - -export const omnigraphCacheExchange = cacheExchange({ - schema: introspection, - keys: { - // by default, all Entities are assumed to match the Relay spec, and graphcache treats - // them as keyable by `id`. if it encounters an Entity with no `id` field and no other - // special handling here in the cacheExchange.keys definitions, it will issue a warning. - - // AccountIds are keyable by stringifying them - AccountId: (data) => stringifyAccountId(data as unknown as AccountId), - - // These entities are Embedded Data and don't have a relevant key - Label: EMBEDDED_DATA, - WrappedBaseRegistrarRegistration: EMBEDDED_DATA, - }, - resolvers: { - // TODO: maybe there's a better way to import/cast the type of args in these local resolvers? - - // derive relayPagination() resolvers for all connection fields in the schema - ...connectionResolvers, - - Query: { - ...connectionResolvers.Query, - - domain(parent, args, cache, info) { - const by = args.by as { id?: string; name?: string }; - - if (by.id) { - const v1Key = cache.keyOfEntity({ __typename: "ENSv1Domain", id: by.id }); - if (v1Key && cache.resolve(v1Key, "id")) return v1Key; - - const v2Key = cache.keyOfEntity({ __typename: "ENSv2Domain", id: by.id }); - if (v2Key && cache.resolve(v2Key, "id")) return v2Key; - } - - return passthrough(args, cache, info); - }, - account(parent, args, cache, info) { - const by = args.by as { id?: Address; address?: Address }; - - if (by.id) return { __typename: "Account", id: by.id }; - if (by.address) return { __typename: "Account", id: by.address }; - - throw new Error("never"); - }, - registry(parent, args, cache, info) { - const by = args.by as { id?: RegistryId; contract?: AccountId }; - - if (by.id) return { __typename: "Registry", id: by.id }; - if (by.contract) return { __typename: "Registry", id: makeRegistryId(by.contract) }; - - throw new Error("never"); - }, - resolver(parent, args, cache, info) { - const by = args.by as { id?: ResolverId; contract?: AccountId }; - - if (by.id) return { __typename: "Resolver", id: by.id }; - if (by.contract) return { __typename: "Resolver", id: makeResolverId(by.contract) }; - - throw new Error("never"); - }, - permissions(parent, args, cache, info) { - const by = args.by as { id?: PermissionsId; contract?: AccountId }; - - if (by.id) return { __typename: "Permissions", id: by.id }; - if (by.contract) return { __typename: "Permissions", id: makePermissionsId(by.contract) }; - - throw new Error("never"); - }, - }, - }, -}); diff --git a/packages/enskit/tsup.config.ts b/packages/enskit/tsup.config.ts index 68a31c889a..3826734c0b 100644 --- a/packages/enskit/tsup.config.ts +++ b/packages/enskit/tsup.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from "tsup"; export default defineConfig({ entry: { + "react/index": "src/react/index.ts", "react/omnigraph/index": "src/react/omnigraph/index.ts", }, platform: "browser", diff --git a/packages/ensnode-sdk/src/ensapi/api/name-tokens/response.ts b/packages/ensnode-sdk/src/ensapi/api/name-tokens/response.ts index 7cd498a7a0..b89170969b 100644 --- a/packages/ensnode-sdk/src/ensapi/api/name-tokens/response.ts +++ b/packages/ensnode-sdk/src/ensapi/api/name-tokens/response.ts @@ -1,6 +1,5 @@ -import type { InterpretedName, Node } from "enssdk"; +import type { InterpretedName, Node, UnixTimestamp } from "enssdk"; -import type { UnixTimestamp } from "../../../shared/types"; import type { NameToken, NameTokenOwnershipTypes } from "../../../tokenscope/name-token"; import type { ErrorResponse } from "../shared/errors"; diff --git a/packages/ensnode-sdk/src/ensapi/api/registrar-actions/filters.ts b/packages/ensnode-sdk/src/ensapi/api/registrar-actions/filters.ts index e7a67a6407..634e1393dc 100644 --- a/packages/ensnode-sdk/src/ensapi/api/registrar-actions/filters.ts +++ b/packages/ensnode-sdk/src/ensapi/api/registrar-actions/filters.ts @@ -1,6 +1,5 @@ -import type { Address, Node } from "enssdk"; +import type { Address, Node, UnixTimestamp } from "enssdk"; -import type { UnixTimestamp } from "../../../shared/types"; import { type RegistrarActionsFilter, type RegistrarActionsFilterBeginTimestamp, diff --git a/packages/ensnode-sdk/src/ensapi/api/registrar-actions/request.ts b/packages/ensnode-sdk/src/ensapi/api/registrar-actions/request.ts index 9d777eba1b..074fc5e866 100644 --- a/packages/ensnode-sdk/src/ensapi/api/registrar-actions/request.ts +++ b/packages/ensnode-sdk/src/ensapi/api/registrar-actions/request.ts @@ -1,6 +1,5 @@ -import type { Address, Node } from "enssdk"; +import type { Address, Node, UnixTimestamp } from "enssdk"; -import type { UnixTimestamp } from "../../../shared/types"; import type { RequestPageParams } from "../shared/pagination"; /** diff --git a/packages/ensnode-sdk/src/ensapi/api/registrar-actions/response.ts b/packages/ensnode-sdk/src/ensapi/api/registrar-actions/response.ts index 1064fed7dc..218a1a5022 100644 --- a/packages/ensnode-sdk/src/ensapi/api/registrar-actions/response.ts +++ b/packages/ensnode-sdk/src/ensapi/api/registrar-actions/response.ts @@ -1,7 +1,6 @@ -import type { InterpretedName } from "enssdk"; +import type { InterpretedName, UnixTimestamp } from "enssdk"; import type { RegistrarAction } from "../../../registrars/registrar-action"; -import type { UnixTimestamp } from "../../../shared/types"; import type { IndexingStatusResponseCodes } from "../indexing-status/response"; import type { ErrorResponse } from "../shared/errors"; import type { ResponsePageContext } from "../shared/pagination"; diff --git a/packages/ensnode-sdk/src/indexing-status/chain-indexing-status-snapshot.ts b/packages/ensnode-sdk/src/indexing-status/chain-indexing-status-snapshot.ts index 45451c46dd..d670eda4ec 100644 --- a/packages/ensnode-sdk/src/indexing-status/chain-indexing-status-snapshot.ts +++ b/packages/ensnode-sdk/src/indexing-status/chain-indexing-status-snapshot.ts @@ -1,4 +1,4 @@ -import type { ChainId } from "enssdk"; +import type { ChainId, UnixTimestamp } from "enssdk"; import { type BlockRefRangeBounded, @@ -6,7 +6,7 @@ import { type BlockRefRangeWithStartBlock, RangeTypeIds, } from "../shared/blockrange"; -import type { BlockRef, UnixTimestamp } from "../shared/types"; +import type { BlockRef } from "../shared/types"; /** * The status of indexing a chain at the time an indexing status snapshot diff --git a/packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts b/packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts index 5506706be8..437a213eb0 100644 --- a/packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts +++ b/packages/ensnode-sdk/src/indexing-status/cross-chain-indexing-status-snapshot.ts @@ -1,7 +1,7 @@ -import type { ChainId } from "enssdk"; +import type { ChainId, UnixTimestamp } from "enssdk"; import { RangeTypeIds } from "../shared/blockrange"; -import type { BlockRef, UnixTimestamp } from "../shared/types"; +import type { BlockRef } from "../shared/types"; import { ChainIndexingStatusIds, type ChainIndexingStatusSnapshot, diff --git a/packages/ensnode-sdk/src/indexing-status/omnichain-indexing-status-snapshot.ts b/packages/ensnode-sdk/src/indexing-status/omnichain-indexing-status-snapshot.ts index c475c72c64..b67f439870 100644 --- a/packages/ensnode-sdk/src/indexing-status/omnichain-indexing-status-snapshot.ts +++ b/packages/ensnode-sdk/src/indexing-status/omnichain-indexing-status-snapshot.ts @@ -1,6 +1,6 @@ -import type { ChainId } from "enssdk"; +import type { ChainId, UnixTimestamp } from "enssdk"; -import type { UnixTimestamp, Unvalidated } from "../shared/types"; +import type { Unvalidated } from "../shared/types"; import { ChainIndexingStatusIds, type ChainIndexingStatusSnapshot, diff --git a/packages/ensnode-sdk/src/indexing-status/realtime-indexing-status-projection.ts b/packages/ensnode-sdk/src/indexing-status/realtime-indexing-status-projection.ts index 7dcb1cf8ca..6ba2f1cd00 100644 --- a/packages/ensnode-sdk/src/indexing-status/realtime-indexing-status-projection.ts +++ b/packages/ensnode-sdk/src/indexing-status/realtime-indexing-status-projection.ts @@ -1,4 +1,5 @@ -import type { Duration, UnixTimestamp } from "../shared/types"; +import type { Duration, UnixTimestamp } from "enssdk"; + import type { CrossChainIndexingStatusSnapshot } from "./cross-chain-indexing-status-snapshot"; /** diff --git a/packages/ensnode-sdk/src/omnigraph-api/example-queries.ts b/packages/ensnode-sdk/src/omnigraph-api/example-queries.ts index 27edd4a485..6f49dc01d6 100644 --- a/packages/ensnode-sdk/src/omnigraph-api/example-queries.ts +++ b/packages/ensnode-sdk/src/omnigraph-api/example-queries.ts @@ -1,3 +1,5 @@ +import { asInterpretedName, toNormalizedAddress } from "enssdk"; + import { DatasourceNames, ENSNamespaceIds } from "@ensnode/datasources"; import { maybeGetDatasourceContract } from "../shared/datasource-contract"; @@ -28,14 +30,14 @@ const ENS_TEST_ENV_V2_ETH_REGISTRAR = maybeGetDatasourceContract( ); // these addresses are from the devnet accounts output -const DEVNET_DEPLOYER = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"; -const DEVNET_OWNER = "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"; +const DEVNET_DEPLOYER = toNormalizedAddress("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"); +const DEVNET_OWNER = toNormalizedAddress("0x70997970C51812dc3A010C7d01b50e0d17dc79C8"); // biome-ignore lint/correctness/noUnusedVariables: keeping it around for the future -const DEVNET_USER = "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"; +const DEVNET_USER = toNormalizedAddress("0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC"); -const VITALIK_ADDRESS = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"; +const VITALIK_ADDRESS = toNormalizedAddress("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"); -const DEVNET_NAME_WITH_OWNED_RESOLVER = "example.eth"; +const DEVNET_NAME_WITH_OWNED_RESOLVER = asInterpretedName("example.eth"); export const GRAPHQL_API_EXAMPLE_QUERIES: Array<{ query: string; diff --git a/packages/ensnode-sdk/src/registrars/encoded-referrer.test.ts b/packages/ensnode-sdk/src/registrars/encoded-referrer.test.ts index 992107496c..bcbbc54758 100644 --- a/packages/ensnode-sdk/src/registrars/encoded-referrer.test.ts +++ b/packages/ensnode-sdk/src/registrars/encoded-referrer.test.ts @@ -1,4 +1,4 @@ -import type { Address } from "enssdk"; +import { type Address, asNormalizedAddress, toNormalizedAddress } from "enssdk"; import { concat, getAddress, pad, zeroAddress } from "viem"; import { describe, expect, it } from "vitest"; @@ -9,7 +9,10 @@ import { ENCODED_REFERRER_BYTE_OFFSET, } from "./encoded-referrer"; -const vitalikEthAddressLowercase: Address = "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"; +const vitalikEthAddressLowercase = asNormalizedAddress( + "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", +); + const vitalikEthAddressChecksummed: Address = getAddress( "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", ); @@ -24,7 +27,7 @@ describe("encoded referrer", () => { const result = decodeEncodedReferrer(input); // assert - expect(result).toEqual(vitalikEthAddressChecksummed); + expect(result).toEqual(vitalikEthAddressLowercase); }); it("returns a zeroAddress value when initial bytes were not all zeroes", () => { @@ -63,17 +66,19 @@ describe("encoded referrer", () => { { addressFormat: "lowercase", address: vitalikEthAddressLowercase }, { addressFormat: "checksummed", address: vitalikEthAddressChecksummed }, ])("returns encoded referrer for a $addressFormat EVM address", ({ address }) => { + // encoding should operate as expected const expectedEncodedReferrer = pad(address.toLowerCase() as Address, { size: ENCODED_REFERRER_BYTE_LENGTH, dir: "left", - }); // all lowercase hex - const expectedDecodedReferrer = getAddress(address); // checksummed EVM address + }); - const encodedReferrer = buildEncodedReferrer(address); - const decodedReferrer = decodeEncodedReferrer(encodedReferrer); + const encodedReferrer = buildEncodedReferrer(toNormalizedAddress(address)); + expect(encodedReferrer).toEqual(expectedEncodedReferrer); + // decoding should operate as expected + const expectedDecodedReferrer = toNormalizedAddress(address); + const decodedReferrer = decodeEncodedReferrer(encodedReferrer); expect(decodedReferrer).toStrictEqual(expectedDecodedReferrer); - expect(encodedReferrer).toEqual(expectedEncodedReferrer); }); }); }); diff --git a/packages/ensnode-sdk/src/registrars/encoded-referrer.ts b/packages/ensnode-sdk/src/registrars/encoded-referrer.ts index 399ed86150..0943833f31 100644 --- a/packages/ensnode-sdk/src/registrars/encoded-referrer.ts +++ b/packages/ensnode-sdk/src/registrars/encoded-referrer.ts @@ -1,5 +1,5 @@ -import type { Address, Hex } from "enssdk"; -import { getAddress, pad, size, slice, zeroAddress } from "viem"; +import { type Hex, isNormalizedAddress, type NormalizedAddress, toNormalizedAddress } from "enssdk"; +import { pad, size, slice, zeroAddress } from "viem"; /** * Encoded Referrer @@ -49,26 +49,26 @@ export const ZERO_ENCODED_REFERRER: EncodedReferrer = pad("0x", { }); /** - * Build an {@link EncodedReferrer} value for the given {@link Address} + * Build an {@link EncodedReferrer} value for the given {@link NormalizedAddress} * according to the referrer encoding with left-zero-padding. */ -export function buildEncodedReferrer(address: Address): EncodedReferrer { - const lowercaseAddress = address.toLowerCase() as Address; +export function buildEncodedReferrer(address: NormalizedAddress): EncodedReferrer { + if (!isNormalizedAddress(address)) throw new Error(`Address '${address}' is not normalized.`); - return pad(lowercaseAddress, { size: ENCODED_REFERRER_BYTE_LENGTH, dir: "left" }); + return pad(address, { size: ENCODED_REFERRER_BYTE_LENGTH, dir: "left" }); } /** - * Decode an {@link EncodedReferrer} value into a checksummed {@link Address} + * Decode an {@link EncodedReferrer} value into a {@link NormalizedAddress} * according to the referrer encoding with left-zero-padding. * * @param encodedReferrer - The "raw" {@link EncodedReferrer} value to decode. - * @returns The decoded referrer checksummed address. + * @returns The decoded referrer address. * @throws when encodedReferrer value is not represented by * {@link ENCODED_REFERRER_BYTE_LENGTH} bytes. * @throws when decodedReferrer is not a valid EVM address. */ -export function decodeEncodedReferrer(encodedReferrer: EncodedReferrer): Address { +export function decodeEncodedReferrer(encodedReferrer: EncodedReferrer): NormalizedAddress { // Invariant: encoded referrer must be of expected size if (size(encodedReferrer) !== ENCODED_REFERRER_BYTE_LENGTH) { throw new Error( @@ -80,15 +80,13 @@ export function decodeEncodedReferrer(encodedReferrer: EncodedReferrer): Address // strict validation: padding must be all zeros // if any byte in the padding is non-zero, treat as Zero Encoded Referrer - if (padding !== EXPECTED_ENCODED_REFERRER_PADDING) { - return zeroAddress; - } + if (padding !== EXPECTED_ENCODED_REFERRER_PADDING) return zeroAddress; const decodedReferrer = slice(encodedReferrer, ENCODED_REFERRER_BYTE_OFFSET); try { - // return checksummed address - return getAddress(decodedReferrer); + // return normalized address + return toNormalizedAddress(decodedReferrer); } catch { throw new Error(`Decoded referrer value must be a valid EVM address.`); } diff --git a/packages/ensnode-sdk/src/registrars/registrar-action.ts b/packages/ensnode-sdk/src/registrars/registrar-action.ts index 86b2f9a032..c6edbdd1f5 100644 --- a/packages/ensnode-sdk/src/registrars/registrar-action.ts +++ b/packages/ensnode-sdk/src/registrars/registrar-action.ts @@ -1,4 +1,4 @@ -import type { Address } from "enssdk"; +import type { Address, Duration } from "enssdk"; import type { Hash } from "viem"; import type { EncodedReferrer } from "./encoded-referrer"; @@ -8,7 +8,7 @@ export { decodeEncodedReferrer, ZERO_ENCODED_REFERRER } from "./encoded-referrer import type { PriceEth, SerializedPriceEth } from "../shared/currencies"; import { serializePriceEth } from "../shared/serialize"; -import type { BlockRef, Duration } from "../shared/types"; +import type { BlockRef } from "../shared/types"; import type { RegistrationLifecycle } from "./registration-lifecycle"; /** diff --git a/packages/ensnode-sdk/src/registrars/registration-lifecycle.ts b/packages/ensnode-sdk/src/registrars/registration-lifecycle.ts index ee7993c983..9260593c32 100644 --- a/packages/ensnode-sdk/src/registrars/registration-lifecycle.ts +++ b/packages/ensnode-sdk/src/registrars/registration-lifecycle.ts @@ -1,6 +1,5 @@ -import type { Node } from "enssdk"; +import type { Node, UnixTimestamp } from "enssdk"; -import type { UnixTimestamp } from "../shared/types"; import type { Subregistry } from "./subregistry"; /** diff --git a/packages/ensnode-sdk/src/registrars/zod-schemas.ts b/packages/ensnode-sdk/src/registrars/zod-schemas.ts index f2b12c6eb4..ff6cca19a2 100644 --- a/packages/ensnode-sdk/src/registrars/zod-schemas.ts +++ b/packages/ensnode-sdk/src/registrars/zod-schemas.ts @@ -1,4 +1,3 @@ -import type { Address } from "enssdk"; import { z } from "zod/v4"; import type { ParsePayload } from "zod/v4/core"; @@ -8,8 +7,8 @@ import { makeBlockRefSchema, makeDurationSchema, makeHexStringSchema, - makeLowercaseAddressSchema, makeNodeSchema, + makeNormalizedAddressSchema, makePriceEthSchema, makeTransactionHashSchema, makeUnixTimestampSchema, @@ -94,9 +93,7 @@ function invariant_registrarActionDecodedReferrerBasedOnRawReferrer( const { encodedReferrer, decodedReferrer } = ctx.value; try { - // decodeEncodedReferrer returns checksummed address, but ENSNode work on lowercase address values - // so we lowercase the result before using for checks - const expectedDecodedReferrer = decodeEncodedReferrer(encodedReferrer).toLowerCase() as Address; + const expectedDecodedReferrer = decodeEncodedReferrer(encodedReferrer); if (decodedReferrer !== expectedDecodedReferrer) { ctx.issues.push({ @@ -127,7 +124,7 @@ const makeRegistrarActionReferralSchema = (valueLabel: string = "Registrar Actio { bytesCount: ENCODED_REFERRER_BYTE_LENGTH }, `${valueLabel} Encoded Referrer`, ), - decodedReferrer: makeLowercaseAddressSchema(`${valueLabel} Decoded Referrer`), + decodedReferrer: makeNormalizedAddressSchema(`${valueLabel} Decoded Referrer`), }) .check(invariant_registrarActionDecodedReferrerBasedOnRawReferrer), @@ -164,7 +161,7 @@ export const makeBaseRegistrarActionSchema = (valueLabel: string = "Base Registr .object({ id: EventIdSchema, incrementalDuration: makeDurationSchema(`${valueLabel} Incremental Duration`), - registrant: makeLowercaseAddressSchema(`${valueLabel} Registrant`), + registrant: makeNormalizedAddressSchema(`${valueLabel} Registrant`), registrationLifecycle: makeRegistrationLifecycleSchema( `${valueLabel} Registration Lifecycle`, ), diff --git a/packages/ensnode-sdk/src/shared/cache/swr-cache.ts b/packages/ensnode-sdk/src/shared/cache/swr-cache.ts index 30f1d94d1a..a7be2064f4 100644 --- a/packages/ensnode-sdk/src/shared/cache/swr-cache.ts +++ b/packages/ensnode-sdk/src/shared/cache/swr-cache.ts @@ -1,8 +1,8 @@ import { secondsToMilliseconds } from "date-fns"; import { getUnixTime } from "date-fns/getUnixTime"; +import type { Duration, UnixTimestamp } from "enssdk"; import { durationBetween } from "../datetime"; -import type { Duration, UnixTimestamp } from "../types"; /** * Data structure for a single cached result. diff --git a/packages/ensnode-sdk/src/shared/cache/ttl-cache.ts b/packages/ensnode-sdk/src/shared/cache/ttl-cache.ts index 3dd8e4b83e..8030df05f3 100644 --- a/packages/ensnode-sdk/src/shared/cache/ttl-cache.ts +++ b/packages/ensnode-sdk/src/shared/cache/ttl-cache.ts @@ -1,7 +1,7 @@ import { getUnixTime } from "date-fns/getUnixTime"; +import type { Duration, UnixTimestamp } from "enssdk"; import { addDuration } from "../datetime"; -import type { Duration, UnixTimestamp } from "../types"; import type { Cache } from "./cache"; interface CacheEntry { diff --git a/packages/ensnode-sdk/src/shared/datetime.ts b/packages/ensnode-sdk/src/shared/datetime.ts index 497c70e07c..8636c1fc9f 100644 --- a/packages/ensnode-sdk/src/shared/datetime.ts +++ b/packages/ensnode-sdk/src/shared/datetime.ts @@ -1,7 +1,7 @@ import { getUnixTime } from "date-fns/getUnixTime"; +import type { Duration, UnixTimestamp } from "enssdk"; import { deserializeDuration, deserializeUnixTimestamp } from "./deserialize"; -import type { Duration, UnixTimestamp } from "./types"; /** * Duration between two moments in time. diff --git a/packages/ensnode-sdk/src/shared/deserialize.ts b/packages/ensnode-sdk/src/shared/deserialize.ts index 8c81416a51..4e2d5d2d68 100644 --- a/packages/ensnode-sdk/src/shared/deserialize.ts +++ b/packages/ensnode-sdk/src/shared/deserialize.ts @@ -1,8 +1,8 @@ -import type { AccountId, ChainId, ChainIdString, UrlString } from "enssdk"; +import type { AccountId, ChainId, ChainIdString, Duration, UrlString } from "enssdk"; import z, { prettifyError } from "zod/v4"; import type { PriceDai, PriceEth, PriceUsdc } from "./currencies"; -import type { BlockNumber, BlockRef, Datetime, Duration } from "./types"; +import type { BlockNumber, BlockRef, Datetime } from "./types"; import { makeAccountIdStringSchema, makeBlockNumberSchema, diff --git a/packages/ensnode-sdk/src/shared/interpretation/interpret-record-values.test.ts b/packages/ensnode-sdk/src/shared/interpretation/interpret-record-values.test.ts index 2ceb379ec9..ddfe16ce05 100644 --- a/packages/ensnode-sdk/src/shared/interpretation/interpret-record-values.test.ts +++ b/packages/ensnode-sdk/src/shared/interpretation/interpret-record-values.test.ts @@ -1,3 +1,4 @@ +import { asLiteralName } from "enssdk"; import { describe, expect, it } from "vitest"; import { @@ -9,15 +10,15 @@ import { describe("interpretNameRecordValue", () => { it("returns null for empty string", () => { - expect(interpretNameRecordValue("")).toBeNull(); + expect(interpretNameRecordValue(asLiteralName(""))).toBeNull(); }); it("returns null for non-normalized name", () => { - expect(interpretNameRecordValue("NotNormalized.eth")).toBeNull(); + expect(interpretNameRecordValue(asLiteralName("NotNormalized.eth"))).toBeNull(); }); it("returns value for normalized name", () => { - expect(interpretNameRecordValue("vitalik.eth")).toBe("vitalik.eth"); + expect(interpretNameRecordValue(asLiteralName("vitalik.eth"))).toBe("vitalik.eth"); }); }); diff --git a/packages/ensnode-sdk/src/shared/interpretation/interpret-record-values.ts b/packages/ensnode-sdk/src/shared/interpretation/interpret-record-values.ts index 2efd82ecf6..6e62c712b1 100644 --- a/packages/ensnode-sdk/src/shared/interpretation/interpret-record-values.ts +++ b/packages/ensnode-sdk/src/shared/interpretation/interpret-record-values.ts @@ -1,5 +1,5 @@ -import type { NormalizedName } from "enssdk"; -import { asLowerCaseAddress, isNormalizedName } from "enssdk"; +import type { InterpretedName, LiteralName } from "enssdk"; +import { isInterpretedName, toNormalizedAddress } from "enssdk"; import { isAddress, isAddressEqual, zeroAddress } from "viem"; import { hasNullByte } from "../null-bytes"; @@ -8,21 +8,21 @@ import { hasNullByte } from "../null-bytes"; * Interprets a name record value string and returns null if the value is interpreted as a deletion. * * The interpreted record value is either: - * a) null, representing a non-existant or deletion of the record, or - * b) a normalized, non-empty-string Name. + * a) null, representing a non-existent or deletion of the record, or + * b) an {@link InterpretedName}. * * @param value - The name record value string to interpret. * @returns The interpreted name string, or null if deleted. */ -export function interpretNameRecordValue(value: string): NormalizedName | null { - // empty string is technically a normalized name, representing the ens root node, but in the +export function interpretNameRecordValue(value: LiteralName): InterpretedName | null { + // empty string is technically an InterpretedName, representing the ens root node, but in the // context of a name record value, empty string is emitted when the user un-sets the record (this // is because the abi of this event is only capable of expressing string values, so empty string // canonically represents the non-existence or deletion of the record value) if (value === "") return null; // if not normalized, is not valid `name` record value - if (!isNormalizedName(value)) return null; + if (!isInterpretedName(value)) return null; // otherwise, this is a non-empty-string normalized Name that can be used as a name() record value return value; @@ -32,7 +32,7 @@ export function interpretNameRecordValue(value: string): NormalizedName | null { * Interprets an address record value string and returns null if the value is interpreted as a deletion. * * The interpreted record value is either: - * a) null, representing a non-existant or deletion of the record, or + * a) null, representing a non-existent or deletion of the record, or * i. contains null bytes * ii. empty string * iii. empty hex (0x) @@ -55,13 +55,13 @@ export function interpretAddressRecordValue(value: string): string | null { if (value === "0x") return null; // if it's not an EVM address, return as-is - if (!isAddress(value)) return value; + if (!isAddress(value, { strict: false })) return value; // interpret zeroAddress as deletion if (isAddressEqual(value, zeroAddress)) return null; - // otherwise convert to lowercase - return asLowerCaseAddress(value); + // otherwise normalize and return + return toNormalizedAddress(value); } /** @@ -92,7 +92,7 @@ export function interpretTextRecordKey(key: string): string | null { * Interprets a text record value string and returns null if the value is interpreted as a deletion. * * The interpreted record value is either: - * a) null, representing a non-existant or deletion of the record, or + * a) null, representing a non-existent or deletion of the record, or * i. contains null bytes * ii. empty string * b) a text record value that diff --git a/packages/ensnode-sdk/src/shared/types.ts b/packages/ensnode-sdk/src/shared/types.ts index ea4e87184b..980ff7e7f5 100644 --- a/packages/ensnode-sdk/src/shared/types.ts +++ b/packages/ensnode-sdk/src/shared/types.ts @@ -1,3 +1,5 @@ +import type { UnixTimestamp } from "enssdk"; + /** * Block Number * @@ -10,10 +12,6 @@ export type BlockNumber = number; */ export type Datetime = Date; -import type { UnixTimestamp } from "enssdk"; - -export type { UnixTimestamp } from "enssdk"; - /** * Represents a URL that is used for RPC endpoints. */ @@ -35,15 +33,6 @@ export interface BlockRef { timestamp: UnixTimestamp; } -/** - * Duration - * - * Representing a duration in seconds. - * - * Guaranteed to be a non-negative integer. - */ -export type Duration = number; - /** * A utility type that makes all properties of a type optional recursively, * including nested objects and arrays. diff --git a/packages/ensnode-sdk/src/shared/zod-schemas.test.ts b/packages/ensnode-sdk/src/shared/zod-schemas.test.ts index 5d1e5adec8..e46a81f36f 100644 --- a/packages/ensnode-sdk/src/shared/zod-schemas.test.ts +++ b/packages/ensnode-sdk/src/shared/zod-schemas.test.ts @@ -10,6 +10,7 @@ import { makeDatetimeSchema, makeIntegerSchema, makeNonNegativeIntegerSchema, + makeNormalizedAddressSchema, makePositiveIntegerSchema, makePriceSchema, makeReinterpretedNameSchema, @@ -168,6 +169,20 @@ describe("ENSIndexer: Shared", () => { ).toMatch(/Price currency must be one of ETH, USDC, DAI/i); }); + describe("NormalizedAddress", () => { + const validAddress = "0x1234567890AbcdEF1234567890aBcdef12345678"; + + it("normalizes a valid address", () => { + expect(makeNormalizedAddressSchema().parse(validAddress)).toBe(validAddress.toLowerCase()); + }); + + it("rejects invalid input with a useful error", () => { + expect( + formatParseError(makeNormalizedAddressSchema().safeParse("not-an-address")), + ).toContain("EVM address must be a valid EVM address"); + }); + }); + describe("ReinterpretedName", () => { const nameWithNormalizedLabels = "tko.basetest.eth"; const nameWithUnnormalizedLabels = "TKO.basetest.eth"; diff --git a/packages/ensnode-sdk/src/shared/zod-schemas.ts b/packages/ensnode-sdk/src/shared/zod-schemas.ts index 974d549362..92746e9618 100644 --- a/packages/ensnode-sdk/src/shared/zod-schemas.ts +++ b/packages/ensnode-sdk/src/shared/zod-schemas.ts @@ -3,14 +3,14 @@ import { AccountId as CaipAccountId } from "caip"; import type { AccountId, AccountIdString, - Address, ChainId, DefaultableChainId, + Duration, Hex, InterpretedName, Node, } from "enssdk"; -import { asLowerCaseAddress, reinterpretName } from "enssdk"; +import { reinterpretName, toNormalizedAddress } from "enssdk"; import { isAddress, isHex, size } from "viem"; /** * All zod schemas we define must remain internal implementation details. @@ -30,7 +30,7 @@ import { type PriceEth, type PriceUsdc, } from "./currencies"; -import type { BlockRef, Datetime, Duration, UnixTimestamp } from "./types"; +import type { BlockRef, Datetime } from "./types"; /** * Parses a string value as a boolean. @@ -149,13 +149,15 @@ export const makeCoinTypeStringSchema = (valueLabel: string = "Coin Type String" .pipe(makeCoinTypeSchema(`The numeric value represented by ${valueLabel}`)); /** - * Parses a serialized representation of an EVM address into a lowercase Address. + * Parses a serialized representation of an EVM address into a {@link NormalizedAddress}. */ -export const makeLowercaseAddressSchema = (valueLabel: string = "EVM address") => +export const makeNormalizedAddressSchema = (valueLabel: string = "EVM address") => z .string() .check((ctx) => { - if (!isAddress(ctx.value)) { + // NOTE: we intentionally use isAddress here instead of isNormalizedAddress, which allows this + // schema to transform (via toNormalizedAddress) the input into a normalized address. + if (!isAddress(ctx.value, { strict: false })) { ctx.issues.push({ code: "custom", message: `${valueLabel} must be a valid EVM address`, @@ -163,7 +165,7 @@ export const makeLowercaseAddressSchema = (valueLabel: string = "EVM address") = }); } }) - .transform((val) => asLowerCaseAddress(val as Address)); + .transform((val) => toNormalizedAddress(val)); /** * Parses an ISO 8601 string representations of {@link Datetime} @@ -290,7 +292,7 @@ export const makePriceDaiSchema = (valueLabel: string = "Price DAI") => export const makeAccountIdSchema = (valueLabel: string = "AccountId") => z.strictObject({ chainId: makeChainIdSchema(`${valueLabel} chain ID`), - address: makeLowercaseAddressSchema(`${valueLabel} address`), + address: makeNormalizedAddressSchema(`${valueLabel} address`), }); /** diff --git a/packages/ensnode-sdk/src/tokenscope/name-token.ts b/packages/ensnode-sdk/src/tokenscope/name-token.ts index 78de51b5b0..68b3a2ab3c 100644 --- a/packages/ensnode-sdk/src/tokenscope/name-token.ts +++ b/packages/ensnode-sdk/src/tokenscope/name-token.ts @@ -1,5 +1,5 @@ import type { AccountId, AssetId, InterpretedName } from "enssdk"; -import { getParentNameFQDN } from "enssdk"; +import { getParentInterpretedName } from "enssdk"; import { isAddressEqual, zeroAddress } from "viem"; import { DatasourceNames, type ENSNamespaceId } from "@ensnode/datasources"; @@ -219,7 +219,8 @@ export function getNameTokenOwnership( } satisfies NameTokenOwnershipBurned; } - const parentName = getParentNameFQDN(name); + const parentName = getParentInterpretedName(name); + if (parentName === null) throw new Error(`Invariant: '${name}' has no parent Name.`); // set ownershipType as 'fully-onchain' if `name` is a direct subname of .eth if (parentName === "eth") { diff --git a/packages/enssdk/src/_lib/README.md b/packages/enssdk/src/_lib/README.md index 973b4ffc55..9cd58957eb 100644 --- a/packages/enssdk/src/_lib/README.md +++ b/packages/enssdk/src/_lib/README.md @@ -1 +1,3 @@ +# enssdk/_lib + enssdk-internal libs or helpers not meant for export to consumers diff --git a/packages/enssdk/src/lib/address.test.ts b/packages/enssdk/src/lib/address.test.ts index 58264d42d9..e05c4d84f5 100644 --- a/packages/enssdk/src/lib/address.test.ts +++ b/packages/enssdk/src/lib/address.test.ts @@ -1,16 +1,79 @@ import { describe, expect, it } from "vitest"; -import { asLowerCaseAddress } from "./address"; +import { asNormalizedAddress, isNormalizedAddress, toNormalizedAddress } from "./address"; -describe("asLowerCaseAddress", () => { - it("should convert a valid EVM address to lowercase", () => { - // arrange - const input = "0x6bD421B6e762d6AD89780EB54B9255f9ab5840BF"; +describe("isNormalizedAddress", () => { + it("should return true for a lowercase address", () => { + expect(isNormalizedAddress("0x6bd421b6e762d6ad89780eb54b9255f9ab5840bf")).toBe(true); + }); + + it("should return true for the zero address", () => { + expect(isNormalizedAddress("0x0000000000000000000000000000000000000000")).toBe(true); + }); + + it("should return false for a checksummed address", () => { + expect(isNormalizedAddress("0x6bD421B6e762d6AD89780EB54B9255f9ab5840BF")).toBe(false); + }); + + it("should return false for a short hex string", () => { + expect(isNormalizedAddress("0xdeaf")).toBe(false); + }); + + it("should return false for a non-hex string", () => { + expect(isNormalizedAddress("not-an-address")).toBe(false); + }); +}); + +describe("toNormalizedAddress", () => { + it("should convert a checksummed address to lowercase", () => { + expect(toNormalizedAddress("0x6bD421B6e762d6AD89780EB54B9255f9ab5840BF")).toBe( + "0x6bd421b6e762d6ad89780eb54b9255f9ab5840bf", + ); + }); + + it("should return an already-lowercase address unchanged", () => { + expect(toNormalizedAddress("0x6bd421b6e762d6ad89780eb54b9255f9ab5840bf")).toBe( + "0x6bd421b6e762d6ad89780eb54b9255f9ab5840bf", + ); + }); + + it("should normalize the zero address", () => { + expect(toNormalizedAddress("0x0000000000000000000000000000000000000000")).toBe( + "0x0000000000000000000000000000000000000000", + ); + }); - // act - const result = asLowerCaseAddress(input); + it("should throw for a partial address", () => { + expect(() => toNormalizedAddress("0xdeaf")).toThrow(/does not represent an EVM Address/); + }); + + it("should throw for a non-hex string", () => { + expect(() => toNormalizedAddress("not-an-address")).toThrow( + /does not represent an EVM Address/, + ); + }); +}); + +describe("asNormalizedAddress", () => { + it("should return the address if already normalized", () => { + expect(asNormalizedAddress("0x6bd421b6e762d6ad89780eb54b9255f9ab5840bf")).toBe( + "0x6bd421b6e762d6ad89780eb54b9255f9ab5840bf", + ); + }); + + it("should return the zero address", () => { + expect(asNormalizedAddress("0x0000000000000000000000000000000000000000")).toBe( + "0x0000000000000000000000000000000000000000", + ); + }); + + it("should throw for a checksummed address", () => { + expect(() => asNormalizedAddress("0x6bD421B6e762d6AD89780EB54B9255f9ab5840BF")).toThrow( + "Not a NormalizedAddress", + ); + }); - // assert - expect(result).toBe("0x6bd421b6e762d6ad89780eb54b9255f9ab5840bf"); + it("should throw for a short hex string", () => { + expect(() => asNormalizedAddress("0xdeaf")).toThrow("Not a NormalizedAddress"); }); }); diff --git a/packages/enssdk/src/lib/address.ts b/packages/enssdk/src/lib/address.ts index 2c4e2b5ce8..99b744d6ea 100644 --- a/packages/enssdk/src/lib/address.ts +++ b/packages/enssdk/src/lib/address.ts @@ -1,11 +1,35 @@ -import type { Address } from "./types"; +import { isAddress } from "viem"; + +import type { Address, NormalizedAddress } from "./types"; + +/** + * Determines whether an {@link Address} is a {@link NormalizedAddress}. + */ +export function isNormalizedAddress(maybeAddress: string): maybeAddress is NormalizedAddress { + const isLowerCase = maybeAddress === maybeAddress.toLowerCase(); + return isLowerCase && isAddress(maybeAddress, { strict: false }); +} + +/** + * Converts an {@link Address} to a {@link NormalizedAddress}. + * + * @throws if `address` does not represent an EVM Address + */ +export function toNormalizedAddress(maybeAddress: string): NormalizedAddress { + if (!isAddress(maybeAddress, { strict: false })) { + throw new Error(`'${maybeAddress}' does not represent an EVM Address.`); + } + + return maybeAddress.toLowerCase() as NormalizedAddress; +} /** - * Converts an EVM address to its lowercase representation. + * Validates that an {@link Address} is already a {@link NormalizedAddress}. * - * @param address - EVM address to convert. - * @returns The lowercase representation of the EVM address. + * @throws if the address is not already normalized */ -export function asLowerCaseAddress(address: Address): Address { - return address.toLowerCase() as Address; +export function asNormalizedAddress(address: Address): NormalizedAddress { + if (isNormalizedAddress(address)) return address; + + throw new Error(`Not a NormalizedAddress: '${address}'`); } diff --git a/packages/enssdk/src/lib/constants.ts b/packages/enssdk/src/lib/constants.ts index 595fa85255..cf00184f84 100644 --- a/packages/enssdk/src/lib/constants.ts +++ b/packages/enssdk/src/lib/constants.ts @@ -1,12 +1,33 @@ -import { asInterpretedName } from "./interpreted-names-and-labels"; import { namehashInterpretedName } from "./namehash"; -import type { Node } from "./types"; +import type { EACResource, InterpretedName, Node } from "./types"; -export const ROOT_NODE: Node = namehashInterpretedName(asInterpretedName("")); -export const ETH_NODE: Node = namehashInterpretedName(asInterpretedName("eth")); -export const ADDR_REVERSE_NODE: Node = namehashInterpretedName(asInterpretedName("addr.reverse")); +/** + * Name for the ENS Root + * + * @dev manually cast to InterpretedName to avoid circular import + */ +export const ENS_ROOT_NAME = "" as InterpretedName; + +/** + * The {@link Node} that identifies the ENS Root Name (""). + */ +export const ENS_ROOT_NODE: Node = namehashInterpretedName(ENS_ROOT_NAME); + +/** + * The {@link Node} that identifies the ETH Name ("eth"). + * + * @dev manually cast to InterpretedName to avoid circular import + */ +export const ETH_NODE: Node = namehashInterpretedName("eth" as InterpretedName); + +/** + * The {@link Node} that identifies the addr.reverse Name ("addr.reverse"). + * + * @dev manually cast to InterpretedName to avoid circular import + */ +export const ADDR_REVERSE_NODE: Node = namehashInterpretedName("addr.reverse" as InterpretedName); /** * ROOT_RESOURCE represents the 'root' resource in an EnhancedAccessControl contract. */ -export const ROOT_RESOURCE = 0n; +export const ROOT_RESOURCE: EACResource = 0n; diff --git a/packages/enssdk/src/lib/ids.ts b/packages/enssdk/src/lib/ids.ts index 5450fcf49a..d84094a655 100644 --- a/packages/enssdk/src/lib/ids.ts +++ b/packages/enssdk/src/lib/ids.ts @@ -10,6 +10,7 @@ import type { ENSv2DomainId, LabelHash, Node, + NormalizedAddress, PermissionsId, PermissionsResourceId, PermissionsUserId, @@ -50,8 +51,11 @@ export const makePermissionsId = (contract: AccountId) => export const makePermissionsResourceId = (contract: AccountId, resource: EACResource) => `${makePermissionsId(contract)}/${resource}` as PermissionsResourceId; -export const makePermissionsUserId = (contract: AccountId, resource: EACResource, user: Address) => - `${makePermissionsResourceId(contract, resource)}/${user}` as PermissionsUserId; +export const makePermissionsUserId = ( + contract: AccountId, + resource: EACResource, + user: NormalizedAddress, +) => `${makePermissionsResourceId(contract, resource)}/${user}` as PermissionsUserId; export const makeResolverRecordsId = (resolver: AccountId, node: Node) => `${makeResolverId(resolver)}/${node}` as ResolverRecordsId; diff --git a/packages/enssdk/src/lib/interpreted-names-and-labels.test.ts b/packages/enssdk/src/lib/interpreted-names-and-labels.test.ts index 31356601b5..0de6d9670e 100644 --- a/packages/enssdk/src/lib/interpreted-names-and-labels.test.ts +++ b/packages/enssdk/src/lib/interpreted-names-and-labels.test.ts @@ -1,12 +1,15 @@ import { describe, expect, it } from "vitest"; +import { ENS_ROOT_NAME } from "./constants"; import { asInterpretedLabel, asLiteralLabel, + asLiteralName, constructSubInterpretedName, interpretedLabelsToInterpretedName, literalLabelsToInterpretedName, literalLabelToInterpretedLabel, + literalNameToInterpretedName, parsePartialInterpretedName, } from "./interpreted-names-and-labels"; import { encodeLabelHash, labelhashLiteralLabel } from "./labelhash"; @@ -202,4 +205,159 @@ describe("interpretation", () => { }, ); }); + + describe("literalNameToInterpretedName", () => { + type Options = Parameters[1]; + + const ENCODED_TEST_NULL = encodeLabelHash(labelhashLiteralLabel(asLiteralLabel("test\0"))); + const ENCODED_BAD_BRACKET = encodeLabelHash(labelhashLiteralLabel(asLiteralLabel("bad["))); + const ENCODED_HASH_AS_LITERAL = encodeLabelHash( + labelhashLiteralLabel(asLiteralLabel(EXAMPLE_ENCODED_LABEL_HASH)), + ); + const ALL_OPTIONS = { + allowENSRootName: true, + allowEncodedLabelHashes: true, + coerceUnnormalizedLabelsToNormalizedLabels: true, + coerceUnnormalizableLabelsToEncodedLabelHashes: true, + } as const satisfies Options; + + it.each<[string, Options, string]>([ + // defaults: fully-normalized names pass through + ["eth", undefined, "eth"], + ["vitalik.eth", undefined, "vitalik.eth"], + ["sub.vitalik.eth", undefined, "sub.vitalik.eth"], + // defaults: ENSIP-15 normalizes normalizable-but-not-normalized Labels + ["Vitalik.eth", undefined, "vitalik.eth"], + ["VITALIK.ETH", undefined, "vitalik.eth"], + ["Sub.Vitalik.Eth", undefined, "sub.vitalik.eth"], + // coerceUnnormalizable=false is irrelevant when no unnormalizable Labels are present + ["Vitalik.eth", { coerceUnnormalizableLabelsToEncodedLabelHashes: false }, "vitalik.eth"], + // coerceUnnormalized=true (explicit): normalizable-but-not-normalized Labels are normalized + ["Vitalik.eth", { coerceUnnormalizedLabelsToNormalizedLabels: true }, "vitalik.eth"], + // coerceUnnormalized=false: fully-normalized names still pass through unchanged + ["vitalik.eth", { coerceUnnormalizedLabelsToNormalizedLabels: false }, "vitalik.eth"], + ["sub.vitalik.eth", { coerceUnnormalizedLabelsToNormalizedLabels: false }, "sub.vitalik.eth"], + // coerceUnnormalized=false + allowEncodedLabelHashes=true: pre-encoded labelhashes still preserved + [ + `${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + { + coerceUnnormalizedLabelsToNormalizedLabels: false, + allowEncodedLabelHashes: true, + }, + `${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + ], + // allowENSRootName=true: empty input returns ENS Root Name + [ENS_ROOT_NAME, { allowENSRootName: true }, ENS_ROOT_NAME], + // allowEncodedLabelHashes=true: pre-encoded labelhashes preserved verbatim + [ + `${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + { allowEncodedLabelHashes: true }, + `${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + ], + [ + `sub.${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + { allowEncodedLabelHashes: true }, + `sub.${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + ], + // allowEncodedLabelHashes=true: still normalizes other labels in the name + [ + `Sub.${EXAMPLE_ENCODED_LABEL_HASH}.Eth`, + { allowEncodedLabelHashes: true }, + `sub.${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + ], + // encodeUnnormalizable=true: unnormalizable Labels are encoded as the labelhash of their literal bytes + [ + "test\0.eth", + { coerceUnnormalizableLabelsToEncodedLabelHashes: true }, + `${ENCODED_TEST_NULL}.eth`, + ], + // encodeUnnormalizable=true: multiple unnormalizable Labels encoded independently + [ + "test\0.bad[.eth", + { coerceUnnormalizableLabelsToEncodedLabelHashes: true }, + `${ENCODED_TEST_NULL}.${ENCODED_BAD_BRACKET}.eth`, + ], + // allowEncodedLabelHashes=false + encodeUnnormalizable=true: a "[hash]" Label + // fails normalization and is encoded as the labelhash of the literal bracket + // string, NOT the original labelhash it encoded. + [ + `${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + { + allowEncodedLabelHashes: false, + coerceUnnormalizableLabelsToEncodedLabelHashes: true, + }, + `${ENCODED_HASH_AS_LITERAL}.eth`, + ], + // all options enabled: ENS Root Name + [ENS_ROOT_NAME, ALL_OPTIONS, ENS_ROOT_NAME], + // all options enabled: encoded labelhash preserved, other labels normalized + [ + `Sub.${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + ALL_OPTIONS, + `sub.${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + ], + // all options enabled: unnormalizable Label encoded alongside preserved encoded labelhash + [ + `test\0.${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + ALL_OPTIONS, + `${ENCODED_TEST_NULL}.${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + ], + ])("literalNameToInterpretedName(%j, %j) → %j", (name, options, expected) => { + expect(literalNameToInterpretedName(asLiteralName(name), options)).toEqual(expected); + }); + + it.each<[string, Options, RegExp]>([ + // empty input rejected when allowENSRootName is false + [ENS_ROOT_NAME, undefined, /ENS Root Name/], + [ENS_ROOT_NAME, { allowENSRootName: false }, /ENS Root Name/], + // empty Label segments always rejected, regardless of options + ["example..eth", undefined, /empty Label segment/], + [".eth", undefined, /empty Label segment/], + ["eth.", undefined, /empty Label segment/], + ["example..eth", { allowENSRootName: true }, /empty Label segment/], + ["a..b", ALL_OPTIONS, /empty Label segment/], + // unnormalizable Label rejected when encodeUnnormalizable is false + ["test\0.eth", undefined, /cannot be normalized/], + [ + "test\0.eth", + { coerceUnnormalizableLabelsToEncodedLabelHashes: false }, + /cannot be normalized/, + ], + // pre-encoded labelhash rejected when allowEncodedLabelHashes is false (falls + // through to the unnormalizable handler, which also throws under defaults) + [`${EXAMPLE_ENCODED_LABEL_HASH}.eth`, undefined, /cannot be normalized/], + [ + `${EXAMPLE_ENCODED_LABEL_HASH}.eth`, + { allowEncodedLabelHashes: false }, + /cannot be normalized/, + ], + // strings that merely look like encoded labelhashes (wrong length) are still + // treated as unnormalizable literals, even when allowEncodedLabelHashes=true + ["[deadbeef].eth", { allowEncodedLabelHashes: true }, /cannot be normalized/], + // coerceUnnormalized=false: a normalizable-but-not-normalized Label is rejected + // up-front without attempting normalization + [ + "Vitalik.eth", + { coerceUnnormalizedLabelsToNormalizedLabels: false }, + /coercion is disabled/, + ], + // coerceUnnormalized=false: an unnormalizable Label is rejected with the same + // "coercion is disabled" message (no normalization is attempted) + ["test\0.eth", { coerceUnnormalizedLabelsToNormalizedLabels: false }, /coercion is disabled/], + // coerceUnnormalized=false gates coerceUnnormalizable=true: even an unnormalizable + // Label that would otherwise be encoded is rejected + [ + "test\0.eth", + { + coerceUnnormalizedLabelsToNormalizedLabels: false, + coerceUnnormalizableLabelsToEncodedLabelHashes: true, + }, + /coercion is disabled/, + ], + ])("literalNameToInterpretedName(%j, %j) throws %s", (name, options, expectedError) => { + expect(() => literalNameToInterpretedName(asLiteralName(name), options)).toThrow( + expectedError, + ); + }); + }); }); diff --git a/packages/enssdk/src/lib/interpreted-names-and-labels.ts b/packages/enssdk/src/lib/interpreted-names-and-labels.ts index 7cba074200..39a1a55666 100644 --- a/packages/enssdk/src/lib/interpreted-names-and-labels.ts +++ b/packages/enssdk/src/lib/interpreted-names-and-labels.ts @@ -1,7 +1,12 @@ -import { isHex } from "viem"; - -import { encodeLabelHash, labelhashInterpretedLabel, labelhashLiteralLabel } from "./labelhash"; -import { isNormalizedLabel } from "./normalization"; +import { ENS_ROOT_NAME } from "./constants"; +import { + decodeEncodedLabelHash, + encodeLabelHash, + isEncodedLabelHash, + labelhashInterpretedLabel, + labelhashLiteralLabel, +} from "./labelhash"; +import { isNormalizedLabel, normalizeLabel } from "./normalization"; import type { InterpretedLabel, InterpretedName, @@ -13,6 +18,119 @@ import type { Name, } from "./types"; +/** + * Interprets a user-provided {@link LiteralName} as an {@link InterpretedName}. + * + * A {@link LiteralName} may be any arbitrary string. The ENS Root Name ('') ({@link ENS_ROOT_NAME}) + * is only accepted when `options.allowENSRootName` is `true`, and is returned as-is. + * + * This function walks each LiteralLabel of `name` and maps it to an {@link InterpretedLabel} + * according to the provided `options`: + * + * 0. If the LiteralLabel is an empty string (''), this function throws: an empty Label is not a valid + * {@link InterpretedLabel}. + * 1. If the LiteralLabel is already a normalized LiteralLabel, it is kept as-is. + * 2. Otherwise, if the LiteralLabel looks like an {@link EncodedLabelHash} (e.g. `[abcd…]`) and + * `options.allowEncodedLabelHashes` is `true`, it is kept as-is. + * 3. Otherwise, the LiteralLabel is unnormalized. If `options.coerceUnnormalizedLabelsToNormalizedLabels` is `false`, + * this function throws. Otherwise (default), the LiteralLabel is passed through ENSIP-15 normalization + * ({@link normalizeLabel}). If normalization succeeds, the normalized form is used (e.g. `"Vitalik"` → + * `"vitalik"`). + * 4. Otherwise, the LiteralLabel is unnormalizable. If `options.coerceUnnormalizableLabelsToEncodedLabelHashes` + * is `true`, the Label is replaced with the EncodedLabelHash of its literal bytes. Otherwise, this + * function throws. + * + * Note that step 3 gates step 4: if `options.coerceUnnormalizedLabelsToNormalizedLabels` is `false`, the + * function throws immediately for any unnormalized Label, regardless of whether the Label would have been + * normalizable and regardless of `options.coerceUnnormalizableLabelsToEncodedLabelHashes`. + * + * @param name - The user-provided {@link LiteralName} to interpret. + * @param options - Controls how the interpretation handles edge cases. + * @param options.allowENSRootName - When `true`, an empty `name` is accepted and returned as the ENS Root Name. + * When `false` (default), an empty `name` throws. + * @param options.allowEncodedLabelHashes - When `true`, a Label that is already formatted as an + * {@link EncodedLabelHash} is preserved verbatim. When `false` (default), such a Label is treated like any other + * input and passed through normalization, which will fail and fall through to the unnormalizable-Label handling. + * @param options.coerceUnnormalizedLabelsToNormalizedLabels - When `true` (default), a Label that is not already + * normalized is passed through ENSIP-15 normalization (e.g. `"Vitalik"` → `"vitalik"`). When `false`, any + * unnormalized Label causes this function to throw — no normalization is attempted and + * `coerceUnnormalizableLabelsToEncodedLabelHashes` is not consulted. + * @param options.coerceUnnormalizableLabelsToEncodedLabelHashes - When `true`, a Label that cannot be normalized is + * replaced with the EncodedLabelHash of its literal bytes. When `false` (default), encountering such a Label causes + * this function to throw. Only consulted when `coerceUnnormalizedLabelsToNormalizedLabels` is `true`. + * + * @throws if `name` cannot be coerced into an {@link InterpretedName} under the provided `options`. + * + * @dev casts to {@link InterpretedLabel} to avoid an additional unnecessary `asInterpretedLabel` pass. + */ +export function literalNameToInterpretedName( + name: LiteralName, + { + allowENSRootName = false, + allowEncodedLabelHashes = false, + coerceUnnormalizedLabelsToNormalizedLabels = true, + coerceUnnormalizableLabelsToEncodedLabelHashes = false, + }: { + allowENSRootName?: boolean | undefined; + allowEncodedLabelHashes?: boolean | undefined; + coerceUnnormalizedLabelsToNormalizedLabels?: boolean | undefined; + coerceUnnormalizableLabelsToEncodedLabelHashes?: boolean | undefined; + } = {}, +): InterpretedName { + if (name === "") { + if (allowENSRootName) return ENS_ROOT_NAME; + + throw new Error( + `The ENS Root Name ('') cannot conform to InterpretedName when allowENSRootName is false.`, + ); + } + + return interpretedLabelsToInterpretedName( + literalNameToLiteralLabels(name).map((label) => { + // Sanity Check: No empty Labels + if (label === "") { + throw new Error( + `Name '${name}' cannot conform to InterpretedName because it contains an empty Label segment, which is not a normalized Label.`, + ); + } + + // if it's already normalized, good to go + if (isNormalizedLabel(label)) { + return label as Label as InterpretedLabel; + } + + // special case: if it's an EncodedLabelHash, and the consumer allows, good to go + if (allowEncodedLabelHashes && isEncodedLabelHash(label)) { + return label as Label as InterpretedLabel; + } + + // if the consumer does not want to allow coercion of unnormalized labels, then there's nothing to do + if (!coerceUnnormalizedLabelsToNormalizedLabels) { + throw new Error( + `Name '${name}' cannot conform to InterpretedName because Label '${label}' is unnormalized and coercion is disabled.`, + ); + } + + try { + // attempt to normalize it and pass the normalized Label along + return normalizeLabel(label); + } catch { + // but the label is unnormalizable, so: + + // if the consumer wants to interpret unnormalizable Labels as an EncodedLabelHash, do so + if (coerceUnnormalizableLabelsToEncodedLabelHashes) { + return encodeLabelHash(labelhashLiteralLabel(label)) as InterpretedLabel; + } + + // otherwise, cannot conform + throw new Error( + `Name '${name}' cannot conform to InterpretedName because Label '${label}' is unnormalized and cannot be normalized.`, + ); + } + }), + ); +} + /** * Interprets a Literal Label, producing an Interpreted Label. * @@ -71,32 +189,24 @@ export function literalLabelsToLiteralName(labels: LiteralLabel[]): LiteralName return labels.join(".") as LiteralName; } +/** + * Converts an LiteralName into a list of LiteralLabels. + */ +export function literalNameToLiteralLabels(name: LiteralName): LiteralLabel[] { + if (name === "") return []; + return name.split(".") as LiteralLabel[]; +} + /** * Converts an Interpreted Name into a list of Interpreted Labels. */ export function interpretedNameToInterpretedLabels(name: InterpretedName): InterpretedLabel[] { + if (name === "") return []; return name.split(".") as InterpretedLabel[]; } -// https://github.com/wevm/viem/blob/main/src/utils/ens/encodedLabelToLabelhash.ts -export function encodedLabelToLabelhash(label: string): LabelHash | null { - if (label.length !== 66) return null; - if (label.indexOf("[") !== 0) return null; - if (label.indexOf("]") !== 65) return null; - const hash = `0x${label.slice(1, 65)}`; - if (!isHex(hash)) return null; - return hash; -} - -export function isInterpetedLabel(label: Label): label is InterpretedLabel { - // if it looks like an encoded labelhash, it must be one - if (label.startsWith("[")) { - const labelHash = encodedLabelToLabelhash(label); - return labelHash != null; - } - - // otherwise label must be normalized - return isNormalizedLabel(label); +export function isInterpretedLabel(label: Label): label is InterpretedLabel { + return isEncodedLabelHash(label) || isNormalizedLabel(label); } /** @@ -107,8 +217,8 @@ export function isInterpetedLabel(label: Label): label is InterpretedLabel { * @returns */ export function isInterpretedName(name: Name): name is InterpretedName { - if (name === "") return true; - return name.split(".").every(isInterpetedLabel); + if (name === ENS_ROOT_NAME) return true; + return name.split(".").every(isInterpretedLabel); } /** @@ -117,18 +227,13 @@ export function isInterpretedName(name: Name): name is InterpretedName { export function interpretedLabelsToLabelHashPath(labels: InterpretedLabel[]): LabelHashPath { return labels .map((label) => { - if (!isInterpetedLabel(label)) { - throw new Error( - `Invariant(interpretedLabelsToLabelHashPath): Expected InterpretedLabel, received '${label}'.`, - ); + try { + // attempt to decode label as an encoded labelhash + return decodeEncodedLabelHash(label); + } catch { + // but if that failed, this must be a normalized label, so labelhash it + return labelhashInterpretedLabel(label); } - - // if it looks like an encoded labelhash, return it - const maybeLabelHash = encodedLabelToLabelhash(label); - if (maybeLabelHash !== null) return maybeLabelHash; - - // otherwise, labelhash it - return labelhashInterpretedLabel(label); }) .toReversed(); } @@ -161,6 +266,12 @@ export function ensureInterpretedLabel( /** * Parses a Partial InterpretedName into concrete InterpretedLabels and the partial Label. * + * @example + * ```ts + * const result = parsePartialInterpretedName("example.et") + * // { concrete: ["example"], partial: "et" } + * ``` + * * @throws if the provided `partialInterpretedName` is not composed of concrete InterpretedLabels. */ export function parsePartialInterpretedName(partialInterpretedName: Name): { @@ -170,10 +281,11 @@ export function parsePartialInterpretedName(partialInterpretedName: Name): { if (partialInterpretedName === "") return { concrete: [], partial: "" }; const concrete = partialInterpretedName.split("."); + // note that the concrete.pop mutates `concrete` to exclude the last element // biome-ignore lint/style/noNonNullAssertion: there's always at least one element after a .split const partial = concrete.pop()!; - if (!concrete.every(isInterpetedLabel)) { + if (!concrete.every(isInterpretedLabel)) { throw new Error( `Invariant(parsePartialInterpretedName): Concrete portion of Partial InterpretedName contains segments that are not InterpretedLabels.\n${JSON.stringify(concrete)}`, ); @@ -183,41 +295,48 @@ export function parsePartialInterpretedName(partialInterpretedName: Name): { } /** - * Validates and casts a string to an {@link InterpretedLabel}. - * An InterpretedLabel is either a normalized label or an EncodedLabelHash. + * Casts a string to a {@link LiteralName}. * - * @throws if the input is not a valid InterpretedLabel + * A LiteralName is a name that should be interpreted as a string literal. It may or may not be + * normalized or normalizable. It may also include labels formatted as an EncodedLabelHash, but + * such labels must be interpreted literally and not as an EncodedLabelHash. */ -export function asInterpretedLabel(label: string): InterpretedLabel { - if (!isInterpetedLabel(label as Label)) { - throw new Error(`Not a valid InterpretedLabel: '${label}'`); - } +export function asLiteralName(name: Name): LiteralName { + return name as LiteralName; +} - return label as InterpretedLabel; +/** + * Casts a string to a {@link LiteralLabel}. + * + * A LiteralLabel is a label that should be interpreted as a string literal. It may or may not be + * normalized or normalizable. It may also be formatted as an EncodedLabelHash, but such labels must + * be interpreted literally and not as an EncodedLabelHash. + */ +export function asLiteralLabel(label: Label): LiteralLabel { + return label as LiteralLabel; } /** - * Validates and casts a string to an {@link InterpretedName}. - * An InterpretedName is composed entirely of InterpretedLabels joined by dots. + * Validates and casts a string to an {@link InterpretedLabel}. + * An InterpretedLabel is either a normalized label or an EncodedLabelHash. * - * @throws if the input is not a valid InterpretedName + * @throws if the input is not a valid InterpretedLabel */ -export function asInterpretedName(name: string): InterpretedName { - if (!isInterpretedName(name as Name)) { - throw new Error(`Not a valid InterpretedName: '${name}'`); - } +export function asInterpretedLabel(label: Label): InterpretedLabel { + if (isInterpretedLabel(label)) return label; - return name as InterpretedName; + throw new Error(`Not a valid InterpretedLabel: '${label}'`); } /** - * Validates and casts a string to a {@link LiteralLabel}. - * A LiteralLabel is a label as it literally appears onchain. + * Validates and casts a string to an {@link InterpretedName}. + * An InterpretedName is either the ENS Root Name ('') or a name made up of InterpretedLabels (which + * are either normalized Labels or EncodedLabelHashes). * - * @throws if the input is empty + * @throws if the input cannot be interpreted into an InterpretedName */ -export function asLiteralLabel(label: string): LiteralLabel { - if (label === "") throw new Error("LiteralLabel must not be empty"); +export function asInterpretedName(name: Name): InterpretedName { + if (isInterpretedName(name)) return name; - return label as LiteralLabel; + throw new Error(`Not a valid InterpretedName: '${name}'`); } diff --git a/packages/enssdk/src/lib/labelhash.ts b/packages/enssdk/src/lib/labelhash.ts index 1875f9ead3..c3cc729c74 100644 --- a/packages/enssdk/src/lib/labelhash.ts +++ b/packages/enssdk/src/lib/labelhash.ts @@ -46,17 +46,50 @@ export function isLabelHash(maybeLabelHash: string): maybeLabelHash is LabelHash * @see https://ensnode.io/docs/reference/terminology#encoded-labelhash * * @param labelHash - A 32-byte lowercase hash string starting with '0x' - * @returns The encoded label hash in format `[hash_without_0x_prefix]` + * @returns The encoded label hash in format `[labelhash_without_0x_prefix]` */ export const encodeLabelHash = (labelHash: LabelHash): EncodedLabelHash => `[${labelHash.slice(2)}]`; +/** + * Parses an Encoded LabelHash (`[labelhash_without_0x_prefix]`) as a {@link LabelHash}, + * returning `null` if the input does not match the expected format. + */ +function parseEncodedLabelHash(value: string): LabelHash | null { + if (value.length !== 66) return null; + if (value[0] !== "[") return null; + if (value[65] !== "]") return null; + + const hash = `0x${value.slice(1, 65)}`; + if (!isLabelHash(hash)) return null; + + return hash; +} + +/** + * Decodes an Encoded LabelHash as a LabelHash. + * + * @throws if a valid LabelHash cannot be decoded + * + * @see https://ensnode.io/docs/reference/terminology#encoded-labelhash + * @see https://github.com/wevm/viem/blob/main/src/utils/ens/encodedLabelToLabelhash.ts + * + * @param maybeEncodedLabelHash The encoded label hash in format `[labelhash_without_0x_prefix]` + * @returns A 32-byte lowercase hash string starting with '0x' + */ +export const decodeEncodedLabelHash = (maybeEncodedLabelHash: string): LabelHash => { + const parsed = parseEncodedLabelHash(maybeEncodedLabelHash); + if (parsed === null) { + throw new Error( + `EncodedLabelHash '${maybeEncodedLabelHash}' is malformed: expected format '[<64-char lowercase hex>]'.`, + ); + } + return parsed; +}; + /** * Checks if the value is an {@link EncodedLabelHash}. */ export function isEncodedLabelHash(value: string): value is EncodedLabelHash { - const expectedFormatting = value.startsWith("[") && value.endsWith("]"); - const includesLabelHash = isLabelHash(`0x${value.slice(1, -1)}`); - - return expectedFormatting && includesLabelHash; + return parseEncodedLabelHash(value) !== null; } diff --git a/packages/enssdk/src/lib/names.test.ts b/packages/enssdk/src/lib/names.test.ts index d1ae240289..60ad985d0e 100644 --- a/packages/enssdk/src/lib/names.test.ts +++ b/packages/enssdk/src/lib/names.test.ts @@ -1,66 +1,66 @@ import { describe, expect, it } from "vitest"; +import { ENS_ROOT_NAME } from "./constants"; import { asInterpretedName } from "./interpreted-names-and-labels"; -import { beautifyName, ENS_ROOT, getNameHierarchy, getParentNameFQDN } from "./names"; -import type { Name, NormalizedName } from "./types"; +import { beautifyName, getNameHierarchy, getParentInterpretedName } from "./names"; +import type { Name } from "./types"; describe("names", () => { describe("getNameHierarchy", () => { it("should split name into hierarchy correctly", () => { - const name = "sub.example.eth" as NormalizedName; + const name = asInterpretedName("sub.example.eth"); const expected = ["sub.example.eth", "example.eth", "eth"]; expect(getNameHierarchy(name)).toEqual(expected); }); it("should handle single label names", () => { - const name = "eth" as NormalizedName; + const name = asInterpretedName("eth"); const expected = ["eth"]; expect(getNameHierarchy(name)).toEqual(expected); }); it("should handle empty string (root node)", () => { - const name = "" as NormalizedName; - const expected = [""]; - expect(getNameHierarchy(name)).toEqual(expected); + const name = asInterpretedName(""); + expect(getNameHierarchy(name)).toEqual([]); }); it("should handle names with different TLDs", () => { - const name = "sub.example.com" as NormalizedName; + const name = asInterpretedName("sub.example.com"); const expected = ["sub.example.com", "example.com", "com"]; expect(getNameHierarchy(name)).toEqual(expected); }); }); - describe("getParentNameFQDN", () => { - it("throws error for ENS Root", () => { - expect(() => getParentNameFQDN(ENS_ROOT)).toThrowError( - /There is no parent name for ENS Root/i, - ); + describe("getParentInterpretedName", () => { + it("returns null for ENS Root", () => { + expect(getParentInterpretedName(ENS_ROOT_NAME)).toBeNull(); }); it("returns ENS Root for top-level name", () => { - expect(getParentNameFQDN(asInterpretedName("eth"))).toStrictEqual(ENS_ROOT); + expect(getParentInterpretedName(asInterpretedName("eth"))).toStrictEqual(ENS_ROOT_NAME); }); - it("returns FQDN for 2nd-level name", () => { - expect(getParentNameFQDN(asInterpretedName("base.eth"))).toStrictEqual("eth"); + it("returns parent for 2nd-level name", () => { + expect(getParentInterpretedName(asInterpretedName("base.eth"))).toStrictEqual("eth"); }); - it("returns FQDN for 3rd-level name", () => { - expect(getParentNameFQDN(asInterpretedName("test.base.eth"))).toStrictEqual("base.eth"); + it("returns parent for 3rd-level name", () => { + expect(getParentInterpretedName(asInterpretedName("test.base.eth"))).toStrictEqual( + "base.eth", + ); }); }); describe("beautifyName", () => { it("should beautify a name with no labels", () => { - const name = "" as Name; + const name = ""; const expected = ""; expect(beautifyName(name)).toEqual(expected); }); it("should beautify normalized labels", () => { - const name = "1\u20E32\u20E3.eth" as NormalizedName; - const expected = "1\uFE0F\u20E32\uFE0F\u20E3.eth"; + const name = "1⃣2⃣.eth"; + const expected = "1️⃣2️⃣.eth"; expect(beautifyName(name)).toEqual(expected); }); @@ -71,8 +71,8 @@ describe("names", () => { }); it("should selectively beautify labels where possible", () => { - const name = "1\u20E32\u20E3.ABC.eth" as Name; - const expected = "1\uFE0F\u20E32\uFE0F\u20E3.ABC.eth"; + const name = "1⃣2⃣.ABC.eth" as Name; + const expected = "1️⃣2️⃣.ABC.eth"; expect(beautifyName(name)).toEqual(expected); }); diff --git a/packages/enssdk/src/lib/names.ts b/packages/enssdk/src/lib/names.ts index 6abe458650..c77d83bd6e 100644 --- a/packages/enssdk/src/lib/names.ts +++ b/packages/enssdk/src/lib/names.ts @@ -1,43 +1,39 @@ import { ens_beautify } from "@adraffy/ens-normalize"; +import { ENS_ROOT_NAME } from "./constants"; import { - asInterpretedName, interpretedLabelsToInterpretedName, interpretedNameToInterpretedLabels, } from "./interpreted-names-and-labels"; import { isNormalizedLabel } from "./normalization"; -import type { InterpretedName, Label, Name, NormalizedName } from "./types"; +import type { InterpretedName, Label, Name } from "./types"; /** - * Name for the ENS Root - */ -export const ENS_ROOT = asInterpretedName(""); - -/** - * Constructs a name hierarchy from a given NormalizedName. + * Constructs a name hierarchy from a given InterpretedName. * * @example * ``` * getNameHierarchy("sub.example.eth") -> ["sub.example.eth", "example.eth", "eth"] * ``` - * - * @dev by restricting the input type to NormalizedName we guarantee that we can split and join - * on '.' and receive NormalizedNames as a result */ -export const getNameHierarchy = (name: NormalizedName): NormalizedName[] => - name.split(".").map((_, i, labels) => labels.slice(i).join(".")) as NormalizedName[]; +export const getNameHierarchy = (name: InterpretedName): InterpretedName[] => { + if (name === ENS_ROOT_NAME) return []; + + return interpretedNameToInterpretedLabels(name).map((_, i, labels) => + interpretedLabelsToInterpretedName(labels.slice(i)), + ); +}; /** - * Get FQDN of parent for a name. + * Derives the parent's {@link InterpretedName} of the provided `name`, or null if there is none. */ -export const getParentNameFQDN = (name: InterpretedName): InterpretedName => { - // Invariant: name is not ENS root. - if (name === ENS_ROOT) throw new Error("There is no parent name for ENS Root."); +export const getParentInterpretedName = (name: InterpretedName): InterpretedName | null => { + if (name === ENS_ROOT_NAME) return null; const labels = interpretedNameToInterpretedLabels(name); - // For TLDs, return ENS_ROOT - if (labels.length === 1) return ENS_ROOT; + // For TLDs, return ENS_ROOT_NAME + if (labels.length === 1) return ENS_ROOT_NAME; // Strip off the child-most label in the name to get the FQDN of the parent return interpretedLabelsToInterpretedName(labels.slice(1)); diff --git a/packages/enssdk/src/lib/normalization.ts b/packages/enssdk/src/lib/normalization.ts index 8130b599ac..84093b6e57 100644 --- a/packages/enssdk/src/lib/normalization.ts +++ b/packages/enssdk/src/lib/normalization.ts @@ -1,6 +1,6 @@ import { ens_normalize } from "@adraffy/ens-normalize"; -import type { InterpretedLabel, InterpretedName, Label, Name, NormalizedName } from "./types"; +import type { InterpretedLabel, InterpretedName, Label, Name } from "./types"; /** * Normalizes a Name according to ENS normalization rules (ENSIP-15), returning an InterpretedName. @@ -8,8 +8,13 @@ import type { InterpretedLabel, InterpretedName, Label, Name, NormalizedName } f * @throws if the Name is not normalizable * @see https://docs.ens.domains/ensip/15 */ -export const normalizeName = (name: Name): InterpretedName => - ens_normalize(name) as InterpretedName; +export const normalizeName = (name: Name): InterpretedName => { + try { + return ens_normalize(name) as InterpretedName; + } catch (cause) { + throw new Error(`Name '${name}' cannot be normalized.`, { cause }); + } +}; /** * Normalizes a Label according to ENS normalization rules (ENSIP-15), returning an InterpretedLabel. @@ -18,29 +23,34 @@ export const normalizeName = (name: Name): InterpretedName => * @see https://docs.ens.domains/ensip/15 */ export const normalizeLabel = (label: Label): InterpretedLabel => { - // empty string cannot be a label - if (label === "") throw new Error("Empty string is not a valid Label."); + // empty string cannot be a normalized label + if (label === "") throw new Error("Label is empty ('') and cannot be normalized."); // normalized labels do not contain periods if (label.includes(".")) { throw new Error(`Label '${label}' includes '.' and cannot be normalized.`); } - // NOTE: the ens_normalize function accepts _names_ not labels, and so we must include our own - // invariants above to ensure that the `label` input here can be safely normalized - return ens_normalize(label) as InterpretedLabel; + try { + // NOTE: the ens_normalize function accepts _names_ not labels, and so we must include our own + // invariants above to ensure that the `label` input here can be safely normalized + return ens_normalize(label) as InterpretedLabel; + } catch (cause) { + throw new Error(`Label '${label}' cannot be normalized.`, { cause }); + } }; /** * Determines whether the Name is normalized according to ENSIP-15 normalization rules. */ -export function isNormalizedName(name: Name): name is NormalizedName { +export function isNormalizedName(name: Name): boolean { try { return name === normalizeName(name); } catch { return false; } } + /** * Determines whether the Label is normalized according to ENSIP-15 normalization rules. */ diff --git a/packages/enssdk/src/lib/parse-reverse-name.test.ts b/packages/enssdk/src/lib/parse-reverse-name.test.ts index 093dc6b436..9e8212a7cf 100644 --- a/packages/enssdk/src/lib/parse-reverse-name.test.ts +++ b/packages/enssdk/src/lib/parse-reverse-name.test.ts @@ -14,8 +14,10 @@ import { import { describe, expect, it } from "vitest"; import { DEFAULT_EVM_CHAIN_ID, evmChainIdToCoinType } from "./coin-type"; +import { asInterpretedName } from "./interpreted-names-and-labels"; import { parseReverseName } from "./parse-reverse-name"; import { reverseName } from "./reverse-name"; +import type { InterpretedName } from "./types"; const EXAMPLE_ADDRESS = "0x51050ec063d393217b436747617ad1c2285aeeee"; const CHAIN_IDS = [ @@ -132,13 +134,14 @@ const negativeCases: string[] = [ describe("parseReverseName", () => { positiveCases.forEach(([input, expected]) => { it(`parses "${input}"`, () => { - expect(parseReverseName(input)).toEqual(expected); + expect(parseReverseName(asInterpretedName(input))).toEqual(expected); }); }); negativeCases.forEach((input) => { it(`does not parse "${input}"`, () => { - expect(parseReverseName(input)).toBeNull(); + // NOTE: directly cast to avoid running asInterpretedName validation + expect(parseReverseName(input as InterpretedName)).toBeNull(); }); }); diff --git a/packages/enssdk/src/lib/parse-reverse-name.ts b/packages/enssdk/src/lib/parse-reverse-name.ts index b49423e4ac..14f2f305d8 100644 --- a/packages/enssdk/src/lib/parse-reverse-name.ts +++ b/packages/enssdk/src/lib/parse-reverse-name.ts @@ -1,8 +1,9 @@ -import { hexToBigInt, isAddress } from "viem"; +import { hexToBigInt } from "viem"; -import { asLowerCaseAddress } from "./address"; +import { toNormalizedAddress } from "./address"; import { bigintToCoinType, DEFAULT_EVM_COIN_TYPE, ETH_COIN_TYPE } from "./coin-type"; -import type { Address, CoinType, Label, Name } from "./types"; +import { asLiteralLabel } from "./interpreted-names-and-labels"; +import type { CoinType, InterpretedName, LiteralLabel, NormalizedAddress } from "./types"; /** * Matches an ENSIP-19 Reverse Name @@ -18,14 +19,8 @@ const REVERSE_NAME_REGEX = /^([0-9a-fA-F]+)\.([0-9a-f]{1,64}|addr|default)\.reve * @throws if address is invalid * @see https://docs.ens.domains/ensip/19#reverse-resolution */ -const parseAddressLabel = (addressLabel: Label): Address => { - const maybeAddress = `0x${addressLabel}`; - - if (!isAddress(maybeAddress)) { - throw new Error(`Invalid EVM address "${maybeAddress}"`); - } - - return asLowerCaseAddress(maybeAddress); +const parseAddressLabel = (addressLabel: LiteralLabel): NormalizedAddress => { + return toNormalizedAddress(`0x${addressLabel}`); }; /** @@ -33,7 +28,7 @@ const parseAddressLabel = (addressLabel: Label): Address => { * * @throws if coinType is invalid */ -const parseCoinTypeLabel = (coinTypeLabel: Label): CoinType => { +const parseCoinTypeLabel = (coinTypeLabel: LiteralLabel): CoinType => { if (coinTypeLabel === "default") return DEFAULT_EVM_COIN_TYPE; if (coinTypeLabel === "addr") return ETH_COIN_TYPE; @@ -42,8 +37,14 @@ const parseCoinTypeLabel = (coinTypeLabel: Label): CoinType => { /** * Parse the address and coinType out of an ENSIP-19 reverse name. + * + * @dev accepts InterpretedName because all Reverse Names are Interpreted Names and we use this + * function in the context of the Resolution module in which all names are InterpretedNames. */ -export function parseReverseName(name: Name): { address: Address; coinType: CoinType } | null { +export function parseReverseName(name: InterpretedName): { + address: NormalizedAddress; + coinType: CoinType; +} | null { const match = name.match(REVERSE_NAME_REGEX); if (!match) return null; @@ -53,8 +54,8 @@ export function parseReverseName(name: Name): { address: Address; coinType: Coin if (!coinTypeLabel) return null; return { - address: parseAddressLabel(addressLabel), - coinType: parseCoinTypeLabel(coinTypeLabel), + address: parseAddressLabel(asLiteralLabel(addressLabel)), + coinType: parseCoinTypeLabel(asLiteralLabel(coinTypeLabel)), }; } catch { // either of the parse methods threw, unable to parse reverse name diff --git a/packages/enssdk/src/lib/reverse-name.ts b/packages/enssdk/src/lib/reverse-name.ts index 4f849f6090..e5fa78a93f 100644 --- a/packages/enssdk/src/lib/reverse-name.ts +++ b/packages/enssdk/src/lib/reverse-name.ts @@ -1,23 +1,29 @@ -import type { Address } from "viem"; - import { DEFAULT_EVM_COIN_TYPE, ETH_COIN_TYPE } from "./coin-type"; -import { asLiteralLabel } from "./interpreted-names-and-labels"; -import type { CoinType, Label, LiteralLabel, Name } from "./types"; +import { + asInterpretedLabel, + interpretedLabelsToInterpretedName, +} from "./interpreted-names-and-labels"; +import type { CoinType, InterpretedLabel, InterpretedName, NormalizedAddress } from "./types"; + +const ADDR_LABEL = asInterpretedLabel("addr"); +const DEFAULT_LABEL = asInterpretedLabel("default"); +const REVERSE_LABEL = asInterpretedLabel("reverse"); /** * Gets the Label used for the reverse names of subnames as per ENSIP-11 & ENSIP-19. * * @see https://docs.ens.domains/ensip/19/#reverse-resolution */ -export const addrReverseLabel = (address: Address): LiteralLabel => - asLiteralLabel(address.slice(2)); // address is guaranteed to be fully lowercase +export const addrReverseLabel = (address: NormalizedAddress): InterpretedLabel => + address.slice(2) as InterpretedLabel; /** * Converts `coinType` to prefix-free hex string. * * @see https://docs.ens.domains/ensip/19 */ -export const coinTypeReverseLabel = (coinType: CoinType): Label => coinType.toString(16); +export const coinTypeReverseLabel = (coinType: CoinType): InterpretedLabel => + coinType.toString(16) as InterpretedLabel; /** * Gets the reverse name for an address according to ENSIP-11 & ENSIP-19. @@ -36,19 +42,19 @@ export const coinTypeReverseLabel = (coinType: CoinType): Label => coinType.toSt * reverseName("0x1234", BigInt(0x5678)) // "1234.5678.reverse" * ``` */ -export function reverseName(address: Address, coinType: CoinType): Name { +export function reverseName(address: NormalizedAddress, coinType: CoinType): InterpretedName { const label = addrReverseLabel(address); - const middle = (() => { + const middle = ((): InterpretedLabel => { switch (coinType) { case ETH_COIN_TYPE: - return "addr"; + return ADDR_LABEL; case DEFAULT_EVM_COIN_TYPE: - return "default"; + return DEFAULT_LABEL; default: return coinTypeReverseLabel(coinType); } })(); - return `${label}.${middle}.reverse`; + return interpretedLabelsToInterpretedName([label, middle, REVERSE_LABEL]); } diff --git a/packages/enssdk/src/lib/types/ens.ts b/packages/enssdk/src/lib/types/ens.ts index cf5e94a9ac..d5007e59e7 100644 --- a/packages/enssdk/src/lib/types/ens.ts +++ b/packages/enssdk/src/lib/types/ens.ts @@ -22,16 +22,6 @@ export type Node = Hex; */ export type Name = string; -/** - * A Normalized Name is an ENS Name that is guaranteed to be normalized. - * - * @example vitalik.eth - * @see https://ensnode.io/docs/reference/terminology#name-node-namehash - * @see https://docs.ens.domains/ensip/15 - * @dev nominally typed to enforce usage & enhance codebase clarity - */ -export type NormalizedName = Name & { __brand: "NormalizedName" }; - /** * A LabelHash is the result of the labelhash function (which is just keccak256) on a Label. * @@ -102,7 +92,6 @@ export type EncodedLabelHash = `[${string}]`; * - containing other unnormalized characters such as null bytes or other characters * not suitable for display. * - * * @see https://ensnode.io/docs/reference/terminology#literal-label * @dev nominally typed to enforce usage & enhance codebase clarity */ diff --git a/packages/enssdk/src/lib/types/evm.ts b/packages/enssdk/src/lib/types/evm.ts index 16d2c8805c..7a0df657ad 100644 --- a/packages/enssdk/src/lib/types/evm.ts +++ b/packages/enssdk/src/lib/types/evm.ts @@ -1,9 +1,51 @@ import type { Address as ViemAddress, Hex as ViemHex } from "viem"; -// re-export viem Address/Hex for consistency +/** + * Represents a Hex string, in the format `0x{string}`. + */ export type Hex = ViemHex; + +/** + * Represents an EVM Address, in the format `0x{string}`, which may or may not be checksummed. + */ export type Address = ViemAddress; +/** + * Represents a normalized (non-checksummed) EVM Address, in the format `0x{string}`, where all + * characters are lowercase and length is exactly 42. + * + * @dev because the Address type is so widely used, nominally typing it would involve a _ton_ of + * asNormalizedAddress() casts across the codebase. By avoiding the __brand, we can easily use + * EventWithArgs<{ address: NormalizedAddress }> in all of the Ponder event handler args to + * declare that the incoming event.args.address is a NormalizedAddress. + */ +export type NormalizedAddress = Address; + +/** + * Unix timestamp value as bigint. + * + * Represents the number of seconds that have elapsed + * since January 1, 1970 (midnight UTC/GMT). + * + * Guaranteed to be an integer. May be zero or negative to represent a time at or + * before Jan 1, 1970. + */ +export type UnixTimestampBigInt = bigint; + +/** + * Duration value as bigint. + * + * Representing a duration in seconds. + * + * Guaranteed to be a non-negative integer. + */ +export type DurationBigInt = bigint; + +/** + * A value denominated in wei, the smallest unit of Ether (1 ETH = 10^18 wei). + */ +export type Wei = bigint; + /** * Chain ID * @@ -33,7 +75,7 @@ export type DefaultableChainId = 0 | ChainId; */ export interface AccountId { chainId: ChainId; - address: Address; + address: NormalizedAddress; } /** @@ -48,17 +90,6 @@ export const AssetNamespaces = { export type AssetNamespace = (typeof AssetNamespaces)[keyof typeof AssetNamespaces]; -/** - * Unix timestamp value - * - * Represents the number of seconds that have elapsed - * since January 1, 1970 (midnight UTC/GMT). - * - * Guaranteed to be an integer. May be zero or negative to represent a time at or - * before Jan 1, 1970. - */ -export type UnixTimestamp = number; - /** * A uint256 value that identifies a specific NFT within a NFT contract. */ diff --git a/packages/enssdk/src/lib/types/shared.ts b/packages/enssdk/src/lib/types/shared.ts index 06265d9ffa..21837dad79 100644 --- a/packages/enssdk/src/lib/types/shared.ts +++ b/packages/enssdk/src/lib/types/shared.ts @@ -1,3 +1,23 @@ +/** + * Unix timestamp value + * + * Represents the number of seconds that have elapsed + * since January 1, 1970 (midnight UTC/GMT). + * + * Guaranteed to be an integer. May be zero or negative to represent a time at or + * before Jan 1, 1970. + */ +export type UnixTimestamp = number; + +/** + * Duration + * + * Representing a duration in seconds. + * + * Guaranteed to be a non-negative integer. + */ +export type Duration = number; + /** * Serialized representation of {@link ChainId}. **/ diff --git a/packages/enssdk/src/omnigraph/generated/graphql-env.d.ts b/packages/enssdk/src/omnigraph/generated/graphql-env.d.ts deleted file mode 100644 index 48f7523682..0000000000 --- a/packages/enssdk/src/omnigraph/generated/graphql-env.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -/* eslint-disable */ -/* prettier-ignore */ - -export type introspection_types = { - 'Account': { kind: 'OBJECT'; name: 'Account'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Address'; ofType: null; }; } }; 'domains': { name: 'domains'; type: { kind: 'OBJECT'; name: 'AccountDomainsConnection'; ofType: null; } }; 'events': { name: 'events'; type: { kind: 'OBJECT'; name: 'AccountEventsConnection'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Address'; ofType: null; }; } }; 'permissions': { name: 'permissions'; type: { kind: 'OBJECT'; name: 'AccountPermissionsConnection'; ofType: null; } }; 'registryPermissions': { name: 'registryPermissions'; type: { kind: 'OBJECT'; name: 'AccountRegistryPermissionsConnection'; ofType: null; } }; 'resolverPermissions': { name: 'resolverPermissions'; type: { kind: 'OBJECT'; name: 'AccountResolverPermissionsConnection'; ofType: null; } }; }; }; - 'AccountByInput': { kind: 'INPUT_OBJECT'; name: 'AccountByInput'; isOneOf: true; inputFields: [{ name: 'address'; type: { kind: 'SCALAR'; name: 'Address'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'SCALAR'; name: 'Address'; ofType: null; }; defaultValue: null }]; }; - 'AccountDomainsConnection': { kind: 'OBJECT'; name: 'AccountDomainsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountDomainsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'AccountDomainsConnectionEdge': { kind: 'OBJECT'; name: 'AccountDomainsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; } }; }; }; - 'AccountDomainsWhereInput': { kind: 'INPUT_OBJECT'; name: 'AccountDomainsWhereInput'; isOneOf: false; inputFields: [{ name: 'canonical'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: "false" }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'AccountEventsConnection': { kind: 'OBJECT'; name: 'AccountEventsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountEventsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'AccountEventsConnectionEdge': { kind: 'OBJECT'; name: 'AccountEventsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; }; }; - 'AccountEventsWhereInput': { kind: 'INPUT_OBJECT'; name: 'AccountEventsWhereInput'; isOneOf: false; inputFields: [{ name: 'selector_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Hex'; ofType: null; }; }; }; defaultValue: null }, { name: 'timestamp_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'timestamp_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }]; }; - 'AccountId': { kind: 'OBJECT'; name: 'AccountId'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Address'; ofType: null; }; } }; 'chainId': { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; } }; }; }; - 'AccountIdInput': { kind: 'INPUT_OBJECT'; name: 'AccountIdInput'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Address'; ofType: null; }; }; defaultValue: null }, { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; }; defaultValue: null }]; }; - 'AccountPermissionsConnection': { kind: 'OBJECT'; name: 'AccountPermissionsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountPermissionsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'AccountPermissionsConnectionEdge': { kind: 'OBJECT'; name: 'AccountPermissionsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PermissionsUser'; ofType: null; }; } }; }; }; - 'AccountRegistryPermissionsConnection': { kind: 'OBJECT'; name: 'AccountRegistryPermissionsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountRegistryPermissionsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'AccountRegistryPermissionsConnectionEdge': { kind: 'OBJECT'; name: 'AccountRegistryPermissionsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'RegistryPermissionsUser'; ofType: null; }; } }; }; }; - 'AccountResolverPermissionsConnection': { kind: 'OBJECT'; name: 'AccountResolverPermissionsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountResolverPermissionsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'AccountResolverPermissionsConnectionEdge': { kind: 'OBJECT'; name: 'AccountResolverPermissionsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ResolverPermissionsUser'; ofType: null; }; } }; }; }; - 'Address': unknown; - 'BaseRegistrarRegistration': { kind: 'OBJECT'; name: 'BaseRegistrarRegistration'; fields: { 'baseCost': { name: 'baseCost'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'domain': { name: 'domain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; } }; 'event': { name: 'event'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; 'expired': { name: 'expired'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'expiry': { name: 'expiry'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'RegistrationId'; ofType: null; }; } }; 'isInGracePeriod': { name: 'isInGracePeriod'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'premium': { name: 'premium'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'referrer': { name: 'referrer'; type: { kind: 'SCALAR'; name: 'Hex'; ofType: null; } }; 'registrant': { name: 'registrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'registrar': { name: 'registrar'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'renewals': { name: 'renewals'; type: { kind: 'OBJECT'; name: 'RegistrationRenewalsConnection'; ofType: null; } }; 'start': { name: 'start'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'unregistrant': { name: 'unregistrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'wrapped': { name: 'wrapped'; type: { kind: 'OBJECT'; name: 'WrappedBaseRegistrarRegistration'; ofType: null; } }; }; }; - 'BigInt': unknown; - 'Boolean': unknown; - 'ChainId': unknown; - 'CoinType': unknown; - 'Domain': { kind: 'INTERFACE'; name: 'Domain'; fields: { 'events': { name: 'events'; type: { kind: 'OBJECT'; name: 'DomainEventsConnection'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DomainId'; ofType: null; }; } }; 'label': { name: 'label'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Label'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'InterpretedName'; ofType: null; } }; 'owner': { name: 'owner'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'path': { name: 'path'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; }; } }; 'registration': { name: 'registration'; type: { kind: 'INTERFACE'; name: 'Registration'; ofType: null; } }; 'registrations': { name: 'registrations'; type: { kind: 'OBJECT'; name: 'DomainRegistrationsConnection'; ofType: null; } }; 'resolver': { name: 'resolver'; type: { kind: 'OBJECT'; name: 'Resolver'; ofType: null; } }; 'subdomains': { name: 'subdomains'; type: { kind: 'OBJECT'; name: 'DomainSubdomainsConnection'; ofType: null; } }; }; possibleTypes: 'ENSv1Domain' | 'ENSv2Domain'; }; - 'DomainEventsConnection': { kind: 'OBJECT'; name: 'DomainEventsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DomainEventsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'DomainEventsConnectionEdge': { kind: 'OBJECT'; name: 'DomainEventsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; }; }; - 'DomainId': unknown; - 'DomainIdInput': { kind: 'INPUT_OBJECT'; name: 'DomainIdInput'; isOneOf: true; inputFields: [{ name: 'id'; type: { kind: 'SCALAR'; name: 'DomainId'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'InterpretedName'; ofType: null; }; defaultValue: null }]; }; - 'DomainPermissionsWhereInput': { kind: 'INPUT_OBJECT'; name: 'DomainPermissionsWhereInput'; isOneOf: false; inputFields: [{ name: 'user'; type: { kind: 'SCALAR'; name: 'Address'; ofType: null; }; defaultValue: null }]; }; - 'DomainRegistrationsConnection': { kind: 'OBJECT'; name: 'DomainRegistrationsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DomainRegistrationsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'DomainRegistrationsConnectionEdge': { kind: 'OBJECT'; name: 'DomainRegistrationsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Registration'; ofType: null; }; } }; }; }; - 'DomainSubdomainsConnection': { kind: 'OBJECT'; name: 'DomainSubdomainsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DomainSubdomainsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'DomainSubdomainsConnectionEdge': { kind: 'OBJECT'; name: 'DomainSubdomainsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; } }; }; }; - 'DomainsOrderBy': { name: 'DomainsOrderBy'; enumValues: 'NAME' | 'REGISTRATION_EXPIRY' | 'REGISTRATION_TIMESTAMP'; }; - 'DomainsOrderInput': { kind: 'INPUT_OBJECT'; name: 'DomainsOrderInput'; isOneOf: false; inputFields: [{ name: 'by'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'DomainsOrderBy'; ofType: null; }; }; defaultValue: null }, { name: 'dir'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: "ASC" }]; }; - 'DomainsWhereInput': { kind: 'INPUT_OBJECT'; name: 'DomainsWhereInput'; isOneOf: false; inputFields: [{ name: 'canonical'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: "false" }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; - 'ENSv1Domain': { kind: 'OBJECT'; name: 'ENSv1Domain'; fields: { 'events': { name: 'events'; type: { kind: 'OBJECT'; name: 'DomainEventsConnection'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DomainId'; ofType: null; }; } }; 'label': { name: 'label'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Label'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'InterpretedName'; ofType: null; } }; 'owner': { name: 'owner'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'parent': { name: 'parent'; type: { kind: 'OBJECT'; name: 'ENSv1Domain'; ofType: null; } }; 'path': { name: 'path'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; }; } }; 'registration': { name: 'registration'; type: { kind: 'INTERFACE'; name: 'Registration'; ofType: null; } }; 'registrations': { name: 'registrations'; type: { kind: 'OBJECT'; name: 'DomainRegistrationsConnection'; ofType: null; } }; 'resolver': { name: 'resolver'; type: { kind: 'OBJECT'; name: 'Resolver'; ofType: null; } }; 'rootRegistryOwner': { name: 'rootRegistryOwner'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'subdomains': { name: 'subdomains'; type: { kind: 'OBJECT'; name: 'DomainSubdomainsConnection'; ofType: null; } }; }; }; - 'ENSv2Domain': { kind: 'OBJECT'; name: 'ENSv2Domain'; fields: { 'events': { name: 'events'; type: { kind: 'OBJECT'; name: 'DomainEventsConnection'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DomainId'; ofType: null; }; } }; 'label': { name: 'label'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Label'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'InterpretedName'; ofType: null; } }; 'owner': { name: 'owner'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'path': { name: 'path'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; }; } }; 'permissions': { name: 'permissions'; type: { kind: 'OBJECT'; name: 'ENSv2DomainPermissionsConnection'; ofType: null; } }; 'registration': { name: 'registration'; type: { kind: 'INTERFACE'; name: 'Registration'; ofType: null; } }; 'registrations': { name: 'registrations'; type: { kind: 'OBJECT'; name: 'DomainRegistrationsConnection'; ofType: null; } }; 'registry': { name: 'registry'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Registry'; ofType: null; }; } }; 'resolver': { name: 'resolver'; type: { kind: 'OBJECT'; name: 'Resolver'; ofType: null; } }; 'subdomains': { name: 'subdomains'; type: { kind: 'OBJECT'; name: 'DomainSubdomainsConnection'; ofType: null; } }; 'subregistry': { name: 'subregistry'; type: { kind: 'OBJECT'; name: 'Registry'; ofType: null; } }; 'tokenId': { name: 'tokenId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; }; }; - 'ENSv2DomainPermissionsConnection': { kind: 'OBJECT'; name: 'ENSv2DomainPermissionsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ENSv2DomainPermissionsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'ENSv2DomainPermissionsConnectionEdge': { kind: 'OBJECT'; name: 'ENSv2DomainPermissionsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PermissionsUser'; ofType: null; }; } }; }; }; - 'ENSv2RegistryRegistration': { kind: 'OBJECT'; name: 'ENSv2RegistryRegistration'; fields: { 'domain': { name: 'domain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; } }; 'event': { name: 'event'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; 'expired': { name: 'expired'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'expiry': { name: 'expiry'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'RegistrationId'; ofType: null; }; } }; 'referrer': { name: 'referrer'; type: { kind: 'SCALAR'; name: 'Hex'; ofType: null; } }; 'registrant': { name: 'registrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'registrar': { name: 'registrar'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'renewals': { name: 'renewals'; type: { kind: 'OBJECT'; name: 'RegistrationRenewalsConnection'; ofType: null; } }; 'start': { name: 'start'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'unregistrant': { name: 'unregistrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; }; }; - 'ENSv2RegistryReservation': { kind: 'OBJECT'; name: 'ENSv2RegistryReservation'; fields: { 'domain': { name: 'domain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; } }; 'event': { name: 'event'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; 'expired': { name: 'expired'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'expiry': { name: 'expiry'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'RegistrationId'; ofType: null; }; } }; 'referrer': { name: 'referrer'; type: { kind: 'SCALAR'; name: 'Hex'; ofType: null; } }; 'registrant': { name: 'registrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'registrar': { name: 'registrar'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'renewals': { name: 'renewals'; type: { kind: 'OBJECT'; name: 'RegistrationRenewalsConnection'; ofType: null; } }; 'start': { name: 'start'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'unregistrant': { name: 'unregistrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; }; }; - 'Event': { kind: 'OBJECT'; name: 'Event'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Address'; ofType: null; }; } }; 'blockHash': { name: 'blockHash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Hex'; ofType: null; }; } }; 'blockNumber': { name: 'blockNumber'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'chainId': { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; } }; 'data': { name: 'data'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Hex'; ofType: null; }; } }; 'from': { name: 'from'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Address'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'logIndex': { name: 'logIndex'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'timestamp': { name: 'timestamp'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'to': { name: 'to'; type: { kind: 'SCALAR'; name: 'Address'; ofType: null; } }; 'topics': { name: 'topics'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Hex'; ofType: null; }; }; }; } }; 'transactionHash': { name: 'transactionHash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Hex'; ofType: null; }; } }; 'transactionIndex': { name: 'transactionIndex'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'EventsWhereInput': { kind: 'INPUT_OBJECT'; name: 'EventsWhereInput'; isOneOf: false; inputFields: [{ name: 'from'; type: { kind: 'SCALAR'; name: 'Address'; ofType: null; }; defaultValue: null }, { name: 'selector_in'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Hex'; ofType: null; }; }; }; defaultValue: null }, { name: 'timestamp_gte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }, { name: 'timestamp_lte'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; defaultValue: null }]; }; - 'Hex': unknown; - 'ID': unknown; - 'Int': unknown; - 'InterpretedLabel': unknown; - 'InterpretedName': unknown; - 'Label': { kind: 'OBJECT'; name: 'Label'; fields: { 'hash': { name: 'hash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Hex'; ofType: null; }; } }; 'interpreted': { name: 'interpreted'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'InterpretedLabel'; ofType: null; }; } }; }; }; - 'NameOrNodeInput': { kind: 'INPUT_OBJECT'; name: 'NameOrNodeInput'; isOneOf: true; inputFields: [{ name: 'name'; type: { kind: 'SCALAR'; name: 'InterpretedName'; ofType: null; }; defaultValue: null }, { name: 'node'; type: { kind: 'SCALAR'; name: 'Node'; ofType: null; }; defaultValue: null }]; }; - 'NameWrapperRegistration': { kind: 'OBJECT'; name: 'NameWrapperRegistration'; fields: { 'domain': { name: 'domain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; } }; 'event': { name: 'event'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; 'expired': { name: 'expired'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'expiry': { name: 'expiry'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'fuses': { name: 'fuses'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'RegistrationId'; ofType: null; }; } }; 'referrer': { name: 'referrer'; type: { kind: 'SCALAR'; name: 'Hex'; ofType: null; } }; 'registrant': { name: 'registrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'registrar': { name: 'registrar'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'renewals': { name: 'renewals'; type: { kind: 'OBJECT'; name: 'RegistrationRenewalsConnection'; ofType: null; } }; 'start': { name: 'start'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'unregistrant': { name: 'unregistrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; }; }; - 'Node': unknown; - 'OrderDirection': { name: 'OrderDirection'; enumValues: 'ASC' | 'DESC'; }; - 'PageInfo': { kind: 'OBJECT'; name: 'PageInfo'; fields: { 'endCursor': { name: 'endCursor'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'hasNextPage': { name: 'hasNextPage'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'hasPreviousPage': { name: 'hasPreviousPage'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'startCursor': { name: 'startCursor'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; - 'Permissions': { kind: 'OBJECT'; name: 'Permissions'; fields: { 'contract': { name: 'contract'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'events': { name: 'events'; type: { kind: 'OBJECT'; name: 'PermissionsEventsConnection'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'PermissionsId'; ofType: null; }; } }; 'resources': { name: 'resources'; type: { kind: 'OBJECT'; name: 'PermissionsResourcesConnection'; ofType: null; } }; 'root': { name: 'root'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PermissionsResource'; ofType: null; }; } }; }; }; - 'PermissionsEventsConnection': { kind: 'OBJECT'; name: 'PermissionsEventsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PermissionsEventsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'PermissionsEventsConnectionEdge': { kind: 'OBJECT'; name: 'PermissionsEventsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; }; }; - 'PermissionsId': unknown; - 'PermissionsIdInput': { kind: 'INPUT_OBJECT'; name: 'PermissionsIdInput'; isOneOf: true; inputFields: [{ name: 'contract'; type: { kind: 'INPUT_OBJECT'; name: 'AccountIdInput'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'SCALAR'; name: 'PermissionsId'; ofType: null; }; defaultValue: null }]; }; - 'PermissionsResource': { kind: 'OBJECT'; name: 'PermissionsResource'; fields: { 'contract': { name: 'contract'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'PermissionsResourceId'; ofType: null; }; } }; 'permissions': { name: 'permissions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Permissions'; ofType: null; }; } }; 'resource': { name: 'resource'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'users': { name: 'users'; type: { kind: 'OBJECT'; name: 'PermissionsResourceUsersConnection'; ofType: null; } }; }; }; - 'PermissionsResourceId': unknown; - 'PermissionsResourceUsersConnection': { kind: 'OBJECT'; name: 'PermissionsResourceUsersConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PermissionsResourceUsersConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'PermissionsResourceUsersConnectionEdge': { kind: 'OBJECT'; name: 'PermissionsResourceUsersConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PermissionsUser'; ofType: null; }; } }; }; }; - 'PermissionsResourcesConnection': { kind: 'OBJECT'; name: 'PermissionsResourcesConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PermissionsResourcesConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'PermissionsResourcesConnectionEdge': { kind: 'OBJECT'; name: 'PermissionsResourcesConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PermissionsResource'; ofType: null; }; } }; }; }; - 'PermissionsUser': { kind: 'OBJECT'; name: 'PermissionsUser'; fields: { 'contract': { name: 'contract'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'PermissionsUserId'; ofType: null; }; } }; 'resource': { name: 'resource'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'roles': { name: 'roles'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'user': { name: 'user'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Account'; ofType: null; }; } }; }; }; - 'PermissionsUserId': unknown; - 'Query': { kind: 'OBJECT'; name: 'Query'; fields: { 'account': { name: 'account'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'domain': { name: 'domain'; type: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; } }; 'domains': { name: 'domains'; type: { kind: 'OBJECT'; name: 'QueryDomainsConnection'; ofType: null; } }; 'permissions': { name: 'permissions'; type: { kind: 'OBJECT'; name: 'Permissions'; ofType: null; } }; 'registrations': { name: 'registrations'; type: { kind: 'OBJECT'; name: 'QueryRegistrationsConnection'; ofType: null; } }; 'registry': { name: 'registry'; type: { kind: 'OBJECT'; name: 'Registry'; ofType: null; } }; 'resolver': { name: 'resolver'; type: { kind: 'OBJECT'; name: 'Resolver'; ofType: null; } }; 'resolvers': { name: 'resolvers'; type: { kind: 'OBJECT'; name: 'QueryResolversConnection'; ofType: null; } }; 'root': { name: 'root'; type: { kind: 'OBJECT'; name: 'Registry'; ofType: null; } }; 'v1Domains': { name: 'v1Domains'; type: { kind: 'OBJECT'; name: 'QueryV1DomainsConnection'; ofType: null; } }; 'v2Domains': { name: 'v2Domains'; type: { kind: 'OBJECT'; name: 'QueryV2DomainsConnection'; ofType: null; } }; }; }; - 'QueryDomainsConnection': { kind: 'OBJECT'; name: 'QueryDomainsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'QueryDomainsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'QueryDomainsConnectionEdge': { kind: 'OBJECT'; name: 'QueryDomainsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; } }; }; }; - 'QueryRegistrationsConnection': { kind: 'OBJECT'; name: 'QueryRegistrationsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'QueryRegistrationsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'QueryRegistrationsConnectionEdge': { kind: 'OBJECT'; name: 'QueryRegistrationsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Registration'; ofType: null; }; } }; }; }; - 'QueryResolversConnection': { kind: 'OBJECT'; name: 'QueryResolversConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'QueryResolversConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'QueryResolversConnectionEdge': { kind: 'OBJECT'; name: 'QueryResolversConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Resolver'; ofType: null; }; } }; }; }; - 'QueryV1DomainsConnection': { kind: 'OBJECT'; name: 'QueryV1DomainsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'QueryV1DomainsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'QueryV1DomainsConnectionEdge': { kind: 'OBJECT'; name: 'QueryV1DomainsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ENSv1Domain'; ofType: null; }; } }; }; }; - 'QueryV2DomainsConnection': { kind: 'OBJECT'; name: 'QueryV2DomainsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'QueryV2DomainsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'QueryV2DomainsConnectionEdge': { kind: 'OBJECT'; name: 'QueryV2DomainsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ENSv2Domain'; ofType: null; }; } }; }; }; - 'Registration': { kind: 'INTERFACE'; name: 'Registration'; fields: { 'domain': { name: 'domain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; } }; 'event': { name: 'event'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; 'expired': { name: 'expired'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'expiry': { name: 'expiry'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'RegistrationId'; ofType: null; }; } }; 'referrer': { name: 'referrer'; type: { kind: 'SCALAR'; name: 'Hex'; ofType: null; } }; 'registrant': { name: 'registrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'registrar': { name: 'registrar'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'renewals': { name: 'renewals'; type: { kind: 'OBJECT'; name: 'RegistrationRenewalsConnection'; ofType: null; } }; 'start': { name: 'start'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'unregistrant': { name: 'unregistrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; }; possibleTypes: 'BaseRegistrarRegistration' | 'ENSv2RegistryRegistration' | 'ENSv2RegistryReservation' | 'NameWrapperRegistration' | 'ThreeDNSRegistration'; }; - 'RegistrationId': unknown; - 'RegistrationRenewalsConnection': { kind: 'OBJECT'; name: 'RegistrationRenewalsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'RegistrationRenewalsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'RegistrationRenewalsConnectionEdge': { kind: 'OBJECT'; name: 'RegistrationRenewalsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Renewal'; ofType: null; }; } }; }; }; - 'Registry': { kind: 'OBJECT'; name: 'Registry'; fields: { 'contract': { name: 'contract'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'domains': { name: 'domains'; type: { kind: 'OBJECT'; name: 'RegistryDomainsConnection'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'RegistryId'; ofType: null; }; } }; 'parents': { name: 'parents'; type: { kind: 'OBJECT'; name: 'RegistryParentsConnection'; ofType: null; } }; 'permissions': { name: 'permissions'; type: { kind: 'OBJECT'; name: 'Permissions'; ofType: null; } }; }; }; - 'RegistryDomainsConnection': { kind: 'OBJECT'; name: 'RegistryDomainsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'RegistryDomainsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'RegistryDomainsConnectionEdge': { kind: 'OBJECT'; name: 'RegistryDomainsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; } }; }; }; - 'RegistryDomainsWhereInput': { kind: 'INPUT_OBJECT'; name: 'RegistryDomainsWhereInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'RegistryId': unknown; - 'RegistryIdInput': { kind: 'INPUT_OBJECT'; name: 'RegistryIdInput'; isOneOf: true; inputFields: [{ name: 'contract'; type: { kind: 'INPUT_OBJECT'; name: 'AccountIdInput'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'SCALAR'; name: 'RegistryId'; ofType: null; }; defaultValue: null }]; }; - 'RegistryParentsConnection': { kind: 'OBJECT'; name: 'RegistryParentsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'RegistryParentsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'RegistryParentsConnectionEdge': { kind: 'OBJECT'; name: 'RegistryParentsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ENSv2Domain'; ofType: null; }; } }; }; }; - 'RegistryPermissionsUser': { kind: 'OBJECT'; name: 'RegistryPermissionsUser'; fields: { 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'PermissionsUserId'; ofType: null; }; } }; 'registry': { name: 'registry'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Registry'; ofType: null; }; } }; 'resource': { name: 'resource'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'roles': { name: 'roles'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'user': { name: 'user'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Account'; ofType: null; }; } }; }; }; - 'Renewal': { kind: 'OBJECT'; name: 'Renewal'; fields: { 'base': { name: 'base'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'duration': { name: 'duration'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'event': { name: 'event'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'RenewalId'; ofType: null; }; } }; 'premium': { name: 'premium'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'referrer': { name: 'referrer'; type: { kind: 'SCALAR'; name: 'Hex'; ofType: null; } }; }; }; - 'RenewalId': unknown; - 'Resolver': { kind: 'OBJECT'; name: 'Resolver'; fields: { 'bridged': { name: 'bridged'; type: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; } }; 'contract': { name: 'contract'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'events': { name: 'events'; type: { kind: 'OBJECT'; name: 'ResolverEventsConnection'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ResolverId'; ofType: null; }; } }; 'permissions': { name: 'permissions'; type: { kind: 'OBJECT'; name: 'Permissions'; ofType: null; } }; 'records': { name: 'records'; type: { kind: 'OBJECT'; name: 'ResolverRecordsConnection'; ofType: null; } }; 'records_': { name: 'records_'; type: { kind: 'OBJECT'; name: 'ResolverRecords'; ofType: null; } }; }; }; - 'ResolverEventsConnection': { kind: 'OBJECT'; name: 'ResolverEventsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ResolverEventsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'ResolverEventsConnectionEdge': { kind: 'OBJECT'; name: 'ResolverEventsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; }; }; - 'ResolverId': unknown; - 'ResolverIdInput': { kind: 'INPUT_OBJECT'; name: 'ResolverIdInput'; isOneOf: true; inputFields: [{ name: 'contract'; type: { kind: 'INPUT_OBJECT'; name: 'AccountIdInput'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'SCALAR'; name: 'ResolverId'; ofType: null; }; defaultValue: null }]; }; - 'ResolverPermissionsUser': { kind: 'OBJECT'; name: 'ResolverPermissionsUser'; fields: { 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'PermissionsUserId'; ofType: null; }; } }; 'resolver': { name: 'resolver'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Resolver'; ofType: null; }; } }; 'resource': { name: 'resource'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'roles': { name: 'roles'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'user': { name: 'user'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Account'; ofType: null; }; } }; }; }; - 'ResolverRecords': { kind: 'OBJECT'; name: 'ResolverRecords'; fields: { 'coinTypes': { name: 'coinTypes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'CoinType'; ofType: null; }; }; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ResolverRecordsId'; ofType: null; }; } }; 'keys': { name: 'keys'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; }; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Node'; ofType: null; }; } }; }; }; - 'ResolverRecordsConnection': { kind: 'OBJECT'; name: 'ResolverRecordsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ResolverRecordsConnectionEdge'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'ResolverRecordsConnectionEdge': { kind: 'OBJECT'; name: 'ResolverRecordsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ResolverRecords'; ofType: null; }; } }; }; }; - 'ResolverRecordsId': unknown; - 'String': unknown; - 'SubdomainsWhereInput': { kind: 'INPUT_OBJECT'; name: 'SubdomainsWhereInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'ThreeDNSRegistration': { kind: 'OBJECT'; name: 'ThreeDNSRegistration'; fields: { 'domain': { name: 'domain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INTERFACE'; name: 'Domain'; ofType: null; }; } }; 'event': { name: 'event'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Event'; ofType: null; }; } }; 'expired': { name: 'expired'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'expiry': { name: 'expiry'; type: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'RegistrationId'; ofType: null; }; } }; 'referrer': { name: 'referrer'; type: { kind: 'SCALAR'; name: 'Hex'; ofType: null; } }; 'registrant': { name: 'registrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; 'registrar': { name: 'registrar'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'AccountId'; ofType: null; }; } }; 'renewals': { name: 'renewals'; type: { kind: 'OBJECT'; name: 'RegistrationRenewalsConnection'; ofType: null; } }; 'start': { name: 'start'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'unregistrant': { name: 'unregistrant'; type: { kind: 'OBJECT'; name: 'Account'; ofType: null; } }; }; }; - 'WrappedBaseRegistrarRegistration': { kind: 'OBJECT'; name: 'WrappedBaseRegistrarRegistration'; fields: { 'fuses': { name: 'fuses'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'tokenId': { name: 'tokenId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; }; }; -}; - -/** An IntrospectionQuery representation of your schema. - * - * @remarks - * This is an introspection of your schema saved as a file by GraphQLSP. - * It will automatically be used by `gql.tada` to infer the types of your GraphQL documents. - * If you need to reuse this data or update your `scalars`, update `tadaOutputLocation` to - * instead save to a .ts instead of a .d.ts file. - */ -export type introspection = { - name: never; - query: 'Query'; - mutation: never; - subscription: never; - types: introspection_types; -}; - -import * as gqlTada from 'gql.tada'; - -declare module 'gql.tada' { - interface setupSchema { - introspection: introspection - } -} \ No newline at end of file diff --git a/packages/enssdk/src/omnigraph/generated/graphql-env.ts b/packages/enssdk/src/omnigraph/generated/graphql-env.ts new file mode 100644 index 0000000000..5b128d1514 --- /dev/null +++ b/packages/enssdk/src/omnigraph/generated/graphql-env.ts @@ -0,0 +1,5767 @@ +/* eslint-disable */ +/* prettier-ignore */ + +/** An IntrospectionQuery representation of your schema. + * + * @remarks + * This is an introspection of your schema saved as a file by GraphQLSP. + * You may import it to create a `graphql()` tag function with `gql.tada` + * by importing it and passing it to `initGraphQLTada<>()`. + * + * @example + * ``` + * import { initGraphQLTada } from 'gql.tada'; + * import type { introspection } from './introspection'; + * + * export const graphql = initGraphQLTada<{ + * introspection: typeof introspection; + * scalars: { + * DateTime: string; + * Json: any; + * }; + * }>(); + * ``` + */ +const introspection = { + "__schema": { + "queryType": { + "name": "Query" + }, + "mutationType": null, + "subscriptionType": null, + "types": [ + { + "kind": "OBJECT", + "name": "Account", + "fields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "domains", + "type": { + "kind": "OBJECT", + "name": "AccountDomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountDomainsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "AccountEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountEventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "OBJECT", + "name": "AccountPermissionsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "in", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountIdInput" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "registryPermissions", + "type": { + "kind": "OBJECT", + "name": "AccountRegistryPermissionsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "resolverPermissions", + "type": { + "kind": "OBJECT", + "name": "AccountResolverPermissionsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "AccountByInput", + "inputFields": [ + { + "name": "address", + "type": { + "kind": "SCALAR", + "name": "Address" + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "Address" + } + } + ], + "isOneOf": true + }, + { + "kind": "OBJECT", + "name": "AccountDomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountDomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountDomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "AccountDomainsWhereInput", + "inputFields": [ + { + "name": "canonical", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "defaultValue": "false" + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "AccountEventsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountEventsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountEventsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "AccountEventsWhereInput", + "inputFields": [ + { + "name": "selector_in", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + } + } + }, + { + "name": "timestamp_gte", + "type": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + { + "name": "timestamp_lte", + "type": { + "kind": "SCALAR", + "name": "BigInt" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "AccountId", + "fields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "chainId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ChainId" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "AccountIdInput", + "inputFields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + } + }, + { + "name": "chainId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ChainId" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "AccountPermissionsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountPermissionsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountPermissionsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsUser" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountRegistryPermissionsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountRegistryPermissionsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountRegistryPermissionsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "RegistryPermissionsUser" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountResolverPermissionsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountResolverPermissionsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountResolverPermissionsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ResolverPermissionsUser" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "Address" + }, + { + "kind": "OBJECT", + "name": "BaseRegistrarRegistration", + "fields": [ + { + "name": "baseCost", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "isInGracePeriod", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "premium", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "wrapped", + "type": { + "kind": "OBJECT", + "name": "WrappedBaseRegistrarRegistration" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Registration" + } + ] + }, + { + "kind": "SCALAR", + "name": "BigInt" + }, + { + "kind": "SCALAR", + "name": "Boolean" + }, + { + "kind": "SCALAR", + "name": "ChainId" + }, + { + "kind": "SCALAR", + "name": "CoinType" + }, + { + "kind": "INTERFACE", + "name": "Domain", + "fields": [ + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "DomainEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DomainId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "label", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Label" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "InterpretedName" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "owner", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "path", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registration", + "type": { + "kind": "INTERFACE", + "name": "Registration" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrations", + "type": { + "kind": "OBJECT", + "name": "DomainRegistrationsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "resolver", + "type": { + "kind": "OBJECT", + "name": "Resolver" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "subdomains", + "type": { + "kind": "OBJECT", + "name": "DomainSubdomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "SubdomainsWhereInput" + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [], + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "ENSv1Domain" + }, + { + "kind": "OBJECT", + "name": "ENSv2Domain" + } + ] + }, + { + "kind": "OBJECT", + "name": "DomainEventsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "DomainEventsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DomainEventsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "DomainId" + }, + { + "kind": "INPUT_OBJECT", + "name": "DomainIdInput", + "inputFields": [ + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "DomainId" + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "InterpretedName" + } + } + ], + "isOneOf": true + }, + { + "kind": "INPUT_OBJECT", + "name": "DomainPermissionsWhereInput", + "inputFields": [ + { + "name": "user", + "type": { + "kind": "SCALAR", + "name": "Address" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "DomainRegistrationsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "DomainRegistrationsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DomainRegistrationsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Registration" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DomainSubdomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "DomainSubdomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DomainSubdomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "ENUM", + "name": "DomainsOrderBy", + "enumValues": [ + { + "name": "NAME", + "isDeprecated": false + }, + { + "name": "REGISTRATION_EXPIRY", + "isDeprecated": false + }, + { + "name": "REGISTRATION_TIMESTAMP", + "isDeprecated": false + } + ] + }, + { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput", + "inputFields": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "DomainsOrderBy" + } + } + }, + { + "name": "dir", + "type": { + "kind": "ENUM", + "name": "OrderDirection" + }, + "defaultValue": "ASC" + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "DomainsWhereInput", + "inputFields": [ + { + "name": "canonical", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "defaultValue": "false" + }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "ENSv1Domain", + "fields": [ + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "DomainEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DomainId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "label", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Label" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "InterpretedName" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "owner", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "parent", + "type": { + "kind": "OBJECT", + "name": "ENSv1Domain" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "path", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registration", + "type": { + "kind": "INTERFACE", + "name": "Registration" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrations", + "type": { + "kind": "OBJECT", + "name": "DomainRegistrationsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "resolver", + "type": { + "kind": "OBJECT", + "name": "Resolver" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "rootRegistryOwner", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "subdomains", + "type": { + "kind": "OBJECT", + "name": "DomainSubdomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "SubdomainsWhereInput" + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Domain" + } + ] + }, + { + "kind": "OBJECT", + "name": "ENSv2Domain", + "fields": [ + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "DomainEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DomainId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "label", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Label" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "InterpretedName" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "owner", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "path", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "OBJECT", + "name": "ENSv2DomainPermissionsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainPermissionsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "registration", + "type": { + "kind": "INTERFACE", + "name": "Registration" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrations", + "type": { + "kind": "OBJECT", + "name": "DomainRegistrationsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "registry", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Registry" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resolver", + "type": { + "kind": "OBJECT", + "name": "Resolver" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "subdomains", + "type": { + "kind": "OBJECT", + "name": "DomainSubdomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "SubdomainsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "subregistry", + "type": { + "kind": "OBJECT", + "name": "Registry" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "tokenId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Domain" + } + ] + }, + { + "kind": "OBJECT", + "name": "ENSv2DomainPermissionsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ENSv2DomainPermissionsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ENSv2DomainPermissionsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsUser" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ENSv2RegistryRegistration", + "fields": [ + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Registration" + } + ] + }, + { + "kind": "OBJECT", + "name": "ENSv2RegistryReservation", + "fields": [ + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Registration" + } + ] + }, + { + "kind": "OBJECT", + "name": "Event", + "fields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "blockHash", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "blockNumber", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "chainId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ChainId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "data", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "from", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "logIndex", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "timestamp", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "to", + "type": { + "kind": "SCALAR", + "name": "Address" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "topics", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transactionHash", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transactionIndex", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput", + "inputFields": [ + { + "name": "from", + "type": { + "kind": "SCALAR", + "name": "Address" + } + }, + { + "name": "selector_in", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + } + } + }, + { + "name": "timestamp_gte", + "type": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + { + "name": "timestamp_lte", + "type": { + "kind": "SCALAR", + "name": "BigInt" + } + } + ], + "isOneOf": false + }, + { + "kind": "SCALAR", + "name": "Hex" + }, + { + "kind": "SCALAR", + "name": "ID" + }, + { + "kind": "SCALAR", + "name": "Int" + }, + { + "kind": "SCALAR", + "name": "InterpretedLabel" + }, + { + "kind": "SCALAR", + "name": "InterpretedName" + }, + { + "kind": "OBJECT", + "name": "Label", + "fields": [ + { + "name": "hash", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "interpreted", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "InterpretedLabel" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "NameOrNodeInput", + "inputFields": [ + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "InterpretedName" + } + }, + { + "name": "node", + "type": { + "kind": "SCALAR", + "name": "Node" + } + } + ], + "isOneOf": true + }, + { + "kind": "OBJECT", + "name": "NameWrapperRegistration", + "fields": [ + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fuses", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Registration" + } + ] + }, + { + "kind": "SCALAR", + "name": "Node" + }, + { + "kind": "ENUM", + "name": "OrderDirection", + "enumValues": [ + { + "name": "ASC", + "isDeprecated": false + }, + { + "name": "DESC", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "PageInfo", + "fields": [ + { + "name": "endCursor", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "hasNextPage", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "hasPreviousPage", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "startCursor", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "Permissions", + "fields": [ + { + "name": "contract", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "PermissionsEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "PermissionsId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resources", + "type": { + "kind": "OBJECT", + "name": "PermissionsResourcesConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "root", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsResource" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsEventsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsEventsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsEventsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "PermissionsId" + }, + { + "kind": "INPUT_OBJECT", + "name": "PermissionsIdInput", + "inputFields": [ + { + "name": "contract", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountIdInput" + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "PermissionsId" + } + } + ], + "isOneOf": true + }, + { + "kind": "OBJECT", + "name": "PermissionsResource", + "fields": [ + { + "name": "contract", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "PermissionsResourceId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Permissions" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resource", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "users", + "type": { + "kind": "OBJECT", + "name": "PermissionsResourceUsersConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "PermissionsResourceId" + }, + { + "kind": "OBJECT", + "name": "PermissionsResourceUsersConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsResourceUsersConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsResourceUsersConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsUser" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsResourcesConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsResourcesConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsResourcesConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsResource" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsUser", + "fields": [ + { + "name": "contract", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "PermissionsUserId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resource", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "roles", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "user", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Account" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "PermissionsUserId" + }, + { + "kind": "OBJECT", + "name": "Query", + "fields": [ + { + "name": "account", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AccountByInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "domain", + "type": { + "kind": "INTERFACE", + "name": "Domain" + }, + "args": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DomainIdInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "domains", + "type": { + "kind": "OBJECT", + "name": "QueryDomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DomainsWhereInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "OBJECT", + "name": "Permissions" + }, + "args": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PermissionsIdInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "registrations", + "type": { + "kind": "OBJECT", + "name": "QueryRegistrationsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "registry", + "type": { + "kind": "OBJECT", + "name": "Registry" + }, + "args": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "RegistryIdInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "resolver", + "type": { + "kind": "OBJECT", + "name": "Resolver" + }, + "args": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ResolverIdInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "resolvers", + "type": { + "kind": "OBJECT", + "name": "QueryResolversConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "root", + "type": { + "kind": "OBJECT", + "name": "Registry" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "v1Domains", + "type": { + "kind": "OBJECT", + "name": "QueryV1DomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "v2Domains", + "type": { + "kind": "OBJECT", + "name": "QueryV2DomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryDomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "QueryDomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryDomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryRegistrationsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "QueryRegistrationsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryRegistrationsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Registration" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryResolversConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "QueryResolversConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryResolversConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Resolver" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryV1DomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "QueryV1DomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryV1DomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ENSv1Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryV2DomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "QueryV2DomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryV2DomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ENSv2Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INTERFACE", + "name": "Registration", + "fields": [ + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [], + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "BaseRegistrarRegistration" + }, + { + "kind": "OBJECT", + "name": "ENSv2RegistryRegistration" + }, + { + "kind": "OBJECT", + "name": "ENSv2RegistryReservation" + }, + { + "kind": "OBJECT", + "name": "NameWrapperRegistration" + }, + { + "kind": "OBJECT", + "name": "ThreeDNSRegistration" + } + ] + }, + { + "kind": "SCALAR", + "name": "RegistrationId" + }, + { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Renewal" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "Registry", + "fields": [ + { + "name": "contract", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "domains", + "type": { + "kind": "OBJECT", + "name": "RegistryDomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "RegistryDomainsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistryId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "parents", + "type": { + "kind": "OBJECT", + "name": "RegistryParentsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "OBJECT", + "name": "Permissions" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "RegistryDomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "RegistryDomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "RegistryDomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "RegistryDomainsWhereInput", + "inputFields": [ + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "SCALAR", + "name": "RegistryId" + }, + { + "kind": "INPUT_OBJECT", + "name": "RegistryIdInput", + "inputFields": [ + { + "name": "contract", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountIdInput" + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "RegistryId" + } + } + ], + "isOneOf": true + }, + { + "kind": "OBJECT", + "name": "RegistryParentsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "RegistryParentsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "RegistryParentsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ENSv2Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "RegistryPermissionsUser", + "fields": [ + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "PermissionsUserId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registry", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Registry" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resource", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "roles", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "user", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Account" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "Renewal", + "fields": [ + { + "name": "base", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "duration", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RenewalId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "premium", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "RenewalId" + }, + { + "kind": "OBJECT", + "name": "Resolver", + "fields": [ + { + "name": "bridged", + "type": { + "kind": "OBJECT", + "name": "AccountId" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "contract", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "ResolverEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ResolverId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "OBJECT", + "name": "Permissions" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "records", + "type": { + "kind": "OBJECT", + "name": "ResolverRecordsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "records_", + "type": { + "kind": "OBJECT", + "name": "ResolverRecords" + }, + "args": [ + { + "name": "for", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NameOrNodeInput" + } + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ResolverEventsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ResolverEventsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ResolverEventsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "ResolverId" + }, + { + "kind": "INPUT_OBJECT", + "name": "ResolverIdInput", + "inputFields": [ + { + "name": "contract", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountIdInput" + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "ResolverId" + } + } + ], + "isOneOf": true + }, + { + "kind": "OBJECT", + "name": "ResolverPermissionsUser", + "fields": [ + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "PermissionsUserId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resolver", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Resolver" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resource", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "roles", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "user", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Account" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ResolverRecords", + "fields": [ + { + "name": "coinTypes", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "CoinType" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ResolverRecordsId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "keys", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Node" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ResolverRecordsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ResolverRecordsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ResolverRecordsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ResolverRecords" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "ResolverRecordsId" + }, + { + "kind": "SCALAR", + "name": "String" + }, + { + "kind": "INPUT_OBJECT", + "name": "SubdomainsWhereInput", + "inputFields": [ + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "ThreeDNSRegistration", + "fields": [ + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Registration" + } + ] + }, + { + "kind": "OBJECT", + "name": "WrappedBaseRegistrarRegistration", + "fields": [ + { + "name": "fuses", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "tokenId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + } + ], + "directives": [] + } +} as const; + +export { introspection }; \ No newline at end of file diff --git a/packages/enssdk/src/omnigraph/generated/introspection.ts b/packages/enssdk/src/omnigraph/generated/introspection.ts index 2c0c938fc9..5b128d1514 100644 --- a/packages/enssdk/src/omnigraph/generated/introspection.ts +++ b/packages/enssdk/src/omnigraph/generated/introspection.ts @@ -1 +1,5767 @@ -export const introspection = {"__schema":{"queryType":{"name":"Query","kind":"OBJECT"},"mutationType":null,"subscriptionType":null,"types":[{"kind":"OBJECT","name":"Account","fields":[{"name":"address","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"domains","type":{"kind":"OBJECT","name":"AccountDomainsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"order","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"events","type":{"kind":"OBJECT","name":"AccountEventsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"permissions","type":{"kind":"OBJECT","name":"AccountPermissionsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"in","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"registryPermissions","type":{"kind":"OBJECT","name":"AccountRegistryPermissionsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"resolverPermissions","type":{"kind":"OBJECT","name":"AccountResolverPermissionsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountDomainsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountDomainsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountDomainsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountEventsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountEventsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountEventsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountId","fields":[{"name":"address","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"chainId","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountPermissionsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountPermissionsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountPermissionsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PermissionsUser","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountRegistryPermissionsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountRegistryPermissionsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountRegistryPermissionsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"RegistryPermissionsUser","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountResolverPermissionsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountResolverPermissionsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"AccountResolverPermissionsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"ResolverPermissionsUser","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"BaseRegistrarRegistration","fields":[{"name":"baseCost","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"domain","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}},"args":[]},{"name":"event","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]},{"name":"expired","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"expiry","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"isInGracePeriod","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"premium","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"referrer","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"registrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"registrar","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"renewals","type":{"kind":"OBJECT","name":"RegistrationRenewalsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"start","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"unregistrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"wrapped","type":{"kind":"OBJECT","name":"WrappedBaseRegistrarRegistration","ofType":null},"args":[]}],"interfaces":[{"kind":"INTERFACE","name":"Registration"}]},{"kind":"INTERFACE","name":"Domain","fields":[{"name":"events","type":{"kind":"OBJECT","name":"DomainEventsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"label","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Label","ofType":null}},"args":[]},{"name":"name","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"owner","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"path","type":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}}},"args":[]},{"name":"registration","type":{"kind":"INTERFACE","name":"Registration","ofType":null},"args":[]},{"name":"registrations","type":{"kind":"OBJECT","name":"DomainRegistrationsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"resolver","type":{"kind":"OBJECT","name":"Resolver","ofType":null},"args":[]},{"name":"subdomains","type":{"kind":"OBJECT","name":"DomainSubdomainsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"order","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]}],"interfaces":[],"possibleTypes":[{"kind":"OBJECT","name":"ENSv1Domain"},{"kind":"OBJECT","name":"ENSv2Domain"}]},{"kind":"OBJECT","name":"DomainEventsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"DomainEventsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"DomainEventsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"DomainRegistrationsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"DomainRegistrationsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"DomainRegistrationsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Registration","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"DomainSubdomainsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"DomainSubdomainsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"DomainSubdomainsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"ENSv1Domain","fields":[{"name":"events","type":{"kind":"OBJECT","name":"DomainEventsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"label","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Label","ofType":null}},"args":[]},{"name":"name","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"owner","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"parent","type":{"kind":"OBJECT","name":"ENSv1Domain","ofType":null},"args":[]},{"name":"path","type":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}}},"args":[]},{"name":"registration","type":{"kind":"INTERFACE","name":"Registration","ofType":null},"args":[]},{"name":"registrations","type":{"kind":"OBJECT","name":"DomainRegistrationsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"resolver","type":{"kind":"OBJECT","name":"Resolver","ofType":null},"args":[]},{"name":"rootRegistryOwner","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"subdomains","type":{"kind":"OBJECT","name":"DomainSubdomainsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"order","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]}],"interfaces":[{"kind":"INTERFACE","name":"Domain"}]},{"kind":"OBJECT","name":"ENSv2Domain","fields":[{"name":"events","type":{"kind":"OBJECT","name":"DomainEventsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"label","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Label","ofType":null}},"args":[]},{"name":"name","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"owner","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"path","type":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}}},"args":[]},{"name":"permissions","type":{"kind":"OBJECT","name":"ENSv2DomainPermissionsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"registration","type":{"kind":"INTERFACE","name":"Registration","ofType":null},"args":[]},{"name":"registrations","type":{"kind":"OBJECT","name":"DomainRegistrationsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"registry","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Registry","ofType":null}},"args":[]},{"name":"resolver","type":{"kind":"OBJECT","name":"Resolver","ofType":null},"args":[]},{"name":"subdomains","type":{"kind":"OBJECT","name":"DomainSubdomainsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"order","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"subregistry","type":{"kind":"OBJECT","name":"Registry","ofType":null},"args":[]},{"name":"tokenId","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[{"kind":"INTERFACE","name":"Domain"}]},{"kind":"OBJECT","name":"ENSv2DomainPermissionsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"ENSv2DomainPermissionsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"ENSv2DomainPermissionsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PermissionsUser","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"ENSv2RegistryRegistration","fields":[{"name":"domain","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}},"args":[]},{"name":"event","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]},{"name":"expired","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"expiry","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"referrer","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"registrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"registrar","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"renewals","type":{"kind":"OBJECT","name":"RegistrationRenewalsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"start","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"unregistrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]}],"interfaces":[{"kind":"INTERFACE","name":"Registration"}]},{"kind":"OBJECT","name":"ENSv2RegistryReservation","fields":[{"name":"domain","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}},"args":[]},{"name":"event","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]},{"name":"expired","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"expiry","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"referrer","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"registrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"registrar","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"renewals","type":{"kind":"OBJECT","name":"RegistrationRenewalsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"start","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"unregistrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]}],"interfaces":[{"kind":"INTERFACE","name":"Registration"}]},{"kind":"OBJECT","name":"Event","fields":[{"name":"address","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"blockHash","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"blockNumber","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"chainId","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"data","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"from","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"logIndex","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"timestamp","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"to","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"topics","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}},"args":[]},{"name":"transactionHash","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"transactionIndex","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Label","fields":[{"name":"hash","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"interpreted","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"NameWrapperRegistration","fields":[{"name":"domain","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}},"args":[]},{"name":"event","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]},{"name":"expired","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"expiry","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"fuses","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"referrer","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"registrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"registrar","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"renewals","type":{"kind":"OBJECT","name":"RegistrationRenewalsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"start","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"unregistrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]}],"interfaces":[{"kind":"INTERFACE","name":"Registration"}]},{"kind":"OBJECT","name":"PageInfo","fields":[{"name":"endCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"hasNextPage","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"hasPreviousPage","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"startCursor","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Permissions","fields":[{"name":"contract","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"events","type":{"kind":"OBJECT","name":"PermissionsEventsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"resources","type":{"kind":"OBJECT","name":"PermissionsResourcesConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"root","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PermissionsResource","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"PermissionsEventsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PermissionsEventsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"PermissionsEventsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"PermissionsResource","fields":[{"name":"contract","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"permissions","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Permissions","ofType":null}},"args":[]},{"name":"resource","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"users","type":{"kind":"OBJECT","name":"PermissionsResourceUsersConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]}],"interfaces":[]},{"kind":"OBJECT","name":"PermissionsResourceUsersConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PermissionsResourceUsersConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"PermissionsResourceUsersConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PermissionsUser","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"PermissionsResourcesConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PermissionsResourcesConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"PermissionsResourcesConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PermissionsResource","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"PermissionsUser","fields":[{"name":"contract","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"resource","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"roles","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"user","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Query","fields":[{"name":"account","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[{"name":"by","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]},{"name":"domain","type":{"kind":"INTERFACE","name":"Domain","ofType":null},"args":[{"name":"by","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]},{"name":"domains","type":{"kind":"OBJECT","name":"QueryDomainsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"order","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]},{"name":"permissions","type":{"kind":"OBJECT","name":"Permissions","ofType":null},"args":[{"name":"by","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]},{"name":"registrations","type":{"kind":"OBJECT","name":"QueryRegistrationsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"registry","type":{"kind":"OBJECT","name":"Registry","ofType":null},"args":[{"name":"by","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]},{"name":"resolver","type":{"kind":"OBJECT","name":"Resolver","ofType":null},"args":[{"name":"by","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]},{"name":"resolvers","type":{"kind":"OBJECT","name":"QueryResolversConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"root","type":{"kind":"OBJECT","name":"Registry","ofType":null},"args":[]},{"name":"v1Domains","type":{"kind":"OBJECT","name":"QueryV1DomainsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"v2Domains","type":{"kind":"OBJECT","name":"QueryV2DomainsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]}],"interfaces":[]},{"kind":"OBJECT","name":"QueryDomainsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"QueryDomainsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"QueryDomainsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"QueryRegistrationsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"QueryRegistrationsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"QueryRegistrationsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Registration","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"QueryResolversConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"QueryResolversConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"QueryResolversConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Resolver","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"QueryV1DomainsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"QueryV1DomainsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"QueryV1DomainsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"ENSv1Domain","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"QueryV2DomainsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"QueryV2DomainsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"QueryV2DomainsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"ENSv2Domain","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"INTERFACE","name":"Registration","fields":[{"name":"domain","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}},"args":[]},{"name":"event","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]},{"name":"expired","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"expiry","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"referrer","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"registrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"registrar","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"renewals","type":{"kind":"OBJECT","name":"RegistrationRenewalsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"start","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"unregistrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]}],"interfaces":[],"possibleTypes":[{"kind":"OBJECT","name":"BaseRegistrarRegistration"},{"kind":"OBJECT","name":"ENSv2RegistryRegistration"},{"kind":"OBJECT","name":"ENSv2RegistryReservation"},{"kind":"OBJECT","name":"NameWrapperRegistration"},{"kind":"OBJECT","name":"ThreeDNSRegistration"}]},{"kind":"OBJECT","name":"RegistrationRenewalsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"RegistrationRenewalsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"RegistrationRenewalsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Renewal","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Registry","fields":[{"name":"contract","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"domains","type":{"kind":"OBJECT","name":"RegistryDomainsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"order","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"parents","type":{"kind":"OBJECT","name":"RegistryParentsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"permissions","type":{"kind":"OBJECT","name":"Permissions","ofType":null},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"RegistryDomainsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"RegistryDomainsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"RegistryDomainsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"RegistryParentsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"RegistryParentsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"RegistryParentsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"ENSv2Domain","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"RegistryPermissionsUser","fields":[{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"registry","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Registry","ofType":null}},"args":[]},{"name":"resource","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"roles","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"user","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Renewal","fields":[{"name":"base","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"duration","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"event","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"premium","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"referrer","type":{"kind":"SCALAR","name":"Any"},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"Resolver","fields":[{"name":"bridged","type":{"kind":"OBJECT","name":"AccountId","ofType":null},"args":[]},{"name":"contract","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"events","type":{"kind":"OBJECT","name":"ResolverEventsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}},{"name":"where","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"permissions","type":{"kind":"OBJECT","name":"Permissions","ofType":null},"args":[]},{"name":"records","type":{"kind":"OBJECT","name":"ResolverRecordsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"records_","type":{"kind":"OBJECT","name":"ResolverRecords","ofType":null},"args":[{"name":"for","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}]}],"interfaces":[]},{"kind":"OBJECT","name":"ResolverEventsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"ResolverEventsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"ResolverEventsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"ResolverPermissionsUser","fields":[{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"resolver","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Resolver","ofType":null}},"args":[]},{"name":"resource","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"roles","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"user","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Account","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"ResolverRecords","fields":[{"name":"coinTypes","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"keys","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}}}},"args":[]},{"name":"name","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"ResolverRecordsConnection","fields":[{"name":"edges","type":{"kind":"NON_NULL","ofType":{"kind":"LIST","ofType":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"ResolverRecordsConnectionEdge","ofType":null}}}},"args":[]},{"name":"pageInfo","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"PageInfo","ofType":null}},"args":[]},{"name":"totalCount","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"ResolverRecordsConnectionEdge","fields":[{"name":"cursor","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"node","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"ResolverRecords","ofType":null}},"args":[]}],"interfaces":[]},{"kind":"OBJECT","name":"ThreeDNSRegistration","fields":[{"name":"domain","type":{"kind":"NON_NULL","ofType":{"kind":"INTERFACE","name":"Domain","ofType":null}},"args":[]},{"name":"event","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"Event","ofType":null}},"args":[]},{"name":"expired","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"expiry","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"id","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"referrer","type":{"kind":"SCALAR","name":"Any"},"args":[]},{"name":"registrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]},{"name":"registrar","type":{"kind":"NON_NULL","ofType":{"kind":"OBJECT","name":"AccountId","ofType":null}},"args":[]},{"name":"renewals","type":{"kind":"OBJECT","name":"RegistrationRenewalsConnection","ofType":null},"args":[{"name":"after","type":{"kind":"SCALAR","name":"Any"}},{"name":"before","type":{"kind":"SCALAR","name":"Any"}},{"name":"first","type":{"kind":"SCALAR","name":"Any"}},{"name":"last","type":{"kind":"SCALAR","name":"Any"}}]},{"name":"start","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"unregistrant","type":{"kind":"OBJECT","name":"Account","ofType":null},"args":[]}],"interfaces":[{"kind":"INTERFACE","name":"Registration"}]},{"kind":"OBJECT","name":"WrappedBaseRegistrarRegistration","fields":[{"name":"fuses","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]},{"name":"tokenId","type":{"kind":"NON_NULL","ofType":{"kind":"SCALAR","name":"Any"}},"args":[]}],"interfaces":[]},{"kind":"SCALAR","name":"Any"}],"directives":[]}} as const; +/* eslint-disable */ +/* prettier-ignore */ + +/** An IntrospectionQuery representation of your schema. + * + * @remarks + * This is an introspection of your schema saved as a file by GraphQLSP. + * You may import it to create a `graphql()` tag function with `gql.tada` + * by importing it and passing it to `initGraphQLTada<>()`. + * + * @example + * ``` + * import { initGraphQLTada } from 'gql.tada'; + * import type { introspection } from './introspection'; + * + * export const graphql = initGraphQLTada<{ + * introspection: typeof introspection; + * scalars: { + * DateTime: string; + * Json: any; + * }; + * }>(); + * ``` + */ +const introspection = { + "__schema": { + "queryType": { + "name": "Query" + }, + "mutationType": null, + "subscriptionType": null, + "types": [ + { + "kind": "OBJECT", + "name": "Account", + "fields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "domains", + "type": { + "kind": "OBJECT", + "name": "AccountDomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountDomainsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "AccountEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountEventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "OBJECT", + "name": "AccountPermissionsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "in", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountIdInput" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "registryPermissions", + "type": { + "kind": "OBJECT", + "name": "AccountRegistryPermissionsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "resolverPermissions", + "type": { + "kind": "OBJECT", + "name": "AccountResolverPermissionsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "AccountByInput", + "inputFields": [ + { + "name": "address", + "type": { + "kind": "SCALAR", + "name": "Address" + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "Address" + } + } + ], + "isOneOf": true + }, + { + "kind": "OBJECT", + "name": "AccountDomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountDomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountDomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "AccountDomainsWhereInput", + "inputFields": [ + { + "name": "canonical", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "defaultValue": "false" + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "AccountEventsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountEventsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountEventsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "AccountEventsWhereInput", + "inputFields": [ + { + "name": "selector_in", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + } + } + }, + { + "name": "timestamp_gte", + "type": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + { + "name": "timestamp_lte", + "type": { + "kind": "SCALAR", + "name": "BigInt" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "AccountId", + "fields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "chainId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ChainId" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "AccountIdInput", + "inputFields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + } + }, + { + "name": "chainId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ChainId" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "AccountPermissionsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountPermissionsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountPermissionsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsUser" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountRegistryPermissionsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountRegistryPermissionsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountRegistryPermissionsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "RegistryPermissionsUser" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountResolverPermissionsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountResolverPermissionsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "AccountResolverPermissionsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ResolverPermissionsUser" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "Address" + }, + { + "kind": "OBJECT", + "name": "BaseRegistrarRegistration", + "fields": [ + { + "name": "baseCost", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "isInGracePeriod", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "premium", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "wrapped", + "type": { + "kind": "OBJECT", + "name": "WrappedBaseRegistrarRegistration" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Registration" + } + ] + }, + { + "kind": "SCALAR", + "name": "BigInt" + }, + { + "kind": "SCALAR", + "name": "Boolean" + }, + { + "kind": "SCALAR", + "name": "ChainId" + }, + { + "kind": "SCALAR", + "name": "CoinType" + }, + { + "kind": "INTERFACE", + "name": "Domain", + "fields": [ + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "DomainEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DomainId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "label", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Label" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "InterpretedName" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "owner", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "path", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registration", + "type": { + "kind": "INTERFACE", + "name": "Registration" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrations", + "type": { + "kind": "OBJECT", + "name": "DomainRegistrationsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "resolver", + "type": { + "kind": "OBJECT", + "name": "Resolver" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "subdomains", + "type": { + "kind": "OBJECT", + "name": "DomainSubdomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "SubdomainsWhereInput" + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [], + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "ENSv1Domain" + }, + { + "kind": "OBJECT", + "name": "ENSv2Domain" + } + ] + }, + { + "kind": "OBJECT", + "name": "DomainEventsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "DomainEventsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DomainEventsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "DomainId" + }, + { + "kind": "INPUT_OBJECT", + "name": "DomainIdInput", + "inputFields": [ + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "DomainId" + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "InterpretedName" + } + } + ], + "isOneOf": true + }, + { + "kind": "INPUT_OBJECT", + "name": "DomainPermissionsWhereInput", + "inputFields": [ + { + "name": "user", + "type": { + "kind": "SCALAR", + "name": "Address" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "DomainRegistrationsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "DomainRegistrationsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DomainRegistrationsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Registration" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DomainSubdomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "DomainSubdomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DomainSubdomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "ENUM", + "name": "DomainsOrderBy", + "enumValues": [ + { + "name": "NAME", + "isDeprecated": false + }, + { + "name": "REGISTRATION_EXPIRY", + "isDeprecated": false + }, + { + "name": "REGISTRATION_TIMESTAMP", + "isDeprecated": false + } + ] + }, + { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput", + "inputFields": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "DomainsOrderBy" + } + } + }, + { + "name": "dir", + "type": { + "kind": "ENUM", + "name": "OrderDirection" + }, + "defaultValue": "ASC" + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "DomainsWhereInput", + "inputFields": [ + { + "name": "canonical", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "defaultValue": "false" + }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "ENSv1Domain", + "fields": [ + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "DomainEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DomainId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "label", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Label" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "InterpretedName" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "owner", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "parent", + "type": { + "kind": "OBJECT", + "name": "ENSv1Domain" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "path", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registration", + "type": { + "kind": "INTERFACE", + "name": "Registration" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrations", + "type": { + "kind": "OBJECT", + "name": "DomainRegistrationsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "resolver", + "type": { + "kind": "OBJECT", + "name": "Resolver" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "rootRegistryOwner", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "subdomains", + "type": { + "kind": "OBJECT", + "name": "DomainSubdomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "SubdomainsWhereInput" + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Domain" + } + ] + }, + { + "kind": "OBJECT", + "name": "ENSv2Domain", + "fields": [ + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "DomainEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DomainId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "label", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Label" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "InterpretedName" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "owner", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "path", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "OBJECT", + "name": "ENSv2DomainPermissionsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainPermissionsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "registration", + "type": { + "kind": "INTERFACE", + "name": "Registration" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrations", + "type": { + "kind": "OBJECT", + "name": "DomainRegistrationsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "registry", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Registry" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resolver", + "type": { + "kind": "OBJECT", + "name": "Resolver" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "subdomains", + "type": { + "kind": "OBJECT", + "name": "DomainSubdomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "SubdomainsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "subregistry", + "type": { + "kind": "OBJECT", + "name": "Registry" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "tokenId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Domain" + } + ] + }, + { + "kind": "OBJECT", + "name": "ENSv2DomainPermissionsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ENSv2DomainPermissionsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ENSv2DomainPermissionsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsUser" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ENSv2RegistryRegistration", + "fields": [ + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Registration" + } + ] + }, + { + "kind": "OBJECT", + "name": "ENSv2RegistryReservation", + "fields": [ + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Registration" + } + ] + }, + { + "kind": "OBJECT", + "name": "Event", + "fields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "blockHash", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "blockNumber", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "chainId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ChainId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "data", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "from", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Address" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "logIndex", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "timestamp", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "to", + "type": { + "kind": "SCALAR", + "name": "Address" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "topics", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transactionHash", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "transactionIndex", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput", + "inputFields": [ + { + "name": "from", + "type": { + "kind": "SCALAR", + "name": "Address" + } + }, + { + "name": "selector_in", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + } + } + }, + { + "name": "timestamp_gte", + "type": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + { + "name": "timestamp_lte", + "type": { + "kind": "SCALAR", + "name": "BigInt" + } + } + ], + "isOneOf": false + }, + { + "kind": "SCALAR", + "name": "Hex" + }, + { + "kind": "SCALAR", + "name": "ID" + }, + { + "kind": "SCALAR", + "name": "Int" + }, + { + "kind": "SCALAR", + "name": "InterpretedLabel" + }, + { + "kind": "SCALAR", + "name": "InterpretedName" + }, + { + "kind": "OBJECT", + "name": "Label", + "fields": [ + { + "name": "hash", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Hex" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "interpreted", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "InterpretedLabel" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "NameOrNodeInput", + "inputFields": [ + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "InterpretedName" + } + }, + { + "name": "node", + "type": { + "kind": "SCALAR", + "name": "Node" + } + } + ], + "isOneOf": true + }, + { + "kind": "OBJECT", + "name": "NameWrapperRegistration", + "fields": [ + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fuses", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Registration" + } + ] + }, + { + "kind": "SCALAR", + "name": "Node" + }, + { + "kind": "ENUM", + "name": "OrderDirection", + "enumValues": [ + { + "name": "ASC", + "isDeprecated": false + }, + { + "name": "DESC", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "PageInfo", + "fields": [ + { + "name": "endCursor", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "hasNextPage", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "hasPreviousPage", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "startCursor", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "Permissions", + "fields": [ + { + "name": "contract", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "PermissionsEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "PermissionsId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resources", + "type": { + "kind": "OBJECT", + "name": "PermissionsResourcesConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "root", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsResource" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsEventsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsEventsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsEventsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "PermissionsId" + }, + { + "kind": "INPUT_OBJECT", + "name": "PermissionsIdInput", + "inputFields": [ + { + "name": "contract", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountIdInput" + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "PermissionsId" + } + } + ], + "isOneOf": true + }, + { + "kind": "OBJECT", + "name": "PermissionsResource", + "fields": [ + { + "name": "contract", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "PermissionsResourceId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Permissions" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resource", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "users", + "type": { + "kind": "OBJECT", + "name": "PermissionsResourceUsersConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "PermissionsResourceId" + }, + { + "kind": "OBJECT", + "name": "PermissionsResourceUsersConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsResourceUsersConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsResourceUsersConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsUser" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsResourcesConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsResourcesConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsResourcesConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PermissionsResource" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "PermissionsUser", + "fields": [ + { + "name": "contract", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "PermissionsUserId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resource", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "roles", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "user", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Account" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "PermissionsUserId" + }, + { + "kind": "OBJECT", + "name": "Query", + "fields": [ + { + "name": "account", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AccountByInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "domain", + "type": { + "kind": "INTERFACE", + "name": "Domain" + }, + "args": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DomainIdInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "domains", + "type": { + "kind": "OBJECT", + "name": "QueryDomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DomainsWhereInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "OBJECT", + "name": "Permissions" + }, + "args": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PermissionsIdInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "registrations", + "type": { + "kind": "OBJECT", + "name": "QueryRegistrationsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "registry", + "type": { + "kind": "OBJECT", + "name": "Registry" + }, + "args": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "RegistryIdInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "resolver", + "type": { + "kind": "OBJECT", + "name": "Resolver" + }, + "args": [ + { + "name": "by", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ResolverIdInput" + } + } + } + ], + "isDeprecated": false + }, + { + "name": "resolvers", + "type": { + "kind": "OBJECT", + "name": "QueryResolversConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "root", + "type": { + "kind": "OBJECT", + "name": "Registry" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "v1Domains", + "type": { + "kind": "OBJECT", + "name": "QueryV1DomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "v2Domains", + "type": { + "kind": "OBJECT", + "name": "QueryV2DomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryDomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "QueryDomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryDomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryRegistrationsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "QueryRegistrationsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryRegistrationsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Registration" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryResolversConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "QueryResolversConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryResolversConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Resolver" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryV1DomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "QueryV1DomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryV1DomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ENSv1Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryV2DomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "QueryV2DomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "QueryV2DomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ENSv2Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INTERFACE", + "name": "Registration", + "fields": [ + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [], + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "BaseRegistrarRegistration" + }, + { + "kind": "OBJECT", + "name": "ENSv2RegistryRegistration" + }, + { + "kind": "OBJECT", + "name": "ENSv2RegistryReservation" + }, + { + "kind": "OBJECT", + "name": "NameWrapperRegistration" + }, + { + "kind": "OBJECT", + "name": "ThreeDNSRegistration" + } + ] + }, + { + "kind": "SCALAR", + "name": "RegistrationId" + }, + { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Renewal" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "Registry", + "fields": [ + { + "name": "contract", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "domains", + "type": { + "kind": "OBJECT", + "name": "RegistryDomainsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "order", + "type": { + "kind": "INPUT_OBJECT", + "name": "DomainsOrderInput" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "RegistryDomainsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistryId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "parents", + "type": { + "kind": "OBJECT", + "name": "RegistryParentsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "OBJECT", + "name": "Permissions" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "RegistryDomainsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "RegistryDomainsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "RegistryDomainsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "RegistryDomainsWhereInput", + "inputFields": [ + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "SCALAR", + "name": "RegistryId" + }, + { + "kind": "INPUT_OBJECT", + "name": "RegistryIdInput", + "inputFields": [ + { + "name": "contract", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountIdInput" + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "RegistryId" + } + } + ], + "isOneOf": true + }, + { + "kind": "OBJECT", + "name": "RegistryParentsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "RegistryParentsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "RegistryParentsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ENSv2Domain" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "RegistryPermissionsUser", + "fields": [ + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "PermissionsUserId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registry", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Registry" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resource", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "roles", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "user", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Account" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "Renewal", + "fields": [ + { + "name": "base", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "duration", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RenewalId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "premium", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "RenewalId" + }, + { + "kind": "OBJECT", + "name": "Resolver", + "fields": [ + { + "name": "bridged", + "type": { + "kind": "OBJECT", + "name": "AccountId" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "contract", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "events", + "type": { + "kind": "OBJECT", + "name": "ResolverEventsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "where", + "type": { + "kind": "INPUT_OBJECT", + "name": "EventsWhereInput" + } + } + ], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ResolverId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "permissions", + "type": { + "kind": "OBJECT", + "name": "Permissions" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "records", + "type": { + "kind": "OBJECT", + "name": "ResolverRecordsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "records_", + "type": { + "kind": "OBJECT", + "name": "ResolverRecords" + }, + "args": [ + { + "name": "for", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NameOrNodeInput" + } + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ResolverEventsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ResolverEventsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ResolverEventsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "ResolverId" + }, + { + "kind": "INPUT_OBJECT", + "name": "ResolverIdInput", + "inputFields": [ + { + "name": "contract", + "type": { + "kind": "INPUT_OBJECT", + "name": "AccountIdInput" + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "ResolverId" + } + } + ], + "isOneOf": true + }, + { + "kind": "OBJECT", + "name": "ResolverPermissionsUser", + "fields": [ + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "PermissionsUserId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resolver", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Resolver" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "resource", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "roles", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "user", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Account" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ResolverRecords", + "fields": [ + { + "name": "coinTypes", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "CoinType" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ResolverRecordsId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "keys", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Node" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ResolverRecordsConnection", + "fields": [ + { + "name": "edges", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ResolverRecordsConnectionEdge" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "totalCount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ResolverRecordsConnectionEdge", + "fields": [ + { + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "node", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ResolverRecords" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "ResolverRecordsId" + }, + { + "kind": "SCALAR", + "name": "String" + }, + { + "kind": "INPUT_OBJECT", + "name": "SubdomainsWhereInput", + "inputFields": [ + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "ThreeDNSRegistration", + "fields": [ + { + "name": "domain", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INTERFACE", + "name": "Domain" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "event", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Event" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expired", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiry", + "type": { + "kind": "SCALAR", + "name": "BigInt" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "RegistrationId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "referrer", + "type": { + "kind": "SCALAR", + "name": "Hex" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "registrar", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "AccountId" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "renewals", + "type": { + "kind": "OBJECT", + "name": "RegistrationRenewalsConnection" + }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false + }, + { + "name": "start", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "unregistrant", + "type": { + "kind": "OBJECT", + "name": "Account" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Registration" + } + ] + }, + { + "kind": "OBJECT", + "name": "WrappedBaseRegistrarRegistration", + "fields": [ + { + "name": "fuses", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "tokenId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "BigInt" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + } + ], + "directives": [] + } +} as const; + +export { introspection }; \ No newline at end of file diff --git a/packages/enssdk/src/omnigraph/generated/schema.graphql b/packages/enssdk/src/omnigraph/generated/schema.graphql index 25aee8d996..b3283c854f 100644 --- a/packages/enssdk/src/omnigraph/generated/schema.graphql +++ b/packages/enssdk/src/omnigraph/generated/schema.graphql @@ -128,7 +128,7 @@ type AccountResolverPermissionsConnectionEdge { node: ResolverPermissionsUser! } -"""Address represents a lowercase (unchecksummed) viem#Address.""" +"""Address represents an EVM Address in all lowercase.""" scalar Address """ @@ -192,10 +192,10 @@ type BaseRegistrarRegistration implements Registration { """BigInt represents non-fractional signed whole numeric values.""" scalar BigInt -"""ChainId represents a @ensnode/ensnode-sdk#ChainId.""" +"""ChainId represents a enssdk#ChainId.""" scalar ChainId -"""CoinType represents a @ensnode/ensnode-sdk#CoinType.""" +"""CoinType represents a enssdk#CoinType.""" scalar CoinType """ @@ -252,7 +252,7 @@ type DomainEventsConnectionEdge { node: Event! } -"""DomainId represents a @ensnode/ensnode-sdk#DomainId.""" +"""DomainId represents a enssdk#DomainId.""" scalar DomainId """Reference a specific Domain.""" @@ -585,10 +585,10 @@ input EventsWhereInput { """Hex represents viem#Hex.""" scalar Hex -"""InterpretedLabel represents a @ensnode/ensnode-sdk#InterpretedLabel.""" +"""InterpretedLabel represents a enssdk#InterpretedLabel.""" scalar InterpretedLabel -"""InterpretedName represents a @ensnode/ensnode-sdk#InterpretedName.""" +"""InterpretedName represents a enssdk#InterpretedName.""" scalar InterpretedName """ @@ -659,7 +659,7 @@ type NameWrapperRegistration implements Registration { unregistrant: Account } -"""Node represents a @ensnode/ensnode-sdk#Node.""" +"""Node represents a enssdk#Node.""" scalar Node """Sort direction""" @@ -704,7 +704,7 @@ type PermissionsEventsConnectionEdge { node: Event! } -"""PermissionsId represents a @ensnode/ensnode-sdk#PermissionsId.""" +"""PermissionsId represents a enssdk#PermissionsId.""" scalar PermissionsId """Address Permissions by ID or AccountId.""" @@ -731,9 +731,7 @@ type PermissionsResource { users(after: String, before: String, first: Int, last: Int): PermissionsResourceUsersConnection } -""" -PermissionsResourceId represents a @ensnode/ensnode-sdk#PermissionsResourceId. -""" +"""PermissionsResourceId represents a enssdk#PermissionsResourceId.""" scalar PermissionsResourceId type PermissionsResourceUsersConnection { @@ -776,7 +774,7 @@ type PermissionsUser { user: Account! } -"""PermissionsUserId represents a @ensnode/ensnode-sdk#PermissionsUserId.""" +"""PermissionsUserId represents a enssdk#PermissionsUserId.""" scalar PermissionsUserId type Query { @@ -911,7 +909,7 @@ interface Registration { unregistrant: Account } -"""RegistrationId represents a @ensnode/ensnode-sdk#RegistrationId.""" +"""RegistrationId represents a enssdk#RegistrationId.""" scalar RegistrationId type RegistrationRenewalsConnection { @@ -962,7 +960,7 @@ input RegistryDomainsWhereInput { name: String } -"""RegistryId represents a @ensnode/ensnode-sdk#RegistryId.""" +"""RegistryId represents a enssdk#RegistryId.""" scalar RegistryId """Address a Registry by ID or AccountId.""" @@ -1020,7 +1018,7 @@ type Renewal { referrer: Hex } -"""RenewalId represents a @ensnode/ensnode-sdk#RenewalId.""" +"""RenewalId represents a enssdk#RenewalId.""" scalar RenewalId """A Resolver represents a Resolver contract on-chain.""" @@ -1058,7 +1056,7 @@ type ResolverEventsConnectionEdge { node: Event! } -"""ResolverId represents a @ensnode/ensnode-sdk#ResolverId.""" +"""ResolverId represents a enssdk#ResolverId.""" scalar ResolverId """Address a Resolver by ID or AccountId.""" @@ -1113,7 +1111,7 @@ type ResolverRecordsConnectionEdge { node: ResolverRecords! } -"""ResolverRecordsId represents a @ensnode/ensnode-sdk#ResolverRecordsId.""" +"""ResolverRecordsId represents a enssdk#ResolverRecordsId.""" scalar ResolverRecordsId """Filter for Domain.subdomains query.""" diff --git a/packages/enssdk/src/omnigraph/graphql.ts b/packages/enssdk/src/omnigraph/graphql.ts index a67c4102ff..f7b6e99178 100644 --- a/packages/enssdk/src/omnigraph/graphql.ts +++ b/packages/enssdk/src/omnigraph/graphql.ts @@ -1,13 +1,14 @@ import { initGraphQLTada } from "gql.tada"; -import type { Address, Hex } from "viem"; import type { ChainId, CoinType, DomainId, + Hex, InterpretedLabel, InterpretedName, Node, + NormalizedAddress, PermissionsId, PermissionsResourceId, PermissionsUserId, @@ -17,34 +18,45 @@ import type { ResolverId, ResolverRecordsId, } from "../lib/types"; -import type { introspection } from "./generated/graphql-env"; +import type { introspection } from "./generated/introspection"; + +/** + * Export the introspection for use with clients, especially urql in enskit. + */ +export { introspection } from "./generated/introspection"; + +/** + * Scalar type mappings for the Omnigraph schema, representing the type of the serialized response + * from the Omnigraph API. + * + * Keep in sync with the scalars in apps/ensapi/src/omnigraph-api/builder.ts. + */ +export type OmnigraphScalars = { + ID: string; + // the omnigraph returns serialized bigint values from the api; further deserialization is + // handled by enskit's graphcache local resolvers (see cache-exchange.ts) + BigInt: `${bigint}`; + Address: NormalizedAddress; + Hex: Hex; + ChainId: ChainId; + CoinType: CoinType; + InterpretedName: InterpretedName; + InterpretedLabel: InterpretedLabel; + Node: Node; + DomainId: DomainId; + RegistryId: RegistryId; + ResolverId: ResolverId; + PermissionsId: PermissionsId; + PermissionsResourceId: PermissionsResourceId; + PermissionsUserId: PermissionsUserId; + RegistrationId: RegistrationId; + RenewalId: RenewalId; + ResolverRecordsId: ResolverRecordsId; +}; export const graphql = initGraphQLTada<{ - introspection: introspection; - scalars: { - ID: string; - // NOTE: graphql clients don't really do deserialization of scalars like bigint, so instead we - // just helpfully type the string as 'a stringified bigint' - BigInt: `${bigint}`; - // NOTE: keep these semantic scalar types in sync with the scalars in apps/ensapi/src/omnigraph-api/builder.ts - // (i.e. excluding the BigInt scalar, which we handle above) - Address: Address; - Hex: Hex; - ChainId: ChainId; - CoinType: CoinType; - InterpretedName: InterpretedName; - InterpretedLabel: InterpretedLabel; - Node: Node; - DomainId: DomainId; - RegistryId: RegistryId; - ResolverId: ResolverId; - PermissionsId: PermissionsId; - PermissionsResourceId: PermissionsResourceId; - PermissionsUserId: PermissionsUserId; - RegistrationId: RegistrationId; - RenewalId: RenewalId; - ResolverRecordsId: ResolverRecordsId; - }; + introspection: typeof introspection; + scalars: OmnigraphScalars; }>(); export type { FragmentOf, ResultOf, VariablesOf } from "gql.tada"; diff --git a/packages/enssdk/src/omnigraph/index.ts b/packages/enssdk/src/omnigraph/index.ts index b718f00f8b..3fdc59de47 100644 --- a/packages/enssdk/src/omnigraph/index.ts +++ b/packages/enssdk/src/omnigraph/index.ts @@ -1,3 +1,2 @@ export * from "./graphql"; -export * from "./introspection"; export * from "./module"; diff --git a/packages/enssdk/src/omnigraph/introspection.ts b/packages/enssdk/src/omnigraph/introspection.ts deleted file mode 100644 index f25a9a828c..0000000000 --- a/packages/enssdk/src/omnigraph/introspection.ts +++ /dev/null @@ -1 +0,0 @@ -export { introspection } from "./generated/introspection"; diff --git a/packages/enssdk/tsconfig.json b/packages/enssdk/tsconfig.json index 6af4a81c9f..0b6a75a8bd 100644 --- a/packages/enssdk/tsconfig.json +++ b/packages/enssdk/tsconfig.json @@ -6,7 +6,7 @@ { "name": "gql.tada/ts-plugin", "schema": "./src/omnigraph/generated/schema.graphql", - "tadaOutputLocation": "./src/omnigraph/generated/graphql-env.d.ts" + "tadaOutputLocation": "./src/omnigraph/generated/introspection.ts" } ] }, diff --git a/packages/namehash-ui/src/components/datetime/DisplayDuration.tsx b/packages/namehash-ui/src/components/datetime/DisplayDuration.tsx index 134cade25d..7ab1174778 100644 --- a/packages/namehash-ui/src/components/datetime/DisplayDuration.tsx +++ b/packages/namehash-ui/src/components/datetime/DisplayDuration.tsx @@ -1,8 +1,7 @@ import { formatDistanceStrict, fromUnixTime } from "date-fns"; +import type { Duration } from "enssdk"; import { useEffect, useState } from "react"; -import type { Duration } from "@ensnode/ensnode-sdk"; - /** * Display Duration component */ diff --git a/packages/namehash-ui/src/components/registrar-actions/RegistrarActionCard.tsx b/packages/namehash-ui/src/components/registrar-actions/RegistrarActionCard.tsx index e4b4315f13..dc377a8965 100644 --- a/packages/namehash-ui/src/components/registrar-actions/RegistrarActionCard.tsx +++ b/packages/namehash-ui/src/components/registrar-actions/RegistrarActionCard.tsx @@ -1,4 +1,4 @@ -import type { Address, DefaultableChainId } from "enssdk"; +import type { Address, DefaultableChainId, UnixTimestamp } from "enssdk"; import { Info as InfoIcon, CircleQuestionMark as QuestionmarkIcon } from "lucide-react"; import { memo, type PropsWithChildren, type ReactNode } from "react"; import { zeroAddress } from "viem"; @@ -7,7 +7,6 @@ import type { ENSNamespaceId, NamedRegistrarAction, RegistrarActionReferral, - UnixTimestamp, } from "@ensnode/ensnode-sdk"; import { buildUnresolvedIdentity, diff --git a/packages/namehash-ui/src/hooks/useNow.ts b/packages/namehash-ui/src/hooks/useNow.ts index 832e4d09f7..6d523236c3 100644 --- a/packages/namehash-ui/src/hooks/useNow.ts +++ b/packages/namehash-ui/src/hooks/useNow.ts @@ -1,8 +1,6 @@ -import type { UnixTimestamp } from "enssdk"; +import type { Duration, UnixTimestamp } from "enssdk"; import { useEffect, useState } from "react"; -import type { Duration } from "@ensnode/ensnode-sdk"; - import { useSystemClock } from "./useSystemClock"; /** Default time to refresh: `1` second. */ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 00f3f61d7b..5fca774bf3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -466,9 +466,6 @@ importers: '@types/prismjs': specifier: ^1.26.6 version: 1.26.6 - '@urql/introspection': - specifier: ^1.2.1 - version: 1.2.1(graphql@16.11.0) chalk: specifier: ^5.6.2 version: 5.6.2 @@ -5031,11 +5028,6 @@ packages: peerDependencies: '@urql/core': ^6.0.0 - '@urql/introspection@1.2.1': - resolution: {integrity: sha512-U9FTSISz69EEK3bHWDsqux9JqOeiLzr3eDFBQ5DmHuTLaBsd5mjPdtLRzzzmb9nW1Ygd6IR8YcuM7zeNqQ5lCQ==} - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - '@vitejs/plugin-react@4.7.0': resolution: {integrity: sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==} engines: {node: ^14.18.0 || >=16.0.0} @@ -13988,10 +13980,6 @@ snapshots: transitivePeerDependencies: - graphql - '@urql/introspection@1.2.1(graphql@16.11.0)': - dependencies: - graphql: 16.11.0 - '@vitejs/plugin-react@4.7.0(vite@6.4.2(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@babel/core': 7.28.5 @@ -14025,14 +14013,6 @@ snapshots: chai: 6.2.0 tinyrainbow: 3.0.3 - '@vitest/mocker@4.0.5(vite@6.4.2(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.3))': - dependencies: - '@vitest/spy': 4.0.5 - estree-walker: 3.0.3 - magic-string: 0.30.21 - optionalDependencies: - vite: 6.4.2(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.3) - '@vitest/mocker@4.0.5(vite@6.4.2(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@vitest/spy': 4.0.5 @@ -19274,7 +19254,7 @@ snapshots: vitest@4.0.5(@types/debug@4.1.12)(@types/node@24.10.9)(jiti@2.6.1)(jsdom@27.0.1(postcss@8.5.6))(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.3): dependencies: '@vitest/expect': 4.0.5 - '@vitest/mocker': 4.0.5(vite@6.4.2(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.20.6)(yaml@2.8.3)) + '@vitest/mocker': 4.0.5(vite@6.4.2(@types/node@24.10.9)(jiti@2.6.1)(lightningcss@1.30.2)(tsx@4.21.0)(yaml@2.8.3)) '@vitest/pretty-format': 4.0.5 '@vitest/runner': 4.0.5 '@vitest/snapshot': 4.0.5