diff --git a/README.md b/README.md index 49dd41418..9af084348 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Insight API -A Bitcoin blockchain REST and web socket API service for [Bitcore Node](https://github.com/bitpay/bitcore-node). +A Zcash blockchain REST and web socket API service for [Bitcore Node](https://github.com/bitpay/bitcore-node). This is a backend-only service. If you're looking for the web frontend application, take a look at https://github.com/bitpay/insight-ui. @@ -10,7 +10,7 @@ This is a backend-only service. If you're looking for the web frontend applicati npm install -g bitcore-node@latest bitcore-node create mynode cd mynode -bitcore-node install insight-api +bitcore-node install insight-api-zcash bitcore-node start ``` @@ -20,7 +20,7 @@ The API endpoints will be available by default at: `http://localhost:3001/insigh - [Bitcore Node 3.x](https://github.com/bitpay/bitcore-node) -**Note:** You can use an existing Bitcoin data directory, however `txindex`, `addressindex`, `timestampindex` and `spentindex` needs to be set to true in `bitcoin.conf`, as well as a few other additional fields. +**Note:** You can use an existing Zcash data directory, however `txindex`, `addressindex`, `timestampindex` and `spentindex` needs to be set to true in `zcash.conf`, as well as a few other additional fields. ## Notes on Upgrading from v0.3 @@ -69,8 +69,8 @@ There are a few changes to the `GET` endpoint for `/addr/[:address]`: Some additional general notes: - The transaction history for an address will be sorted in block order -- The response for the `/sync` endpoint does not include `startTs` and `endTs` as the sync is no longer relevant as indexes are built in bitcoind. -- The endpoint for `/peer` is no longer relevant connection to bitcoind is via ZMQ. +- The response for the `/sync` endpoint does not include `startTs` and `endTs` as the sync is no longer relevant as indexes are built in zcashd. +- The endpoint for `/peer` is no longer relevant connection to zcashd is via ZMQ. - `/tx` endpoint results will now include block height, and spentTx related fields will be set to `null` if unspent. - `/block` endpoint results does not include `confirmations` and will include `poolInfo`. @@ -89,7 +89,7 @@ The `/tx/` endpoint JSON response will not include the following fields on object. - `spentTs` -The `/status?q=getTxOutSetInfo` method has also been removed due to the query being very slow and locking bitcoind. +The `/status?q=getTxOutSetInfo` method has also been removed due to the query being very slow and locking zcashd. Plug-in support for Insight API is also no longer available, as well as the endpoints: - `/email/retrieve` @@ -364,7 +364,7 @@ POST response: /insight-api/peer ``` -### Status of the Bitcoin Network +### Status of the Zcash Network ``` /insight-api/status?q=xxx ``` @@ -409,7 +409,7 @@ Sample output: } ``` -``: new transaction concerning received from network. This event is published in the `` room. +``: new transaction concerning received from network. This event is published in the `` room. `status`: every 1% increment on the sync task, this event will be triggered. This event is published in the `sync` room. diff --git a/lib/addresses.js b/lib/addresses.js index b45bc18ec..9859806e4 100644 --- a/lib/addresses.js +++ b/lib/addresses.js @@ -1,6 +1,6 @@ 'use strict'; -var bitcore = require('bitcore-lib'); +var bitcore = require('bitcore-lib-zcash'); var async = require('async'); var TxController = require('./transactions'); var Common = require('./common'); diff --git a/lib/blocks.js b/lib/blocks.js index 4d286a523..3450a0ea1 100644 --- a/lib/blocks.js +++ b/lib/blocks.js @@ -1,7 +1,7 @@ 'use strict'; var async = require('async'); -var bitcore = require('bitcore-lib'); +var bitcore = require('bitcore-lib-zcash'); var _ = bitcore.deps._; var pools = require('../pools.json'); var BN = bitcore.crypto.BN; diff --git a/lib/index.js b/lib/index.js index 422615f25..c3c15ba08 100644 --- a/lib/index.js +++ b/lib/index.js @@ -14,7 +14,7 @@ var UtilsController = require('./utils'); var CurrencyController = require('./currency'); var RateLimiter = require('./ratelimiter'); var morgan = require('morgan'); -var bitcore = require('bitcore-lib'); +var bitcore = require('bitcore-lib-zcash'); var _ = bitcore.deps._; var $ = bitcore.util.preconditions; var Transaction = bitcore.Transaction; diff --git a/lib/messages.js b/lib/messages.js index ac7e57370..073ec0641 100644 --- a/lib/messages.js +++ b/lib/messages.js @@ -1,8 +1,8 @@ 'use strict'; -var bitcore = require('bitcore-lib'); +var bitcore = require('bitcore-lib-zcash'); var _ = bitcore.deps._; -var Message = require('bitcore-message'); +var Message = require('bitcore-message-zcash'); var Common = require('./common'); function MessagesController(node) { diff --git a/lib/transactions.js b/lib/transactions.js index ec98f9eb0..a73b270a2 100644 --- a/lib/transactions.js +++ b/lib/transactions.js @@ -1,6 +1,6 @@ 'use strict'; -var bitcore = require('bitcore-lib'); +var bitcore = require('bitcore-lib-zcash'); var _ = bitcore.deps._; var $ = bitcore.util.preconditions; var Common = require('./common'); diff --git a/package.json b/package.json index b95909a26..c6699187d 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "insight-api", - "description": "A Bitcoin blockchain REST and web socket API service for Bitcore Node.", + "name": "insight-api-zcash", + "description": "A Zcash blockchain REST and web socket API service for Bitcore Node.", "version": "0.4.3", - "repository": "git://github.com/bitpay/insight-api.git", + "repository": "git://github.com/str4d/insight-api-zcash.git", "contributors": [ { "name": "Gustavo Cortez", @@ -35,18 +35,22 @@ { "name": "Braydon Fuller", "email": "braydon@bitpay.com" + }, + { + "name": "Jack Grigg", + "email": "jack@z.cash" } ], "bugs": { - "url": "https://github.com/bitpay/insight-api/issues" + "url": "https://github.com/str4d/insight-api-zcash/issues" }, - "homepage": "https://github.com/bitpay/insight-api", + "homepage": "https://github.com/str4d/insight-api-zcash", "license": "MIT", "keywords": [ "insight", "insight api", "blockchain", - "bitcoin api", + "zcash api", "blockchain api", "json", "bitcore" @@ -61,8 +65,8 @@ "bitcoreNode": "lib", "dependencies": { "async": "*", - "bitcore-lib": "^0.13.7", - "bitcore-message": "^1.0.1", + "bitcore-lib-zcash": "str4d/bitcore-lib-zcash", + "bitcore-message-zcash": "str4d/bitcore-message-zcash", "body-parser": "^1.13.3", "compression": "^1.6.1", "lodash": "^2.4.1", diff --git a/test/addresses.js b/test/addresses.js index 6f27f8433..ed2c09db6 100644 --- a/test/addresses.js +++ b/test/addresses.js @@ -3,7 +3,7 @@ var sinon = require('sinon'); var should = require('should'); var AddressController = require('../lib/addresses'); var _ = require('lodash'); -var bitcore = require('bitcore-lib'); +var bitcore = require('bitcore-lib-zcash'); var txinfos = { totalCount: 2, diff --git a/test/blocks.js b/test/blocks.js index f88cdec5b..a831b7136 100644 --- a/test/blocks.js +++ b/test/blocks.js @@ -3,7 +3,7 @@ var should = require('should'); var sinon = require('sinon'); var BlockController = require('../lib/blocks'); -var bitcore = require('bitcore-lib'); +var bitcore = require('bitcore-lib-zcash'); var _ = require('lodash'); var blocks = require('./data/blocks.json'); diff --git a/test/messages.js b/test/messages.js index 6470b42ab..817c68e68 100644 --- a/test/messages.js +++ b/test/messages.js @@ -3,7 +3,7 @@ var should = require('should'); var sinon = require('sinon'); var MessagesController = require('../lib/messages'); -var bitcore = require('bitcore-lib'); +var bitcore = require('bitcore-lib-zcash'); var _ = require('lodash'); describe('Messages', function() { diff --git a/test/transactions.js b/test/transactions.js index 937093424..6660d0ae7 100644 --- a/test/transactions.js +++ b/test/transactions.js @@ -1,7 +1,7 @@ 'use strict'; var should = require('should'); var sinon = require('sinon'); -var bitcore = require('bitcore-lib'); +var bitcore = require('bitcore-lib-zcash'); var TxController = require('../lib/transactions'); var _ = require('lodash');