|
|
@ -366,7 +366,7 @@ HDPublicKey.prototype.toString = function () { |
|
|
|
* * xpubkey: the string with the base58 representation of this extended key |
|
|
|
* * checksum: the base58 checksum of xpubkey |
|
|
|
*/ |
|
|
|
HDPublicKey.prototype.toJSON = function () { |
|
|
|
HDPublicKey.prototype.toObject = function toObject() { |
|
|
|
return { |
|
|
|
network: Network.get(BufferUtil.integerFromBuffer(this._buffers.version)).name, |
|
|
|
depth: BufferUtil.integerFromSingleByteBuffer(this._buffers.depth), |
|
|
@ -380,6 +380,10 @@ HDPublicKey.prototype.toJSON = function () { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
HDPublicKey.prototype.toJSON = function toJSON() { |
|
|
|
return JSON.stringify(this.toObject()); |
|
|
|
}; |
|
|
|
|
|
|
|
HDPublicKey.Hardened = 0x80000000; |
|
|
|
HDPublicKey.RootElementAlias = ['m', 'M']; |
|
|
|
|
|
|
|