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
|
||||
}
|
||||
|
||||
HDNode.prototype.getScriptData = function () {
|
||||
return this.prefix.scriptFactory.convert(this.keyPair)
|
||||
}
|
||||
|
||||
HDNode.prototype.getAddress = function () {
|
||||
var data = this.prefix.scriptFactory.convert(this.keyPair)
|
||||
return baddress.fromOutputScript(data.scriptPubKey, this.keyPair.network)
|
||||
var scriptData = this.getScriptData()
|
||||
return baddress.fromOutputScript(scriptData.scriptPubKey, this.keyPair.network)
|
||||
}
|
||||
|
||||
HDNode.prototype.getIdentifier = function () {
|
||||
|
|
Loading…
Reference in a new issue