PrivateKey: Fixed documentation
This commit is contained in:
parent
d4d3d4ab4a
commit
5b0bedee6c
|
@ -21,7 +21,7 @@ To export and import a private key, you can do the following:
|
||||||
var exported = privateKey.toWIF();
|
var exported = privateKey.toWIF();
|
||||||
|
|
||||||
// instantiate from the exported (and saved) private key
|
// instantiate from the exported (and saved) private key
|
||||||
var imported = PrivateKey.fromWIF(exported);
|
var imported = PrivateKey.fromWIF('L3T1s1TYP9oyhHpXgkyLoJFGniEgkv2Jhi138d7R2yJ9F4QdDU2m');
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -52,6 +52,5 @@ var error = PrivateKey.getValidationError(input, Networks.livenet);
|
||||||
if (error) {
|
if (error) {
|
||||||
// handle the error
|
// handle the error
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -103,7 +103,7 @@ var PrivateKey = function PrivateKey(data, network, compressed) {
|
||||||
/**
|
/**
|
||||||
* Internal function to get a random BN
|
* 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
|
* @private
|
||||||
*/
|
*/
|
||||||
PrivateKey._getRandomBN = function(){
|
PrivateKey._getRandomBN = function(){
|
||||||
|
|
Loading…
Reference in New Issue