HDKeys: Add jsdocs to hdprivatekey
This commit is contained in:
parent
28a1eae0be
commit
0ff4c9a922
@ -480,14 +480,30 @@ HDPrivateKey.prototype.toObject = function toObject() {
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a JSON representation of the HDPrivateKey
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
HDPrivateKey.prototype.toJSON = function toJSON() {
|
||||
return JSON.stringify(this.toObject());
|
||||
};
|
||||
|
||||
/**
|
||||
* Build a HDPrivateKey from a buffer
|
||||
*
|
||||
* @param {Buffer} arg
|
||||
* @return {HDPrivateKey}
|
||||
*/
|
||||
HDPrivateKey.fromBuffer = function(arg) {
|
||||
return new HDPrivateKey(arg);
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns a buffer representation of the HDPrivateKey
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
HDPrivateKey.prototype.toBuffer = function() {
|
||||
return this._buffers.xprivkey;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user