- Builds on top of https://github.com/hyperledger/aries-vcx/pull/1081 - please merge that first - Restores (and simplifies) tests of `EncryptionEnvelope` - Refactors `EncryptionEnvelope` by decoupling its APIs from concept of Aries messages. Even inherently `didcomm !== aries`, so this decoupling makes broader sense and also makes testing a lot easier. - The changes also represent one step towards dropping usage of legacy `AriesDidDoc` structure in encryption envelope - Deleted unused error mappings
- Previous refactoring PR https://github.com/hyperledger/aries-vcx/pull/1070 introduced an error such that `to` field in the forward message ended up string containing JSON array (`"to": "[\"foobar\"]"`), rather than correctly just the key (`"to": "foobar"`) - This PR fixes the issue - The issue was detected as mediator tests started to fail - This PR is to be followed by another PR restoring encryption envelope tests
extracted from https://github.com/hyperledger/aries-vcx/pull/1063 as it was growing too large. I can't really set https://github.com/hyperledger/aries-vcx/pull/1071 as a base for merge since I opened it from my fork, but the commits here are separated, so it should still be possible to view only the implementation part with a relative ease.
Add explicit static lifetime rather than let the compiler guess. As per suggestion of lint `ELIDED_LIFETIMES_IN_ASSOCIATED_CONSTANT` https://github.com/rust-lang/rust/issues/115010 This should fix the clippy warning we are seeing (the ones point to `MessageType` trait derive macro)
Built on top of https://github.com/hyperledger/aries-vcx/pull/1082, please merge that first I recommend start looking at the PR from top down to understand public API effect of the changes. # Demo - `aries/aries_vcx/tests/test_did_exchange.rs` is the top-most level of changes - Simplified `DidExchangeRequester` - Now has single method `construct_request` which simple accepts a `Did` as input - can be any DID which is resolvable. In comparison, previously there were 2 sovrin-crafted methods `construct_from_invitation`, `construct_from_invitation`. - Trimmed down support for invitations - we do not support OOB invitations with service objects "embedded" into the invitation. This Aries design was objected in https://github.com/hyperledger/aries-rfcs/issues/802. We can implemented later if desired by any vcx users, but solution is ugly - it would be needed to convert Service object to Did Document which doesn't make sense. - The above changes also lead to internals simplification where bunch of transformation code could been removed - Simplified DidExchangeResponder - simplify `receive_request`API - to stay symmetric (and general) alike `DidExchangeRequester` the API requires caller to prepare instance `PeerDid` and pass that in as input - remove required argument `invitation_id` - also don't keep this as part of SM state - because Responder might receive request which is not constructed on basis of any particular invitation - but rather simply on basis of knowing Responder's public DID. Invitation might not exist, so it doesn't make sense to mention it. # Other changes - introduce `pretty_assertions` https://github.com/rust-pretty-assertions/rust-pretty-assertions#usage as dev dependency to some of the crates and tests - Leftover code from `did_doc_sov` moved to `did_doc` - `aries-vcx-agent` did-exchange service is generating invitation with `did:peer` as value of `services`, rather than inlining service object. - Derive `Display` for more structs A lot more to describe ... TBD ...
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/hyperledger/aries-vcx/network/alerts). </details> </td> </tr> </table>