Javascript/Typescript vc_utils package

Is is possible to have vc_utils as JS/TS lib? The one for only verifying the age is not really usefull

1 Like

There is a JS/TS wrapper for the vc_util Rust crate: internet-identity/src/vc_util_js at main · dfinity/internet-identity · GitHub.

I saw this one; it’s only verify for age as mentioned in the readme

1 Like

Ah, yes, I can check if there is a timeline to add more functionality.

Hi @Jonath-z

First of all, let me say that the whole vc_util is planned to be replaced in the future. We have moved the code to this repository: GitHub - dfinity/verifiable-credentials-sdk: Repository containing a set of libraries to manage the verifiable credentials in Internet Computer

Now, the current JS/TS libraries that we have do not allow verification of generic VCs. However, building a wrapper from the rust library is pretty straight forward. For example, the entire vc_util_js is just ~42 lines of code.

Of course, it would be much nicer to have a published NPM package, however there are currently no concrete plans to publish such a library from the DFINITY side. I’ll bring it up internally, whether some priorities should be shifted.

2 Likes

Thanks @frederikrothenberger

I think the vc_utils here verifiable-credentials-sdk/rust-packages/ic-verifiable-credentials/src/lib.rs at main · dfinity/verifiable-credentials-sdk · GitHub is generic already and validates the JWS, the vc_utils_js validate only the age and it’s using one of the functions from vc_utils