Merge pull request #1000 from braydonf/docs/save-privatekey
Docs: Include information about saving a PrivateKey that can be imported.
This commit is contained in:
commit
c240e66043
|
@ -45,17 +45,20 @@ Some functionality is implemented as a module that can be installed seperately:
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
## Create a Private Key
|
## Create and Save a Private Key
|
||||||
|
|
||||||
```javascript
|
```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
|
## Create an Address
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var privKey = new bitcore.PrivateKey();
|
var address = privateKey.toAddress();
|
||||||
var address = privKey.toAddress();
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create a Multisig Address
|
## Create a Multisig Address
|
||||||
|
|
Loading…
Reference in New Issue