Skip to content

Update did method key#25

Open
jameseaster wants to merge 8 commits intomainfrom
update-did-method-key
Open

Update did method key#25
jameseaster wants to merge 8 commits intomainfrom
update-did-method-key

Conversation

@jameseaster
Copy link

@jameseaster jameseaster commented Jun 27, 2024

Resolves - updates did-method-key dependency to latest version 5.2.0


What kind of change does this PR introduce?

  • Dev dependency update which causes breaking changes.

What is the current behavior?

  • Tests and README shows examples using @digitalbazaar/did-method-key@3.0.0

What is the new behavior?

  • Update @digitalbazaar/did-method-key@5.2.0 and update tests accordingly
  • New test was added to delegate a root zcap using ed25519multikey
  • New dev dependencies were added to accommodate the API change
    • @digitalbazaar/ed25519-verification-key-2020
    • @digitalbazaar/ed25519-multikey

Does this PR introduce a breaking change?

  • Yes, API changes

How has this been tested?

  • Tests have been run locally with new API implementation from did-method-key

Screenshots: n/a

});
const verificationKeyPair = await Ed25519VerificationKey2020.generate();
const {didDocument, keyPairs} =
await didKeyDriver.fromKeyPair({verificationKeyPair});
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, we might want to just remove this test. keyPairs would need to be updated for this to work properly. Someone might also copy this example and it isn't correct now. The keyPairs would need to be updated in some way to enable the use of signers.

Choose a reason for hiding this comment

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

Right, that's what this issue is about: #26

Choose a reason for hiding this comment

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

In preparation for a fix somehow somewhere here, I think the appropriate thing is to demonstrate how to properly initialize the client. And therefore proper keys should be passed in etc. We now recognize that successfully calling the constructor does not produce a fully operational client instance.

@jameseaster jameseaster force-pushed the update-did-method-key branch from ccbe9d1 to 1b988c8 Compare March 17, 2026 04:27
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.92%. Comparing base (9d1f756) to head (1b988c8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #25   +/-   ##
=======================================
  Coverage   63.92%   63.92%           
=======================================
  Files           3        3           
  Lines         621      621           
=======================================
  Hits          397      397           
  Misses        224      224           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d1f756...1b988c8. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

4 participants