Getting Started

Start using Namicorn by using a few examples.

Create a new project.

mkdir test-out-namicorn && cd $_
npm init -y

Install Namicorn.

npm install namicorn

Make a file, script.js.

const {default: Namicorn} = require('namicorn')

const namicorn = new Namicorn()

function resolve(domain, currency) {
  namicorn.address(domain, currency)
    .then(address => console.log(domain, ' resolves to', address))
    .catch(console.error)
}
resolve('resolver.eth', "ETH")
resolve('ryan.zil', "ZIL")

Execute the script.

node script.js
# ryan.zil  resolves to 0x177FFbD0366097C8A0DB7De1E81217dE3883a4B3
# resolver.eth resolves to 0xD3ddcCDD3b25A8a7423B5bEe360a42146eb4Baf3