Skip to main content

Crate brk_client

Crate brk_client 

Source

Structs§

ActivityAddrCostOutputsRealizedRelativeSupplyUnrealizedPattern
Pattern struct for repeated tree structure.
ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern
Pattern struct for repeated tree structure.
ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern3
Pattern struct for repeated tree structure.
ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern4
Pattern struct for repeated tree structure.
ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern5
Pattern struct for repeated tree structure.
ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern6
Pattern struct for repeated tree structure.
ActivityCostOutputsRealizedSupplyUnrealizedPattern
Pattern struct for repeated tree structure.
Address
Bitcoin address string
AddressChainStats
Address statistics on the blockchain (confirmed transactions only)
AddressGroups
AddressHash
AddressIndexOutPoint
AddressIndexTxIndex
AddressMempoolStats
Address statistics in the mempool (unconfirmed transactions only)
AddressParam
AddressStats
Address information compatible with mempool.space API format
AddressTxidsParam
AddressValidation
Address validation result
AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern
Pattern struct for repeated tree structure.
AdjustedCapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2
Pattern struct for repeated tree structure.
Age
Represents the age of a UTXO or address balance. Encapsulates all age-related calculations in one type-safe struct.
AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern
Pattern struct for repeated tree structure.
AmountBucket
Bucket index for amount ranges. Use for cheap comparisons and direct lookups.
AnyAddressIndex
Unified index for any address type (funded or empty)
AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern
Pattern struct for repeated tree structure.
AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2
Pattern struct for repeated tree structure.
AverageBaseMaxMedianMinPct10Pct25Pct75Pct90Pattern
Pattern struct for repeated tree structure.
AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2
Pattern struct for repeated tree structure.
AverageMaxMedianMinPct10Pct25Pct75Pct90TxindexPattern
Pattern struct for repeated tree structure.
BalanceBothReactivatedReceivingSendingPattern
Pattern struct for repeated tree structure.
BaseCumulativeSumPattern
Pattern struct for repeated tree structure.
Bitcoin
Bitcoin amount as floating point (1 BTC = 100,000,000 satoshis)
BitcoinDollarsSatsPattern2
Pattern struct for repeated tree structure.
BitcoinDollarsSatsPattern3
Pattern struct for repeated tree structure.
BitcoinDollarsSatsPattern4
Pattern struct for repeated tree structure.
BitcoinDollarsSatsPattern5
Pattern struct for repeated tree structure.
BitcoinDollarsSatsPattern6
Pattern struct for repeated tree structure.
BlkMetadata
BlkPosition
Position within a .blk file, encoding file index and byte offset
Block
BlockCountParam
BlockFeeRatesEntry
A single block fee rates data point with percentiles.
BlockFeesEntry
A single block fees data point.
BlockHash
Block hash
BlockHashParam
BlockHashPrefix
BlockHashStartIndex
BlockHashTxIndex
BlockInfo
Block information returned by the API
BlockRewardsEntry
A single block rewards data point.
BlockSizeEntry
A single block size data point.
BlockSizesWeights
Combined block sizes and weights response.
BlockStatus
Block status indicating whether block is in the best chain
BlockTimestamp
Block information returned for timestamp queries
BlockWeightEntry
A single block weight data point.
BrkClient
Main BRK client with metrics tree and API methods.
BrkClientBase
Base HTTP client for making requests.
BrkClientOptions
Options for configuring the BRK client.
BrkError
Error type for BRK client operations.
ByAddressType
ByAgeRange
ByAmountRange
ByAnyAddress
ByEpoch
ByGreatEqualAmount
ByLowerThanAmount
ByMaxAge
ByMinAge
BySpendableType
ByTerm
ByUnspendableType
ByYear
CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern
Pattern struct for repeated tree structure.
CapCapitulationInvestorLossMvrvNegNetPeakProfitRealizedSellSentSoprTotalValuePattern2
Pattern struct for repeated tree structure.
CentsSats
Cents × Sats (u128) - price in cents multiplied by amount in sats. Uses u128 because large amounts at any price can overflow u64.
CentsSigned
Signed cents (i64) - for values that can be negative. Used for profit/loss calculations, deltas, etc.
CentsSquaredSats
Raw cents squared (u128) - stores cents² × sats without division. Used for precise accumulation of investor cap values: Σ(price² × sats). investor_price = investor_cap_raw / realized_cap_raw
CentsUnsigned
Unsigned cents (u64) - for values that should never be negative. Used for invested capital, realized cap, etc.
CentsUnsignedCompact
Compact unsigned cents (u32) - memory-efficient for map keys. Supports values from $0.00 to $42,949,672.95 (u32::MAX / 100).
Close
Closing price value for a time period
CloseHighLowOpenPattern2
Pattern struct for repeated tree structure.
Cohort
Cohort identifier for cost basis distribution.
CohortName
Display names for a cohort with id (for storage/API), short (for charts), and long (for tooltips/labels)
CoinblocksCoindaysSatblocksSatdaysSentPattern
Pattern struct for repeated tree structure.
ComputeIndexes
Extended indexes with time-based granularities. Used by brk_computer for time-series aggregation.
CostBasisCohortParam
Path parameters for cost basis dates endpoint.
CostBasisDistribution
Cost basis distribution: a map of price (cents) to sats.
CostBasisParams
Path parameters for cost basis distribution endpoint.
CostBasisQuery
Query parameters for cost basis distribution endpoint.
CostBasisSnapshot
Snapshot of cost basis related state. Uses CentsSats (u64) for single-UTXO values, CentsSquaredSats (u128) for investor cap.
CumulativeSumPattern
Pattern struct for repeated tree structure.
CumulativeSumPattern2
Pattern struct for repeated tree structure.
DataRange
Range parameters for slicing data
DataRangeFormat
Data range with output format for API query parameters
Date
Date in YYYYMMDD format stored as u32
DateIndex
DecadeIndex
DetailedMetricCount
Detailed metric count with per-database breakdown
DifficultyAdjustment
Difficulty adjustment information.
DifficultyAdjustmentEntry
A single difficulty adjustment entry. Serializes as array: [timestamp, height, difficulty, change_percent]
DifficultyEntry
A single difficulty data point.
DifficultyEpoch
DiskUsage
Disk usage of the indexed data
Dollars
US Dollar amount as floating point
DollarsSatsPattern
Pattern struct for repeated tree structure.
DollarsSatsPattern2
Pattern struct for repeated tree structure.
EmptyAddressData
Data of an empty address
EmptyAddressIndex
EmptyOutputIndex
Etag
HTTP ETag value.
Exit
Graceful shutdown coordinator for ensuring data consistency during program exit.
FeeRate
Fee rate in sats/vB
FeeRatePercentiles
Fee rate percentiles (min, 10%, 25%, 50%, 75%, 90%, max).
FundedAddressData
Data for a funded (non-empty) address with current balance
FundedAddressIndex
GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern
Pattern struct for repeated tree structure.
GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern
Pattern struct for repeated tree structure.
GroupedByType
HalvingEpoch
HashrateEntry
A single hashrate data point.
HashrateSummary
Summary of network hashrate and difficulty data.
Health
Server health status
Height
Block height
HeightParam
Hex
Hex-encoded string
High
Highest price value for a time period
IndexInfo
Information about an available index and its query aliases
Indexes
Blockchain-level indexes tracking current positions for various entity types. Used by brk_indexer during block processing.
InvestedMaxMinPercentilesSpotPattern
Pattern struct for repeated tree structure.
InvestedNegNetNuplSupplyUnrealizedPattern
Pattern struct for repeated tree structure.
InvestedNegNetNuplSupplyUnrealizedPattern3
Pattern struct for repeated tree structure.
InvestedNegNetNuplSupplyUnrealizedPattern4
Pattern struct for repeated tree structure.
InvestedNegNetSupplyUnrealizedPattern
Pattern struct for repeated tree structure.
InvestedSupplyPattern
Pattern struct for repeated tree structure.
JSONPool
Limit
Maximum number of results to return. Defaults to 100 if not specified.
LimitParam
Low
Lowest price value for a time period
MaxMinPattern
Pattern struct for repeated tree structure.
MempoolBlock
Block info in a mempool.space like format for fee estimation.
MempoolEntryInfo
Mempool entry info from Bitcoin Core’s getrawmempool verbose
MempoolInfo
Mempool statistics
Metric
Metric name
MetricCount
Metric count statistics - distinct metrics and total metric-index combinations
MetricData
Metric data with range information.
MetricEndpointBuilder
Initial builder for metric endpoint queries.
MetricLeaf
Leaf node containing metric metadata
MetricLeafWithSchema
MetricLeaf with JSON Schema for client generation
MetricOutput
Metric output with metadata for caching.
MetricOutputLegacy
Deprecated: Legacy metric output with metadata for caching.
MetricParam
MetricPattern1
MetricPattern2
MetricPattern3
MetricPattern4
MetricPattern5
MetricPattern6
MetricPattern7
MetricPattern8
MetricPattern9
MetricPattern1By
MetricPattern2By
MetricPattern3By
MetricPattern4By
MetricPattern5By
MetricPattern6By
MetricPattern7By
MetricPattern8By
MetricPattern9By
MetricPattern10
MetricPattern11
MetricPattern12
MetricPattern13
MetricPattern14
MetricPattern15
MetricPattern16
MetricPattern17
MetricPattern18
MetricPattern19
MetricPattern20
MetricPattern21
MetricPattern22
MetricPattern23
MetricPattern24
MetricPattern25
MetricPattern26
MetricPattern27
MetricPattern28
MetricPattern29
MetricPattern30
MetricPattern31
MetricPattern32
MetricPattern10By
MetricPattern11By
MetricPattern12By
MetricPattern13By
MetricPattern14By
MetricPattern15By
MetricPattern16By
MetricPattern17By
MetricPattern18By
MetricPattern19By
MetricPattern20By
MetricPattern21By
MetricPattern22By
MetricPattern23By
MetricPattern24By
MetricPattern25By
MetricPattern26By
MetricPattern27By
MetricPattern28By
MetricPattern29By
MetricPattern30By
MetricPattern31By
MetricPattern32By
MetricSelection
Selection of metrics to query
MetricSelectionLegacy
Legacy metric selection parameters (deprecated)
MetricWithIndex
Metrics
Comma-separated list of metric names
MetricsTree
Metrics tree node.
MetricsTree_Addresses
Metrics tree node.
MetricsTree_Blocks
Metrics tree node.
MetricsTree_Blocks_Count
Metrics tree node.
MetricsTree_Blocks_Difficulty
Metrics tree node.
MetricsTree_Blocks_Halving
Metrics tree node.
MetricsTree_Blocks_Mining
Metrics tree node.
MetricsTree_Blocks_Rewards
Metrics tree node.
MetricsTree_Blocks_Rewards_24hCoinbaseSum
Metrics tree node.
MetricsTree_Blocks_Size
Metrics tree node.
MetricsTree_Blocks_Time
Metrics tree node.
MetricsTree_Cointime
Metrics tree node.
MetricsTree_Cointime_Activity
Metrics tree node.
MetricsTree_Cointime_Adjusted
Metrics tree node.
MetricsTree_Cointime_Cap
Metrics tree node.
MetricsTree_Cointime_Pricing
Metrics tree node.
MetricsTree_Cointime_ReserveRisk
Metrics tree node.
MetricsTree_Cointime_Supply
Metrics tree node.
MetricsTree_Cointime_Value
Metrics tree node.
MetricsTree_Constants
Metrics tree node.
MetricsTree_Distribution
Metrics tree node.
MetricsTree_Distribution_AddressActivity
Metrics tree node.
MetricsTree_Distribution_AddressCohorts
Metrics tree node.
MetricsTree_Distribution_AddressCohorts_AmountRange
Metrics tree node.
MetricsTree_Distribution_AddressCohorts_GeAmount
Metrics tree node.
MetricsTree_Distribution_AddressCohorts_LtAmount
Metrics tree node.
MetricsTree_Distribution_AddressesData
Metrics tree node.
MetricsTree_Distribution_AnyAddressIndexes
Metrics tree node.
MetricsTree_Distribution_GrowthRate
Metrics tree node.
MetricsTree_Distribution_NewAddrCount
Metrics tree node.
MetricsTree_Distribution_TotalAddrCount
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_AgeRange
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_All
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_All_Relative
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_AmountRange
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_Epoch
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_GeAmount
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_LtAmount
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_MaxAge
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_MinAge
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_Term
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_Term_Long
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_Term_Short
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_Type
Metrics tree node.
MetricsTree_Distribution_UtxoCohorts_Year
Metrics tree node.
MetricsTree_Indexes
Metrics tree node.
MetricsTree_Indexes_Address
Metrics tree node.
MetricsTree_Indexes_Address_Empty
Metrics tree node.
MetricsTree_Indexes_Address_Opreturn
Metrics tree node.
MetricsTree_Indexes_Address_P2a
Metrics tree node.
MetricsTree_Indexes_Address_P2ms
Metrics tree node.
MetricsTree_Indexes_Address_P2pk33
Metrics tree node.
MetricsTree_Indexes_Address_P2pk65
Metrics tree node.
MetricsTree_Indexes_Address_P2pkh
Metrics tree node.
MetricsTree_Indexes_Address_P2sh
Metrics tree node.
MetricsTree_Indexes_Address_P2tr
Metrics tree node.
MetricsTree_Indexes_Address_P2wpkh
Metrics tree node.
MetricsTree_Indexes_Address_P2wsh
Metrics tree node.
MetricsTree_Indexes_Address_Unknown
Metrics tree node.
MetricsTree_Indexes_Dateindex
Metrics tree node.
MetricsTree_Indexes_Decadeindex
Metrics tree node.
MetricsTree_Indexes_Difficultyepoch
Metrics tree node.
MetricsTree_Indexes_Halvingepoch
Metrics tree node.
MetricsTree_Indexes_Height
Metrics tree node.
MetricsTree_Indexes_Monthindex
Metrics tree node.
MetricsTree_Indexes_Quarterindex
Metrics tree node.
MetricsTree_Indexes_Semesterindex
Metrics tree node.
MetricsTree_Indexes_Txindex
Metrics tree node.
MetricsTree_Indexes_Txinindex
Metrics tree node.
MetricsTree_Indexes_Txoutindex
Metrics tree node.
MetricsTree_Indexes_Weekindex
Metrics tree node.
MetricsTree_Indexes_Yearindex
Metrics tree node.
MetricsTree_Inputs
Metrics tree node.
MetricsTree_Inputs_Spent
Metrics tree node.
MetricsTree_Market
Metrics tree node.
MetricsTree_Market_Ath
Metrics tree node.
MetricsTree_Market_Dca
Metrics tree node.
MetricsTree_Market_Dca_ClassAveragePrice
Metrics tree node.
MetricsTree_Market_Dca_ClassDaysInLoss
Metrics tree node.
MetricsTree_Market_Dca_ClassDaysInProfit
Metrics tree node.
MetricsTree_Market_Dca_ClassMaxReturn
Metrics tree node.
MetricsTree_Market_Dca_ClassMinReturn
Metrics tree node.
MetricsTree_Market_Dca_ClassStack
Metrics tree node.
MetricsTree_Market_Dca_PeriodAveragePrice
Metrics tree node.
MetricsTree_Market_Indicators
Metrics tree node.
MetricsTree_Market_Lookback
Metrics tree node.
MetricsTree_Market_MovingAverage
Metrics tree node.
MetricsTree_Market_Range
Metrics tree node.
MetricsTree_Market_Returns
Metrics tree node.
MetricsTree_Market_Returns_PriceReturns
Metrics tree node.
MetricsTree_Market_Volatility
Metrics tree node.
MetricsTree_Outputs
Metrics tree node.
MetricsTree_Outputs_Count
Metrics tree node.
MetricsTree_Outputs_Spent
Metrics tree node.
MetricsTree_Pools
Metrics tree node.
MetricsTree_Pools_Vecs
Metrics tree node.
MetricsTree_Positions
Metrics tree node.
MetricsTree_Price
Metrics tree node.
MetricsTree_Price_Cents
Metrics tree node.
MetricsTree_Price_Cents_Split
Metrics tree node.
MetricsTree_Price_Usd
Metrics tree node.
MetricsTree_Scripts
Metrics tree node.
MetricsTree_Scripts_Count
Metrics tree node.
MetricsTree_Scripts_Value
Metrics tree node.
MetricsTree_Supply
Metrics tree node.
MetricsTree_Supply_Burned
Metrics tree node.
MetricsTree_Supply_Circulating
Metrics tree node.
MetricsTree_Supply_Velocity
Metrics tree node.
MetricsTree_Transactions
Metrics tree node.
MetricsTree_Transactions_Count
Metrics tree node.
MetricsTree_Transactions_Fees
Metrics tree node.
MetricsTree_Transactions_Fees_Fee
Metrics tree node.
MetricsTree_Transactions_Size
Metrics tree node.
MetricsTree_Transactions_Versions
Metrics tree node.
MetricsTree_Transactions_Volume
Metrics tree node.
MonthIndex
OHLCCentsUnsigned
OHLC (Open, High, Low, Close) data in cents
OHLCDollars
OHLC (Open, High, Low, Close) data in dollars
OHLCSats
OHLC (Open, High, Low, Close) data in satoshis
OhlcSplitPattern2
Pattern struct for repeated tree structure.
OpReturnIndex
Open
Opening price value for a time period
OracleBins
Phase histogram: counts per bin for frac(log10(sats))
OracleBinsV2
V2 Phase histogram: counts per bin for frac(log10(sats))
OutPoint
P2AAddressIndex
P2ABytes
P2MSOutputIndex
P2PK33AddressIndex
P2PK33Bytes
P2PK65AddressIndex
P2PK65Bytes
P2PKHAddressIndex
P2PKHBytes
P2SHAddressIndex
P2SHBytes
P2TRAddressIndex
P2TRBytes
P2WPKHAddressIndex
P2WPKHBytes
P2WSHAddressIndex
P2WSHBytes
PaginatedMetrics
A paginated list of available metric names (1000 per page)
Pagination
Pagination parameters for paginated API endpoints
PaginationIndex
Pagination parameters with an index filter
PairOutputIndex
Index for 2-output transactions (oracle pair candidates)
Pct05Pct10Pct15Pct20Pct25Pct30Pct35Pct40Pct45Pct50Pct55Pct60Pct65Pct70Pct75Pct80Pct85Pct90Pct95Pattern
Pattern struct for repeated tree structure.
Pool
Mining pool information
PoolBlockCounts
Block counts for different time periods
PoolBlockShares
Pool’s share of total blocks for different time periods
PoolDetail
Detailed pool information with statistics across time periods
PoolDetailInfo
Pool information for detail view
PoolInfo
Basic pool information for listing all pools
PoolSlugParam
PoolStats
Mining pool with block statistics for a time period
Pools
PoolsSummary
Mining pools response for a time period
Port
Server port. Defaults to 3110.
PriceRatioPattern
Pattern struct for repeated tree structure.
QuarterIndex
RangeBuilder
Builder with range fully specified.
RatioPattern
Pattern struct for repeated tree structure.
RatioPattern2
Pattern struct for repeated tree structure.
RawLockTime
Transaction locktime
ReadBlock
RecommendedFees
Recommended fee rates in sat/vB
RewardStats
Block reward statistics over a range of blocks
Sats
Satoshis
SatsFract
Fractional satoshis (f64) - for representing USD prices in sats
SatsSigned
Signed satoshis (i64) - for values that can be negative. Used for changes, deltas, profit/loss calculations, etc.
SdSmaPattern
Pattern struct for repeated tree structure.
SemesterIndex
SingleItemBuilder
Builder for single item access.
SkippedBuilder
Builder after calling skip(n). Chain with take(n) to specify count.
StoredBool
Fixed-size boolean value optimized for on-disk storage (stored as u8)
StoredF32
Stored 32-bit floating point value
StoredF64
Fixed-size 64-bit floating point value optimized for on-disk storage
StoredI8
StoredI16
StoredString
StoredU8
StoredU16
StoredU32
Fixed-size 32-bit unsigned integer optimized for on-disk storage
StoredU64
Fixed-size 64-bit unsigned integer optimized for on-disk storage
SupplyState
Current supply state tracking UTXO count and total value
SyncStatus
Sync status of the indexer
TimePeriodParam
Timestamp
UNIX timestamp in seconds
TimestampParam
Transaction
Transaction information compatible with mempool.space API format
TxIn
Transaction input
TxInIndex
TxIndex
TxOut
Transaction output
TxOutIndex
TxOutspend
Status of an output indicating whether it has been spent
TxStatus
Transaction confirmation status
TxVersion
Transaction version number
TxWithHex
A transaction with its raw hex representation
Txid
Transaction ID (hash)
TxidParam
TxidPrefix
TxidVout
Transaction output reference (txid + output index)
TypeIndex
Index within its type (e.g., 0 for first P2WPKH address)
U8x2
U8x20
U8x32
U8x33
U8x65
UTXOGroups
Unit
UnknownOutputIndex
Utxo
Unspent transaction output
UtxoPattern
Pattern struct for repeated tree structure.
VSize
Virtual size in vbytes (weight / 4, rounded up)
ValidateAddressParam
Version
Version tracking for data schema and computed values.
Vin
Input index in the spending transaction
Vout
Index of the output being spent in the previous transaction
WeekIndex
Weight
Transaction or block weight in weight units (WU)
Year
Bitcoin year (2009, 2010, …, 2025+)
YearIndex
_0sdM0M1M1sdM2M2sdM3sdP0P1P1sdP2P2sdP3sdSdSmaZscorePattern
Pattern struct for repeated tree structure.
_1m1w1y24hBlocksCoinbaseDaysDominanceFeeSubsidyPattern
Pattern struct for repeated tree structure.
_10y1m1w1y2y3m3y4y5y6m6y8yPattern2
Pattern struct for repeated tree structure.
_10y1m1w1y2y3m3y4y5y6m6y8yPattern3
Pattern struct for repeated tree structure.
_10y2y3y4y5y6y8yPattern
Pattern struct for repeated tree structure.
_30dCountPattern
Pattern struct for repeated tree structure.
_30dHalvedTotalPattern
Pattern struct for repeated tree structure.
_201520162017201820192020202120222023202420252026Pattern2
Pattern struct for repeated tree structure.

