-
Notifications
You must be signed in to change notification settings - Fork 28
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
[WIP] Initial commit - Webvh #1377
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: jamshale <[email protected]>
from .did.manager import DidWebvhManager | ||
|
||
|
||
class WebvhOptionsSchema(OpenAPISchema): |
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.
is this request payload following a model we see with other did registration methods or is it specific to webvh?
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.
Umm. This is super basic right now specific to webvh
. I was mostly waiting until I knew exactly what options would be available. Currently you just provide the namespace and an optional identifier.
It tries to be the same as what cheqd did with an options and features object, as this had been discussed briefly. It's very much open for changes.
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.
ok good to know. I would envision having a parameters
key in there where the user can set some boolean flags for prerotation
and portable
as well as the witness
information. The options key is fine with me.
We should also discuss how we plan to handle method
versions of webvh which may or may not become a nightmare.
if response.status == http.HTTPStatus.BAD_REQUEST: | ||
raise DidCreationError(response_json.get("detail")) | ||
|
||
log_entry = response_json.get("logEntry") |
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.
This will change, the posting of the did document will no longer return the log entry. Instead the client must create it itself. However, I will have a helper call available by calling GET http://example.com/my/identifier
. If this call is made after a did was registered but the log wasn't initialized, it will return a proposed initial log entry for the client to sign. However, the client should be responsible for creating this initial did log entry based on the parameters it wishes to set.
|
||
return resolved_did_doc | ||
|
||
async def update(self, options: dict, features: dict): |
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 not implemented on the didwebvh server. The route exists, but will return a 501
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.
Ok. The way this was working was by creating the next custom log entry and posting it to the /namespace/identifier endpoint.
Do we need another endpoint for this?
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.
updates will be using the PUT
method (same endpoint). The reason for this is the rules for the log entry object are different for the initial log entry.
) | ||
).serialize() | ||
|
||
async def deactivate(self, options: dict): |
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 not implemented on the didwebvh server. The route exists, but will return a 501
WIP - Adds basic did create/update/deactivate support with the
didwebvh-server-py
project.Includes endorsement protocol, initial integration testing and some initial unit tests.