Skip to content

ipfs-shipyard/js-ipid-did-resolver

Repository files navigation

ipid-did-resolver

NPM version Downloads Build Status Coverage Status Dependency status Dev Dependency status

IPID resolver to be used with the generic did-resolver package.

Installation

$ npm install did-resolver ipid-did-resolver

This library is written in modern JavaScript and is published in both CommonJS and ES module transpiled variants. If you target older browsers please make sure to transpile accordingly.

Usage

import registerResolver from 'ipid-did-resolver';
import resolve from 'did-resolver';

registerResolver(ipfs);

await (async () => {
    const didDocument = await resolve('did:ipid:xxxxxxx');

    console.log(didDocument);
})();

You must provide a valid ipfs instance to the registerResolver function

Tests

$ npm test
$ npm test -- --watch # during development

License

Released under the MIT License.