|
|
@ -283,12 +283,21 @@ PrivateKey.isValid = function(data, network){ |
|
|
|
return !PrivateKey.getValidationError(data, network); |
|
|
|
}; |
|
|
|
|
|
|
|
/** |
|
|
|
* Will output the PublicKey encoded as hex string |
|
|
|
* |
|
|
|
* @returns {String} |
|
|
|
*/ |
|
|
|
PrivateKey.prototype.toString = function() { |
|
|
|
return this.toBuffer().toString('hex'); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Will output the PrivateKey to a WIF string |
|
|
|
* |
|
|
|
* @returns {String} A WIP representation of the private key |
|
|
|
*/ |
|
|
|
PrivateKey.prototype.toString = PrivateKey.prototype.toWIF = function() { |
|
|
|
PrivateKey.prototype.toWIF = function() { |
|
|
|
var network = this.network; |
|
|
|
var compressed = this.compressed; |
|
|
|
|
|
|
|