UNPKG

jsonld-signatures-merkleproof2019

Version:

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

16 lines (15 loc) 591 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = isMockChain; const explorer_lookup_1 = require("@blockcerts/explorer-lookup"); function isMockChain(chain) { if (chain) { const chainCode = typeof chain === 'string' ? chain : chain.code; // TODO: can it be string? const isChainValid = Object.keys(explorer_lookup_1.BLOCKCHAINS).some(chainObj => chainObj === chainCode); if (!isChainValid) { return false; } return !!explorer_lookup_1.BLOCKCHAINS[chainCode].test; } return false; }