#csv #scan #extract #rocks-db #leveldb #utxo #bitcoin

utxo-scanner

Scans the chainstate LevelDB database of, Bitcoin Core and extracts all UTXOs into either a RocksDB database, CSV file, or both

5 releases (3 breaking)

0.4.0 Mar 26, 2023
0.3.1 Mar 24, 2023
0.3.0 Mar 24, 2023
0.2.0 Mar 13, 2023
0.1.0 Feb 18, 2023

#13 in #utxo

41 downloads per month

MIT license

20KB
463 lines

UTXO Scanner

Scans the chainstate LevelDB from Bitcoin Core, extracts all UTXOs, and places them in RocksDB, a CSV file or both.

Usage

use utxo_scanner

//Scan for all UTXOs
let stats = utxo_scanner::scan("/path/to/.bitcoin", true, Some("/path/to/desired.csv"));

println!("Total Txs: {}", stats.count);
println!("Total Amount: {}", stats.amount);
println!("Total Secs: {}", stats.total_secs);

// Remove RocksDB and start fresh
utxo_scanner::reset_rocksdb


https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata

Dependencies

~71MB
~1M SLoC