hdnode: expose getScriptData
This commit is contained in:
parent
f44e662dbe
commit
84e330df3d
1 changed files with 6 additions and 2 deletions
|
@ -148,9 +148,13 @@ HDNode.fromBase58 = function (string, networks, prefixes) {
|
||||||
return hd
|
return hd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HDNode.prototype.getScriptData = function () {
|
||||||
|
return this.prefix.scriptFactory.convert(this.keyPair)
|
||||||
|
}
|
||||||
|
|
||||||
HDNode.prototype.getAddress = function () {
|
HDNode.prototype.getAddress = function () {
|
||||||
var data = this.prefix.scriptFactory.convert(this.keyPair)
|
var scriptData = this.getScriptData()
|
||||||
return baddress.fromOutputScript(data.scriptPubKey, this.keyPair.network)
|
return baddress.fromOutputScript(scriptData.scriptPubKey, this.keyPair.network)
|
||||||
}
|
}
|
||||||
|
|
||||||
HDNode.prototype.getIdentifier = function () {
|
HDNode.prototype.getIdentifier = function () {
|
||||||
|
|
Loading…
Reference in a new issue