bitcoin_explorer/
lib.rs

1//!
2//! # Introduction
3//!
4//! This library is designed for efficient and massive deserialization
5//! of the binary Bitcoin Core block files.
6//!
7//! It decodes all transactions, addresses, script types,
8//! connects outpoints of inputs to outputs, to figure out
9//! input addresses.
10//!
11//! This library allows efficient and versatile reading of all
12//! bitcoin transaction records. This is good for analysis and research on
13//! bitcoin trading behaviour.
14//!
15//! # Example
16//!
17//! ```rust
18//! use bitcoin_explorer::BitcoinDB;
19//! use std::path::Path;
20//!
21//! let path = Path::new("/Users/me/bitcoin");
22//!
23//! // launch without reading txindex
24//! let db = BitcoinDB::new(path, false).unwrap();
25//!
26//! // launch attempting to read txindex
27//! let db = BitcoinDB::new(path, true).unwrap();
28//! ```
29//!
30//! # Features
31//!
32//! Feature '`on-disk-utxo`' is enabled by default,
33//! which uses an on-disk cache to keep track of unspent transaction
34//! for iterator `db.iter_connected_block`.
35//!
36//! To use in-memory UTXO cache for better performance,
37//! use `default-features = false` to Cargo.toml,
38//! which requires 32GB+ RAM.
39//!
40
41pub(crate) mod api;
42pub mod iter;
43pub mod parser;
44
45#[doc(inline)]
46pub use crate::api::*;