Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(did-provider-key): use compressed keys for creating Secp256k1 did:key #1217

Merged
merged 2 commits into from
Aug 15, 2023

Conversation

mirceanis
Copy link
Member

What issue is this PR fixing

fixes #1213

What is being changed

Creating did:key identifiers with keyType set to Secp256k1 will use compressed public keys when computing the identifier specific string.
This PR also adds the ability to the resolver to resolve did:key identifiers based on uncompressed keys.

Quality

Check all that apply:

  • I want these changes to be integrated
  • I successfully ran pnpm i, pnpm build, pnpm test, pnpm test:browser locally.
  • I allow my PR to be updated by the reviewers (to speed up the review process).
  • I added unit tests.
  • I added integration tests.

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (75048ce) 84.85% compared to head (1a4c8e8) 84.85%.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #1217   +/-   ##
=======================================
  Coverage   84.85%   84.85%           
=======================================
  Files         167      167           
  Lines       18065    18067    +2     
  Branches     2028     2029    +1     
=======================================
+ Hits        15329    15331    +2     
  Misses       2736     2736           
Files Changed Coverage Δ
packages/did-provider-key/src/key-did-provider.ts 77.44% <100.00%> (+0.17%) ⬆️
packages/did-provider-key/src/resolver.ts 77.77% <100.00%> (+0.41%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mirceanis mirceanis force-pushed the 1213-fix-did-provider-key-secp256k1 branch from 9c38d4a to 1a4c8e8 Compare August 15, 2023 14:05
@mirceanis mirceanis merged commit ba8f6f5 into next Aug 15, 2023
11 checks passed
@mirceanis mirceanis deleted the 1213-fix-did-provider-key-secp256k1 branch August 15, 2023 14:24
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.

[bug] did-provider-key is creating unusual DIDs for Secp256k1 keys
2 participants