Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions packages/ensnode-sdk/src/api/config/serialized-response.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/ensnode-sdk/src/client-error.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ErrorResponse } from "./api";
import type { ErrorResponse } from "./ensapi/api/shared/errors/response";

export class ClientError extends Error {
details?: unknown;
Expand Down
12 changes: 6 additions & 6 deletions packages/ensnode-sdk/src/client.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import type { Address } from "viem";
import { beforeEach, describe, expect, it, vi } from "vitest";

import { ENSNodeClient } from "./client";
import { ClientError } from "./client-error";
import { DEFAULT_ENSNODE_API_URL_MAINNET, getDefaultEnsNodeUrl } from "./deployments";
import { ENSNamespaceIds, type Name } from "./ens";
import { deserializeENSApiPublicConfig, type SerializedENSApiPublicConfig } from "./ensapi";
import {
deserializeIndexingStatusResponse,
type ErrorResponse,
Expand All @@ -10,12 +15,7 @@ import {
type ResolvePrimaryNamesResponse,
type SerializedIndexingStatusResponseOk,
serializeIndexingStatusResponse,
} from "./api";
import { ENSNodeClient } from "./client";
import { ClientError } from "./client-error";
import { DEFAULT_ENSNODE_API_URL_MAINNET, getDefaultEnsNodeUrl } from "./deployments";
import { ENSNamespaceIds, type Name } from "./ens";
import { deserializeENSApiPublicConfig, type SerializedENSApiPublicConfig } from "./ensapi";
} from "./ensapi/api";
import {
ChainIndexingConfigTypeIds,
ChainIndexingStatusIds,
Expand Down
6 changes: 3 additions & 3 deletions packages/ensnode-sdk/src/client.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ClientError } from "./client-error";
import { getDefaultEnsNodeUrl } from "./deployments";
import {
type ConfigResponse,
deserializeConfigResponse,
Expand Down Expand Up @@ -25,9 +27,7 @@ import {
type SerializedIndexingStatusResponse,
type SerializedNameTokensResponse,
type SerializedRegistrarActionsResponse,
} from "./api";
import { ClientError } from "./client-error";
import { getDefaultEnsNodeUrl } from "./deployments";
} from "./ensapi/api";
import type { ResolverRecordsSelection } from "./resolution";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deserializeENSApiPublicConfig } from "../../ensapi";
import { deserializeENSApiPublicConfig } from "../../config/deserialize";
import type { ConfigResponse } from "./response";
import type { SerializedConfigResponse } from "./serialized-response";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ENSApiPublicConfig } from "../../ensapi";
import type { ENSApiPublicConfig } from "../../config/types";

