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

Improve JSON-LD VC integration in Aries Framework JavaScript #1466

Open
TimoGlastra opened this issue May 23, 2023 · 0 comments
Open

Improve JSON-LD VC integration in Aries Framework JavaScript #1466

TimoGlastra opened this issue May 23, 2023 · 0 comments

Comments

@TimoGlastra
Copy link
Contributor

The JSON-LD VC integration in AFJ is suboptimal, mainly because the dependency on forks from digitalbazaar for the various vc.js related logic that doesn't work in React Native.

There is an issue open in the VC library about react native support: digitalbazaar/vc#109. The general answer is: PRs to improve RN support are welcome, official support for React Native is not on the roadmap however.

As the implementation of jsonld and jsonld signatures can be complex, using the libraries is desired, but improving the exeprience in AFJ is also desired. I think the following middle ground can achieve the best of boths worlds:

  • Remove the usage of vc.js from AFJ as the library is only a few hunderd lines of code, and with the JWT VC implementation in AFJ we already have most of it covered. This allows us to provide a more streamlined API and validation interaface that is consistent.
  • Make PRs to the rdf-canonize, http-client, jsonld-signatures and jsonld.js libraries that make it work in a react native environment without having to rely on forks.
    • There's not too much code needed to make it work in react native, and it probably mostly comes down to making things more pluggable where it depends on Node.JS or browser specific APIs.
  • Implement signature suites directly in AFJ (as we already have with Ed25519Siganture2018 and BbsBlsSignature2020).

This way the API surface we use from digitalbazaars library is minimal (just signing and verification of jsonld signatures), and we have the VC layer implemented in AFJ itself.

Removing the need for forks means we stay up to date with latest changes, while still being able to run it in vc-js

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

No branches or pull requests

1 participant