Skip to content

Commit

Permalink
Address request to specify did+json DID Resolution Result
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Hinek <[email protected]>
  • Loading branch information
frankhinek committed Dec 6, 2023
1 parent a23a7e6 commit ac3737f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/dids/src/did-dht.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class DidDhtMethod implements DidMethod {
didDocument : null,
didDocumentMetadata : {},
didResolutionMetadata : {
contentType : 'application/did+ld+json',
contentType : 'application/did+json',
error : 'invalidDid',
errorMessage : `Cannot parse DID: ${didUrl}`
}
Expand All @@ -271,7 +271,7 @@ export class DidDhtMethod implements DidMethod {
didDocument : null,
didDocumentMetadata : {},
didResolutionMetadata : {
contentType : 'application/did+ld+json',
contentType : 'application/did+json',
error : 'methodNotSupported',
errorMessage : `Method not supported: ${parsedDid.method}`
}
Expand All @@ -294,7 +294,7 @@ export class DidDhtMethod implements DidMethod {
didDocument : null,
didDocumentMetadata : {},
didResolutionMetadata : {
contentType : 'application/did+ld+json',
contentType : 'application/did+json',
error : 'internalError',
errorMessage : `An unexpected error occurred while resolving DID: ${parsedDid.did}`
}
Expand All @@ -306,7 +306,7 @@ export class DidDhtMethod implements DidMethod {
didDocument,
didDocumentMetadata : {},
didResolutionMetadata : {
contentType : 'application/did+ld+json',
contentType : 'application/did+json',
did : {
didString : parsedDid.did,
methodSpecificId : parsedDid.id,
Expand Down
6 changes: 3 additions & 3 deletions packages/dids/tests/did-dht.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ describe('DidDhtMethod', () => {
didDocument : document,
didDocumentMetadata : {},
didResolutionMetadata : {
contentType : 'application/did+ld+json',
contentType : 'application/did+json',
did : {
didString : document.id,
methodSpecificId : parseDid({ didUrl: document.id }).id,
Expand Down Expand Up @@ -325,7 +325,7 @@ describe('DidDhtMethod', () => {
didDocument : document,
didDocumentMetadata : {},
didResolutionMetadata : {
contentType : 'application/did+ld+json',
contentType : 'application/did+json',
did : {
didString : 'did:dht:123456789abcdefgh',
methodSpecificId : '123456789abcdefgh',
Expand Down Expand Up @@ -423,7 +423,7 @@ describe('DidDhtMethod', () => {
didDocument,
didDocumentMetadata : {},
didResolutionMetadata : {
contentType : 'application/did+ld+json',
contentType : 'application/did+json',
did : {
didString : 'did:dht:h4d3ixkwt6q5a455tucw7j14jmqyghdtbr6cpiz6on5oxj5bpr3o',
methodSpecificId : 'h4d3ixkwt6q5a455tucw7j14jmqyghdtbr6cpiz6on5oxj5bpr3o',
Expand Down

0 comments on commit ac3737f

Please sign in to comment.