2.3.8 • Published 2 years ago
@growr/vc-json-schemas-parser v2.3.8
npm i did-jwt @rsksmart/vc-json-schemas-parserThis 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' } } }
*/Supports:
- Phone
Run tests
npm testBuild
npm run buildContribute
- Understand
vc-json-schemas - Follow the collaboration guidelines