Docs: Include information about saving a PrivateKey

This commit is contained in:
Braydon Fuller 2015-01-23 20:14:52 -05:00
parent 32b257d74c
commit 818d9cb331
1 changed files with 7 additions and 4 deletions

View File

@ -45,17 +45,20 @@ Some functionality is implemented as a module that can be installed seperately:
# Examples
## Create a Private Key
## Create and Save a Private Key
```javascript
var privKey = new bitcore.PrivateKey();
var privateKey = new bitcore.PrivateKey();
var exported = privateKey.toWIF();
// e.g. L3T1s1TYP9oyhHpXgkyLoJFGniEgkv2Jhi138d7R2yJ9F4QdDU2m
var imported = bitcore.PrivateKey.fromWIF(exported);
```
## Create an Address
```javascript
var privKey = new bitcore.PrivateKey();
var address = privKey.toAddress();
var address = privateKey.toAddress();
```
## Create a Multisig Address