UNPKG

jsonld-signatures-merkleproof2019

Version:

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

9 lines (8 loc) 331 B
import VerifierError from '../models/VerifierError.js'; import getText from '../helpers/getText.js'; export default function ensureMerkleRootEqual(merkleRoot, remoteHash) { if (merkleRoot !== remoteHash) { throw new VerifierError('checkMerkleRoot', getText('errors', 'ensureMerkleRootEqual')); } return true; }