-
Notifications
You must be signed in to change notification settings - Fork 200
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: oob without handhsake improvements and routing #1511
feat: oob without handhsake improvements and routing #1511
Conversation
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Codecov Report
@@ Coverage Diff @@
## main #1511 +/- ##
==========================================
- Coverage 85.79% 81.79% -4.01%
==========================================
Files 943 946 +3
Lines 22588 22591 +3
Branches 3915 3953 +38
==========================================
- Hits 19380 18478 -902
- Misses 3027 3850 +823
- Partials 181 263 +82
|
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.
Woooooo! Awesome work :). I think an additional review would be good here but if no one has the capacity right now to review I think we can merge it when my minor comments are resolved.
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
Several improvements to the OOB and connection-less exchange flows.
Fixes #1376
Fixes #1250
Mainly it introduces the following changes:
createLegacyConnectionlessInvitation
. In addition, you can now also pass a legacy connectionless invitation url toagent.oob.recieveInvitationFromUrl
. This will transform the legacy connectionless invitation to an out of band invitation. The method to receive the message usingagent.receiveMessage
works to not introduce breaking changes, but I've marked that method as deprecated and we can remove it in 0.5.0. This leaves multiple flows now that work, and we probably want to do some cleanup of the connectionless code once we remove the old flow in 0.5.0 (not using the oob api).routing
prop, but this was not used for connection-less exchanges. This means you could not control which routing config would be used for a connection-less exchange you received an invitation for. Now the routing is used when you respond to a connectionless out of band invitation.getOutboundMessageContext
method (again ;), we just removed it lol). But this takes into account everything that is needed for responding in connection-full and connection-less exchanges and removes a lot of the duplicated complex logic for handling connection-less. Once we remove the old flow (not using oob api, but still can use legacy connection-less), we could even fully abstract connection-less vs connection, and thus any protocol that uses theDidCommMessageRepository
could support connection-less out of the box.Our main use case for these changes is DIDComm over Bluetooth, where we use a mediator for normal HTTP exchagnes, but if we respond to an invitation over BLE, we want to use custom routing and explicitly set
useDefaultMediator
to false, so we can directly communicate over bluetooth instead of through a mediator.