Based off the Bitcoin Core JSON RPC API.
It uses bitcoin's default JSON RPC API, meaning that you need bitcoind / bitcoin-qt running in background with txindex=1 enabled, the explorer will use the data directly from the index, no extra index is added.
- redis
- bitcoin-core (btc, bch, ltc, doge, etc...)
This project includes also an API:
API_PATH: http://explorer.example.com/api/
Retrieves block info including all the following fields: block, hash, confirmations, size, height, version, versionHex, merkleroot, time, mediantime, nonce, bits, difficulty, chainwork, nextblockhash
Plus on tx you will get an array containing all the transaction hashes of the transactions included in the block
Genesis block: http://explorer.example.com/api/blocks/0
Pre-fork block: http://explorer.example.com/api/blocks/556765
Gets the latest block number, sample response:
"block_num": 556766
}
Gets all the information contained in a transaction such as: txid, hash, size, version, locktime and then all the inputs (vin) and outputs (vout).
bundle
bundle exec rackup
or
rackup
docker-compose up --build
URL: https://hub.docker.com/r/makevoid/explorer
docker pull makevoid/explorer
docker run -e
Bitcoin Core configuration (bitcoind / bitcoin-qt) (valid for BTC bitcoind, Bitcoin "Core" ABC, Bitcoin "Core" SV)
This is a sample ~/.bitcoin/bitcoin.conf to make sure this explorer can connect and get all the infos from your bitcoind / bitcoin-qt whatever chain is on.
txindex=1
rpcuser=bitcoinrpc
rpcpassword=YOUR_PASSWORD
rpcallowip=YOUR_IP
rpcallowip is used to whitelist IPs, you can have multiple lines for rpcallowip (for example if you have multiple application servers for high/availabilty or horizontal scaling)
Note that for a recent version of BTC bitcoind/bitcoin-qt (bitcoin core) you will need to use rpcauth instead of rpcuser/rcppassword.