walletkey: toJSON changes.

This commit is contained in:
Christopher Jeffrey 2016-11-02 17:53:34 -07:00
parent c94884a188
commit 1a44f50ac7
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -121,18 +121,18 @@ WalletKey.fromSecret = function fromSecret(data) {
WalletKey.prototype.toJSON = function toJSON() {
return {
network: this.network.type,
witness: this.witness,
nested: this.nested,
publicKey: this.publicKey.toString('hex'),
script: this.script ? this.script.toRaw().toString('hex') : null,
program: this.program ? this.program.toRaw().toString('hex') : null,
type: constants.scriptTypesByVal[this.type].toLowerCase(),
wid: this.wid,
id: this.id,
name: this.name,
account: this.account,
branch: this.branch,
index: this.index,
witness: this.witness,
nested: this.nested,
publicKey: this.publicKey.toString('hex'),
script: this.script ? this.script.toRaw().toString('hex') : null,
program: this.program ? this.program.toRaw().toString('hex') : null,
type: constants.scriptTypesByVal[this.type].toLowerCase(),
address: this.getAddress('base58')
};
};