blockchain blocks analyzer, is an open source tool for analyze Bitcoin wallet address transaction. The main purpose of the tool is to track suspicious addresses transaction from income to to outcome and keep track the next wallet, which received money from the suspicious address. Moreover, we create a Graph database, Neo4j, which represent a flow graph which starts with the income of the suspicious addresses until the last "interesting" wallet. The meaning of graph flow is to connect between other wallet to the suspicious wallet, Type of money laundering.
Python 3.* download here
Graph database platform. (Official site)
Download:
- For PC (Windows, linux or MAC): Here
- Docker: DockerHub
or run:
[]~$ docker run -d --publish=7474:7474 --publish=7687:7687 --volume=$HOME/neo4j/data:/data neo4j
Use Blockchain API according the term of service and request limits.
- pandas
- py2neo
- requests
NEO4J_USER and NEO4J_PASS must being configure.
- Windows - (make sure you Run as administrator so you're able to add a system environment variable).
setx -m NEO4J_USER "<user_name>" setx -m NEO4J_PASS "<password>"
- Linux or MAC - (recommended to add to ~/.bash_profile)
$ export NEO4J_USER=<user_name> $ export NEO4J_PASS=<password>
Setup instruction:
- Install Cli:
$ python3 -m pip install https://github.com/MatufA/blockchain-blocks-analyzer.git
- Print help:
$ btc-analyzer --help
- Track wallet transaction:
$ btc-analyzer -tr "<wallet_hash>"
Clone and setup requirements:
$ git clone https://github.com/MatufA/blockchain-blocks-analyzer.git
$ cd blockchain-blocks-analyzer
$ python3 -m pip install -r requirements.txt
Main classes and function description:
- Config.py - a configuration file with common function.
- conf_logger - a function to configure a logger.
- print_json_to_file - a function to print output json beautify.
- node_builder.py - a class which responsible to link all the project.
- create_node - a function to keep track suspicious wallet.
- nodes_builder - a function to analyze suspicious wallet and draw a money flow.
- neo4j_handler.py - a handler function to communicate with Neo4j database.
- connect_db - a function to create a connection to db.
- generate_graph - a function to generate a graph database from json file.
- blockchain_track - a handler function to track a money flow of a wallet.
- get_single_address - a function to fetch all transactions information of a wallet.
- generate_record - a function to generate a record of wallet transaction.
GNU General Public License v3.0