Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-ens

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-ens

Get text records of an ENS address with ease.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by250%
Maintainers
1
Weekly downloads
 
Created
Source


get-ens

Version Downloads GitHub Workflow Status Codecov

Get text records of an ENS address with ease.

This library simplifies the process of retreiving ENS data with the help of TheGraph ENS explorer and ENS TextResolver contract.

Install

pnpm i get-ens

Usage

Node.js

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

const provider = getDefaultProvider()

// @ts-ignore
globalThis.fetch = fetch

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

/*
{
  address: '0xf75ed978170dfa5ee3d71d95979a34c91cd7042e',
  owner: '0xf75ed978170dfa5ee3d71d95979a34c91cd7042e',
  records: {
    avatar: 'https://slate.textile.io/ipfs/bafkreiddogjj5m6nhru72cqvj7napv3knwyqcvxlfxu4axkwhhlg55t5cu',
    color: '#f0da91',
    description: 'ⓕ™',
    email: 'foda@just.is',
    url: 'https://asf.is',
    web: {
      github: 'https://github.com/a-s-f',
      instagram: 'https://instagram.com/foda.farm',
      twitter: 'twitter.com/fodasynthesis'
    }
  }
}
*/

Deno

import { getENS } from 'https://esm.sh/get-ens'
import { getDefaultProvider } from 'https://esm.sh/@ethersproject/providers'

const provider = getDefaultProvider()

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

Keywords

FAQs

Package last updated on 18 Aug 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc