From 5b0bedee6c1c710dcbd398470da12bf56b1aa6aa Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Thu, 11 Dec 2014 13:29:21 -0500 Subject: [PATCH] PrivateKey: Fixed documentation --- docs/PrivateKey.md | 7 +++---- lib/privatekey.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/PrivateKey.md b/docs/PrivateKey.md index 691177190..bbf51b390 100644 --- a/docs/PrivateKey.md +++ b/docs/PrivateKey.md @@ -21,7 +21,7 @@ To export and import a private key, you can do the following: var exported = privateKey.toWIF(); // instantiate from the exported (and saved) private key -var imported = PrivateKey.fromWIF(exported); +var imported = PrivateKey.fromWIF('L3T1s1TYP9oyhHpXgkyLoJFGniEgkv2Jhi138d7R2yJ9F4QdDU2m'); ``` @@ -49,9 +49,8 @@ if (PrivateKey.isValid(input){ // get the specific validation error that can occurred var error = PrivateKey.getValidationError(input, Networks.livenet); - if (error) { - // handle the error - } +if (error) { + // handle the error } ``` diff --git a/lib/privatekey.js b/lib/privatekey.js index 0ed943857..e2a95a203 100644 --- a/lib/privatekey.js +++ b/lib/privatekey.js @@ -103,7 +103,7 @@ var PrivateKey = function PrivateKey(data, network, compressed) { /** * Internal function to get a random BN * - * @returns {BN} An object with keys: bn, network and compressed + * @returns {BN} A new randomly generated BN * @private */ PrivateKey._getRandomBN = function(){