hyperledger / aries-vcx

aries-vcx is set of crates to work with DIDs, DID Documents, DIDComm, Verifiable Credentials and Hyperledger Aries.
https://didcomm.org
Apache License 2.0
125 stars 83 forks source link

Add setters on `DidDocument`, remove `DidDocumentBuilder` #1164

Closed Patrik-Stas closed 8 months ago

Patrik-Stas commented 8 months ago

Removes custom DidDocumentBuilder in favor of setters on DidDocument itself.

Rationale:

It's worth noting that the mutating method could in future performs runtime checks, such as whether a provided DidUrl reference (eg pub fn add_authentication_ref(&mut self, reference: DidUrl)) is referring to existing VerificationMethod.

Additionally:

codecov-commenter commented 8 months ago

Codecov Report

Attention: Patch coverage is 0% with 189 lines in your changes are missing coverage. Please review.

Project coverage is 0.05%. Comparing base (413b183) to head (d3a02ef).

Files Patch % Lines
...peer_did/numalgos/numalgo4/construction_did_doc.rs 0.00% 114 Missing :warning:
did_core/did_doc/src/schema/did_doc.rs 0.00% 41 Missing :warning:
...did_peer/src/peer_did/numalgos/numalgo2/helpers.rs 0.00% 19 Missing :warning:
...rc/protocols/did_exchange/state_machine/helpers.rs 0.00% 4 Missing :warning:
...d_methods/did_resolver_sov/src/resolution/utils.rs 0.00% 4 Missing :warning:
did_core/did_methods/did_peer/src/resolver/mod.rs 0.00% 3 Missing :warning:
...ods/did_peer/src/peer_did/numalgos/numalgo2/mod.rs 0.00% 2 Missing :warning:
...ods/did_peer/src/peer_did/numalgos/numalgo4/mod.rs 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1164 +/- ## ======================================== - Coverage 0.05% 0.05% -0.01% ======================================== Files 484 484 Lines 24165 24184 +19 Branches 4489 4484 -5 ======================================== Hits 13 13 - Misses 24152 24171 +19 ``` | [Flag](https://app.codecov.io/gh/hyperledger/aries-vcx/pull/1164/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperledger) | Coverage Δ | | |---|---|---| | [unittests-aries-vcx](https://app.codecov.io/gh/hyperledger/aries-vcx/pull/1164/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperledger) | `0.05% <0.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hyperledger#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.