@valora/resolve-kit
TypeScript icon, indicating that this package has built-in type declarations

3.0.110 • Public • Published

resolve-kit

Resolve an identifier to a Celo address.

Adding

yarn add @valora/resolve-kit

Example

import { ResolveGroup, ResolveAddress, ResolveEns } from '@valora/resolve-kit'

const providerUrl = 'https://forno.celo.org'

const resolver = new ResolveGroup([
  new ResolveAddress(),
  new ResolveEns({}),
])

// Likely resolve 'foo' to a nom with a resolution address
const foo = await resolver.resolve('foo')
console.log('foo resolutions:', foo.resolutions)
console.log('foo errors:', foo.errors)

// Resolves 0x1212121212121212121212121212121212121212 to an address
const address = await resolver.resolve(
  '0x1212121212121212121212121212121212121212',
)
console.log('address resolutions:', address.resolutions)
console.log('address errors:', address.errors)

Developing

Install dependencies:

yarn

Run tests:

yarn test

Run the example CLI:

yarn resolve --id foo
yarn resolve --id 0x1212121212121212121212121212121212121212
yarn resolve --id 0x121212121212121212121212121212121212121

Release

This project uses semantic-release to automatically publish new versions to NPM. You must use PR titles adhering to the conventional commits standard (also enforced in CI) for this to work properly.

/@valora/resolve-kit/

    Package Sidebar

    Install

    npm i @valora/resolve-kit

    Weekly Downloads

    387

    Version

    3.0.110

    License

    Apache-2.0

    Unpacked Size

    2.6 MB

    Total Files

    25

    Last publish

    Collaborators

    • satishr
    • valora-bot
    • jeanregisser
    • jh2oman
    • dievazqu
    • jophish
    • caj-valora
    • sbw