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.

14 lines
448 B

10 years ago
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));
10 years ago
};
module.exports = Verifier;