Open-Attestation / open-attestation

Meta framework for providing digital provenance and integrity to documents.
https://openattestation.com
Apache License 2.0
55 stars 19 forks source link

feat: allow both OA and W3C VCs to be digested or signing #317

Open HJunyuan opened 4 days ago

HJunyuan commented 4 days ago

What does this PR do?

This PR will introduce breaking changes to OA v4 (which is currently in beta).

  1. Allow both OA and W3C VCs to be digested or signing
  2. Use "digest" terminology instead of "wrap"
  3. signVc() will automatically digest before performing signing. As such, digest and sign are now separate processes
    1. signVc() will not re-sign if proof object is already defined
  4. digestVc() is left available for use with Ethereum issuance
  5. Stop grouping or the usage of any shared functions/utils between v2 and v4 (e.g. src/index.ts)
    1. In future, those functions will only serve v2 once v3 has been removed

To-do: