UNPKG

jsonld-signatures-merkleproof2019

Version:

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

14 lines (13 loc) 444 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.stripHashPrefix = stripHashPrefix; const string_1 = require("./string"); function stripHashPrefix(remoteHash, prefixes) { for (let i = 0; i < prefixes.length; i++) { const prefix = prefixes[i]; if ((0, string_1.startsWith)(remoteHash, prefix)) { return remoteHash.slice(prefix.length); } } return remoteHash; }