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

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

Merged
merged 6 commits into from
Jan 27, 2025

Conversation

HJunyuan
Copy link
Member

@HJunyuan HJunyuan commented Nov 19, 2024

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 signed
  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
  6. Rename all remaining mention of document to vc

@HJunyuan HJunyuan changed the base branch from master to beta November 19, 2024 04:17
@HJunyuan HJunyuan marked this pull request as ready for review December 3, 2024 06:31
@HJunyuan HJunyuan changed the title feat: allow both OA and W3C VCs to be digested or signing feat: allow both OA and W3C VCs to be digested or signed Dec 4, 2024
* fix: make types more granular

* fix: use new types, assert that vc is proofless

* refactor: bring w3cVc schema definitions tgt

* fix: use new types

* fix: update references to guards and types

* fix: update references to guards and types

* fix: tests

* refactor: rename wrap to digest

* refactor: already checking for proofless data model error in digest

* fix: naming

* refactor: reference proofless schema, custom err msg

* fix: builder error shd have digest and sign errors

* fix: tests

* refactor: oaDigested should mean only digested, and not include signed documents

* refactor: useless alias
Copy link
Contributor

@phanshiyu phanshiyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@HJunyuan HJunyuan merged commit 69b78d4 into beta Jan 27, 2025
6 checks passed
@HJunyuan HJunyuan deleted the feat/mix-and-match branch January 27, 2025 06:28
Copy link

🎉 This PR is included in version 6.10.0-beta.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants