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

0.0.7 • Public • Published

uPort DID Resolver

This library is intended to resolve uPort DID documents.

It supports the proposed Decentralized Identifiers spec from the W3C Credentials Community Group.

It requires the did-resolver library, which is the primary interface for resolving DIDs.

Resolving a DID document

The resolver presents a simple resolver() function that returns a ES6 Promise returning the DID document.

import resolve from 'did-resolver'
import registerResolver from 'uport-did-resolver'
 
registerResolver()
 
resolve('did:uport:2nQtiQG6Cgm1GYTBaaKAgr76uY7iSexUkqX/some/path#fragment=123').then(doc => console.log)
 
// You can also use ES7 async/await syntax
const doc = await resolve('did:uport:2nQtiQG6Cgm1GYTBaaKAgr76uY7iSexUkqX/some/path#fragment=123')

Readme

Keywords

none

Package Sidebar

Install

npm i uport-did-resolver

Weekly Downloads

52

Version

0.0.7

License

MIT

Unpacked Size

11 kB

Total Files

7

Last publish

Collaborators

  • simonas-notcat
  • mirceanis
  • uport-automation-bot
  • zachferland
  • pelleb
  • mike.xu