Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 2.79 KB

README.md

File metadata and controls

46 lines (29 loc) · 2.79 KB

NZCP Rust   Latest Version Documentation

An implementation of NZ COVID Pass verification, New Zealand's proof of COVID-19 vaccination solution, written in Rust 🦀

We also have a JavaScript implementation available.

Usage

Usage is very straight forward, simply call verify_pass_uri with the scanned QR Code URI. If the given pass is valid the function will return Ok with the pass details, otherwise it will return Err with details of the verification issue.

Add the dependency to your Cargo.toml:

[dependencies]
nzcp = "1.0.2"
use nzcp::{verify_pass_uri, PublicCovidPass};

let barcode = "NZCP:/1/2KCEVIQEIVVWK6JNGEASNICZAEP2KALYDZSGSZB2O5SWEOTOPJRXALTDN53GSZBRHEXGQZLBNR2GQLTOPICRUYMBTIFAIGTUKBAAUYTWMOSGQQDDN5XHIZLYOSBHQJTIOR2HA4Z2F4XXO53XFZ3TGLTPOJTS6MRQGE4C6Y3SMVSGK3TUNFQWY4ZPOYYXQKTIOR2HA4Z2F4XW46TDOAXGG33WNFSDCOJONBSWC3DUNAXG46RPMNXW45DFPB2HGL3WGFTXMZLSONUW63TFGEXDALRQMR2HS4DFQJ2FMZLSNFTGSYLCNRSUG4TFMRSW45DJMFWG6UDVMJWGSY2DN53GSZCQMFZXG4LDOJSWIZLOORUWC3CTOVRGUZLDOSRWSZ3JOZSW4TTBNVSWISTBMNVWUZTBNVUWY6KOMFWWKZ2TOBQXE4TPO5RWI33CNIYTSNRQFUYDILJRGYDVAYFE6VGU4MCDGK7DHLLYWHVPUS2YIDJOA6Y524TD3AZRM263WTY2BE4DPKIF27WKF3UDNNVSVWRDYIYVJ65IRJJJ6Z25M2DO4YZLBHWFQGVQR5ZLIWEQJOZTS3IQ7JTNCFDX";
let pass: PublicCovidPass = verify_pass_uri(barcode).await?;

Pass Types

The library is written in a manner which allows easy addition to the types of passes that can be verified, but to date only the My Vaccine Pass spec has been published.

Pass Name Struct
My Vaccine Pass PublicCovidPass

Usage Outside of Rust

There are plans to provide cross platform libraries using this implementation for other languages, such as web browser WASM and React Native. If you'd like to create your own please do!

Support

See something that can be improved? Report an Issue or contact us to report a security concern.

Want to help us build a better library? We welcome contributions via pull requests and welcome you to our wider Vaxx.nz community on Discord: Join our Discord community.