UNPKG

jsonld-signatures-merkleproof2019

Version:

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

11 lines (10 loc) 318 B
import { startsWith } from './string'; export function stripHashPrefix(remoteHash, prefixes) { for (let i = 0; i < prefixes.length; i++) { const prefix = prefixes[i]; if (startsWith(remoteHash, prefix)) { return remoteHash.slice(prefix.length); } } return remoteHash; }