Name: did-io
Owner: Digital Bazaar, Inc.
Description: Decentralized identifier management library for browser and node.js
Created: 2015-05-08 21:00:18.0
Updated: 2017-09-22 16:29:51.0
Pushed: 2017-09-22 16:29:07.0
Homepage: https://demo.authorization.io/
Size: 73
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A Decentralized Identifier resolution library for the browser and node.js.
The did-io library is available through npm for both node.js and the browser.
install did-io
s
didio = require('did-io');
install npm:did-io
js
rt * as didio from 'did-io';
Retrieve a DID document:
t did = 'did:example:521a0c21-7816-47f8-bc07-1de5b89385fb';
o.get(did, (err, doc) => {
(err) {
console.log('Failed to get DID Document:', err);
nsole.log('Successfully retrieved DID Document:', JSON.stringify(doc, null, 2));
Retrieve a public key from a DID document:
t keyId = 'did:example:521a0c21-7816-47f8-bc07-1de5b89385fb/keys/123';
o.get(keyId, (err, doc) => {
(err) {
console.log('Failed to get key description:', err);
nsole.log('Successfully retrieved key:', JSON.stringify(doc, null, 2));
Commercial support for this library is available upon request from Digital Bazaar: support@digitalbazaar.com
The source code for the JavaScript implementation is available at:
https://github.com/digitalbazaar/did-io
This library includes a sample testing utility which may be used to verify that changes to the library maintains the correct output.
To run the sample tests you will need to get the test suite files by cloning the did-io repository hosted on GitHub.
https://github.com/digitalbazaar/did-io/
Run the tests using the following command:
npm run test
The standard tests will run node and browser tests. Just one type can also be run:
npm run test-node
npm run test-browser
Code coverage of node tests can be generated in coverage/
:
npm run coverage