/**
* ENSApi Public Config Response
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { serializeENSApiPublicConfig } from "../../ensapi";
import { serializeENSApiPublicConfig } from "../../config/serialize";
import type { ConfigResponse } from "./response";
import type { SerializedConfigResponse } from "./serialized-response";

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { SerializedENSApiPublicConfig } from "../../config/serialized-types";

export type SerializedConfigResponse = SerializedENSApiPublicConfig;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { prettifyError } from "zod/v4";

import { buildUnvalidatedRealtimeIndexingStatusProjection } from "../../ensindexer/indexing-status/deserialize/realtime-indexing-status-projection";
import type { Unvalidated } from "../../shared/types";
import { buildUnvalidatedRealtimeIndexingStatusProjection } from "../../../ensindexer/indexing-status/deserialize/realtime-indexing-status-projection";
import type { Unvalidated } from "../../../shared/types";
import { type IndexingStatusResponse, IndexingStatusResponseCodes } from "./response";
import type { SerializedIndexingStatusResponse } from "./serialized-response";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RealtimeIndexingStatusProjection } from "../../ensindexer";
import type { RealtimeIndexingStatusProjection } from "../../../ensindexer/indexing-status/realtime-indexing-status-projection";

/**
* A status code for indexing status responses.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { serializeRealtimeIndexingStatusProjection } from "../../ensindexer";
import { serializeRealtimeIndexingStatusProjection } from "../../../ensindexer/indexing-status/serialize/realtime-indexing-status-projection";
import { type IndexingStatusResponse, IndexingStatusResponseCodes } from "./response";
import type {
SerializedIndexingStatusResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SerializedRealtimeIndexingStatusProjection } from "../../ensindexer";
import type { SerializedRealtimeIndexingStatusProjection } from "../../../ensindexer/indexing-status/serialize/realtime-indexing-status-projection";
import type { IndexingStatusResponseError, IndexingStatusResponseOk } from "./response";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { z } from "zod/v4";
import {
makeRealtimeIndexingStatusProjectionSchema,
makeSerializedRealtimeIndexingStatusProjectionSchema,
} from "../../ensindexer/indexing-status/zod-schema/realtime-indexing-status-projection";
} from "../../../ensindexer/indexing-status/zod-schema/realtime-indexing-status-projection";
import {
type IndexingStatusResponse,
IndexingStatusResponseCodes,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { type ENSIndexerPublicConfig, PluginName } from "../../../ensindexer/config/types";
import {
type ENSIndexerPublicConfig,
type OmnichainIndexingStatusId,
OmnichainIndexingStatusIds,
PluginName,
} from "../../ensindexer";
} from "../../../ensindexer/indexing-status/omnichain-indexing-status-snapshot";

export const nameTokensPrerequisites = Object.freeze({
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Name, Node } from "../../ens";
import type { Name, Node } from "../../../ens/types";

/**
* Represents request to Name Tokens API.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { InterpretedName, Node } from "../../ens";
import type { UnixTimestamp } from "../../shared/types";
import type { NameToken, NameTokenOwnershipTypes } from "../../tokenscope";
import type { InterpretedName, Node } from "../../../ens/types";
import type { UnixTimestamp } from "../../../shared/types";
import type { NameToken, NameTokenOwnershipTypes } from "../../../tokenscope/name-token";
import type { ErrorResponse } from "../shared/errors";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { serializeNameToken } from "../../tokenscope";
import { serializeNameToken } from "../../../tokenscope/name-token";
import {
type NameTokensResponse,
NameTokensResponseCodes,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SerializedNameToken } from "../../tokenscope";
import type { SerializedNameToken } from "../../../tokenscope/name-token";
import type {
NameTokensResponse,
NameTokensResponseError,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { describe, expect, it } from "vitest";

import type { InterpretedName } from "../../ens";
import { AssetNamespaces } from "../../shared/types";
import { NameTokenOwnershipTypes, NFTMintStatuses } from "../../tokenscope";
import type { InterpretedName } from "../../../ens/types";
import { AssetNamespaces } from "../../../shared/types";
import { NFTMintStatuses } from "../../../tokenscope/assets";
import { NameTokenOwnershipTypes } from "../../../tokenscope/name-token";
import { NameTokensResponseCodes, type NameTokensResponseOk } from "./response";
import type { SerializedNameTokensResponseOk } from "./serialized-response";
import { makeNameTokensResponseSchema } from "./zod-schemas";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
makeNodeSchema,
makeReinterpretedNameSchema,
makeUnixTimestampSchema,
} from "../../shared/zod-schemas";
import { NameTokenOwnershipTypes } from "../../tokenscope";
import { makeNameTokenSchema } from "../../tokenscope/zod-schemas";
} from "../../../shared/zod-schemas";
import { NameTokenOwnershipTypes } from "../../../tokenscope/name-token";
import { makeNameTokenSchema } from "../../../tokenscope/zod-schemas";
import { ErrorResponseSchema } from "../shared/errors/zod-schemas";
import {
NameTokensResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Address } from "viem";

import type { Node } from "../../ens";
import type { UnixTimestamp } from "../../shared/types";
import type { Node } from "../../../ens/types";
import type { UnixTimestamp } from "../../../shared/types";
import {
type RegistrarActionsFilter,
type RegistrarActionsFilterBeginTimestamp,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { type ENSIndexerPublicConfig, PluginName } from "../../../ensindexer/config/types";
import {
type ENSIndexerPublicConfig,
type OmnichainIndexingStatusId,
OmnichainIndexingStatusIds,
PluginName,
} from "../../ensindexer";
} from "../../../ensindexer/indexing-status/omnichain-indexing-status-snapshot";

export const registrarActionsPrerequisites = Object.freeze({
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Address } from "viem";

import type { Node } from "../../ens";
import type { UnixTimestamp } from "../../shared/types";
import type { Node } from "../../../ens/types";
import type { UnixTimestamp } from "../../../shared/types";
import type { RequestPageParams } from "../shared/pagination";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { InterpretedName } from "../../ens";
import type { RegistrarAction } from "../../registrars";
import type { UnixTimestamp } from "../../shared/types";
import type { IndexingStatusResponseCodes } from "../indexing-status";
import type { InterpretedName } from "../../../ens/types";
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";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { serializeRegistrarAction } from "../../registrars";
import { serializeRegistrarAction } from "../../../registrars/registrar-action";
import {
type NamedRegistrarAction,
type RegistrarActionsResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SerializedRegistrarAction } from "../../registrars";
import type { SerializedRegistrarAction } from "../../../registrars/registrar-action";
import type {
NamedRegistrarAction,
RegistrarActionsResponseError,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, it } from "vitest";

import type { InterpretedName } from "../../ens";
import { registrarActionsPrerequisites } from "../registrar-actions";
import type { InterpretedName } from "../../../ens/types";
import { registrarActionsPrerequisites } from "../registrar-actions/prerequisites";
Comment thread
tk-o marked this conversation as resolved.
import { RegistrarActionsResponseCodes, type RegistrarActionsResponseError } from "./response";
import type {
SerializedNamedRegistrarAction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { namehash } from "viem/ens";
import { z } from "zod/v4";
import type { ParsePayload } from "zod/v4/core";

import { makeRegistrarActionSchema } from "../../registrars/zod-schemas";
import { makeReinterpretedNameSchema, makeUnixTimestampSchema } from "../../shared/zod-schemas";
import { makeRegistrarActionSchema } from "../../../registrars/zod-schemas";
import { makeReinterpretedNameSchema, makeUnixTimestampSchema } from "../../../shared/zod-schemas";
import { ErrorResponseSchema } from "../shared/errors/zod-schemas";
import { makeResponsePageContextSchema } from "../shared/pagination/zod-schemas";
import { type NamedRegistrarAction, RegistrarActionsResponseCodes } from "./response";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type {
ResolverRecordsSelection,
ReverseResolutionArgs,
ReverseResolutionResult,
} from "../../resolution";
import type { TracingTrace } from "../../tracing";
} from "../../../resolution";
import type { TracingTrace } from "../../../tracing";

export interface TraceableRequest {
trace?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { ParsePayload } from "zod/v4/core";
import {
makeNonNegativeIntegerSchema,
makePositiveIntegerSchema,
} from "../../../shared/zod-schemas";
} from "../../../../shared/zod-schemas";
import { RECORDS_PER_PAGE_MAX, RequestPageParams } from "./request";
import {
ResponsePageContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { z } from "zod/v4";

import type { InterpretedName, Node } from "../ens";
import type { ENSApiPublicConfig } from "../ensapi";
import type { RealtimeIndexingStatusProjection } from "../ensindexer";
import type { RegistrarAction } from "../registrars";
import type { InterpretedName, Node } from "../../ens/types";
import type { ENSApiPublicConfig } from "../../ensapi/config";
import type { RealtimeIndexingStatusProjection } from "../../ensindexer/indexing-status/realtime-indexing-status-projection";
import type { RegistrarAction } from "../../registrars/registrar-action";
import type {
ForwardResolutionArgs,
MultichainPrimaryNameResolutionArgs,
Expand All @@ -12,8 +12,8 @@ import type {
ResolverRecordsSelection,
ReverseResolutionArgs,
ReverseResolutionResult,
} from "../resolution";
import type { TracingTrace } from "../tracing";
} from "../../resolution";
import type { TracingTrace } from "../../tracing";
import type { ErrorResponseSchema } from "./shared/errors/zod-schemas";

/**
Expand Down
1 change: 1 addition & 0 deletions packages/ensnode-sdk/src/ensapi/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from "./api";
export * from "./config";
1 change: 0 additions & 1 deletion packages/ensnode-sdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./api";
export { type ClientOptions, ENSNodeClient } from "./client";
export * from "./client-error";
export * from "./deployments";
Expand Down
12 changes: 6 additions & 6 deletions packages/ensnode-sdk/src/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
* app/package in the monorepo which requires `@ensnode/ensnode-sdk` dependency.
*/

export * from "./api/indexing-status/zod-schemas";
export * from "./api/name-tokens/zod-schemas";
export * from "./api/registrar-actions/zod-schemas";
export * from "./api/resolution/zod-schemas";
export * from "./api/shared/errors/zod-schemas";
export * from "./api/shared/pagination/zod-schemas";
export * from "./ensapi/api/indexing-status/zod-schemas";
export * from "./ensapi/api/name-tokens/zod-schemas";
export * from "./ensapi/api/registrar-actions/zod-schemas";
export * from "./ensapi/api/resolution/zod-schemas";
export * from "./ensapi/api/shared/errors/zod-schemas";
export * from "./ensapi/api/shared/pagination/zod-schemas";
export * from "./ensapi/config/zod-schemas";
export * from "./ensindexer/config/zod-schemas";
export * from "./registrars/zod-schemas";
Expand Down