@pathcheck/universal-verifier-sdk
v0.0.5
Published
Verifiable QR SDK for all Verifiable QR codes
Downloads
5
Readme
Universal Verifier SDK for QRCode-based Verifiable Credentials
SDK to verify all Verifiable QR codes out there.
Supported Platforms
- [x] CRED: PathCheck's PaperCreds
- [x] DIVOC: COWIN's Credentials in India
- [x] HC1: Europe's Digital Covid Certificates by the eHealth Network
- [x] SHC: SmartHealth Cards
- [x] JXT: A BBS+ W3C Verifiable Credentials minimized with JSON-XT
- [x] CBLD: A CBOR-LD version of W3C Verifiable Credentials.
- [x] VDS: ICAO's Visible Digital Seals
- [ ] Excelsior: NYC's COVID pass
Install
npm install @pathcheck/universal-verifier-sdk --save
Usage
Import the library
const { verifyQRCode } = require('@pathcheck/universal-verifier-sdk');
Read a Verifiable QR
const qr = 'CRED:STATUS:2:GBCQEIIAWXECNVIUJQXPDV44EW3UHJIGNBGK4ITZAKX37MJNXG6IQZDXS7ZAEIB3ROQ2EWIRYH66FGPJOWBWP3MK6YTYVGJE332CXM6V2YQOBLHECU:1A9.PCF.PW:1//JD82'
Check if it's valid and get the unpacked version of the QR with:
const result = await verifyQRCode(qr);
Result will be on the format of the package type before signature depending on the QR format. Package types include:
- Array of elements
- JSON Web Token
- CBOR Web Token
- JSON-LD documents
Development
npm install
Test
npm test
Contributing
Issues and pull requests are very welcome! :)