UNPKG

oca_package

Version:

The wrapper of OCA bundle to generate OCA Package at ADC

16 lines (15 loc) 697 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VerifyOcaPackage = VerifyOcaPackage; const saidify_1 = require("saidify"); /** * Verifies the OCA package against a digest. * @param oca_package - The OCA package to verify. * @param digest - The digest to verify against. * @returns {boolean} - Returns true if the verification is successful, otherwise false. */ function VerifyOcaPackage(oca_package, digest) { const label = 'd'; // prefixed is set to true this avoid d = '' to be considered as a valid self-addressing data return (0, saidify_1.verify)(oca_package, digest, label, saidify_1.SAIDDex.Blake3_256, saidify_1.Serials.JSON, true); }