This repository was archived by the owner on Apr 3, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -299,19 +299,6 @@ PrivateKey.prototype.toString = function() {
299299 return this . toBuffer ( ) . toString ( 'hex' ) ;
300300} ;
301301
302- /**
303- * Will output the PrivateKey to a WIF string
304- *
305- * @returns {string } A WIP representation of the private key
306- */
307- PrivateKey . prototype . toWIF = function ( ) {
308- if ( this . compressed ) {
309- return toCompressedWIF ( ) ;
310- } else {
311- return toUncompressedWIF ( ) ;
312- }
313- } ;
314-
315302/**
316303 * Will output the PrivateKey to a WIF string leading to compressed Public Key form
317304 *
@@ -343,6 +330,19 @@ PrivateKey.prototype.toUncompressedWIF = function() {
343330 return Base58Check . encode ( buf ) ;
344331} ;
345332
333+ /**
334+ * Will output the PrivateKey to a WIF string
335+ *
336+ * @returns {string } A WIP representation of the private key
337+ */
338+ PrivateKey . prototype . toWIF = function ( ) {
339+ if ( this . compressed ) {
340+ return this . toCompressedWIF ( ) ;
341+ } else {
342+ return this . toUncompressedWIF ( ) ;
343+ }
344+ } ;
345+
346346/**
347347 * Will return the private key as a BN instance
348348 *
You can’t perform that action at this time.
0 commit comments