I no longer work on Ara nor maintain https://github.com/AraBlocks/did-uri This fork is the cannonical and maintained repository for
did-uri
Decentralized Identity (DID) URI parser and formatter.
In this module we provide a w3 compliant interface for parsing and serializing
Decentralized Identity (DID) URIs
as specified by Decentralized
Identifiers
specification. This module provides an interface similar to that of the
url module in the Node standard library.
$ npm install did-uriconst did = require('did-uri')
const spec = did.parse('did:ara:68656c6c6f/music?key=mk706c6179206d65')
console.log(spec)outputs:
{ reference: 'did:ara:68656c6c6f/music?key=mk706c6179206d65',
did: 'did:ara:68656c6c6f',
method: 'ara',
identifier: '68656c6c6f',
path: '/music',
fragment: '',
query: 'key=mk706c6179206d65',
param: '' }Parses a given DID uri and returns an object similar to a DID
instance.
Formats a given DID URI or object into a normalized formatted URI.
Parses and creates a new DID instance.
A reference to the uri that was parsed as input.
The component of the URI containing the protocol, method, and
identifier in the form of did:method:identifier.
The method component of the URI.
The identifier component of the URI.
The param (;) component of the URI.
The path component of the URI.
The fragment (#) component of the URI.
The query (?) component of the URI.
The param string component of the URI parsed into an object.
The query string component of the URI parsed into an object.
The fragment string component of the URI parsed into an object.
- Decentralized Identity Spec
- Universal Resolver
- did-universal-resolver-driver
- did-universal-resolver-resolution
MIT