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">
|
<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)
|
[![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
|
## Getting Started
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install bitcore-message-zclassic
|
npm install bitcore-message-btcp
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bower install bitcore-message-zclassic
|
bower install bitcore-message-btcp
|
||||||
```
|
```
|
||||||
|
|
||||||
To sign a message:
|
To sign a message:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var bitcore = require('bitcore-lib-zclassic');
|
var bitcore = require('bitcore-lib-btcp');
|
||||||
var Message = require('bitcore-message-zclassic');
|
var Message = require('bitcore-message-btcp');
|
||||||
|
|
||||||
var privateKey = bitcore.PrivateKey.fromWIF('cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4');
|
var privateKey = bitcore.PrivateKey.fromWIF('cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4');
|
||||||
var signature = Message('hello, world').sign(privateKey);
|
var signature = Message('hello, world').sign(privateKey);
|
||||||
|
|
12
bower.json
12
bower.json
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "bitcore-message-zclassic",
|
"name": "bitcore-message-btcp",
|
||||||
"main": "./bitcore-message-zclassic.min.js",
|
"main": "./bitcore-message-btcp.min.js",
|
||||||
"version": "1.0.3-zclassic",
|
"version": "1.0.3-btcp",
|
||||||
"homepage": "https://github.com/z-classic/bitcore-message-zclassic",
|
"homepage": "https://github.com/interbiznw-btcpcontrib/bitcore-message-btcp",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Zclassic Team",
|
"The btcp Team",
|
||||||
"BitPay"
|
"BitPay"
|
||||||
],
|
],
|
||||||
"description": "Zclassic Message Verification and Signing for Bitcore",
|
"description": "btcp Message Verification and Signing for Bitcore",
|
||||||
"moduleType": [
|
"moduleType": [
|
||||||
"globals"
|
"globals"
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Message Verification and Signing
|
# 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.
|
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
|
## Installation
|
||||||
Message Verification and Signing is implemented as a separate module and you must add it to your dependencies:
|
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:
|
For node projects:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install bitcore-message-zclassic --save
|
npm install bitcore-message-btcp --save
|
||||||
```
|
```
|
||||||
|
|
||||||
For client-side projects:
|
For client-side projects:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bower install bitcore-message-zclassic --save
|
bower install bitcore-message-btcp --save
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
var bitcoreTasks = require('bitcore-build-zclassic');
|
var bitcoreTasks = require('bitcore-build-btcp');
|
||||||
|
|
||||||
bitcoreTasks('message');
|
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');
|
bitcore.Message = require('./lib/message');
|
||||||
|
|
||||||
module.exports = bitcore.Message;
|
module.exports = bitcore.Message;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var bitcore = require('bitcore-lib-zclassic');
|
var bitcore = require('bitcore-lib-btcp');
|
||||||
var _ = bitcore.deps._;
|
var _ = bitcore.deps._;
|
||||||
var PrivateKey = bitcore.PrivateKey;
|
var PrivateKey = bitcore.PrivateKey;
|
||||||
var PublicKey = bitcore.PublicKey;
|
var PublicKey = bitcore.PublicKey;
|
||||||
|
|
12
package.json
12
package.json
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "bitcore-message-zclassic",
|
"name": "bitcore-message-btcp",
|
||||||
"version": "1.0.3-zclassic",
|
"version": "1.0.3-btcp",
|
||||||
"description": "Zclassic Messages for Bitcore",
|
"description": "btcp Messages for Bitcore",
|
||||||
"author": "BitPay <dev@bitpay.com>",
|
"author": "BitPay <dev@bitpay.com>",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -22,13 +22,13 @@
|
||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/z-classic/bitcore-message-zclassic.git"
|
"url": "https://github.com/interbiznw-btcpcontrib/bitcore-message-btcp.git"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bitcore-lib-zclassic": "z-classic/bitcore-lib-zclassic"
|
"bitcore-lib-btcp": "z-classic/bitcore-lib-btcp"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bitcore-build-zclassic": "z-classic/bitcore-build-zclassic",
|
"bitcore-build-btcp": "z-classic/bitcore-build-btcp",
|
||||||
"brfs": "^1.3.0",
|
"brfs": "^1.3.0",
|
||||||
"chai": "~1.10.0",
|
"chai": "~1.10.0",
|
||||||
"gulp": "^3.8.10"
|
"gulp": "^3.8.10"
|
||||||
|
|
|
@ -4,7 +4,7 @@ var chai = require('chai');
|
||||||
var expect = chai.expect;
|
var expect = chai.expect;
|
||||||
var should = chai.should();
|
var should = chai.should();
|
||||||
|
|
||||||
var bitcore = require('bitcore-lib-zclassic');
|
var bitcore = require('bitcore-lib-btcp');
|
||||||
var Address = bitcore.Address;
|
var Address = bitcore.Address;
|
||||||
var Signature = bitcore.crypto.Signature;
|
var Signature = bitcore.crypto.Signature;
|
||||||
var Message = require('../');
|
var Message = require('../');
|
||||||
|
|
Loading…
Reference in New Issue