bitcore -> bitcore-lib

This commit is contained in:
Braydon Fuller 2015-10-17 00:56:29 -04:00
parent b387b34861
commit 1dec93edd4
23 changed files with 47 additions and 47 deletions

View File

@ -6,8 +6,8 @@ A Bitcoin full node for building applications and services with Node.js. A node
## Install
```bash
npm install -g bitcore-node@latest
bitcore-node start
npm install -g bitcore
bitcore start
```
Note: For your convenience, we distribute binaries for x86_64 Linux and x86_64 Mac OS X. Upon npm install, the binaries for your platform will be downloaded. For more detailed installation instructions, or if you want to compile the project yourself, then please see the [Build & Install](docs/build.md) documentation to build the project from source.
@ -16,34 +16,35 @@ Note: For your convenience, we distribute binaries for x86_64 Linux and x86_64 M
- Node.js v0.12
- ~100GB of disk storage
- ~1GB of RAM
- ~4GB of RAM
- Mac OS X >= 10.9, Ubuntu >= 12.04 (libc >= 2.15 and libstdc++ >= 6.0.16)
## Configuration
Bitcore Node includes a Command Line Interface (CLI) for managing, configuring and interfacing with your Bitcore Node.
Bitcore includes a Command Line Interface (CLI) for managing, configuring and interfacing with your Bitcore Node.
```bash
bitcore-node create -d <bitcoin-data-dir> mynode "My Node"
bitcore create -d <bitcoin-data-dir> mynode
cd mynode
bitcore-node add <service>
bitcore-node add https://github.com/yourname/helloworld
bitcore add <service>
bitcore add https://github.com/yourname/helloworld
```
This will create a directory with configuration files for your node and install the necessary dependencies. For more information about (and developing) services, please see the [Service Documentation](docs/services.md).
To start bitcore-node as a daemon:
To start bitcore as a daemon:
```bash
bitcore-node start --daemon
bitcore start --daemon
```
## Add-on Services
There are several add-on services available to extend the functionality of Bitcore Node:
There are several add-on services available to extend the functionality of Bitcore:
- [Insight API](https://github.com/bitpay/insight-api/tree/v0.3.0)
- [Insight UI](https://github.com/bitpay/insight/tree/v0.3.0)
- [Bitcore Wallet Service](https://github.com/bitpay/bitcore-wallet-service)
## Documentation

View File

@ -3,7 +3,7 @@
var benchmark = require('benchmark');
var async = require('async');
var sinon = require('sinon');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var Block = bitcore.Block;
var AddressService = require('../lib/services/address');
var maxTime = 20;

View File

@ -6,8 +6,8 @@ A Bitcoin full node for building applications and services with Node.js. A node
## Install
```bash
npm install -g bitcore-node@latest
bitcore-node start
npm install -g bitcore
bitcore start
```
Note: For your convenience, we distribute binaries for x86_64 Linux and x86_64 Mac OS X. Upon npm install, the binaries for your platform will be downloaded. For more detailed installation instructions, or if you want to compile the project yourself, then please see the [Build & Install](build.md) documentation to build the project from source.
@ -16,26 +16,26 @@ Note: For your convenience, we distribute binaries for x86_64 Linux and x86_64 M
- Node.js v0.12
- ~100GB of disk storage
- ~1GB of RAM
- ~4GB of RAM
- Mac OS X >= 10.9, Ubuntu >= 12.04 (libc >= 2.15 and libstdc++ >= 6.0.16)
## Configuration
Bitcore Node includes a Command Line Interface (CLI) for managing, configuring and interfacing with your Bitcore Node.
Bitcore includes a Command Line Interface (CLI) for managing, configuring and interfacing with your Bitcore Node.
```bash
bitcore-node create -d <bitcoin-data-dir> mynode "My Node"
bitcore create -d <bitcoin-data-dir> mynode
cd mynode
bitcore-node add <service>
bitcore-node add https://github.com/yourname/helloworld
bitcore add <service>
bitcore add https://github.com/yourname/helloworld
```
This will create a directory with configuration files for your node and install the necessary dependencies. For more information about (and developing) services, please see the [Service Documentation](services.md).
To start bitcore-node as a daemon:
To start bitcore as a daemon:
```bash
bitcore-node start --daemon
bitcore start --daemon
```
## Add-on Services

View File

@ -28,7 +28,7 @@ Services correspond with a Node.js module as described in 'package.json', for ex
```json
{
"dependencies": {
"bitcore": "^0.13.1",
"bitcore-lib": "^0.13.7",
"bitcore-node": "^0.2.0",
"insight-api": "^3.0.0"
}
@ -47,8 +47,8 @@ var bitcore = require('bitcore-node');
//Services
var Address = bitcore.services.Address;
var Bitcoin = bitcore.services.Bitcoin;
var DB = bitcore.services.DB;
var Web = bitcore.services.Web;
var DB = bitcore.services.DB;
var Web = bitcore.services.Web;
var myNode = new bitcore.Node({
datadir: '~/.bitcore',

View File

@ -11,7 +11,7 @@ var p2p = require('bitcore-p2p');
var Peer = p2p.Peer;
var Messages = p2p.Messages;
var chai = require('chai');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var Transaction = bitcore.Transaction;
var BN = bitcore.crypto.BN;
var async = require('async');

View File

@ -16,7 +16,7 @@ if (process.env.BITCORENODE_ENV !== 'test') {
}
var chai = require('chai');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var rimraf = require('rimraf');
var node;

View File

@ -14,7 +14,7 @@ if (process.env.BITCORENODE_ENV !== 'test') {
}
var chai = require('chai');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var BN = bitcore.crypto.BN;
var async = require('async');
var rimraf = require('rimraf');

View File

@ -3,7 +3,7 @@
var util = require('util');
var EventEmitter = require('events').EventEmitter;
var async = require('async');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var Networks = bitcore.Networks;
var $ = bitcore.util.preconditions;
var _ = bitcore.deps._;

View File

@ -4,7 +4,7 @@ var async = require('async');
var fs = require('fs');
var path = require('path');
var spawn = require('child_process').spawn;
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var $ = bitcore.util.preconditions;
var _ = bitcore.deps._;

View File

@ -1,7 +1,7 @@
'use strict';
var spawn = require('child_process').spawn;
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var async = require('async');
var $ = bitcore.util.preconditions;
var _ = bitcore.deps._;
@ -20,7 +20,7 @@ if (packageFile.version.match('-dev')) {
var BASE_PACKAGE = {
dependencies: {
'bitcore': '^' + bitcore.version,
'bitcore-lib': '^' + bitcore.version,
'bitcore-node': version
}
};

View File

@ -1,6 +1,6 @@
'use strict';
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var $ = bitcore.util.preconditions;
var _ = bitcore.deps._;
var path = require('path');

View File

@ -5,7 +5,7 @@ var fs = require('fs');
var npm = require('npm');
var path = require('path');
var spawn = require('child_process').spawn;
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var $ = bitcore.util.preconditions;
var _ = bitcore.deps._;

View File

@ -3,7 +3,7 @@
var path = require('path');
var BitcoreNode = require('../node');
var index = require('../');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var _ = bitcore.deps._;
var $ = bitcore.util.preconditions;
var log = index.log;

View File

@ -1,6 +1,6 @@
'use strict';
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var async = require('async');
var _ = bitcore.deps._;
@ -228,7 +228,7 @@ AddressHistory.prototype.getDetailedInfo = function(txInfo, next) {
height: transaction.__height,
confirmations: self.getConfirmationsDetail(transaction),
timestamp: transaction.__timestamp,
// TODO bitcore should return null instead of throwing error on coinbase
// TODO bitcore-lib should return null instead of throwing error on coinbase
fees: !transaction.isCoinbase() ? transaction.getFee() : null,
tx: transaction
});

View File

@ -7,7 +7,7 @@ var index = require('../../');
var log = index.log;
var errors = index.errors;
var Transaction = require('../../transaction');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var levelup = require('levelup');
var $ = bitcore.util.preconditions;
var _ = bitcore.deps._;

View File

@ -4,7 +4,7 @@ var fs = require('fs');
var util = require('util');
var bindings = require('bindings')('bitcoind.node');
var mkdirp = require('mkdirp');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var $ = bitcore.util.preconditions;
var index = require('../');
var log = index.log;

View File

@ -6,7 +6,7 @@ var async = require('async');
var levelup = require('levelup');
var leveldown = require('leveldown');
var mkdirp = require('mkdirp');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var BufferUtil = bitcore.util.buffer;
var Networks = bitcore.Networks;
var Block = bitcore.Block;

View File

@ -2,7 +2,7 @@
var async = require('async');
var levelup = require('levelup');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var Transaction = bitcore.Transaction;
Transaction.prototype.populateInputs = function(db, poolTransactions, callback) {

View File

@ -46,7 +46,7 @@
"dependencies": {
"async": "^1.3.0",
"bindings": "^1.2.1",
"bitcore": "^0.13.0",
"bitcore-lib": "^0.13.7",
"body-parser": "^1.13.3",
"colors": "^1.1.2",
"commander": "^2.8.1",
@ -73,7 +73,7 @@
"proxyquire": "^1.3.1",
"rimraf": "^2.4.2",
"sinon": "^1.15.4",
"bitcore-p2p": "^0.15.1"
"bitcore-p2p": "~1.0.0"
},
"engines": {
"node": ">=0.12.0"

View File

@ -2,7 +2,7 @@
var should = require('chai').should();
var sinon = require('sinon');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var Networks = bitcore.Networks;
var proxyquire = require('proxyquire');
var util = require('util');

View File

@ -94,7 +94,7 @@ describe('#add', function() {
var callCount = 0;
var oldPackage = {
dependencies: {
'bitcore': '^v0.13.1',
'bitcore-lib': '^v0.13.7',
'bitcore-node': '^v0.2.0'
}
};

View File

@ -6,7 +6,7 @@ var proxyquire = require('proxyquire');
var bitcorenode = require('../../../');
var AddressService = bitcorenode.services.Address;
var blockData = require('../../data/livenet-345003.json');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var Script = bitcore.Script;
var Address = bitcore.Address;
var Networks = bitcore.Networks;

View File

@ -7,18 +7,17 @@ var proxyquire = require('proxyquire');
var index = require('../../');
var DB = index.services.DB;
var blockData = require('../data/livenet-345003.json');
var bitcore = require('bitcore');
var bitcore = require('bitcore-lib');
var Networks = bitcore.Networks;
var Block = bitcore.Block;
var BufferUtil = bitcore.util.buffer;
var Transaction = bitcore.Transaction;
var transactionData = require('../data/bitcoin-transactions.json');
var chainHashes = require('../data/hashes.json');
var chainData = require('../data/testnet-blocks.json');
var errors = index.errors;
var memdown = require('memdown');
var levelup = require('levelup');
var bitcore = require('bitcore');
var Transaction = bitcore.Transaction;
describe('DB Service', function() {