Browse Source

Update 1.5.x hdnode.js

Informed the pubkey when building an HDNode from an ECKey (otherwise, derivation would fail on "this.pubKey.toBuffer()")
Joel Santirso 10 years ago
parent
commit
fc9d2ff2f2
  1. 1
      src/hdnode.js

1
src/hdnode.js

@ -44,6 +44,7 @@ function HDNode (K, chainCode, network) {
} else if (K instanceof ECKey) { } else if (K instanceof ECKey) {
assert(K.pub.compressed, 'ECKey must be compressed') assert(K.pub.compressed, 'ECKey must be compressed')
this.privKey = K this.privKey = K
this.pubKey = K.pub
} else if (K instanceof ECPubKey) { } else if (K instanceof ECPubKey) {
assert(K.compressed, 'ECPubKey must be compressed') assert(K.compressed, 'ECPubKey must be compressed')
this.pubKey = K this.pubKey = K

Loading…
Cancel
Save