Skip to content

Add did key spec 7 validators#63

Open
aljones15 wants to merge 39 commits into
mainfrom
add-did-key-spec-7-validators
Open

Add did key spec 7 validators#63
aljones15 wants to merge 39 commits into
mainfrom
add-did-key-spec-7-validators

Conversation

@aljones15
Copy link
Copy Markdown

@aljones15 aljones15 commented Aug 5, 2022

Adds general did validators to the cached resolver.

To Do:

  • Expand tests for did and did url validators

@aljones15 aljones15 self-assigned this Aug 5, 2022
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 8, 2022

Codecov Report

Merging #63 (50ae168) into main (ef5d7cc) will increase coverage by 5.31%.
The diff coverage is 90.54%.

@@            Coverage Diff             @@
##             main      #63      +/-   ##
==========================================
+ Coverage   78.33%   83.65%   +5.31%     
==========================================
  Files           4        6       +2     
  Lines         337      465     +128     
==========================================
+ Hits          264      389     +125     
- Misses         73       76       +3     
Impacted Files Coverage Δ
lib/CachedResolver.js 64.00% <44.00%> (+0.66%) ⬆️
lib/DidResolverError.js 100.00% <100.00%> (ø)
lib/did-io.js 82.37% <100.00%> (+0.98%) ⬆️
lib/index.js 100.00% <100.00%> (ø)
lib/validators.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@aljones15 aljones15 marked this pull request as ready for review August 12, 2022 17:10
Comment thread lib/did-io.js Outdated
Comment thread lib/did-io.js Outdated
Comment thread lib/did-io.js Outdated
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Comment thread lib/CachedResolver.js
* @param {object} driver - A did method driver.
* @param {string} [method] - An optional method.
*/
use(driver, method) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this change to an arguments object like {driver: d, method: m}?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've never used that pattern for registering plugins or middleware (I forget what the name of this pattern is) so I just stuck with what we already have. I might add that method parameter exists for one reason: test data this might be over thinking an optional parameter.

Comment thread lib/validators.js Outdated
Comment thread lib/validators.js Outdated
Comment thread test/02-did-io-validators.spec.js Outdated
Comment thread lib/CachedResolver.js Outdated
Comment thread test/helpers.js Outdated
aljones15 and others added 2 commits August 26, 2022 10:08
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
aljones15 and others added 16 commits August 26, 2022 10:08
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
@aljones15 aljones15 requested a review from davidlehn August 26, 2022 14:29
aljones15 and others added 2 commits August 26, 2022 10:30
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Comment thread CHANGELOG.md Outdated
Comment thread lib/index.js Outdated
aljones15 and others added 2 commits December 7, 2022 09:31
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Co-authored-by: David I. Lehn <dlehn@digitalbazaar.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants