Skip to content
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

[Task] Move proof in IotaDocument outside of metadata #714

Closed
8 tasks
cycraig opened this issue Mar 15, 2022 · 2 comments · Fixed by #728
Closed
8 tasks

[Task] Move proof in IotaDocument outside of metadata #714

cycraig opened this issue Mar 15, 2022 · 2 comments · Fixed by #728
Assignees
Labels
Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog
Milestone

Comments

@cycraig
Copy link
Contributor

cycraig commented Mar 15, 2022

Description

Move the proof section in IotaDocument from inside its metadata to the root level.

Current JSON:

"doc": {},
"meta": { 
  "proof": {},
  ... 
}

Proposed JSON:

"doc": {},
"meta": {},
"proof": {}

Motivation

This change would remove the special case for signing DID Documents, which stands in contrast to all other structs which have their proof at the root level, such as Credential and Presentation.

While in Rust this is handled by the SetSignature trait, this discrepancy has caused problems in the Wasm bindings and will likely continue to cause problems. This also causes problems when verifying data, because we need to know what type of data we're dealing with in order to know where its signature is located.

The simplest solution is to move the DID Document proof to align with other objects.

To-do list

  • Move proof in IotaDocument.
  • Update the IOTA DID Method Specification.

Change checklist

  • The feature or fix is implemented in Rust and across all bindings whereas possible.
  • The feature or fix has sufficient testing coverage
  • All tests and examples build and run locally as expected
  • Every piece of code has been document according to the documentation guidelines.
  • If conceptual documentation (mdbook) and examples highlighting the feature exist, they are properly updated.
  • If the feature is not currently documented, a documentation task Issue has been opened to address this.
@cycraig cycraig added the Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog label Mar 15, 2022
@cycraig cycraig added this to the v0.5 Features milestone Mar 15, 2022
@eike-hass
Copy link
Collaborator

We need to verify this change against the explorer application. It expects only the the doc and meta root keys. I assume ATM you would not be able to inspect the proof in the UI with this change.

@cycraig
Copy link
Contributor Author

cycraig commented Mar 16, 2022

I believe the proof field was manually removed from the JSON in the initial release of the explorer, if I'm not mistaken. Was it added back in the refactor for 0.5? Needs investigating either way, thanks for the heads-up.

@abdulmth abdulmth self-assigned this Mar 16, 2022
@abdulmth abdulmth linked a pull request Mar 17, 2022 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog
Projects
Development

Successfully merging a pull request may close this issue.

3 participants