ens-resolver

1.0.1 • Public • Published

Two ways ENS Resolver

Installation

npm i -S ens-resolver

Resolver your ENS name or Ethereum Address

Give it a try! DEMO

Happy hacking =)

Usage

import React from "react";
import ReactDOM from "react-dom";
import EnsResolver from "ens-resolver";

// First one from ENS name to ETH address
// Second on from ETH address to ENS name
function App() {
  return (
    <div className="App">
      <h1>Two ways ENS Resolver</h1>
      <EnsResolver lookup="0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359" />
      {/*expected result: ethereumfoundation.eth */}
      <EnsResolver lookup="ethereumfoundation.eth" />
      {/*expected result: 0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359 */}
    </div>
  );
}

Technologies

  • ES6/ESNext - Write ES6 code and Babel will transpile it to ES5 for backwards compatibility
  • Test - Mocha with Istanbul coverage
  • Lint - Preconfigured ESlint with Airbnb config
  • CI - TravisCI configuration setup
  • Minify - Built code will be minified for performance

Commands

  • npm run clean - Remove lib/ directory
  • npm test - Run tests with linting and coverage results.
  • npm test:watch - You can even re-run tests on file changes!
  • npm test:prod - Run tests with minified code.
  • npm run test:examples - Test written examples on pure JS for better understanding module usage.
  • npm run lint - Run ESlint with airbnb-config
  • npm run build - Babel will transpile ES6 => ES5 and minify the code.
  • npm run prepublish - Hook for npm. Do all the checks before publishing your module.

License

MIT © X5 Engine

Package Sidebar

Install

npm i ens-resolver

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

9.2 kB

Total Files

5

Last publish

Collaborators

  • embedapi