Decentralized Identity (DID) Universal Resolver abstract driver class
In this module we provide a base Driver
class for Decentralized
Identity (DID) universal
resolution. This driver implements an interface similar to the reference
implementation described in the
universal-resolver
repository. Implementors should extend this abstract class to describe
their own resolution driver.
$ npm install did-universal-resolver-driver
const { Driver } = require('did-universal-resolver-driver')
const driver = new Driver({
resolve(identifier) {
// resolve identifier with ResolutionResult somehow
},
properties() {
// return Map<String, Object> instance of driver resolution properties
}
})
An implementor can extend this base class overloading the required methods for the driver.
const { Driver } = require('did-universal-resolver-driver')
class MyDriver extends Driver {
resolve(identifier) {
// resolve identifier with ResolutionResult somehow
},
properties() {
// return Map<String, Object> instance of driver resolution properties
}
}
where opts
should be:
{
resolve(identifier): ResolutionResult // Resolve identifier into a ResolutionResult
properties(): Map<String, Object> // A Map instance of property keys to object values
}
where identifier
is a DID URI.
An interface method that should be overloaded. Will throw error if not implemented.
An interface method that should be overloaded. Will throw error if not implemented.
MIT