Skip to main content

Crate brk

Crate brk 

Source
Expand description

§brk

Umbrella crate for the Bitcoin Research Kit.

crates.io | docs.rs

§Usage

Single dependency to access any BRK component. Enable only what you need via feature flags.

[dependencies]
brk = { version = "0.1", features = ["query", "types"] }
use brk::query::Query;
use brk::types::Height;

Feature flags match crate names without the brk_ prefix. Use full to enable all.

§Crates

Core Pipeline

CrateDescription
brk_readerRead blocks from blk*.dat with parallel parsing and XOR decoding
brk_indexerIndex transactions, addresses, and UTXOs
brk_computerCompute derived metrics (realized cap, MVRV, SOPR, cohorts, etc.)
brk_mempoolMonitor mempool, estimate fees, project upcoming blocks
brk_queryQuery interface for indexed and computed data
brk_serverREST API with OpenAPI docs

Data & Storage

CrateDescription
brk_typesDomain types: Height, Sats, Txid, addresses, etc.
brk_storeKey-value storage (fjall wrapper)
brk_fetcherFetch price data from exchanges
brk_rpcBitcoin Core RPC client
brk_iteratorUnified block iteration with automatic source selection
brk_cohortUTXO and address cohort filtering
brk_traversableNavigate hierarchical data structures

Clients & Integration

CrateDescription
brk_clientGenerated Rust API client
brk_bindgenGenerate typed clients (Rust, JavaScript, Python)

Internal

CrateDescription
brk_cliCLI binary (cargo install --locked brk_cli)
brk_errorError types
brk_loggerLogging infrastructure
brk_bencherBenchmarking utilities

Modules§

bencher
bindgen
client
cohort
brk_cohort
computer
brk_computer
error
brk_error
fetcher
brk_fetcher
indexer
brk_indexer
iterator
logger
brk_logger
mempool
query
brk_query
reader
brk_reader
rpc
server
brk_server
store
brk_store
traversable
types
brk_types