jesse-vc-json-schemas-parser

1.0.0 • Public • Published

logo

vc-json-schemas-parser

A parser for VC JSON Schemas compliant credentials

npm

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

This library can be used to parse credentials that are compatible with Verifiable Credentials JSON Schemas

Quick start

To parse a credential that complies with a given schema

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' } } }
*/

Run tests

npm test

Build

npm run build

Contribute

Readme

Keywords

Package Sidebar

Install

npm i jesse-vc-json-schemas-parser

Weekly Downloads

4

Version

1.0.0

License

ISC

Unpacked Size

14 kB

Total Files

9

Last publish

Collaborators

  • jessgusclark