UNPKG

covid-certificate

Version:

Parse and verify a european digital covid certificate (dcc)

73 lines (72 loc) 1.62 kB
/** * Electronic Health Certificate Specification * */ export declare type HealthCertificate = { kid: string; alg: Algorithm; issuer: string; expirationDate: Date; issuedAt: Date; dateOfBirth: string; name: Name; vaccinations: Array<VaccinationCertificate>; tests: Array<TestCertificate>; recovered: Array<RecoveredCertificate>; version: string; }; export declare type Name = { surname: string; givenName?: string; }; export declare type VaccinationCertificate = { target: Target; vaccineType: VaccineType; medicinalProduct: string; manufacturer: string; doseNumber: number; totalDoses: number; date: Date; country: string; issuer: string; id: string; }; export declare enum TestResult { Detected = "DETECTED", Undetected = "UNDETECTED" } export declare type TestCertificate = { target: Target; testType: string; name: string; manufacturer: string; date: Date; result: TestResult; testingCentre: string; country: string; issuer: string; id: string; }; export declare type RecoveredCertificate = { id: string; target: Target; firstDetectedDate: Date; countryOfTest: string; issuer: string; dateValidFrom: Date; dateValidUntil: Date; }; export declare enum Target { "COVID-19" = "COVID-19" } export declare enum VaccineType { "MRNA" = "MRNA", "ANTIGEN" = " ANTIGEN", "GENERAL" = "GENERAL" } export declare enum Algorithm { /** * Elliptic curve digital signing algorithm with sha256 hash */ "ECDSA-256" = "ECDSA-256" }