You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
var $ = require('preconditions').singleton();
|
|
|
|
var _ = require('lodash');
|
|
|
|
|
|
|
|
var BitcoinUtils = require('../bitcoinutils')
|
|
|
|
|
|
|
|
function Verifier(opts) {};
|
|
|
|
|
|
|
|
Verifier.checkAddress = function(data, address) {
|
|
|
|
var local = BitcoinUtils.deriveAddress(data.publicKeyRing, address.path, data.m, data.network);
|
|
|
|
return (local.address == address.address && JSON.stringify(local.publicKeys) == JSON.stringify(address.publicKeys));
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Verifier;
|