Enums§

AddressBytes
AmountFilter
AnyAddressDataIndexEnum
CohortContext
Context for cohort naming - determines whether a prefix is needed.
CostBasisBucket
Bucket type for cost basis aggregation. Options: raw (no aggregation), lin200/lin500/lin1000 (linear $200/$500/$1000), log10/log50/log100 (logarithmic with 10/50/100 buckets per decade).
CostBasisValue
Value type for cost basis distribution. Options: supply (BTC), realized (USD, price × supply), unrealized (USD, spot × supply).
Filter
Format
Output format for API responses
FormatResponse
Response type for endpoints that support multiple formats (JSON/CSV).
Index
Aggregation dimension for querying metrics. Includes time-based (date, week, month, year), block-based (height, txindex), and address/output type indexes.
LegacyValue
Deprecated: Raw JSON without metadata wrapper.
Output
Metric data output format
OutputLegacy
Deprecated: Raw JSON without metadata wrapper
OutputType
Type (P2PKH, P2WPKH, P2SH, P2TR, etc.)
PoolSlug
StateLevel
Controls the level of state tracking for a cohort.
Term
Classification for short-term vs long-term holders. The threshold is 150 days (approximately 5 months) = 3600 hours.
TimeFilter
TimePeriod
Time period for mining statistics.
TreeNode
Hierarchical tree node for organizing metrics into categories

