ens-did-resolver
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

npm npm

ens DID Resolver

This is the reference implementation for the did:ens resolver.

The Ethereum community has established ENS names as their identifiers (see Etherscan) for web3 projects. This DID method specification has two purposes:

  • to wrap existing ENS names as DIDs to be interoperable with applications relying on Decentralized Identifiers
  • to define a canonical way to augment ENS names with DID capabilities such as services and verification methods.

Usage

This library should be used with did-resolver.

npm i ens-did-resolver did-resolver
import { getResolver } from 'ens-did-resolver'
import { Resolver } from 'did-resolver'

const infuraProjectId = '<create a free project at infura.io>'

const resolver = new Resolver({
  ...getResolver({ infuraProjectId })
})

const result = await resolver.resolve('did:ens:vitalik.eth')
console.dir(result.didDocument, { depth: 4 })

/ens-did-resolver/

    Package Sidebar

    Install

    npm i ens-did-resolver

    Weekly Downloads

    325

    Version

    1.0.4

    License

    Apache-2.0

    Unpacked Size

    180 kB

    Total Files

    25

    Last publish

    Collaborators

    • nickreynolds2
    • uport-automation-bot
    • simonas-notcat
    • mirceanis
    • veramo-bot