diff --git a/README.md b/README.md index 17ec9fe..22b1e99 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,22 @@ -bitcore message -# Bitcoin Message Verification and Signing for Bitcore - +# Bitcore Message [![NPM Package](https://img.shields.io/npm/v/bitcore-message.svg?style=flat-square)](https://www.npmjs.org/package/bitcore-message) [![Build Status](https://img.shields.io/travis/bitpay/bitcore-message.svg?branch=master&style=flat-square)](https://travis-ci.org/bitpay/bitcore-message) [![Coverage Status](https://img.shields.io/coveralls/bitpay/bitcore-message.svg?style=flat-square)](https://coveralls.io/r/bitpay/bitcore-message?branch=master) -bitcore-message adds support for verifying and signing bitcoin messages in [Node.js](http://nodejs.org/) and web browsers. +Bitcoin message verification and signing for bitcore in [Node.js](http://nodejs.org/) and web browsers. See [the main bitcore repo](https://github.com/bitpay/bitcore) for more information. ## Getting Started ```sh +npm install bitcore-lib npm install bitcore-message ``` ```sh +bower install bitcore-lib bower install bitcore-message ``` diff --git a/docs/index.md b/docs/index.md index dfd4d6c..12c9ff8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -9,12 +9,14 @@ Message Verification and Signing is implemented as a separate module and you mus For node projects: ```bash +npm install bitcore-lib --save npm install bitcore-message --save ``` For client-side projects: ```bash +bower install bitcore-lib --save bower install bitcore-message --save ``` @@ -22,7 +24,9 @@ bower install bitcore-message --save To sign a message: ```javascript -var privateKey = PrivateKey.fromWIF('cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4'); +var bitcore = require('bitcore-lib'); +var Message = require('bitcore-message'); +var privateKey = bitcore.PrivateKey.fromWIF('cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4'); var signature = Message('hello, world').sign(privateKey); ```