JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q15397F
  • License MIT

A parser for VC JSON Schemas compliant credentials

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

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

Supports:

  • Email
  • Phone

Run tests

npm test

Build

npm run build

Contribute