Skip to content

Commit

Permalink
"LAC1" DID method updates (#10)
Browse files Browse the repository at this point in the history
* feat: Add alsoKnownAs to resolved DIDDocument

Signed-off-by: eum602 <[email protected]>

* fix: Update resolver logic because of the 'alsoKnownAs' property

Signed-off-by: eum602 <[email protected]>

* chore: Update library version

Signed-off-by: eum602 <[email protected]>

* feat: Add default controller as a verification method with 'assertion' and 'authentication' capabilities

Signed-off-by: eum602 <[email protected]>

* fix: Bind invocation capability

Signed-off-by: eum602 <[email protected]>

* fix: move controller change operation to lac1 file, fix errors in logic for DID document resolution

Signed-off-by: eum602 <[email protected]>

* test: Update tests for lac1

Signed-off-by: eum602 <[email protected]>

* test: Reorganize unit tests

Signed-off-by: eum602 <[email protected]>

* chore: Format files

Signed-off-by: eum602 <[email protected]>

* Fix: Re define identifiers for the main controller set as default verification method

Signed-off-by: eum602 <[email protected]>

---------
closes #11 
Signed-off-by: eum602 <[email protected]>
  • Loading branch information
eum602 authored Jul 3, 2024
1 parent 804b1d6 commit 8d90cf6
Show file tree
Hide file tree
Showing 20 changed files with 2,429 additions and 354 deletions.
3 changes: 3 additions & 0 deletions lib/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default class DIDDocument {

constructor( document, mode = 'reference' ) {
this.id = document.id;
this.alsoKnownAs = document.alsoKnownAs;
this.controller = document.controller;
this.verificationMethod = document.verificationMethod;
this.authentication = getRelationship( document.verificationMethod, document.authentication );
Expand All @@ -20,6 +21,7 @@ export default class DIDDocument {
if( this.mode === 'explicit' )
return {
id: this.id,
alsoKnownAs: this.alsoKnownAs,
controller: this.controller,
verificationMethod: this.verificationMethod,
authentication: this.authentication,
Expand All @@ -32,6 +34,7 @@ export default class DIDDocument {
const document = this.document;
return {
id: this.id,
alsoKnownAs: this.alsoKnownAs,
controller: this.controller,
verificationMethod: this.document.verificationMethod,
authentication: getExistingMethods( document.verificationMethod, document.authentication ),
Expand Down
Loading

0 comments on commit 8d90cf6

Please sign in to comment.