digital-covid-certificate-lib
Version:
A library to parse and verify Digital Covid Certificates (DCC)
15 lines • 542 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DccBase45 = void 0;
class DccBase45 {
constructor(certificateWithPrefix) {
this.certificateWithPrefix = certificateWithPrefix;
this.type = certificateWithPrefix.substr(0, 3);
this.base45 = this.certificateWithPrefix.substr(4);
if (this.type !== 'HC1') {
throw new Error(`Certificate Type: ${this.type} is not supported.`);
}
}
}
exports.DccBase45 = DccBase45;
//# sourceMappingURL=DccBase45.js.map