# @growr/vc-json-schemas-parser

> A parser for VC JSON Schemas compliant credentials

Latest version **2.3.8** (published 2023-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @growr/vc-json-schemas-parser
pnpm add @growr/vc-json-schemas-parser
yarn add @growr/vc-json-schemas-parser
bun add @growr/vc-json-schemas-parser
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.3.8 |
| Published | 2023-11-18 |
| First published | 2022-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 34.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | madgrowr |
| Keywords | did, vc, json, json-schema |

## Links

- npm: https://www.npmjs.com/package/@growr/vc-json-schemas-parser
- Repository: https://github.com/growr-xyz/vc-json-schemas-parser
- Homepage: https://github.com/growr-xyz/vc-json-schemas-parser#readme
- Issues: https://github.com/growr-xyz/vc-json-schemas-parser/issues
- npm.io page: https://npm.io/package/@growr/vc-json-schemas-parser

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.3.8 (latest) — 2023-11-18
- 2.3.7 — 2023-06-15
- 2.3.6 — 2023-06-11
- 2.3.5 — 2023-05-16
- 2.3.4 — 2023-05-16
- 2.3.3 — 2023-05-10
- 2.3.2 — 2022-12-15
- 2.3.1 — 2022-11-03
- 2.3.0 — 2022-11-02
- 2.2.0 — 2022-10-29
- 2.1.0 — 2022-07-28
- 2.0.0 — 2022-05-02

## README

<p align="middle">
  <img src="https://www.rifos.org/assets/img/logo.svg" alt="logo" height="100" >
</p>
<h3 align="middle"><code>vc-json-schemas-parser</code></h3>
<p align="middle">
  A parser for <a href="https://github.com/rsksmart/vc-json-schemas">VC JSON Schemas</a> compliant credentials
</p>
<p align="middle">
  <a href="https://github.com/rsksmart/vc-json-schemas-parser/actions?query=workflow%3Atest">
    <img src="https://github.com/rsksmart/vc-json-schemas-parser/workflows/test/badge.svg" />
  </a>
  <a href="https://badge.fury.io/js/%40rsksmart%2Fvc-json-schemas-parser">
    <img src="https://badge.fury.io/js/%40rsksmart%2Fvc-json-schemas-parser.svg" alt="npm" />
  </a>
</p>

```
npm i did-jwt @rsksmart/vc-json-schemas-parser
```

This library can be used to parse credentials that are compatible with <a href="https://github.com/rsksmart/vc-json-schemas">Verifiable Credentials JSON Schemas</a>

## Quick start

To parse a credential that complies with a given schema

```ts
import { decodeJWT } from 'did-jwt'
import { parseVerifiableCredential } from '@rsksmart/vc-json-schemas-parser'

const emailVC = '...'
const decodedEmailVC = decodeJWT(emailVC)
const parsedEmailVC = parseVerifiableCredential('Email', decodedEmailVC.payload)
/*
{ Email:
       { text: 'ilan@iovlabs.org', prefix: { en: 'Email address' } } }
*/
```

Supports:
- Email
- Phone

## Run tests

```
npm test
```

## Build

```
npm run build
```

## Contribute

- Understand [`vc-json-schemas`](https://github.com/rsksmart/vc-json-schemas)
- Follow the [collaboration guidelines](https://developers.rsk.co/rif/identity/contribute/)

---
_Source: https://npm.io/package/@growr/vc-json-schemas-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
