Hanchon
  • Home
  • BCH Testnet Environment
    • BCH Testnet Environment
    • BitcoinABC (bitcore patches)
    • Bitcore (insight + insight-api)
    • NOMP (mining pool)
    • CPU Miner
    • Fork the network
    • Run regtest
  • Bitprim
    • Introduction
    • Node versions
    • Requirements
    • Node installation
    • Run the node
    • Insight Installation
    • Run Insight (node + REST-API)
    • Query the insight api
  • Bitprim Node Configuration Files
    • Bitcoin Cash Testnet
    • Bitcoin Cash Mainnet
    • Bitcoin Core Testnet
    • Bitcoin Core Mainnet
    • Litecoin Testnet
    • Litecoin Mainnet
  • Bitprim Insight Configuration
    • Insight-API configuration file
  • Utils
    • Install Node Version Manager
    • Install Redis
Powered by GitBook
On this page
  • Introduction
  • Installation
  • Requirements:
  • Install bitcore:
  • Configuration file:
  • Usage
  • Run bitcore:
  • Check you explorer and API:
  • References
  1. BCH Testnet Environment

Bitcore (insight + insight-api)

Guide to set up the Explorer and API. This requires a bitcoind node with the bitcore patches already compiled.

PreviousBitcoinABC (bitcore patches)NextNOMP (mining pool)

Last updated 6 years ago

Introduction

In order to display the blockchain data, bitcore is going to be used. The bitcore process will start the bitcoind node and will serve the insight and insight-api.

Installation

Requirements:

  • Node Version Manager to install the NodeJs version 4. .

  • Any bitcoind node with the bitcore patches to request the blockchain data. .

Install bitcore:

  • In your terminal set the NodeJs version to v4.

nvm use v4
  • Install bitcore:

npm install -g bitcore --unsafe-perm=true
  • Create your node folder.

    • -d: Your bitcoin data folder. (The configuration file must be also located inside that folder with the name bitcoin.conf)

    • mynode: This will be the folder name, it can be change.

bitcore create -d "/root/.bitcoin/" mynode
  • Add the Explorer and API to the bitcore service.

cd mynode
bitcore install insight-api insight-ui

Configuration file:

Inside your node folder there is a file named: bitcore-node.json

Set the network to testnet, and the location of your compiled bitcoind.

{
  "network": "testnet",
  "port": 3001,
  "services": [
    "bitcoind",
    "insight-api",
    "insight-ui",
    "web"
  ],
  "servicesConfig": {
    "bitcoind": {
      "datadir": "/root/.bitcoin",
      "exec": "/root/your/directory/to/bitcoin-abc/src/bitcoind"
    }
  }
}

Usage

Run bitcore:

Inside your node folder:

nvm use v4
bitcored

Check you explorer and API:

The Explorer will be hosted in localhost:3001/insight/

The API will be hosted in localhost:3001/insight-api/

References

Bitcore official guide:

Install Node Version Manager
BitcoinABC + bitcore patches
https://bitcore.io/guides/full-node
Bitcore running.
Insight explorer index.
Insight-API result for a block.