UNPKG

jsonld-signatures-merkleproof2019

Version:

A jsonld signature implementation to support MerkleProof2019 verification in Verifiable Credential context

15 lines (14 loc) 614 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = ensureHashesEqual; const VerifierError_1 = __importDefault(require("../models/VerifierError")); const getText_1 = __importDefault(require("../helpers/getText")); function ensureHashesEqual(actual, expected) { if (actual !== expected) { throw new VerifierError_1.default('compareHashes', (0, getText_1.default)('errors', 'ensureHashesEqual')); } return true; }