Package Exports
- @growr/vc-json-schemas-parser
- @growr/vc-json-schemas-parser/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@growr/vc-json-schemas-parser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
vc-json-schemas-parser
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
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 test
Build
npm run build
Contribute
- Understand
vc-json-schemas
- Follow the collaboration guidelines