UNPKG

dcc-decoder

Version:

<img alttext="COVID Green Logo" src="https://raw.githubusercontent.com/lfph/artwork/master/projects/covidgreen/stacked/color/covidgreen-stacked-color.png" width="300" />

99 lines (98 loc) 2.41 kB
export declare type RecoveryGroup = { /** Disease or agent from which the holder has recovered */ tg: string; /** Date of the holder’s first positive NAAT test result */ fr: string; /** Member State or third country in which test was carried out */ co: string; /** Certificate issuer */ is: string; /** Certificate valid from */ df: string; /** Certificate valid until */ du: string; /** Unique certificate identifier */ ci: string; }; export declare type TestGroup = { /** Disease or Agent Targeted */ tg: string; /** The type of test */ tt: string; /** Test name (nucleic acid amplification tests only) */ nm: string; /** Test device identifier (rapid antigen tests only) */ ma: string; /** Date and time of the test sample collection */ sc: string; /** Result of the test */ tr: string; /** Testing centre or facility */ tc: string; /** Member State or third country in which the test was carried out */ co: string; /** Certificate issuer */ is: string; /** Unique certificate identifier */ ci: string; }; export declare type VaccinationGroup = { /** Disease or Agent Targeted */ tg: string; /** Vaccine or Prophylaxis */ vp: string; /** Vaccine Medicinal Product */ mp: string; /** Marketing Authorization Holder */ ma: string; /** Dose Number */ dn: string; /** Total Series of Doses */ sd: string; /** Date of Vaccination */ dt: string; /** Country of Vaccination */ co: string; /** Certificate Issuer */ is: string; /** Unique Certificate Identifier */ ci: string; }; export declare type CertificateContent = { ver: string; nam: { fn: string; gn: string; fnt: string; gnt: string; }; dob: string; v?: VaccinationGroup[]; t?: TestGroup[]; r?: RecoveryGroup[]; }; export declare enum CBOR_STRUCTURE { PROTECTED_HEADER = 0, UNPROTECTED_HEADER = 1, PAYLOAD = 2, SIGNATURE = 3 } export declare enum ALGOS { ECDSA_256 = -7, RSA_PSS_256 = -37 } export declare enum HEADER_KEYS { ALGORITHM = 1, KID = 4 } export declare enum PAYLOAD_KEYS { ISSUER = 1, ISSUED_AT = 6, EXPIRES_AT = 4, CONTENT = -260 } export declare enum CERT_TYPE { VACCINE = "v", TEST = "t", RECOVERY = "r" }