Create Bitcoin Explorer Using Bitcoind And Bitcore Insight

Posted By : S. Ajit | 17-Nov-2017

Bitcore is a module that is created by Bitpay for building bitcoin and block chain based application. Insight is also a module that uses bitcore to generate bitcoin explorer. This blog will guide you to connect bitcore with currently running bitcoind and create a bitcoin explorer using insight. Follow the below steps to implement this in your system.

 

STEP 1: Install Bitcore

Run this command to install bitcore

npm install -g bitcore

If you face any permission issue while running above command (even with sudo) then fix this issue by following steps written in this link: fixing-npm-permissions

 

STEP 2: Install And Configure Bitcoind

Run these command one by one to install bitcoind

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind

Now configure bitcoind so that it can work with bitcore

cd ~/
mkdir .bitcoin
cd .bitcoin
vim bitcoin.conf

Inside this bitcoin.conf file copy-paste below lines 

server=1
testnet=1
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcallowip=127.0.0.1
uacomment=bitcore
rpcuser=bitcoin
rpcpassword=local321

 

STEP 3: Configuring Bitcore And Bitcoind

Now inside .bitcoin folder create bitcore-node.json file and add these lines inside this file:

{
  "network": "testnet",
  "port": 3001,
  "services": [
    "bitcoind",
    "insight-api",
    "insight-ui",
    "web"
  ],
  "servicesConfig": {
    "bitcoind": {
      "spawn": {
        "datadir": "/home/ajit/.bitcoin",
        "exec": "bitcoind"
      }
    }
  }
}

 

NOTE: I have provided network as testnet since we are going to run bitcoind in testnet also change datadir path according to your system.

Create package.json file inside .bitcoin folder and add these lines:

{
  "description": "A full Bitcoin node build with Bitcore",
  "repository": "https://github.com/user/project",
  "license": "MIT",
  "readme": "README.md",
  "dependencies": {
    "bitcore-lib": "^v0.13.19",
    "bitcore-node": "^3.1.3",
    "insight-api": "^0.4.3",
    "insight-ui": "^0.4.0"
  }
}

Now the below command inside .bitcoin folder.

npm install

Run the below command to start bitcoind and insight UI

bitcored

Now open localhost:3001/insight/ in your browser, You will be able to see Insight UI explorer as shown in screen shot below:

 

 

 

Request for Proposal

Recaptcha is required.

Sending message..