0.2.0 • Published 1 year ago

xype-resolver v0.2.0

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

npm latest version npm ethers-v5 version Build Status Downloads Issues Code Coverage Commitizen Friendly Semantic Release

Install

npm install xype-resolver

Usage

Import and initialization

import { XypeResolver } from 'xype-resolver';

const xypeResolver = await XypeResolver.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 xypeResolver.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 xypeResolver.lookupAddress(
  '0x084B5B4967b6EaB4EeDc628C12c7E63292cD5FC6'
);

Running tests

npm run test

Publish package

There are two supported versions of this package depending on version of ethers.js (v5 and v6):

  • Publish ethers-v5 version xype-resolver@ethers-v5:
npm publish --tag ethers-v5
  • Publish ethers-v6 version xype-resolver@latest:
npm publish --tag latest
1.2.0

1 year ago

0.2.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

0.1.1

2 years ago

1.3.0

2 years ago

0.1.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.0.0

2 years ago