tsjs-did-siriusid-resolver
v0.0.4
Published
ProximaX SiriusID Resolver
Downloads
4
Readme
SiriusId DID Resolver
DID Resolver for sirius
DIDs based on the DID-Resolver.
Requirements
- NodeJS 10.x
- Typescript >= 3.5.3
Installing the library
Install using npm:
npm install tsjs-did-siriusid-resolver
or using yarn:
yarn add tsjs-did-siriusid-resolver
Getting started
Default Blockchain Ledger Provider
const ledgerProvider = 'https://demo-sc-api-1.ssi.xpxsirius.io'
Default Public Content Provider
const contentProvider = 'http://ipfs1-dev.xpxsirius.io:5001/
Provide the valid did document
const testDid = "did:sirius:2VhYrbauc2cCx9ZpCp5wrDtK7HKf7jrsvgoKBD4KgK";
Initiate siriusId resolver
const siriusResolver = getResolver(ledgerProvider, contentProvider);
Inject siriusId resolver to Universal resolver
const resolver = new Resolver(siriusResolver);
Resolve did document
const didDoc = await resolver.resolve(testDid);
console.log(didDoc);