open-attestation
open-attestation copied to clipboard
[refactor] wrap v3 document
Current behavior
The implementation takes an object, and return a new object where each property has been added a salt. Then the signature is computer (merkle root). and added to the document (at the root) While mapping to W3C document, the salt and the signature are extracted and moved to the proof property.
Expected behavior
Salt and Signature are directly added into the proof property, so that we don't need the mapping function.
Proposal
- For each key, we must generate a salt and add it to the proof
- Once all salts have been generated, we must compute the signature and add it to the proof
- the logic to compute the salts and the signature remains the same