1.2.0 • Published 1 year ago

bns-resolver v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

bns-resolver

npm package Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

The Blockprime Name Resolver Library

Install

npm install bns-resolver

Usage

Import and initialization

import { BnsResolver } from "bns-resolver";

const bnsResolver = await BnsResolver.init(RPC_NODE);

Name resolution

  • This function should be used when the input is a human readable name or alias like alex.sxt. The sample code:
const addr = await bnsResolver.resolveName('alex.sxt');

Lookup the address

  • This function performs reverse resolution returning the primary alias of the given address. Typically it is used when the Ethereum account is connected to the dApp. The sample code:
const addr = await bnsResolver.lookupAddress('0x084B5B4967b6EaB4EeDc628C12c7E63292cD5FC6');

Running tests

npm run test
1.2.0

1 year ago

2.2.0

1 year ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago