UNPKG

jsonld-signatures-merkleproof2019

Version:

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

14 lines (11 loc) 361 B
import VerifierError from '../models/VerifierError'; import getText from '../helpers/getText'; export default function ensureMerkleRootEqual (merkleRoot: string, remoteHash: string): boolean { if (merkleRoot !== remoteHash) { throw new VerifierError( 'checkMerkleRoot', getText('errors', 'ensureMerkleRootEqual') ); } return true; }