brk_types
Bitcoin domain and storage-index types shared across BRK and Bitview.
What it provides
Purpose-built types for heights, amounts, hashes, addresses, transactions,
calendar indexes, protocol epochs, and API values that are intrinsically tied
to Bitcoin. Query-protocol types such as SeriesSelection, SeriesData,
Pagination, and TreeNode live in bitview_types.
Type categories
| Category | Examples |
|---|---|
| Block metadata | Height, BlockHash, BlockTimestamp, BlkPosition |
| Transactions | Txid, TxIndex, TxIn, TxOut, VSize, Weight |
| Addresses | Addr, OutputType, P2PKHAddrIndex, AnyAddrIndex, AddrStats |
| Values | Sats, Bitcoin, Dollars, Cents, OHLCCents |
| Time indexes | Day1, Day3, Week1, Month1, Month3, Month6, Year1, Year10 |
| Protocol | Epoch, Halving, TxVersion, RawLockTime |
The types implement the serialization, JSON Schema, arithmetic, formatting, and vecdb traits needed by their domains rather than exposing a parallel set of API wrapper types.
Example
use ;
let height = new;
let reward = FIFTY_BTC / 16;
let day = try_from?;
Built on
bitcoinfor consensus primitives and address parsingbrk_errorfor shared errorsvecdbfor persistent-vector traits