A general framework for blockchain analytics
BlockAPI is a general-purpose blockchain analytics Scala API, maintained by Livio Pompianu and Stefano Lande of the Blockchain@Unica Lab at the University of Cagliari, under the supervision of Massimo Bartoletti.
The standard workflow of BlockAPI consists of two steps:
BlockAPI currently supports Bitcoin and Ethereum, and the DBMS MongoDB, MySQL, PostgreSQL, and Fuseki.
BlockAPI requires Java JDK 1.8, and it supports the following blockchain clients and DBMSs:
BlockAPI may be used either as an IDE for executing a Scala SBT projects (e.g. IntelliJ IDEA), or via command line (in this case, you need to install SBT.
Further prerequisites may depend on the specific analyses one wants to implement.
This step is required to sucessfully compile the project. Before building the project, execute the following commands:
git clone https://github.com/stefanolande/bitcoinj.git
cd bitcoinj
mvn install -DskipTests
cd core
mvn install -DskipTests
bitcoind -datadir=path/to/blockchain -server -rpcuser=user -rpcpassword=password -rpcserialversion=0
You can test BlockAPI through one of the use cases in the repository. To do this, either:
bash sbt "runMain it.unica.blockchain.analyses.ClassName"
Once BlockAPI has built the database, you can query it using one of the available queries.
The project has been supported by several developers at the Department of Mathematics and Computer Science of the University of Cagliari, Italy.