# Javascript/Typescript vc\_utils package

**URL:** <https://forum.dfinity.org/t/javascript-typescript-vc-utils-package/34525>\
**Category:** CDK\
**Created:** [August 27, 2024, 6:06pm UTC](https://forum.dfinity.org/t/javascript-typescript-vc-utils-package/34525 "2024-08-27T18:06:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonath-z](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jonath-z/32/19753_2.png) [@Jonath-z](https://forum.dfinity.org/u/Jonath-z)\
**Post date:** [August 27, 2024, 6:06pm UTC](https://forum.dfinity.org/t/javascript-typescript-vc-utils-package/34525/1 "2024-08-27T18:06:13Z")

</div>

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

> <https://github.com/dfinity/internet-identity/blob/main/src/vc_util/src/lib.rs>

---

<div class="post-metadata">

**Author:** ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)\
**Post date:** [August 28, 2024, 3:22pm UTC](https://forum.dfinity.org/t/javascript-typescript-vc-utils-package/34525/2 "2024-08-28T15:22:51Z")

</div>

There is a JS/TS wrapper for the `vc_util` Rust crate: [internet-identity/src/vc\_util\_js at main · dfinity/internet-identity · GitHub](https://github.com/dfinity/internet-identity/tree/main/src/vc_util_js).

---

<div class="post-metadata">

**Author:** ![Jonath-z](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jonath-z/32/19753_2.png) [@Jonath-z](https://forum.dfinity.org/u/Jonath-z)\
**Post date:** [August 28, 2024, 8:28pm UTC](https://forum.dfinity.org/t/javascript-typescript-vc-utils-package/34525/3 "2024-08-28T20:28:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)\
**Post date:** [August 28, 2024, 9:58pm UTC](https://forum.dfinity.org/t/javascript-typescript-vc-utils-package/34525/4 "2024-08-28T21:58:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![frederikrothenberger](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/frederikrothenberger/32/3826_2.png) [@frederikrothenberger](https://forum.dfinity.org/u/frederikrothenberger)\
**Post date:** [August 29, 2024, 6:27am UTC](https://forum.dfinity.org/t/javascript-typescript-vc-utils-package/34525/5 "2024-08-29T06:27:31Z")

</div>

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](https://github.com/dfinity/verifiable-credentials-sdk/)

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.

---

<div class="post-metadata">

**Author:** ![Jonath-z](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jonath-z/32/19753_2.png) [@Jonath-z](https://forum.dfinity.org/u/Jonath-z)\
**Post date:** [August 29, 2024, 9:29am UTC](https://forum.dfinity.org/t/javascript-typescript-vc-utils-package/34525/6 "2024-08-29T09:29:00Z")

</div>

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](https://github.com/dfinity/verifiable-credentials-sdk/blob/main/rust-packages/ic-verifiable-credentials/src/lib.rs) 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`
