@rsksmart/vc-json-schemas-parser
v1.0.1
Published
A parser for VC JSON Schemas compliant credentials
Downloads
235
Readme
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: '[email protected]', prefix: { en: 'Email address' } } }
*/
Supports:
- Phone
Run tests
npm test
Build
npm run build
Contribute
- Understand
vc-json-schemas
- Follow the collaboration guidelines