Socket
Socket
Sign inDemoInstall

@ensdomains/ensjs

Package Overview
Dependencies
10
Maintainers
8
Versions
103
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ensdomains/ensjs

ENS javascript library for contract interaction


Version published
Weekly downloads
19K
decreased by-40.64%
Maintainers
8
Created
Weekly downloads
 

Readme

Source

ENSjs

The ultimate ENS javascript library, with viem under the hood.

Features

  • Super fast response times
  • Easy call batchability
  • Written in TypeScript
  • Supports the most cutting edge ENS features
  • Full tree-shaking support

Installation

Install @ensdomains/ensjs, alongside viem.

npm install @ensdomains/ensjs viem

Getting Started

The most simple way to get started is to create a public ENS client, with a supported chain and transport imported from viem. The public client has all the read functions available on it, as well as all subgraph functions.

// Import viem transport, viem chain, and ENSjs
import { http } from 'viem'
import { mainnet } from 'viem/chains'
import { createEnsPublicClient } from '@ensdomains/ensjs'

// Create the client
const client = createEnsPublicClient({
  chain: mainnet,
  transport: http(),
})

// Use the client
const ethAddress = client.getAddressRecord({ name: 'ens.eth' })

Docs

Docs can be found here. Full docs site coming soon.

FAQs

Last updated on 25 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc