digitalbazaar/did-io

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

did-io

Build Status

A Decentralized Identifier resolution library for the browser and node.js.

Install

The did-io library is available through npm for both node.js and the browser.

Requiring did-io
node.js + npm
install did-io
s
didio = require('did-io');
JSPM
 install npm:did-io
js
rt * as didio from 'did-io';
Quick Examples

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

Commercial support for this library is available upon request from Digital Bazaar: support@digitalbazaar.com

Source

The source code for the JavaScript implementation is available at:

https://github.com/digitalbazaar/did-io

Tests

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

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.