Merge pull request #16 from smithb1994/patch-1
You need to have "bitcore" before "PrivateKey.fromWIF"
This commit is contained in:
commit
3f1e666fbe
|
@ -23,7 +23,10 @@ bower install bitcore-message
|
||||||
To sign a message:
|
To sign a message:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var privateKey = PrivateKey.fromWIF('cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4');
|
var bitcore = require('bitcore');
|
||||||
|
var Message = require('bitcore-message');
|
||||||
|
|
||||||
|
var privateKey = bitcore.PrivateKey.fromWIF('cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4');
|
||||||
var signature = Message('hello, world').sign(privateKey);
|
var signature = Message('hello, world').sign(privateKey);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue