OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Ensjs

ENSjs is an MIT-licensed TypeScript library that adds composable actions for interacting with ENS v1 and v2 to viem clients. It includes public read actions, wallet write actions, subgraph and DNS helpers, and utilities, with tree-shakeable package entry points and multicall batching for reads.

Independent OpenViST project profile, based on linked sources.

Ensjs — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use ENSjs when building a TypeScript application that already uses viem and needs composable ENS reads or wallet actions. It is also relevant when the application needs ENS subgraph or DNS helpers, or when developers want to import only selected ENS actions.

Who it is for

  • TypeScript developers adding ENS resolution and record lookups to Ethereum applications
  • Teams building ENS registration or name-management interfaces with viem
  • Developers who need ENS subgraph queries, DNS helpers or contract ABI snippets

Documented uses

  • Resolve ENS names and retrieve address, text and other records
  • Check name price or availability and support registration and renewal flows
  • Build ENS v1 or v2 wallet operations, including supported record and name-management actions
  • Query subnames, names associated with addresses and history through the subgraph module
  • Use DNS helpers or import ENS contract ABI snippets
Before you choose

Requirements & limits

The repository is public and identifies the project license as MIT. The README lists viem 2.9.2 or later as a peer dependency.

  • The core integration is built around viem clients rather than a standalone user-facing interface.
  • The README lists mainnet and Sepolia as supported chains.
  • GraphQL is needed for the subgraph entry point; dnsprovejs is needed for the documented DNS import-data helper.
  • React hooks and query integration are provided as separate repository packages.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up ENS record reads with viem

Create a viem public client extended with ENS contracts and use it to request ENS records.

Before you start

  • TypeScript project
  • viem 2.9.2 or later
  • Install pnpm and the @ensdomains/ensjs package

Steps

  1. Install the library and viem with pnpm add @ensdomains/ensjs viem.

  2. Import http and createPublicClient from viem, mainnet from viem/chains, and addEnsContracts from ENSjs.

  3. Create a public client with chain: addEnsContracts(mainnet) and an HTTP transport.

  4. Import read actions from @ensdomains/ensjs/public and call getAddressRecord or getRecords with the client and a name.

Expected outcome

A viem client configured with ENS contract information can request address and other records, as shown in the README example.

Guide limitations

  • The documented example targets mainnet; the README also lists Sepolia as supported.
  • This recipe covers read operations only; write actions use wallet-oriented entry points and standard viem write parameters.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
12 October 2026
Original website title
ensdomains/ensjs · Official homepage title · retained in its source language