Has anyone tried Cert Verifier JS with options to pass Explorer API implementation as an argument. I can see the documentation however when I tried to pass implementation it gives an error. Below is the code. and error I am getting is “One or more of your custom explorer APIs does not have a parsing function”
var myOptions = {
explorerAPIs:
[
{
serviceName: "BlockCypherTest",
parsingFunction: function (e) {
if (e.confirmations < mr) throw new Yn(Gt, mn("errors", "parseBlockCypherResponse"));
const t = Qf(e.received), r = e.outputs, n = r[r.length - 1], i = e.inputs[0].addresses[0];
return { remoteHash: oN(n.script, hr.bitcoin.prefixes), issuingAddress: i, time: t, revokedAddresses: r.filter(e => !!e.spent_by).map(e => e.addresses[0]) }
},
priority: 1,
serviceURL:
{
main: "https://api.blockcypher.com/v1/btc/main/txs/{transaction_id}?limit=500",
test: "https://api.blockcypher.com/v1/btc/test3/txs/{transaction_id}?limit=500"
}
}
]
};
const certificate = new Verifier.Certificate(this.certJSON, myOptions);