Skip to content

Commit 2753e3e

Browse files
authored
fix: return non-nullable DIDDocument on Resolver.resolve() (#21)
BREAKING CHANGE: The `Resolver.resolve()` method throws an error (rejects the promise) if the DID document returned by the respective method is `null`. Also, `null` documents are not cached.
1 parent 02bdaf1 commit 2753e3e

5 files changed

Lines changed: 3410 additions & 3359 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ lib
33
.vscode/settings.json
44
coverage
55
.idea/
6+
.vscode/
67

78
*.log
89

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export function getResolver() {
110110
did: string,
111111
parsed: ParsedDID,
112112
didResolver: Resolver
113-
): Promise<DIDDocument | null> {
113+
): Promise<DIDDocument> {
114114
console.log(parsed)
115115
// {method: 'mymethod', id: 'abcdefg', did: 'did:mymethod:abcdefg/some/path#fragment=123', path: '/some/path', fragment: 'fragment=123'}
116116
const didDoc = ...// lookup doc

0 commit comments

Comments
 (0)