The Bitcoin Blockchain Analysis Tool is a command-line interface (CLI) application designed to analyze Bitcoin addresses, transactions, and blocks. It provides detailed insights into wallet clustering, transaction flows, and large transactions within blocks.
- Address Analysis: Analyze Bitcoin addresses for wallet clustering and transaction flows.
- Transaction Tracing: Trace the flow of transactions for given addresses up to a specified depth.
- Block Analysis: Analyze blocks for large transactions above a specified threshold.
- Detailed Reports: Generate and save detailed analysis reports in JSON format.
- Local Database Cache: Utilize a local SQLite database to cache API responses, improving performance and reducing redundant API calls.
- Clone the repository:
git clone https://github.com/gianlucamazza/bitcoin-blockchain-analysis-tool.git
- Navigate to the project directory:
cd bitcoin-blockchain-analysis-tool
- Install the required dependencies:
pip install -r requirements.txt
The script can be run from the command line with various options for analysis. Below are some usage examples:
--addresses
: Bitcoin address(es) to analyze.--transaction
: Transaction ID to analyze.--block
: Block hash to analyze.--flow-depth
: Depth for transaction flow analysis (default: 5).--cluster-depth
: Depth for wallet cluster analysis (default: 2).--large-tx-threshold
: Threshold for large transaction detection in BTC (default: 10).--output
: Output file for the report in JSON format.
To analyze one or more Bitcoin addresses:
python script_name.py --addresses address1 address2 --flow-depth 3 --cluster-depth 2
To analyze a specific transaction:
python script_name.py --transaction txid --flow-depth 3
To analyze a specific block:
python script_name.py --block block_hash --large-tx-threshold 20
To save the analysis report to a file:
python script_name.py --addresses address1 address2 --output report.json
The tool uses Python's logging module to provide detailed logs of its operations. Logs are printed to the console to help trace the execution and identify any issues.
Contributions are welcome! Please fork the repository and submit a pull request with your changes. Ensure your code follows the existing coding style and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for more details.