bcloop

Crates.iobcloop
lib.rsbcloop
version0.1.0
created_at2025-05-27 02:00:29.116653+00
updated_at2025-05-27 02:00:29.116653+00
descriptionA tool for processing Bitcoin-like blockchain data
homepage
repositoryhttps://github.com/vladkens/bcloop
max_upload_size
id1690501
size49,892
(vladkens)

documentation

README

bcloop

A Bitcoin-like blockchain parser for local nodes, written in pure Rust. It parses raw blockchain .dat files and produces UTXO dumps in CSV format for analysis. Compatible with Bitcoin, Litecoin, Bitcoin Cash, and similar blockchains.

Features

  • Pure Rust implementation with no LevelDB dependency
  • Memory-efficient design that works on machines where UTXO HashMaps can't fit into RAM
  • Parallel processing for faster data extraction
  • Direct parsing of blockchain .dat files (ordered blocks)
  • CSV output format for easy integration with analysis tools
  • Multi-blockchain support

CLI usage

cargo install bcloop

UTXO dump

bcloop utxodump /path/to/blockchain/blocks output.csv

Library usage

cargo add bcloop
use bcloop::{BcWalker, AddrType};

// Initialize the blockchain walker
let walker = BcWalker::from_dir("/path/to/blockchain/blocks")?;

let chan = walker.get_chan();
while let Ok((blk, blk_size)) = chan.recv() {
  println!("Block {} have {} txs", block.height, block.txs.len());

  for tx in blk.txs.iter() {
    for txo in tx.outputs.iter() { /* Process txo data... */ }
    for txi in tx.inputs.iter() { /* Process txi data... */ }
  }
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 13

cargo fmt