Skip to content

Commit

Permalink
Merge pull request #1000 from braydonf/docs/save-privatekey
Browse files Browse the repository at this point in the history
Docs: Include information about saving a PrivateKey that can be imported.
  • Loading branch information
eordano committed Jan 27, 2015
2 parents 32b257d + 818d9cb commit c240e66
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c240e66

Please sign in to comment.