-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add version_id support #21
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #21 +/- ##
==========================================
- Coverage 91.79% 91.25% -0.54%
==========================================
Files 11 11
Lines 1194 1292 +98
==========================================
+ Hits 1096 1179 +83
- Misses 98 113 +15 ☔ View full report in Codecov by Sentry. |
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.
Looks good, but you got a bunch of clippy suggestions you should go through,
cargo clippy
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.
Looks good to me. One note about process, you should be able to directly create branches in the xmtp/didethresolver repo and PR from there. Let me know if GitHub permissions forced you to fork the repo. Your GitHub user may not be in the right group. IT should be able to fix that.
That was done very much on purpose, so that we won't "spam" the public repository with intermediate branches. Creating shared branches are good practice when we have multiple individuals contributing to the same branch, but aren't really designed for scalability. ( i.e. it would add the role of "cleanup officer" ). That's the reason why most large organizations that promotes external contributions would allow PR to be created only from a fork. |
} | ||
Ok(()) | ||
Ok(deactivated) |
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.
I'm confused about this result. Is deactivated successful or failure?
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.
it's neither. The deactivation is separate from the error.
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.
Generally looking good to me! I made one note but thanks for cleaning up the warnings!
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.
much cleaner and nice job!
What ?
This PR add the support for version_id as part of the resolver implementation.
More details
The DID document specifications is described https://github.com/decentralized-identity/ethr-did-resolver/blob/master/doc/did-method-spec.md.
The changes here convert the return type from
DidDocument
into aDidResolutionResult
.The difference is this:
So that a
DidResolutionResult
provides additional information regarding the document. In particular, it provides versioning information.To take advantage of that, the resolver also support requesting a particular version. That version can be provided as the second argument :
result by