Constants§

AGE_BOUNDARIES
Age boundaries in hours. Defines the cohort ranges: [0, 1h), [1h, 1d), [1d, 1w), [1w, 1m), …, [15y, ∞)
AGE_RANGE_BOUNDS
Age range bounds (end = usize::MAX means unbounded)
AGE_RANGE_FILTERS
Age range filters
AGE_RANGE_NAMES
Age range names
AMOUNT_RANGE_BOUNDS
Amount range bounds
AMOUNT_RANGE_FILTERS
Amount range filters
AMOUNT_RANGE_NAMES
Amount range names
BLOCKS_PER_DIFF_EPOCHS
BLOCKS_PER_HALVING
EPOCH_FILTERS
Epoch filters
EPOCH_NAMES
Epoch names
EPOCH_VALUES
Epoch values
GE_AMOUNT_FILTERS
Greater-or-equal amount filters
GE_AMOUNT_NAMES
Greater-or-equal amount names
GE_AMOUNT_THRESHOLDS
Greater-or-equal amount thresholds
HOURS_1D
HOURS_1H
HOURS_1M
HOURS_1W
HOURS_1Y
HOURS_2M
HOURS_2Y
HOURS_3M
HOURS_3Y
HOURS_4M
HOURS_4Y
HOURS_5M
HOURS_5Y
HOURS_6M
HOURS_6Y
HOURS_7Y
HOURS_8Y
HOURS_10Y
HOURS_12Y
HOURS_15Y
LT_AMOUNT_FILTERS
Lower-than amount filters
LT_AMOUNT_NAMES
Lower-than amount names
LT_AMOUNT_THRESHOLDS
Lower-than amount thresholds
MAX_AGE_FILTERS
Max age filters (LowerThan threshold in hours)
MAX_AGE_HOURS
Max age thresholds in hours
MAX_AGE_NAMES
Max age names
MIN_AGE_FILTERS
Min age filters (GreaterOrEqual threshold in hours)
MIN_AGE_HOURS
Min age thresholds in hours
MIN_AGE_NAMES
Min age names
ONE_DAY_IN_SEC
ONE_DAY_IN_SEC_F64
ONE_HOUR_IN_SEC
P2A
P2PK33
P2PK65
P2PKH
P2SH
P2TR
P2WPKH
P2WSH
PERCENTILES
Standard percentile values used throughout BRK.
PERCENTILES_LEN
Length of the PERCENTILES array.
PHASE_BINS
Number of bins for the phase histogram
PHASE_BINS_V2
Number of bins for V2 phase histogram (0.5% resolution)
SPENDABLE_TYPE_FILTERS
Spendable type filters
SPENDABLE_TYPE_NAMES
Spendable type names
SPENDABLE_TYPE_VALUES
Spendable type values
TERM_FILTERS
Term filters
TERM_NAMES
Term names
TERM_VALUES
Term values
YEAR_FILTERS
Year filters
YEAR_NAMES
Year names
YEAR_VALUES
Year values

Traits§

AnyMetricPattern
Non-generic trait for metric patterns (usable in collections).
CheckedSub
Filtered
MetricPattern
Generic trait for metric patterns with endpoint access.
OptionExt
Extension trait for Option to provide shorter unwrap methods
PrintableIndex
Provides string representations of index types for display and region naming.

Functions§

amounts_in_different_buckets
Check if two amounts are in different buckets. O(1).
de_unquote_i64
de_unquote_limit
de_unquote_usize
extract_json_type
Extract JSON type from a schema, following $ref if needed.
get_percentile
Get a percentile value from a sorted slice.
pools
zip2_by_addresstype
Zip two ByAddressTypes with a function, producing a new ByAddressType.
zip_by_addresstype
Zip one ByAddressType with a function, producing a new ByAddressType.

Type Aliases§

CostBasisFormatted
Formatted cost basis output. Key: price floor in USD (dollars). Value: BTC (for supply) or USD (for realized/unrealized).
Result
Result type for BRK client operations.
StoredPhantom