0.0.5 • Published 3 years ago

@pathcheck/universal-verifier-sdk v0.0.5

Weekly downloads
-
License
GPL-3.0-only
Repository
-
Last release
3 years ago

Universal Verifier SDK for QRCode-based Verifiable Credentials

SDK to verify all Verifiable QR codes out there.

Supported Platforms

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! :)