From 4ffabf05af3ab98c53293679c4ab331557a040c0 Mon Sep 17 00:00:00 2001 From: Andreas Brekken Date: Fri, 10 Jan 2014 17:16:08 +0700 Subject: [PATCH] Fix bitcoinAddress to use getPub().key.export('bytes') --- src/bip32.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bip32.js b/src/bip32.js index 2bc3079..fb4c80d 100644 --- a/src/bip32.js +++ b/src/bip32.js @@ -132,7 +132,7 @@ BIP32key.fromMasterKey = function(seed) { BIP32key.prototype.getKey = function() { return this.key } BIP32key.prototype.bitcoinAddress = function() { - return new Address(util.sha256ripe160(this.getPub().key)) + return new Address(util.sha256ripe160(this.getPub().key.export('bytes'))) } module.exports = BIP32key;