@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

Readme

Keywords

none

Package Sidebar

Install

npm i @ensdomains/reverse-records

Weekly Downloads

3

Version

1.0.0

License

ISC

Unpacked Size

20.2 kB

Total Files

17

Last publish

Collaborators

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