A parser for VC JSON Schemas compliant credentials
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
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: '[email protected]', prefix: { en: 'Email address' } } }
*/
Supports:
- Phone
npm test
npm run build
- Understand
vc-json-schemas
- Follow the collaboration guidelines