tests: add HDNode fromSeed throwing tests

This commit is contained in:
Daniel Cousens 2015-09-12 15:10:44 +10:00
parent 5c3d3b61e6
commit 888393fa8f
2 changed files with 24 additions and 4 deletions

View file

@ -124,6 +124,10 @@ HDNode.fromBase58 = function (string, networks) {
return hd
}
HDNode.prototype.getAddress = function () {
return this.keyPair.getAddress()
}
HDNode.prototype.getIdentifier = function () {
return bcrypto.hash160(this.keyPair.getPublicKeyBuffer())
}
@ -132,10 +136,6 @@ HDNode.prototype.getFingerprint = function () {
return this.getIdentifier().slice(0, 4)
}
HDNode.prototype.getAddress = function () {
return this.keyPair.getAddress()
}
HDNode.prototype.neutered = function () {
var neuteredKeyPair = new ECPair(null, this.keyPair.Q, {
network: this.keyPair.network