@francocorrea/cov-vaccine-uy-validate
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@francocorrea/cov-vaccine-uy-validate

A library to validate the COVID-19 vaccine certificate issued by the Uruguayan government.

Compatibility

Should work in Node, React Native and Web (through WebCrypto). Only React Native has been tested.

Usage

import { verify } from '@francocorrea/cov-vaccine-uy-validate';

const data = 'HC1:(...)' // Data obtained from scanning the QR code

const results = await verify(data);
/*
    {
      "valid": true, // if false, the digital signature verification has failed
      "data": {
        "Date": "2021-08-01",
        "Name": "Nombres Apellidos",
        "CountryCode": "858",
        "DocumentType": "CI",
        "DocumentNumber": "11111111",
        "VaccinationInfo": {
            "Doses": [
                {
                    "Number": 2,
                    "Date": "2021-07-01",
                    "Vaccine": "PFIZER"
                },
                {
                    "Number": 2,
                    "Date": "2021-06-01",
                    "Vaccine": "PFIZER"
                },
            ] 
        }
    }
 */

Readme

Keywords

none

Package Sidebar

Install

npm i @francocorrea/cov-vaccine-uy-validate

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

222 kB

Total Files

26

Last publish

Collaborators

  • francocorrea