JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q49374F
  • License MIT

Get text records of an ENS address with ease.

Package Exports

  • get-ens

Readme

get-ens

Get text records of an ENS address with ease.

Install

pnpm i get-ens

Usage

import { getDefaultProvider } from '@ethersproject/provider'
import { getENS } from 'get-ens'
import fetch from 'node-fetch'

const provider = getDefaultProvider()

// @ts-ignore
globalThis.fetch = fetch

const { address, records } = await getENS(provider)('foda.eth')

/*
{
  address: '0xf75ed978170dfa5ee3d71d95979a34c91cd7042e',
  records: {
    web: { twitter: 'twitter.com/fodasynthesis' },
    email: 'foda@just.is',
    url: 'instagram.com/foda.farm'
  }
}
*/