Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
k06a authored Mar 12, 2018
1 parent bb97b39 commit 495f250
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/privatekey.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,19 +299,6 @@ 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.toWIF = function() {
if (this.compressed) {
return toCompressedWIF();
} else {
return toUncompressedWIF();
}
};

/**
* Will output the PrivateKey to a WIF string leading to compressed Public Key form
*
Expand Down Expand Up @@ -343,6 +330,19 @@ PrivateKey.prototype.toUncompressedWIF = function() {
return Base58Check.encode(buf);
};

/**
* Will output the PrivateKey to a WIF string
*
* @returns {string} A WIP representation of the private key
*/
PrivateKey.prototype.toWIF = function() {
if (this.compressed) {
return this.toCompressedWIF();
} else {
return this.toUncompressedWIF();
}
};

/**
* Will return the private key as a BN instance
*
Expand Down

0 comments on commit 495f250

Please sign in to comment.