New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@bchdomains/reverse-records

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bchdomains/reverse-records

Returns multiple LNS reverse records with forward lookup check

latest
npmnpm
Version
1.0.1
Version published
Maintainers
2
Created
Source

Reverse records

How to setup

git clone https://github.com/bchdomains/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

FAQs

Package last updated on 23 Mar 2022

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