Add DIDCommV2Service builder methods and update dependencies#187
Add DIDCommV2Service builder methods and update dependencies#187dbluhm merged 10 commits intoIndicio-tech:mainfrom
Conversation
…e builder to help address sicpa-dlab/didcomm-python#104, and added list support at DIDCommVxService models per Indicio-tech#83. Signed-off-by: H. Pretila <hpretila@users.noreply.github.com>
Signed-off-by: H. Pretila <hpretila@users.noreply.github.com>
Signed-off-by: H. Pretila <hpretila@users.noreply.github.com>
Signed-off-by: H. Pretila <hpretila@users.noreply.github.com>
|
CC @dbluhm (apologies if wrong person!) |
Signed-off-by: H. Pretila <hpretila@users.noreply.github.com>
Signed-off-by: H. Pretila <hpretila@users.noreply.github.com>
dbluhm
left a comment
There was a problem hiding this comment.
Looks pretty good! I have a few nitpicks but I don't feel too strongly about them. I'll give you some time to address them but if you don't get around to it, I'll probably merge as is. Thanks!
Signed-off-by: H. Pretila <hpretila@users.noreply.github.com>
…3.14. Signed-off-by: H. Pretila <hpretila@users.noreply.github.com>
|
Once this is merged, I'll get a new release out. I'll probably reuse most of your PR description! Thanks for the contribution! |
Signed-off-by: H. Pretila <hpretila@users.noreply.github.com>
Signed-off-by: H. Pretila <hpretila@users.noreply.github.com>
|
Thanks so much for taking the time to review my work! 🙇 |
dbluhm
left a comment
There was a problem hiding this comment.
Another pass on a bigger screen! LGTM!
|
https://github.com/Indicio-tech/pydid/releases/tag/v0.5.3 The new release is up 😄 You may also be interested in another project I've worked on: https://github.com/Indicio-tech/didcomm-messaging-python I wrote it after getting frustrated with SICPA's DIDComm library. It's been long enough that I honestly couldn't tell you what those original frustrations were 😄 These days, I'm not sure there's anyone maintaining the SICPA library but I'm open to contributions on didcomm-messaging-python. |
|
Thanks so much for the pointer -- from what I've gleaned, I'd be keen to have a better read! You've probably gathered that I've been looking around for DIDComm messaging examples. I'm using them to run a few experiments and wrap my head around some of the moving parts. It would help to have something a bit more opinionated and tackles V1 as well. I know that SICPA's library is specific to DIDComm V2 and doesn't really implement any secrets management or DID resolution/management, which is a bit tricky since -- besides the pain of setting up secrets management -- some of the experiments I'm running depend on agents relying on DIDComm V1 as well. I've got a PR lined up there as well but the org has been pretty inactive in terms of commits recently. |
This pull request introduces explicit support for
DIDCommV2Servicegeneration, which enables DIDComm v2 support for downstream libraries likedidcomm-python. It also raises the minimum required Python version to 3.10.This addition provides methods for when there's a need for a DIDComm V2 service object, as specified in issues decentralized-identity/peer-did-method-spec#64 and more specifically in sicpa-dlab/didcomm-python#104.
Summary of Changes
Dependency & Environment Updates:
pydanticto>=2.7.0and adjusted other development dependencies likepytest.Explicit DIDComm V1 and V2 Service Builders:
add_didcommmethod has been superseded by two new explicit methods:add_didcomm_v1andadd_didcomm_v2. It still does automatic matching, but I have added a deprecation notice and replaced any use of it in the testing withadd_didcomm_v1.add_didcomm_v1creates aDIDCommV1Service, handlingrecipient_keys,routing_keys, andpriority.add_didcomm_v2creates aDIDCommV2Servicewith a compliantDIDCommV2ServiceEndpoint.Backwards Compatibility:
ServiceBuilder.add_didcommis preserved as a compatibility wrapper.DeprecationWarningand delegates to either the V1 or V2 builder. Version detection is based on theacceptheader or an explicitversionargument, defaulting to V1 to maintain old behavior.Model Extensions:
typeattribute forDIDCommV1ServiceandDIDCommV2Servicenow supports aList[str], as noted in Permit DIDCommService type to be a list? #83 allowing for service type arrays.DIDCommV1Service,DIDCommV2Service,DIDCommV2ServiceEndpoint) for direct use.Key Files Modified
Breaking Changes
ServiceBuilder.add_didcommis now deprecated and will be removed in a future release. Developers should migrate to usingadd_didcomm_v1oradd_didcomm_v2explicitly.Testing
All existing tests have been updated to pass with the new dependency set and builder logic. The changes were validated using
pytestin a Python 3.10+ environment.