@ensdomains/reverse-records

1.0.0 • Public • Published

Reverse records

How to setup

git clone https://github.com/ensdomains/reverse-records
cd reverse-records
cp env.example .env // Add your mnemonic, infura project id, and etherscan key
yarn

CLI

yarn query:ropsten 0x123...,0x234...

Smart contract API

getNames([address])

Returns an array of string. If the given address does not have a reverse record or forward record setup, it returns an empty string.

Usage note

Make sure to compare that the returned names match with the normalised names to prevent from homograph attack

Example

const namehash = require('eth-ens-namehash');
const allnames = await ReverseRecords.getNames(['0x123','0x124'])
const validNames = allnames.filter((n) => namehash.normalize(n) === n )

Deployed contract address

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.01latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.01

Package Sidebar

Install

npm i @ensdomains/reverse-records

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

20.2 kB

Total Files

17

Last publish

Collaborators

  • dropthebeatbro
  • davidchu
  • taytems
  • makoto_inoue
  • decanus
  • nickjohnson
  • jefflau
  • mdt.
  • leeondamiky