btcpify
This commit is contained in:
parent
a8d09a571d
commit
be7e5fdbc6
10
README.md
10
README.md
|
@ -1,5 +1,5 @@
|
|||
<img src="http://bitcore.io/css/images/module-message.png" alt="bitcore message" height="35">
|
||||
# Zclassic Message Verification and Signing for Bitcore
|
||||
# btcp Message Verification and Signing for Bitcore
|
||||
|
||||
|
||||
[![NPM Package](https://img.shields.io/npm/v/bitcore-message.svg?style=flat-square)](https://www.npmjs.org/package/bitcore-message)
|
||||
|
@ -13,18 +13,18 @@ See [the main bitcore repo](https://github.com/bitpay/bitcore) for more informat
|
|||
## Getting Started
|
||||
|
||||
```sh
|
||||
npm install bitcore-message-zclassic
|
||||
npm install bitcore-message-btcp
|
||||
```
|
||||
|
||||
```sh
|
||||
bower install bitcore-message-zclassic
|
||||
bower install bitcore-message-btcp
|
||||
```
|
||||
|
||||
To sign a message:
|
||||
|
||||
```javascript
|
||||
var bitcore = require('bitcore-lib-zclassic');
|
||||
var Message = require('bitcore-message-zclassic');
|
||||
var bitcore = require('bitcore-lib-btcp');
|
||||
var Message = require('bitcore-message-btcp');
|
||||
|
||||
var privateKey = bitcore.PrivateKey.fromWIF('cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4');
|
||||
var signature = Message('hello, world').sign(privateKey);
|
||||
|
|
12
bower.json
12
bower.json
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "bitcore-message-zclassic",
|
||||
"main": "./bitcore-message-zclassic.min.js",
|
||||
"version": "1.0.3-zclassic",
|
||||
"homepage": "https://github.com/z-classic/bitcore-message-zclassic",
|
||||
"name": "bitcore-message-btcp",
|
||||
"main": "./bitcore-message-btcp.min.js",
|
||||
"version": "1.0.3-btcp",
|
||||
"homepage": "https://github.com/interbiznw-btcpcontrib/bitcore-message-btcp",
|
||||
"authors": [
|
||||
"The Zclassic Team",
|
||||
"The btcp Team",
|
||||
"BitPay"
|
||||
],
|
||||
"description": "Zclassic Message Verification and Signing for Bitcore",
|
||||
"description": "btcp Message Verification and Signing for Bitcore",
|
||||
"moduleType": [
|
||||
"globals"
|
||||
],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Message Verification and Signing
|
||||
Bitcore implementation of [bitcoin message signing and verification](http://bitcoin.stackexchange.com/questions/3337/what-are-the-safety-guidelines-for-using-the-sign-message-feature/3339#3339). This is used to cryptographically prove that a certain message was signed by the holder of an address private key.
|
||||
|
||||
For more information refer to the [bitcore-message-zclassic](https://github.com/z-classic/bitcore-message-zclassic) github repo.
|
||||
For more information refer to the [bitcore-message-btcp](https://github.com//interbiznw-btcpcontrib/bitcore-message-btcp) github repo.
|
||||
|
||||
## Installation
|
||||
Message Verification and Signing is implemented as a separate module and you must add it to your dependencies:
|
||||
|
@ -9,13 +9,13 @@ Message Verification and Signing is implemented as a separate module and you mus
|
|||
For node projects:
|
||||
|
||||
```bash
|
||||
npm install bitcore-message-zclassic --save
|
||||
npm install bitcore-message-btcp --save
|
||||
```
|
||||
|
||||
For client-side projects:
|
||||
|
||||
```bash
|
||||
bower install bitcore-message-zclassic --save
|
||||
bower install bitcore-message-btcp --save
|
||||
```
|
||||
|
||||
## Example
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var gulp = require('gulp');
|
||||
var bitcoreTasks = require('bitcore-build-zclassic');
|
||||
var bitcoreTasks = require('bitcore-build-btcp');
|
||||
|
||||
bitcoreTasks('message');
|
||||
|
||||
|
|
2
index.js
2
index.js
|
@ -1,4 +1,4 @@
|
|||
var bitcore = require('bitcore-lib-zclassic');
|
||||
var bitcore = require('bitcore-lib-btcp');
|
||||
bitcore.Message = require('./lib/message');
|
||||
|
||||
module.exports = bitcore.Message;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var bitcore = require('bitcore-lib-zclassic');
|
||||
var bitcore = require('bitcore-lib-btcp');
|
||||
var _ = bitcore.deps._;
|
||||
var PrivateKey = bitcore.PrivateKey;
|
||||
var PublicKey = bitcore.PublicKey;
|
||||
|
|
12
package.json
12
package.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "bitcore-message-zclassic",
|
||||
"version": "1.0.3-zclassic",
|
||||
"description": "Zclassic Messages for Bitcore",
|
||||
"name": "bitcore-message-btcp",
|
||||
"version": "1.0.3-btcp",
|
||||
"description": "btcp Messages for Bitcore",
|
||||
"author": "BitPay <dev@bitpay.com>",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -22,13 +22,13 @@
|
|||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/z-classic/bitcore-message-zclassic.git"
|
||||
"url": "https://github.com/interbiznw-btcpcontrib/bitcore-message-btcp.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"bitcore-lib-zclassic": "z-classic/bitcore-lib-zclassic"
|
||||
"bitcore-lib-btcp": "z-classic/bitcore-lib-btcp"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bitcore-build-zclassic": "z-classic/bitcore-build-zclassic",
|
||||
"bitcore-build-btcp": "z-classic/bitcore-build-btcp",
|
||||
"brfs": "^1.3.0",
|
||||
"chai": "~1.10.0",
|
||||
"gulp": "^3.8.10"
|
||||
|
|
|
@ -4,7 +4,7 @@ var chai = require('chai');
|
|||
var expect = chai.expect;
|
||||
var should = chai.should();
|
||||
|
||||
var bitcore = require('bitcore-lib-zclassic');
|
||||
var bitcore = require('bitcore-lib-btcp');
|
||||
var Address = bitcore.Address;
|
||||
var Signature = bitcore.crypto.Signature;
|
||||
var Message = require('../');
|
||||
|
|
Loading…
Reference in New Issue