walletkey: toJSON changes.
This commit is contained in:
parent
c94884a188
commit
1a44f50ac7
@ -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')
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user