-
Notifications
You must be signed in to change notification settings - Fork 135
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
feat(coordinate-mediation): upgrade from 2.0 to 3.0 #1282
feat(coordinate-mediation): upgrade from 2.0 to 3.0 #1282
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## next #1282 +/- ##
==========================================
+ Coverage 84.97% 85.89% +0.92%
==========================================
Files 167 170 +3
Lines 18105 18939 +834
Branches 2040 2137 +97
==========================================
+ Hits 15384 16268 +884
+ Misses 2721 2671 -50 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall this seems like a great update. I think @mirceanis has some thoughts on the changes to the data store, so I'll hold off on approval until hearing from him
packages/did-comm/src/__tests__/routing-message-handler.test.ts
Outdated
Show resolved
Hide resolved
packages/did-comm/src/protocols/coordinate-mediation-message-handler.ts
Outdated
Show resolved
Hide resolved
packages/did-comm/src/protocols/coordinate-mediation-message-handler.ts
Outdated
Show resolved
Hide resolved
packages/did-comm/src/protocols/coordinate-mediation-message-handler.ts
Outdated
Show resolved
Hide resolved
packages/did-comm/src/protocols/coordinate-mediation-message-handler.ts
Outdated
Show resolved
Hide resolved
packages/did-comm/src/__tests__/coordinate-mediation-message-handler.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this awesome contribution, it's really great to see such a high quality PR as a first contribution!
There are a couple of things to be addressed before we can merge this:
- There's a lot of coupling between the new protocol and the data-store API + implementations which will definitely cause lots of friction down the road. It's best to separate the config storage into its own plugin.
- The v2 functionality is being replaced altogether. Anyone using or depending on v2 will be stuck on an old version of veramo if we merge it as is.
packages/did-comm/src/protocols/coordinate-mediation-message-handler.ts
Outdated
Show resolved
Hide resolved
update coordinate mediation from v2 to v3 - add recipient update - add recipient update response - add recipient query - add recipient add grant or deny control mechanism - add default logic - add TODO for injection of grant/deny mechanism logic add datastore for: - mediation - recipient did - mediation policy add core-types: - IDataStore - IMediation - IMediationPolicy - IRecipientDid modify validation to use type guards remove return_route on MEDIATE_REQUEST add tests for added functionality - modify mediate test suite - add recipient update test suite - add recipient query test suite documentation: - add documentation on introduced methods cli: - add mediate allow-from command - add mediate deny-from command - add mediate list - add mediate remove
Co-authored-by: Paul Parker <114397409+pauldesmondparker@users.noreply.github.com>
Co-authored-by: Paul Parker <114397409+pauldesmondparker@users.noreply.github.com>
adf9c8d
to
70fcde3
Compare
@mirceanis Just a reminder that this is here ✌️ |
I saw it, but I'm traveling this week so I'll be able to review only next week. Thank you for the effort and the patience. |
To make it easier to track the scope of the PR I have summarised the main changes introduced by this PR below:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks much better now with an independent plugin for managing mediation metadata.
Kudos for the various workarounds you've found! It's been a delight reviewing this :)
This PR can probably be merged as is.
But if you still have time for some improvements, I have a few points:
- revert the did-comm plugin constructor changes
- define the
IMediationManager
and collateral types in the new package instead of the@veramo/core-types
- maybe simplify the mediation manager plugin config by using a single kv-store?
Thanks for the thorough review, it is greatly appreciated! I have pushed some updates in line with your comments. Specifically:
Thanks again and we look forward to your comments. |
…tests reactivation
…at requesters control are considered
closes #1255
What is being changed
This PR updates Veramo's Coordinate Mediation from the v2 specification to the recently released v3 Coordinate Mediation specification. A summary of the changes introduced is as follows:
Coordinate Mediation:
Mediate Grant or Deny control mechanism:
mediate cli command
Track Granted and Denied Mediation Requests
Recipient Update
Testing & Documentation
Quality
Check all that apply:
pnpm i
,pnpm build
,pnpm test
,pnpm test:browser
locally.Details
If applicable, add screen captures, error messages or stack traces to help explain your problem.