identity.rs
identity.rs copied to clipboard
Add support for relative references in core document
Description of change
Adds support for relative references in CoreDocument
for OrderedSet<MethodRef>
fields:
-
authentication
-
assertion_method
-
key_agreement
-
capability_delegation
-
capability_invocation
Added a new enum variant MethodRef::RelativeRefer
, which holds a full (including the document's id
) DIDUrl
. id
value is inserted during deserialization andomitted during serializtion to keep DIDUrl
value valid but serialize back to original value.
Links to any relevant issues
Implements #1072.
Type of change
- [ ] Bug fix (a non-breaking change which fixes an issue)
- [x] Enhancement (a non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation Fix
How the change has been tested
New tests for (de)serialization added, existing tests still work.
Change checklist
Add an x
to the boxes that are relevant to your changes.
- [x] I have followed the contribution guidelines for this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes