0.5.4 • Published 3 years ago
@fl-did-registry/did-resolver-interface v0.5.4
DID Resolver Interface
EW-DID library has a design goal to support different DID methods. did-document
allows management of keys, authorisation, delegation and service endpoints in standardised way. In the practical scenario, the CRUD behaviour of the did-document
needs to be specific to the DID method's underlying implementation. EW-DID aims to handle this through the DID method specific resolver implementation.
did-resolver-interface
defines the contract required for CRUD behaviour of the did-document
. did-ethr-resolver provides a reference implementation of ERC 1056 standard.
Class Diagram
Pseudo example of implementation
// MyResolver - Implement the read only behaviour for your DID Method
class Resolver implements IResolver{
read(){
// return the whole DID Document
}
readAttribute(){
// read an attribute as per did method requirement
}
validDelegate(){
//validate a delegate as per did method requirement
}
}
// MyResolver - Implement the update and revoke behaviour for your DID Method
class Operator extends Resolver implements IOperator {
create(){
//create specific to did method
}
update(){
//update specific to did method
}
deactivate(){
//deactivate specific to did method
}
revokeDelegate(){
//revokeDelegate specific to did method
}
revokeAttribute(){
//revoke attribute specific to did method
}
}