enssdk

Provide a strongly-typed JavaScript/TypeScript client for the ENS Omnigraph API.

41|19|Updated Dec 23, 2024
One-click install
npx skills add https://github.com/namehash/ensnode --skill enssdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: enssdk
Source: https://github.com/namehash/ensnode/tree/main/packages/ensskills/skills/enssdk
Command: npx skills add https://github.com/namehash/ensnode --skill enssdk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide a strongly-typed JavaScript/TypeScript client over the ENS Omnigraph API to simplify safe access to ENSv1/v2 data and primitives without manual contracts.

Core Features & Use Cases

  • Strongly typed GraphQL queries over the Omnigraph schema for ENSv1 + ENSv2
  • Primitives for namehash/normalization, interpretation/beautification, and branded types to prevent runtime errors
  • Isomorphic, tree-shakable client that works in browser, Node, and edge environments
  • Use case: Build ENS-enabled apps that read domain state, ownership, and records in a type-safe way

Quick Start

Install and configure the enssdk in a TS/JS project and start querying the Omnigraph endpoint.

Frequently Asked Questions about enssdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query ENSv1 and ENSv2 domain data with type safety in TypeScript?

Use a strongly-typed JavaScript/TypeScript client over the ENS Omnigraph API to read ENSv1/v2 data safely. It provides typed GraphQL queries over the Omnigraph schema, enabling you to fetch domain state, ownership, and records without manual smart contract interactions.

What is the best way to handle ENS namehash and normalization in JavaScript?

Handling ENS namehash and normalization in JavaScript is done using dedicated primitives with branded types to prevent runtime errors. The SDK provides these utilities to interpret, beautify, and process ENS names safely within your TypeScript application.

Can I use a typed ENS GraphQL client in browser, Node, and edge environments?

Yes, you can use this typed ENS GraphQL client in browser, Node, and edge environments. It is an isomorphic, tree-shakable client designed to run across various JavaScript runtimes without environment-specific modifications.

Do I need viem and graphql to query the ENS Omnigraph?

Yes, you need viem, graphql, and gql.tada as peer dependencies to query the ENS Omnigraph. The client relies on these libraries to provide strongly-typed GraphQL queries and Ethereum primitives within your TypeScript project.

How do ENS typed GraphQL queries compare to reading smart contracts directly?

Typed GraphQL queries over the ENS Omnigraph schema simplify safe access to ENSv1/v2 data without manual contracts. This approach provides branded types for compile-time safety, whereas direct contract interactions require manual type handling and ABI management.