-
Notifications
You must be signed in to change notification settings - Fork 83
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
draft: DidDocument integration #864
Conversation
Codecov Report
@@ Coverage Diff @@
## main #864 +/- ##
==========================================
- Coverage 48.96% 47.96% -1.01%
==========================================
Files 429 462 +33
Lines 34225 35414 +1189
Branches 7594 7749 +155
==========================================
+ Hits 16759 16985 +226
- Misses 12208 13139 +931
- Partials 5258 5290 +32
Flags with carried forward coverage won't be shown. Click here to find out more.
|
32e32ff
to
b4452fe
Compare
{ | ||
controller: '2RjtVytftf9Psbh3E8jqyq', | ||
id: '1', |
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.
The problem here is 1
is not a valid DidUrl
, so the deserialization fails with this value. The correct value here would be did:sov:2RjtVytftf9Psbh3E8jqyq#1
.
@@ -62,7 +63,7 @@ export const ARIES_CONNECTION_REQUEST = { | |||
{ | |||
id: 'did:example:123456789abcdefghi;indy', | |||
priority: 0, | |||
recipientKeys: ['2RjtVytftf9Psbh3E8jqyq#1'], |
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.
Currently, after converting from the new to legacy DDO format, resolving key by reference fails. Since this is a field specific to the Sovrin DID method, the dereferencing should probably be responsibility of ExtraFieldsSov
and is not implemented currently.
2b618c9
to
b72de4b
Compare
Postponed until
|
Signed-off-by: Miroslav Kovar <[email protected]>
b72de4b
to
3388483
Compare
Replaces the use of
diddoc_legacy::aries::diddoc::AriesDidDoc
withdid_doc::schema::did_doc::DidDocument
, anddiddoc_legacy::aries::service::AriesService
withdid_doc::schema::service::Service
across the aries-vcx codebase.
Integration with mediated connection is skipped and
diddoc_legacy
will be removed along withmediated_connection
.The method specific fields of the service struct are now set via a type associated with the
DidResolvable
trait, where only fields specific to the sovrin method are used in the codebase for now. This choice impacts the current implementation of the resolver registry, which needs to be reconsidered.Moreover, currently, the service type is set manually during the construction of the
DidDocument
, and theaccept
field is not set at all. However, as per the Sovrin DID method specification, the value of those two fields is implied by the composition of / fields included in the service. This suggests that potentially we might want to wrap theDidDocumentBuilder
in some kind ofDidDocumentBuilderSov
responsible for this method-specific logic in the future.This would be also useful because the extra fields are defined in
did_resolver_sov
. In some use-cases, the entire resolver is imported only for the extra fields needed in order to name theDidDocument
orService
type.The DID parser fails to parse any did which is not fully qualified. This is desirable in cases where fully qualified DID is required as it forces early failure. But in situations where the method is implied, an unqualified DID may also be valid and usable. Therefore, perhaps a separate type should be created to be used in these cases.
As it stands, this integration is a breaking change as it changes the format of the
did_doc
field in the serialized connection state machines in both non-backwards-compatible and non-forwards-compatible way (e.g. some fields optional in the legacy format are now required andpublicKey
used in the legacy format is not a valid DDO field - it can probably be mapped to another valid field when deserializing, but currently isn't).