diff --git a/.gitignore b/.gitignore index f11f9515e..00926e199 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ db/testnet/blocks README.html public + +/nbproject/ diff --git a/README.md b/README.md index cff2dbc91..7bdd8d636 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,26 @@ -# Insight API Dash +# Insight API PIVX -A Dash blockchain REST and web socket API service for [Bitcore Node Dash](https://github.com/dashpay/bitcore-node-dash). +A PIVX blockchain REST and web socket API service for [Bitcore Node PIVX](https://github.com/PIVX-Project/bitcore-node-pivx). -This is a backend-only service. If you're looking for the web frontend application, take a look at https://github.com/dashpay/insight-ui-dash. +This is a backend-only service. If you're looking for the web frontend application, take a look at https://github.com/PIVX-Project/insight-ui-pivx. ## Getting Started ```bashl -npm install -g bitcore-node-dash@latest -bitcore-node-dash create mynode +npm install -g bitcore-node-pivx@latest +bitcore-node-pivx create mynode cd mynode -bitcore-node-dash install insight-api-dash -bitcore-node-dash start +bitcore-node-pivx install insight-api-pivx +bitcore-node-pivx start ``` -The API endpoints will be available by default at: `http://localhost:3001/insight-api-dash/` +The API endpoints will be available by default at: `http://localhost:3001/insight-api-pivx/` ## Prerequisites -- [Bitcore Node Dash 3.x](https://github.com/dashpay/bitcore-node-dash) +- [Bitcore Node PIVX 3.x](https://github.com/PIVX-Project/bitcore-node-pivx) -**Note:** You can use an existing Dash data directory, however `txindex`, `addressindex`, `timestampindex` and `spentindex` needs to be set to true in `dash.conf`, as well as a few other additional fields. +**Note:** You can use an existing PIVX data directory, however `txindex`, `addressindex`, `timestampindex` and `spentindex` needs to be set to true in `pivx.conf`, as well as a few other additional fields. ## Notes on Upgrading from v0.3 @@ -125,15 +125,15 @@ Or disabled entirely with: ### Block ``` - /insight-api-dash/block/[:hash] - /insight-api-dash/block/00000000a967199a2fad0877433c93df785a8d8ce062e5f9b451cd1397bdbf62 + /insight-api-pivx/block/[:hash] + /insight-api-pivx/block/00000000a967199a2fad0877433c93df785a8d8ce062e5f9b451cd1397bdbf62 ``` ### Block Index Get block hash by height ``` - /insight-api-dash/block-index/[:height] - /insight-api-dash/block-index/0 + /insight-api-pivx/block-index/[:height] + /insight-api-pivx/block-index/0 ``` This would return: ``` @@ -146,8 +146,8 @@ which is the hash of the Genesis block (0 height) ### Raw Block ``` - /insight-api-dash/rawblock/[:blockHash] - /insight-api-dash/rawblock/[:blockHeight] + /insight-api-pivx/rawblock/[:blockHash] + /insight-api-pivx/rawblock/[:blockHeight] ``` This would return: @@ -161,7 +161,7 @@ This would return: Get block summaries by date: ``` - /insight-api-dash/blocks?limit=3&blockDate=2016-04-22 + /insight-api-pivx/blocks?limit=3&blockDate=2016-04-22 ``` Example response: @@ -195,31 +195,31 @@ Example response: ### Transaction ``` - /insight-api-dash/tx/[:txid] - /insight-api-dash/tx/525de308971eabd941b139f46c7198b5af9479325c2395db7f2fb5ae8562556c - /insight-api-dash/rawtx/[:rawid] - /insight-api-dash/rawtx/525de308971eabd941b139f46c7198b5af9479325c2395db7f2fb5ae8562556c + /insight-api-pivx/tx/[:txid] + /insight-api-pivx/tx/525de308971eabd941b139f46c7198b5af9479325c2395db7f2fb5ae8562556c + /insight-api-pivx/rawtx/[:rawid] + /insight-api-pivx/rawtx/525de308971eabd941b139f46c7198b5af9479325c2395db7f2fb5ae8562556c ``` ### Address ``` - /insight-api-dash/addr/[:addr][?noTxList=1][&from=&to=] - /insight-api-dash/addr/mmvP3mTe53qxHdPqXEvdu8WdC7GfQ2vmx5?noTxList=1 - /insight-api-dash/addr/mmvP3mTe53qxHdPqXEvdu8WdC7GfQ2vmx5?from=1000&to=2000 + /insight-api-pivx/addr/[:addr][?noTxList=1][&from=&to=] + /insight-api-pivx/addr/mmvP3mTe53qxHdPqXEvdu8WdC7GfQ2vmx5?noTxList=1 + /insight-api-pivx/addr/mmvP3mTe53qxHdPqXEvdu8WdC7GfQ2vmx5?from=1000&to=2000 ``` ### Address Properties ``` - /insight-api-dash/addr/[:addr]/balance - /insight-api-dash/addr/[:addr]/totalReceived - /insight-api-dash/addr/[:addr]/totalSent - /insight-api-dash/addr/[:addr]/unconfirmedBalance + /insight-api-pivx/addr/[:addr]/balance + /insight-api-pivx/addr/[:addr]/totalReceived + /insight-api-pivx/addr/[:addr]/totalSent + /insight-api-pivx/addr/[:addr]/unconfirmedBalance ``` The response contains the value in Satoshis. ### Unspent Outputs ``` - /insight-api-dash/addr/[:addr]/utxo + /insight-api-pivx/addr/[:addr]/utxo ``` Sample return: ``` @@ -250,13 +250,13 @@ Sample return: ### Unspent Outputs for Multiple Addresses GET method: ``` - /insight-api-dash/addrs/[:addrs]/utxo - /insight-api-dash/addrs/2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f/utxo + /insight-api-pivx/addrs/[:addrs]/utxo + /insight-api-pivx/addrs/2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f/utxo ``` POST method: ``` - /insight-api-dash/addrs/utxo + /insight-api-pivx/addrs/utxo ``` POST params: @@ -264,7 +264,7 @@ POST params: addrs: 2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f ``` -### InstantSend Transactions +### SwiftTX Transactions If a Transaction Lock has been observed by Insight API a 'txlock' value of true will be included in the Transaction Object. Sample output: @@ -290,25 +290,25 @@ Sample output: ### Transactions by Block ``` - /insight-api-dash/txs/?block=HASH - /insight-api-dash/txs/?block=00000000fa6cf7367e50ad14eb0ca4737131f256fc4c5841fd3c3f140140e6b6 + /insight-api-pivx/txs/?block=HASH + /insight-api-pivx/txs/?block=00000000fa6cf7367e50ad14eb0ca4737131f256fc4c5841fd3c3f140140e6b6 ``` ### Transactions by Address ``` - /insight-api-dash/txs/?address=ADDR - /insight-api-dash/txs/?address=mmhmMNfBiZZ37g1tgg2t8DDbNoEdqKVxAL + /insight-api-pivx/txs/?address=ADDR + /insight-api-pivx/txs/?address=mmhmMNfBiZZ37g1tgg2t8DDbNoEdqKVxAL ``` ### Transactions for Multiple Addresses GET method: ``` - /insight-api-dash/addrs/[:addrs]/txs[?from=&to=] - /insight-api-dash/addrs/2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f/txs?from=0&to=20 + /insight-api-pivx/addrs/[:addrs]/txs[?from=&to=] + /insight-api-pivx/addrs/2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f/txs?from=0&to=20 ``` POST method: ``` - /insight-api-dash/addrs/txs + /insight-api-pivx/addrs/txs ``` POST params: @@ -355,7 +355,7 @@ Note: if pagination params are not specified, the result is an array of transact ### Transaction Broadcasting POST method: ``` - /insight-api-dash/tx/send + /insight-api-pivx/tx/send ``` POST params: ``` @@ -382,7 +382,7 @@ POST response: ### Budget Proposal List GET method: ``` - /insight-api-dash/gobject/list/proposal + /insight-api-pivx/gobject/list/proposal ``` Sample output: @@ -395,7 +395,7 @@ Sample output: payment_amount: 5, start_epoch: 1482105600, type: 1, - url: 'https://www.dash.org' + url: 'https://pivx.org/' }, AbsoluteYesCount: 40, YesCount: 40, @@ -406,8 +406,8 @@ Sample output: ### Budget Proposal Detail GET method: ``` - /insight-api-dash/gobject/get/[:hash] - /insight-api-dash/gobject/get/b6af3e70c686f660541a77bc035df2e5e46841020699ce3ec8fad786f7d1aa35 + /insight-api-pivx/gobject/get/[:hash] + /insight-api-pivx/gobject/get/b6af3e70c686f660541a77bc035df2e5e46841020699ce3ec8fad786f7d1aa35 ``` Sample output: @@ -422,7 +422,7 @@ Sample output: payment_amount: 5, start_epoch: 1482105600, type: 1, - url: 'https://www.dash.org' + url: 'https://pivx.org/' }, CreationTime: 1482223714, FundingResult: { @@ -454,17 +454,17 @@ Sample output: ### Historic Blockchain Data Sync Status ``` - /insight-api-dash/sync + /insight-api-pivx/sync ``` ### Live Network P2P Data Sync Status ``` - /insight-api-dash/peer + /insight-api-pivx/peer ``` ### Status of the Bitcoin Network ``` - /insight-api-dash/status?q=xxx + /insight-api-pivx/status?q=xxx ``` Where "xxx" can be: @@ -477,7 +477,7 @@ Where "xxx" can be: ### Utility Methods ``` - /insight-api-dash/utils/estimatefee[?nbBlocks=2] + /insight-api-pivx/utils/estimatefee[?nbBlocks=2] ``` @@ -497,7 +497,7 @@ Sample output: } ``` -`txlock`: InstantSend transaction received from network, this event is published alongside the 'tx' event when a transaction lock event occurs. Data will be a app/models/Transaction object. +`txlock`: SwiftTX transaction received from network, this event is published alongside the 'tx' event when a transaction lock event occurs. Data will be a app/models/Transaction object. Sample output: ``` { @@ -555,7 +555,7 @@ html }) socket.on(eventToListenTo, function(data) { if (data.txlock) { - console.log("New InstantSend transaction received: " + data.txid) + console.log("New SwiftTX transaction received: " + data.txid) } else { console.log("New transaction received: " + data.txid) } diff --git a/lib/addresses.js b/lib/addresses.js index 889fbfbd9..4a6df42f4 100644 --- a/lib/addresses.js +++ b/lib/addresses.js @@ -1,6 +1,6 @@ 'use strict'; -var bitcore = require('bitcore-lib-dash'); +var bitcore = require('bitcore-lib-pivx'); var async = require('async'); var TxController = require('./transactions'); var Common = require('./common'); diff --git a/lib/blocks.js b/lib/blocks.js index c6bbe8ad3..a75cf4c95 100644 --- a/lib/blocks.js +++ b/lib/blocks.js @@ -1,7 +1,7 @@ 'use strict'; var async = require('async'); -var bitcore = require('bitcore-lib-dash'); +var bitcore = require('bitcore-lib-pivx'); var _ = bitcore.deps._; var pools = require('../pools.json'); var BN = bitcore.crypto.BN; @@ -74,7 +74,7 @@ BlockController.prototype.block = function(req, res, next) { return self.common.handleErrors(err, res); } var blockResult = self.transformBlock(block, info); - self.getBlockReward(blockResult.previousblockhash, function(err,reward) { + self.getBlockReward(self.node.services.bitcoind.height, function(err,reward) { if (err) { return self.common.handleErrors(err, res); } @@ -357,52 +357,46 @@ BlockController.prototype.getPreviousBlock = function(prevHash, cb) { }); }; -BlockController.prototype.getBlockReward = function(prevHash, cb) { - var self = this; - var nSubsidyHalvingInterval = 210240; - var nBudgetPaymentsStartBlock = 100000; - var nSubsidyBase; +BlockController.prototype.getBlockReward = function(nHeight) { + var nSubsidy = 0; + var COIN = 100000000; + var nLastPOWBlock = 259200; // block reward is based on the previous block diff / height - self.getPreviousBlock(prevHash, function(err, info) { - if(err) cb(err, null); - - var dDiff = info.difficulty; - var nPrevHeight = info.height; - - if (nPrevHeight < 5465) { - // Early ages... - // 1111/((x+1)^2) - nSubsidyBase = (1111.0 / (Math.pow((dDiff+1.0),2.0))); - if(nSubsidyBase > 500) nSubsidyBase = 500; - else if(nSubsidyBase < 1) nSubsidyBase = 1; - } else if (nPrevHeight < 17000 || (dDiff <= 75 && nPrevHeight < 24000)) { - // CPU mining era - // 11111/(((x+51)/6)^2) - nSubsidyBase = (11111.0 / (Math.pow((dDiff+51.0)/6.0,2.0))); - if(nSubsidyBase > 500) nSubsidyBase = 500; - else if(nSubsidyBase < 25) nSubsidyBase = 25; - } else { - // GPU/ASIC mining era - // 2222222/(((x+2600)/9)^2) - nSubsidyBase = (2222222.0 / (Math.pow((dDiff+2600.0)/9.0,2.0))); - if(nSubsidyBase > 25) nSubsidyBase = 25; - else if(nSubsidyBase < 5) nSubsidyBase = 5; - } - - var nSubsidy = nSubsidyBase; - - // yearly decline of production by ~7.1% per year, projected ~18M coins max by year 2050+. - for (var i = nSubsidyHalvingInterval; i <= nPrevHeight; i += nSubsidyHalvingInterval) { - nSubsidy -= nSubsidy/14; - } - - // Hard fork to reduce the block reward by 10 extra percent (allowing budget/superblocks) - var nSuperblockPart = (nPrevHeight > nBudgetPaymentsStartBlock) ? nSubsidy/10 : 0; - var reward = nSubsidy - nSuperblockPart; - - cb(null, parseFloat(reward.toString(10)).toFixed(8)); - }); + if (nHeight === 0) { + nSubsidy = 60001 * COIN; + } else if (nHeight < 86400 && nHeight > 0) { + nSubsidy = 250 * COIN; + } else if (nHeight < 151200 && nHeight >= 86400) { + nSubsidy = 225 * COIN; + } else if (nHeight <= nLastPOWBlock && nHeight >= 151200) { + nSubsidy = 45 * COIN; + } else if (nHeight <= 302399 && nHeight > nLastPOWBlock) { + nSubsidy = 45 * COIN; + } else if (nHeight <= 345599 && nHeight >= 302400) { + nSubsidy = 40.5 * COIN; + } else if (nHeight <= 388799 && nHeight >= 345600) { + nSubsidy = 36 * COIN; + } else if (nHeight <= 431999 && nHeight >= 388800) { + nSubsidy = 31.5 * COIN; + } else if (nHeight <= 475199 && nHeight >= 432000) { + nSubsidy = 27 * COIN; + } else if (nHeight <= 518399 && nHeight >= 475200) { + nSubsidy = 22.5 * COIN; + } else if (nHeight <= 561599 && nHeight >= 518400) { + nSubsidy = 18 * COIN; + } else if (nHeight <= 604799 && nHeight >= 561600) { + nSubsidy = 13.5 * COIN; + } else if (nHeight <= 647999 && nHeight >= 604800) { + nSubsidy = 9 * COIN; + } else if (nHeight >= 648000) { + nSubsidy = 4.5 * COIN; + } else { + nSubsidy = 0 * COIN; + } + + var parsedFloat = parseFloat(nSubsidy.toString(10)); + return parsedFloat.toFixed(8); }; module.exports = BlockController; diff --git a/lib/currency.js b/lib/currency.js index 68e55df77..c5cf291c8 100644 --- a/lib/currency.js +++ b/lib/currency.js @@ -7,9 +7,9 @@ function CurrencyController(options) { var refresh = options.currencyRefresh || CurrencyController.DEFAULT_CURRENCY_DELAY; this.currencyDelay = refresh * 60000; this.exchange_rates = { - dash_usd: 0.00, + pivx_usd: 0.00, btc_usd: 0.00, - btc_dash: 0.00 + btc_pivx: 0.00 }; this.timestamp = Date.now(); } @@ -19,16 +19,16 @@ CurrencyController.DEFAULT_CURRENCY_DELAY = 10; CurrencyController.prototype.index = function(req, res) { var self = this; var currentTime = Date.now(); - if (self.exchange_rates.dash_usd === 0.00 || currentTime >= (self.timestamp + self.currencyDelay)) { + if (self.exchange_rates.pivx_usd === 0.00 || currentTime >= (self.timestamp + self.currencyDelay)) { self.timestamp = currentTime; - request('https://www.dashcentral.org/api/v1/public', function(err, response, body) { + request('http://178.254.23.111/~pub/PIVX/api/exchange.txt', function(err, response, body) { if (err) { self.node.log.error(err); } if (!err && response.statusCode === 200) { var response = JSON.parse(body); self.exchange_rates = response.exchange_rates; - self.exchange_rates.bitstamp = response.exchange_rates.dash_usd; // backwards compatibility + self.exchange_rates.bitstamp = response.exchange_rates.pivx_usd; // backwards compatibility } res.jsonp({ status: 200, diff --git a/lib/index.js b/lib/index.js index 357506a6d..b6e0cbd27 100644 --- a/lib/index.js +++ b/lib/index.js @@ -15,7 +15,7 @@ var UtilsController = require('./utils'); var CurrencyController = require('./currency'); var RateLimiter = require('./ratelimiter'); var morgan = require('morgan'); -var bitcore = require('bitcore-lib-dash'); +var bitcore = require('bitcore-lib-pivx'); var _ = bitcore.deps._; var $ = bitcore.util.preconditions; var Transaction = bitcore.Transaction; diff --git a/lib/messages.js b/lib/messages.js index f189512f2..e9e4a63cc 100644 --- a/lib/messages.js +++ b/lib/messages.js @@ -1,8 +1,8 @@ 'use strict'; -var bitcore = require('bitcore-lib-dash'); +var bitcore = require('bitcore-lib-pivx'); var _ = bitcore.deps._; -var Message = require('bitcore-message-dash'); +var Message = require('bitcore-message-pivx'); var Common = require('./common'); function MessagesController(node) { diff --git a/lib/transactions.js b/lib/transactions.js index d7837c975..51f12248e 100644 --- a/lib/transactions.js +++ b/lib/transactions.js @@ -1,6 +1,6 @@ 'use strict'; -var bitcore = require('bitcore-lib-dash'); +var bitcore = require('bitcore-lib-pivx'); var _ = bitcore.deps._; var $ = bitcore.util.preconditions; var Common = require('./common'); diff --git a/package.json b/package.json index 64574b09c..0d47af5d0 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "insight-api-dash", - "description": "A Dash blockchain REST and web socket API service for Bitcore Node.", + "name": "insight-api-pivx", + "description": "A PIVX blockchain REST and web socket API service for Bitcore Node.", "version": "0.4.5", - "repository": "git://github.com/dashpay/insight-api-dash.git", + "repository": "git://github.com/PIVX-Project/insight-api-pivx.git", "contributors": [ { "name": "Gustavo Cortez", @@ -38,18 +38,18 @@ } ], "bugs": { - "url": "https://github.com/dashpay/insight-api-dash/issues" + "url": "https://github.com/PIVX-Project/insight-api-pivx.git/issues" }, - "homepage": "https://github.com/dashpay/insight-api-dash", + "homepage": "https://github.com/PIVX-Project/insight-api-pivx.git", "license": "MIT", "keywords": [ "insight", "insight api", "blockchain", - "dash api", + "pivx api", "blockchain api", "json", - "bitcore-dash" + "bitcore-pivx" ], "engines": { "node": ">=0.12.0" @@ -61,8 +61,8 @@ "bitcoreNode": "lib", "dependencies": { "async": "*", - "bitcore-lib-dash": "^0.13.20", - "bitcore-message-dash": "^1.0.5", + "bitcore-lib-pivx": "^0.13.20", + "bitcore-message-pivx": "^1.0.5", "body-parser": "^1.13.3", "compression": "^1.6.1", "lodash": "^2.4.1", diff --git a/test/addresses.js b/test/addresses.js index b282fdcbb..03ae75d65 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-dash'); +var bitcore = require('bitcore-lib-pivx'); var txinfos = { totalCount: 2, diff --git a/test/blocks.js b/test/blocks.js index 52a4e009d..0f666a5aa 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-dash'); +var bitcore = require('bitcore-lib-pivx'); var _ = require('lodash'); var blocks = require('./data/blocks.json'); diff --git a/test/currency.js b/test/currency.js index 227938081..b3f3a91b9 100644 --- a/test/currency.js +++ b/test/currency.js @@ -18,9 +18,9 @@ describe('Currency', function() { registered_masternodes_verified: 770 }, exchange_rates: { - dash_usd: 9.4858840414, + pivx_usd: 9.4858840414, btc_usd: 682.93, - btc_dash: 0.01388998 + btc_pivx: 0.01388998 } }; @@ -30,8 +30,8 @@ describe('Currency', function() { var res = { jsonp: function(response) { response.status.should.equal(200); - should.exist(response.data.dash_usd); - (typeof response.data.dash_usd).should.equal('number'); + should.exist(response.data.pivx_usd); + (typeof response.data.pivx_usd).should.equal('number'); done(); } }; @@ -49,17 +49,17 @@ describe('Currency', function() { }; var currency = new TestCurrencyController({node: node}); currency.exchange_rates = { - dash_usd: 9.4858840414, + pivx_usd: 9.4858840414, btc_usd: 682.93, - btc_dash: 0.01388998 + btc_pivx: 0.01388998 }; currency.timestamp = Date.now() - 61000 * CurrencyController.DEFAULT_CURRENCY_DELAY; var req = {}; var res = { jsonp: function(response) { response.status.should.equal(200); - should.exist(response.data.dash_usd); - response.data.dash_usd.should.equal(9.4858840414); + should.exist(response.data.pivx_usd); + response.data.pivx_usd.should.equal(9.4858840414); done(); } }; @@ -77,9 +77,9 @@ describe('Currency', function() { }; var currency = new TestCurrencyController({node: node}); currency.exchange_rates = { - dash_usd: 9.4858840414, + pivx_usd: 9.4858840414, btc_usd: 682.93, - btc_dash: 0.01388998 + btc_pivx: 0.01388998 }; currency.timestamp = Date.now() - 65000 * CurrencyController.DEFAULT_CURRENCY_DELAY; var req = {}; @@ -87,7 +87,7 @@ describe('Currency', function() { jsonp: function(response) { response.status.should.equal(200); should.exist(response.data); - response.data.dash_usd.should.equal(9.4858840414); + response.data.pivx_usd.should.equal(9.4858840414); node.log.error.callCount.should.equal(1); done(); } @@ -107,17 +107,17 @@ describe('Currency', function() { }; var currency = new TestCurrencyController({node: node}); currency.exchange_rates = { - dash_usd: 9.4858840414, + pivx_usd: 9.4858840414, btc_usd: 682.93, - btc_dash: 0.01388998 + btc_pivx: 0.01388998 }; currency.timestamp = Date.now(); var req = {}; var res = { jsonp: function(response) { response.status.should.equal(200); - should.exist(response.data.dash_usd); - response.data.dash_usd.should.equal(9.4858840414); + should.exist(response.data.pivx_usd); + response.data.pivx_usd.should.equal(9.4858840414); request.callCount.should.equal(0); done(); } diff --git a/test/messages.js b/test/messages.js index 81076291b..96193636a 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-dash'); +var bitcore = require('bitcore-lib-pivx'); var _ = require('lodash'); describe('Messages', function() { diff --git a/test/transactions.js b/test/transactions.js index 584125f2e..6f74e7336 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-dash'); +var bitcore = require('bitcore-lib-pivx'); var TxController = require('../lib/transactions'); var _ = require('lodash');