Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9fe129a
feat: reserve top-level package names for narrative overhaul
shrugs Mar 19, 2026
4880146
checkpoint: update addresses, use docker-compose as source of truth f…
shrugs Mar 30, 2026
cbb6449
fix: remove the Resolver.dedicated metadata in advance of permissione…
shrugs Mar 30, 2026
2ecd710
docs(changeset): Omnigraph API (BREAKING): Removed `Resolver.dedicate…
shrugs Mar 30, 2026
2c0ddf3
checkpoint: update abis
shrugs Mar 30, 2026
3d12851
feat: implement registration and reservation in latest devnet commit
shrugs Mar 30, 2026
6941fba
save unregistrant
shrugs Mar 30, 2026
3bf16a5
use distinct ensindexer schema names
shrugs Mar 30, 2026
8784e46
fix orchestrator
shrugs Mar 30, 2026
35eace6
fix: remove unnecessary helper
shrugs Mar 30, 2026
3107c80
fix: container name devnet
shrugs Mar 30, 2026
d11d0b9
nit: add relation
shrugs Mar 30, 2026
19a467e
add manual instructions
shrugs Mar 30, 2026
5899005
Merge branch 'feat/secure-top-level-package-names' into feat/enssdk-init
shrugs Mar 30, 2026
c2f00eb
feat: initial enssdk client implementation with omnigraph gql.tada
shrugs Mar 30, 2026
197e269
feat: add gql.tada codegen pipeline, generated schema artifacts, and …
shrugs Mar 30, 2026
edbe99c
chore: add changeset for enssdk
shrugs Mar 30, 2026
aba31b0
fix: vscode settings for tsconfig usage
shrugs Mar 30, 2026
7f1247c
docs: update enssdk README with usage examples and docs link
shrugs Mar 30, 2026
68becd6
chore: add biome config for enssdk, ignore generated files
shrugs Mar 30, 2026
ffb3492
feat: add CLI entrypoint for ensapi schema generation
shrugs Mar 31, 2026
0fb593e
ci: run ensapi generate:schema before gql.tada output in schema check
shrugs Mar 31, 2026
8607277
chore: remove gql.tada turbo from enssdk — consumer concern, not SDK
shrugs Mar 31, 2026
8cb8370
fix: generation
shrugs Mar 31, 2026
d232132
fix: address PR review feedback
shrugs Mar 31, 2026
9d47046
fix lint
shrugs Mar 31, 2026
94714f2
Merge branch 'main' into feat/enssdk-init
shrugs Mar 31, 2026
fdafe2f
fix: pr notes
shrugs Mar 31, 2026
6d2578e
fix: merge conflicts
shrugs Mar 31, 2026
26313d3
fix: throw if write failed via direct execution
shrugs Mar 31, 2026
31471da
fixes
shrugs Mar 31, 2026
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
4 changes: 4 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"ensrainbow",
"ensapi",
"fallback-ensapi",
"enssdk",
"enscli",
"enskit",
"ensskills",
"@ensnode/datasources",
"@ensnode/ensrainbow-sdk",
"@ensnode/ensdb-sdk",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/warm-snails-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"enssdk": minor
---

add core client factory with viem-style extend() and omnigraph module with gql.tada typed queries
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ jobs:
or .name == "@ensnode/namehash-ui"
or .name == "@ensnode/ponder-sdk"
or .name == "@ensnode/ponder-subgraph"
or .name == "enssdk"
or .name == "enskit"
or .name == "enscli"
or .name == "ensskills"
))

- name: Filter Published Packages For Lambdas
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,31 @@ jobs:
- name: Validate OpenAPI spec with Mintlify
run: pnpm dlx mint@^4.1.0 openapi-check docs/docs.ensnode.io/ensapi-openapi.json

graphql-schema-check:
name: "GraphQL Schema Check"
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup_node_environment

- name: Generate Schemas & Typings
run: pnpm generate:gqlschema

- name: Verify generated files are committed
run: |
if ! git diff --quiet packages/enssdk/src/omnigraph/generated/; then
echo "Error: Generated files are out of sync"
echo ""
echo "The following generated files differ from what is committed:"
git diff --name-status packages/enssdk/src/omnigraph/generated/
echo ""
echo "To fix, run:"
echo " pnpm generate:gqlschema"
echo "Then commit the updated generated files."
exit 1
fi
echo "GraphQL schema generated files are in sync"

integrity-check:
name: "Integrity Check"
runs-on: blacksmith-4vcpu-ubuntu-2204
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dist

# Ponder
generated
!packages/enssdk/src/omnigraph/generated/
.ponder

#jetbrains elements
Expand Down
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifier": "non-relative",
"js/ts.tsdk.path": "node_modules/typescript/lib",
"js/ts.preferences.importModuleSpecifier": "non-relative",
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
"files.insertFinalNewline": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
Expand Down
3 changes: 2 additions & 1 deletion apps/ensapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"test:integration": "vitest run --config vitest.integration.config.ts",
"lint": "biome check --write .",
"lint:ci": "biome ci",
"typecheck": "tsgo --noEmit"
"typecheck": "tsgo --noEmit",
"generate:gqlschema": "tsx src/graphql-api/lib/write-graphql-schema.ts"
},
"dependencies": {
"@ensdomains/ensjs": "^4.0.2",
Expand Down
44 changes: 44 additions & 0 deletions apps/ensapi/src/graphql-api/lib/write-graphql-schema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { writeFile } from "node:fs/promises";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";

import { lexicographicSortSchema, printSchema } from "graphql";

import { makeLogger } from "@/lib/logger";

const logger = makeLogger("write-graphql-schema");

const MONOREPO_ROOT = resolve(import.meta.dirname, "../../../../../");
const ENSSDK_ROOT = resolve(MONOREPO_ROOT, "packages/enssdk/");
const OUTPUT_PATH = resolve(ENSSDK_ROOT, "src/omnigraph/generated/schema.graphql");

async function _writeGraphQLSchema() {
const { schema } = await import("@/graphql-api/schema");
const schemaAsString = printSchema(lexicographicSortSchema(schema));

await writeFile(OUTPUT_PATH, schemaAsString);
}

/**
* Attempts to write the GraphQL Schema, swallowing any errors.
*/
export async function writeGraphQLSchema() {
try {
await _writeGraphQLSchema();
logger.info(`Wrote SDL to ${OUTPUT_PATH}`);
} catch (error) {
logger.warn(error, `Unable to write SDL to ${OUTPUT_PATH}`);
}
}

// when executed directly (`pnpm generate:gqlschema`), write generated schema and produce an exit code
if (resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
try {
await _writeGraphQLSchema();
console.log(`Wrote SDL to ${OUTPUT_PATH}`);
process.exit(0);
} catch (error) {
console.error(error);
process.exit(1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createApp } from "@/lib/hono-factory";

const app = createApp();

// 503 if ensv2 plugin not available
// 503 if prerequisites not met
app.use(async (c, next) => {
const prerequisite = hasGraphqlApiConfigSupport(config.ensIndexerPublicConfig);
if (!prerequisite.supported) {
Expand Down
6 changes: 5 additions & 1 deletion apps/ensapi/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { getReferralLeaderboardEditionsCaches } from "@/cache/referral-leaderboa
import { referralProgramEditionConfigSetCache } from "@/cache/referral-program-edition-set.cache";
import { referrerLeaderboardCache } from "@/cache/referrer-leaderboard.cache";
import { redactEnsApiConfig } from "@/config/redact";
import { writeGraphQLSchema } from "@/graphql-api/lib/write-graphql-schema";
import { sdk } from "@/lib/instrumentation";
import logger from "@/lib/logger";

Expand All @@ -26,12 +27,15 @@ const server = serve(
async (info) => {
logger.info({ config: redactEnsApiConfig(config) }, `ENSApi listening on port ${info.port}`);

// Write the generated graphql schema in the background
void writeGraphQLSchema();

// Trigger proactive initialization of the indexing status cache at startup.
// SWRCache with proactivelyInitialize: true starts fetching immediately upon
// construction, but construction is deferred via the lazy proxy until first
// access — so we access it explicitly here rather than waiting for the first
// user request.
indexingStatusCache.read();
void indexingStatusCache.read();
},
);

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
environment:
# Override environment variables to point to docker instances
DATABASE_URL: postgresql://postgres:password@postgres:5432/postgres
DATABASE_SCHEMA: ensindexer_0
DATABASE_SCHEMA: docker_compose_ensindexer_schema
ENSRAINBOW_URL: http://ensrainbow:3223
env_file:
# NOTE: must define apps/ensindexer/.env.local (see apps/ensindexer/.env.local.example)
Expand Down Expand Up @@ -35,7 +35,7 @@ services:
environment:
# Override environment variables to point to docker instances
DATABASE_URL: postgresql://postgres:password@postgres:5432/postgres
ENSINDEXER_SCHEMA_NAME: ensindexer_0
ENSINDEXER_SCHEMA_NAME: docker_compose_ensindexer_schema
env_file:
# NOTE: must define apps/ensapi/.env.local (see apps/ensapi/.env.local.example)
# Copy .env.local.example to .env.local and configure all required values
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"docker:build:ensrainbow": "docker build -f apps/ensrainbow/Dockerfile -t ghcr.io/namehash/ensnode/ensrainbow:latest .",
"docker:build:ensapi": "docker build -f apps/ensapi/Dockerfile -t ghcr.io/namehash/ensnode/ensapi:latest .",
"otel-desktop-viewer": "docker run -p 8000:8000 -p 4317:4317 -p 4318:4318 davetron5000/otel-desktop-viewer:alpine-3",
"generate:openapi": "pnpm -r --if-present generate:openapi"
"generate:openapi": "pnpm -r --if-present generate:openapi",
"generate:gqlschema": "pnpm -F ensapi generate:gqlschema && pnpm -F enssdk generate:gqlschema"
},
"devDependencies": {
"@biomejs/biome": "^2.3.1",
Expand Down
21 changes: 21 additions & 0 deletions packages/enscli/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 NameHash

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 5 additions & 0 deletions packages/enscli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# enscli

This package name is reserved for the [ENSNode](https://ensnode.io) project by [NameHash Labs](https://namehashlabs.org).

For more information, visit [ensnode.io](https://ensnode.io).
13 changes: 13 additions & 0 deletions packages/enscli/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"private": true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to make this public? Please ignore if you think not the right time for some reason.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't publish the enscli package due to the proximity to ens-cli — so marking this as private for now avoids publishing it (and therefore failing the release.yml workflow). In order to unmark this as private, we'd need to change the name to something we can publish against or resolve the naming issues.

"name": "enscli",
"version": "1.9.0",
"description": "Reserved for the ENSNode project by NameHash Labs. See https://ensnode.io",
"repository": {
"type": "git",
"url": "https://github.com/namehash/ensnode.git",
"directory": "packages/enscli"
},
"license": "MIT",
"homepage": "https://ensnode.io"
}
21 changes: 21 additions & 0 deletions packages/enskit/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 NameHash

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 5 additions & 0 deletions packages/enskit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# enskit

This package name is reserved for the [ENSNode](https://ensnode.io) project by [NameHash Labs](https://namehashlabs.org).

For more information, visit [ensnode.io](https://ensnode.io).
12 changes: 12 additions & 0 deletions packages/enskit/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "enskit",
"version": "1.9.0",
"description": "Reserved for the ENSNode project by NameHash Labs. See https://ensnode.io",
"repository": {
"type": "git",
"url": "https://github.com/namehash/ensnode.git",
"directory": "packages/enskit"
},
"license": "MIT",
"homepage": "https://ensnode.io"
}
21 changes: 21 additions & 0 deletions packages/enssdk/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 NameHash

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
53 changes: 53 additions & 0 deletions packages/enssdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# enssdk

The foundational ENS developer library. Isomorphic, tree-shakable, with composable modules via subpath exports.

Learn more about [ENSNode](https://ensnode.io/) from [the ENSNode docs](https://ensnode.io/docs).

## Installation

```bash
npm install enssdk
```

## Usage

### Core Client

```typescript
import { createEnsNodeClient } from "enssdk/core";

const client = createEnsNodeClient({ url: "https://api.alpha.ensnode.io" });
```

### Omnigraph (Typed GraphQL)

```typescript
import { createEnsNodeClient } from "enssdk/core";
import { omnigraph, graphql } from "enssdk/omnigraph";

const client = createEnsNodeClient({ url: "https://api.alpha.ensnode.io" })
.extend(omnigraph);

const MyQuery = graphql(`
query MyQuery($name: Name!) {
domain(by: { name: $name }) {
name
registration { expiry }
}
}
`);

const result = await client.omnigraph.query({
query: MyQuery,
variables: { name: "nick.eth" },
});
```

Modules are composable via `extend()` — only import what you use.

## License

Licensed under the MIT License, Copyright © 2025-present [NameHash Labs](https://namehashlabs.org).

See [LICENSE](./LICENSE) for more information.
7 changes: 7 additions & 0 deletions packages/enssdk/biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.2/schema.json",
"extends": "//",
"files": {
"includes": ["**", "!src/omnigraph/generated"]
}
}
Loading
Loading