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() {
|
WalletKey.prototype.toJSON = function toJSON() {
|
||||||
return {
|
return {
|
||||||
network: this.network.type,
|
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,
|
wid: this.wid,
|
||||||
id: this.id,
|
id: this.id,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
account: this.account,
|
account: this.account,
|
||||||
branch: this.branch,
|
branch: this.branch,
|
||||||
index: this.index,
|
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')
|
address: this.getAddress('base58')
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user