From 98fed176a8a6eba556887b1ffa8aaf0b0cde4ab4 Mon Sep 17 00:00:00 2001 From: smithb1994 Date: Tue, 14 Apr 2015 18:27:12 -0700 Subject: [PATCH] You need to have "bitcore" before "PrivateKey.fromWIF" Also, I added correct library includes --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8967af4..246e080 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,10 @@ bower install bitcore-message To sign a message: ```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); ```