Merge pull request #366 from Sjors/hdnode

Allow constructing HDNode from an ECPubKey.
This commit is contained in:
Daniel Cousens 2015-02-24 12:15:47 +11:00
commit 49050f9d26

View file

@ -43,6 +43,8 @@ function HDNode(K, chainCode, network) {
if (K instanceof BigInteger) {
this.privKey = new ECKey(K, true)
this.pubKey = this.privKey.pub
} else if (K instanceof ECPubKey) {
this.pubKey = K
} else {
this.pubKey = new ECPubKey(K, true)
}