experiments: import trail, rarity, bedrock htmls

This commit is contained in:
nym21
2026-08-06 14:01:29 +02:00
parent 5806b40e54
commit f363f65275
17 changed files with 6255 additions and 62 deletions
+5 -5
View File
@@ -1075,7 +1075,7 @@ impl<T: DeserializeOwned> SeriesPattern<T> for SeriesPattern35<T> { fn get(&self
/// Pattern struct for repeated tree structure.
pub struct IndexPct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99ScorePattern {
pub index: SeriesPattern1<StoredI8>,
pub pct0_01: CentsSatsUsdPattern,
pub pct0_1: CentsSatsUsdPattern,
pub pct0_5: CentsSatsUsdPattern,
pub pct1: CentsSatsUsdPattern,
pub pct10: CentsSatsUsdPattern,
@@ -1102,7 +1102,7 @@ impl IndexPct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct9
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
index: SeriesPattern1::new(client.clone(), _m(&acc, "index")),
pct0_01: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "pct0_01")),
pct0_1: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "pct0_1")),
pct0_5: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "pct0_5")),
pct1: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "pct01")),
pct10: CentsSatsUsdPattern::new(client.clone(), _m(&acc, "pct10")),
@@ -1178,7 +1178,7 @@ impl Pct05Pct10Pct15Pct20Pct25Pct30Pct35Pct40Pct45Pct50Pct55Pct60Pct65Pct70Pct75
/// Pattern struct for repeated tree structure.
pub struct Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99Pattern {
pub pct0_01: PpmPriceRatioPattern,
pub pct0_1: PpmPriceRatioPattern,
pub pct0_5: PpmPriceRatioPattern,
pub pct1: PpmPriceRatioPattern,
pub pct10: PpmPriceRatioPattern,
@@ -1203,7 +1203,7 @@ impl Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct9
/// Create a new pattern node with accumulated series name.
pub fn new(client: Arc<BrkClientBase>, acc: String) -> Self {
Self {
pct0_01: PpmPriceRatioPattern::new(client.clone(), acc.clone(), "pct0_01".to_string()),
pct0_1: PpmPriceRatioPattern::new(client.clone(), acc.clone(), "pct0_1".to_string()),
pct0_5: PpmPriceRatioPattern::new(client.clone(), acc.clone(), "pct0_5".to_string()),
pct1: PpmPriceRatioPattern::new(client.clone(), acc.clone(), "pct1".to_string()),
pct10: PpmPriceRatioPattern::new(client.clone(), acc.clone(), "pct10".to_string()),
@@ -9758,7 +9758,7 @@ pub struct BrkClient {
impl BrkClient {
/// Client version.
pub const VERSION: &'static str = "v0.3.6";
pub const VERSION: &'static str = "v0.11.0";
/// Create a new client with the given base URL.
pub fn new(base_url: impl Into<String>) -> Self {
+63 -24
View File
@@ -2,6 +2,7 @@ use brk_cohort::ByAddrType;
use brk_types::{
AnyAddrDataIndexEnum, EmptyAddrData, FundedAddrData, OutputType, TxIndex, TypeIndex,
};
use rayon::prelude::*;
use smallvec::SmallVec;
use crate::distribution::{
@@ -12,6 +13,8 @@ use crate::distribution::{
use super::super::cohort::{WithAddrDataSource, update_tx_counts};
use super::lookup::AddrLookup;
const MIN_PARALLEL_LOADS: usize = 128;
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[repr(transparent)]
struct BlockAddress(u64);
@@ -45,6 +48,35 @@ impl BlockAddress {
fn type_index(self) -> TypeIndex {
TypeIndex::from(self.0 as u32)
}
fn load(
self,
first_addr_indexes: &ByAddrType<TypeIndex>,
vr: &VecsReaders,
any_addr_indexes: &AnyAddrIndexesVecs,
addrs_data: &AddrsDataVecs,
) -> WithAddrDataSource<FundedAddrData> {
let addr_type = self.addr_type();
let type_index = self.type_index();
let first = *first_addr_indexes.get(addr_type).unwrap();
if first <= type_index {
return WithAddrDataSource::New(FundedAddrData::default());
}
let any_addr_index = vr.any_addr_index(any_addr_indexes, addr_type, type_index);
match any_addr_index.to_enum() {
AnyAddrDataIndexEnum::Funded(funded_index) => {
let funded_data = vr.funded_data(addrs_data, funded_index);
WithAddrDataSource::FromFunded(funded_index, funded_data)
}
AnyAddrDataIndexEnum::Empty(empty_index) => {
let empty_data = vr.empty_data(addrs_data, empty_index);
WithAddrDataSource::FromEmpty(empty_index, empty_data.into())
}
}
}
}
/// Cache for address data within a flush interval.
@@ -55,6 +87,8 @@ pub struct AddrCache {
empty: AddrTypeToTypeIndexMap<WithAddrDataSource<EmptyAddrData>>,
/// Reusable scratch space for the unique addresses touched by one block.
block_addresses: Vec<BlockAddress>,
/// Reusable scratch space for their loaded sources.
block_sources: Vec<WithAddrDataSource<FundedAddrData>>,
}
impl Default for AddrCache {
@@ -69,6 +103,7 @@ impl AddrCache {
funded: AddrTypeToTypeIndexMap::default(),
empty: AddrTypeToTypeIndexMap::default(),
block_addresses: Vec::new(),
block_sources: Vec::new(),
}
}
@@ -95,7 +130,12 @@ impl AddrCache {
) {
self.block_addresses.clear();
for (addr_type, type_index) in addresses {
if addr_type.is_addr() && !self.contains(addr_type, type_index) {
if addr_type.is_not_addr() {
continue;
}
let first = *first_addr_indexes.get(addr_type).unwrap();
if first <= type_index || !self.contains(addr_type, type_index) {
self.block_addresses
.push(BlockAddress::new(addr_type, type_index));
}
@@ -103,30 +143,29 @@ impl AddrCache {
self.block_addresses.sort_unstable();
self.block_addresses.dedup();
for index in 0..self.block_addresses.len() {
let address = self.block_addresses[index];
let addr_type = address.addr_type();
let type_index = address.type_index();
let first = *first_addr_indexes.get(addr_type).unwrap();
self.block_sources.clear();
if self.block_addresses.len() < MIN_PARALLEL_LOADS {
self.block_sources.extend(
self.block_addresses.iter().copied().map(|address| {
address.load(first_addr_indexes, vr, any_addr_indexes, addrs_data)
}),
);
} else {
self.block_addresses
.par_iter()
.copied()
.map(|address| address.load(first_addr_indexes, vr, any_addr_indexes, addrs_data))
.collect_into_vec(&mut self.block_sources);
}
let source = if first <= type_index {
WithAddrDataSource::New(FundedAddrData::default())
} else {
let any_addr_index = vr.any_addr_index(any_addr_indexes, addr_type, type_index);
match any_addr_index.to_enum() {
AnyAddrDataIndexEnum::Funded(funded_index) => {
let funded_data = vr.funded_data(addrs_data, funded_index);
WithAddrDataSource::FromFunded(funded_index, funded_data)
}
AnyAddrDataIndexEnum::Empty(empty_index) => {
let empty_data = vr.empty_data(addrs_data, empty_index);
WithAddrDataSource::FromEmpty(empty_index, empty_data.into())
}
}
};
self.funded.insert_for_type(addr_type, type_index, source);
for (address, source) in self
.block_addresses
.iter()
.copied()
.zip(self.block_sources.drain(..))
{
self.funded
.insert_for_type(address.addr_type(), address.type_index(), source);
}
}
@@ -28,7 +28,7 @@ pub struct Band<M: StorageMode = Rw> {
#[derive(Traversable)]
pub struct Component<M: StorageMode = Rw> {
pub pct0_01: Band<M>,
pub pct0_1: Band<M>,
pub pct0_5: Band<M>,
pub pct1: Band<M>,
pub pct2: Band<M>,
@@ -55,7 +55,7 @@ pub struct Component<M: StorageMode = Rw> {
cached_price: CachedComponentPrice,
}
const VERSION: Version = Version::new(9);
const VERSION: Version = Version::new(10);
impl Component {
fn forced_import(
@@ -93,7 +93,7 @@ impl Component {
}
Ok(Self {
pct0_01: import_band!("pct0_01"),
pct0_1: import_band!("pct0_1"),
pct0_5: import_band!("pct0_5"),
pct1: import_band!("pct1"),
pct2: import_band!("pct2"),
@@ -155,7 +155,7 @@ impl Component {
let new_ratios = ratio_source.collect_range_at(start, ratio_len);
let mut pct_vecs: [&mut EagerVec<PcoVec<Height, PartsPerMillion32>>; 19] = [
&mut self.pct0_01.ratio.ppm.height,
&mut self.pct0_1.ratio.ppm.height,
&mut self.pct0_5.ratio.ppm.height,
&mut self.pct1.ratio.ppm.height,
&mut self.pct2.ratio.ppm.height,
@@ -176,7 +176,7 @@ impl Component {
&mut self.pct99_9.ratio.ppm.height,
];
const PCTS: [f64; 19] = [
0.0001, 0.005, 0.01, 0.02, 0.05, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80,
0.001, 0.005, 0.01, 0.02, 0.05, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80,
0.90, 0.95, 0.98, 0.99, 0.995, 0.999,
];
let mut out = [0.0; 19];
@@ -210,7 +210,7 @@ impl Component {
&mut self,
) -> impl Iterator<Item = &mut EagerVec<PcoVec<Height, PartsPerMillion32>>> {
[
&mut self.pct0_01.ratio.ppm.height,
&mut self.pct0_1.ratio.ppm.height,
&mut self.pct0_5.ratio.ppm.height,
&mut self.pct1.ratio.ppm.height,
&mut self.pct2.ratio.ppm.height,
@@ -13,7 +13,7 @@ use super::Component;
#[derive(Traversable)]
pub struct RarityMeterInner<M: StorageMode = Rw> {
pub pct0_01: Price<PerBlock<Cents, M>>,
pub pct0_1: Price<PerBlock<Cents, M>>,
pub pct0_5: Price<PerBlock<Cents, M>>,
pub pct1: Price<PerBlock<Cents, M>>,
pub pct2: Price<PerBlock<Cents, M>>,
@@ -44,7 +44,7 @@ impl RarityMeterInner {
indexes: &indexes::Vecs,
) -> Result<Self> {
Ok(Self {
pct0_01: Price::forced_import(db, &format!("{prefix}_pct0_01"), version, indexes)?,
pct0_1: Price::forced_import(db, &format!("{prefix}_pct0_1"), version, indexes)?,
pct0_5: Price::forced_import(db, &format!("{prefix}_pct0_5"), version, indexes)?,
pct1: Price::forced_import(db, &format!("{prefix}_pct01"), version, indexes)?,
pct2: Price::forced_import(db, &format!("{prefix}_pct02"), version, indexes)?,
@@ -81,9 +81,9 @@ impl RarityMeterInner {
};
// Lower percentiles: max across all models (tightest lower bound)
self.pct0_01.cents.height.compute_max_of_others(
self.pct0_1.cents.height.compute_max_of_others(
starting_height,
&gather(|component| &component.pct0_01.price.cents.height),
&gather(|component| &component.pct0_1.price.cents.height),
exit,
)?;
self.pct0_5.cents.height.compute_max_of_others(
@@ -222,7 +222,7 @@ impl RarityMeterInner {
) -> Result<()> {
let starting_height = indexer.safe_lengths().height;
let bands = [
&self.pct0_01.cents.height,
&self.pct0_1.cents.height,
&self.pct0_5.cents.height,
&self.pct1.cents.height,
&self.pct2.cents.height,
@@ -275,7 +275,7 @@ impl RarityMeterInner {
let dep_version: Version = components
.iter()
.map(|component| {
component.pct0_01.price.cents.height.version()
component.pct0_1.price.cents.height.version()
+ component.pct0_5.price.cents.height.version()
+ component.pct1.price.cents.height.version()
+ component.pct2.price.cents.height.version()
@@ -300,7 +300,7 @@ impl RarityMeterInner {
.iter()
.flat_map(|component| {
[
component.pct0_01.price.cents.height.len(),
component.pct0_1.price.cents.height.len(),
component.pct0_5.price.cents.height.len(),
component.pct1.price.cents.height.len(),
component.pct2.price.cents.height.len(),
@@ -328,7 +328,7 @@ impl RarityMeterInner {
.map(|component| {
[
component
.pct0_01
.pct0_1
.price
.cents
.height
+132
View File
@@ -6,6 +6,138 @@ All notable changes to the Bitcoin Research Kit (BRK) project will be documented
> *This changelog was generated by Claude Code*
## [v0.11.0](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.11.0) - 2026-08-05
### Breaking Changes
#### `brk_types`, `brk_computer`, and generated clients
- Replaced most basis-point values with parts-per-million storage and API types. `BasisPoints16` and `BasisPointsSigned16` were removed, the 32-bit types became `PartsPerMillion32` and `PartsPerMillionSigned32`, and new signed and unsigned 64-bit variants were added. Generated Rust, JavaScript, and Python series paths consequently use `.ppm` instead of `.bps`, including renamed metrics such as `block_fullness_ppm` and `price_sma_200d_ratio_ppm` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/parts_per_million_32.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/parts_per_million_64.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/parts_per_million_signed_64.rs))
- Reserved the maximum integer encodings of `Cents` and `CentsCompact` as `NAN` sentinels. `MAX` now denotes that sentinel, finite callers must use `MAX_FINITE`, and direct integer extraction from a sentinel now fails instead of treating it as a price ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/cents.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/cents_compact.rs))
- Renamed the serialized `SeriesCount` fields from `distinct_series`, `total_endpoints`, `lazy_endpoints`, and `stored_endpoints` to the shorter `distinct`, `total`, `lazy`, and `stored` names ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/series_count.rs))
- Reorganized and reduced the exported metric tree to remove redundant stored cohort variants and duplicated realized-price SMA, deviation, z-score, and band families. OP_RETURN metrics moved from `scripts.raw.op_return` into the dedicated top-level `op_return` tree. Consumers should regenerate typed clients and review removed or relocated paths before upgrading stored data ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/distribution/metrics/config.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/lib.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/op_return/vecs.rs))
- Reorganized entry-price cohorts under the semantic `cohorts.utxo.entry.discount` and `cohorts.utxo.entry.premium` paths, while retaining the stored Veteran and Rookie series prefixes for existing data ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/distribution/vecs.rs))
- Split the broad `6m-1y` and `1y-2y` UTXO age cohorts into `6m-9m`, `9m-1y`, `1y-18m`, and `18m-2y`, and added matching under/over 9-month and 18-month aggregates. Series keyed by the former ranges must migrate to the new cohort paths ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_cohort/src/age_range.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_cohort/src/under_age.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_cohort/src/over_age.rs))
#### `vecdb` and `brk_traversable`
- Replaced `LazyVecFrom1` with the general single-source `LazyVec` and removed `LazyVecFrom2` and `LazyVecFrom3`. Multi-source arithmetic is now performed explicitly through eager or binary transform operations, keeping lazy vector derivations tied to one source ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/src/variants/lazy/vec/mod.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/src/ops/binary_transform/mod.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_traversable/src/lib.rs))
#### `quickmatch`
- Changed result ordering to rank matches by matched-word count, fuzzy score, earliest match position, candidate length, and deterministic lexical order. Applications that depended on the previous result order should treat the new order as part of the matching upgrade ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/quickmatch/src/lib.rs))
### New Features
#### `brk_mcp`
- Added `brk_mcp`, a thin, stateless, read-only MCP adapter generated from BRK's OpenAPI document. Every tool invocation is forwarded as a `GET` request to the configured REST origin, allowing deployments to reuse the REST API's Cloudflare cache without adding response caching or session state to the MCP server ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_mcp/src/server.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_mcp/src/upstream.rs))
- Added a single-argument `brk_mcp <REST_API_URL_OR_HOST>` interface. Bare hosts try HTTPS first and fall back to HTTP only after a transport failure; explicit origins are used as supplied. The local Streamable HTTP server starts at `127.0.0.1:3111` and tries successive ports through `3211` when occupied ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_mcp/src/config.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_mcp/src/main.rs))
- Embedded the generated tool manifest in the binary at compile time and added request-size, concurrency, rate, and Origin protections around the public MCP endpoint. This release implements MCP protocol version `2026-07-28`; the official stateless, tokenless instance is available at `https://mcp.bitview.space/` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_mcp/generated/manifest.json), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_mcp/src/manifest.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_mcp/README.md))
#### `brk_bindgen` and clients
- Added OpenAPI-driven MCP manifest generation and compact/full LLM documentation generation so the MCP tool catalog, `llms.txt`, and `llms-full.txt` share the canonical REST API descriptions instead of maintaining a separate hand-written API surface ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_bindgen/src/generators/llm/manifest.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_bindgen/src/generators/llm/mod.rs))
- Added RapidHash v3 address-payload prefix and match helpers to the generated Rust, JavaScript, and Python clients, plus mainnet Bitcoin address decoding and address-string hashing in Rust. Public clients can discover address candidates without sending a raw address or xpub to the server ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_bindgen/src/generators/rust/client.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_bindgen/src/generators/javascript/client.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_bindgen/src/generators/python/client.rs))
- Added per-request `memCache` control to generated JavaScript endpoint methods, independently of their HTTP/browser `cache` option, so callers can bypass the parsed-response LRU for selected requests ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_bindgen/src/generators/javascript/api.rs))
- Expanded generated endpoint metadata and parameter descriptions for both API readers and agents, including exact address-hash behavior, URPD weighting, endpoint cache policy, and typed request/response schemas ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_bindgen/src/openapi/endpoint.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_server/src/api/openapi/mod.rs))
#### `brk_indexer`, `brk_computer`, and `brk_types`
- Added raw OP_RETURN indexing and 23 protocol/content classifications: Runes, VeriBlock, Omni, Stacks, Blockstack, Colu, OpenAssets, Komodo, CoinSpark, Poet, Docproof, OpenTimestamps, Factom, EternityWall, Memo, Bitproof, Ascribe, Stampery, Epobc, BareHash, Text, Empty, and Unknown ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/op_return_kind.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_indexer/src/processor/txout/op_return.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_indexer/src/vecs/op_return.rs))
- Added total, per-kind, and policy OP_RETURN metrics for output and transaction counts, data bytes, virtual size, fees, chain share, data share, fee share, cumulative totals, and rolling windows ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/op_return/vecs.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/op_return/by_kind.rs))
- Added transaction analysis for scriptSig, redeem scripts, witnesses, output scripts, sighash modes, sigops, annexes, inscriptions, fake public keys and script hashes, dust, and nonstandard-policy conditions. The resulting typed flags and counts are stored per transaction for queries and downstream metrics ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_indexer/src/processor/transaction/analysis/mod.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_indexer/src/processor/transaction/analysis/policy.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_indexer/src/vecs/transactions/features/mod.rs))
- Added CoinJoin, consolidation, and batch-payout transaction-pattern series together with nonstandard-transaction policy metrics ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/transactions/patterns/compute.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/transactions/patterns/coinjoin.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/transactions/policy/compute.rs))
- Added confirmed same-block CPFP cluster construction with ancestor and descendant relationships, chunk linearization, effective fee rates, sigops-adjusted virtual sizes, per-transaction parent/child flags, and per-block parent/child counts, extending CPFP analysis beyond the live mempool ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_query/src/impl/cpfp/confirmed.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/transactions/fees/vecs.rs))
#### Frameworks and models
- Added the Coinflow framework with spending rate, exposure, mobility, mobile and immobile supply, all/STH/LTH splits, 1-month through 8-year horizons, capitalization, price, and loss-share series ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/frameworks/coinflow/compute.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/frameworks/coinflow/vecs.rs))
- Made Cointime canonical under the new `frameworks.cointime` tree while retaining the legacy top-level `cointime` branch, and expanded it with age-range coindays created, consumed, and stored; wakefulness and dormancy; awake and dormant supply; all/STH/LTH aggregates; adjusted capitalization and prices; reserve risk; and loss-share series ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/frameworks/mod.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/frameworks/cointime/age_range/compute.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/frameworks/cointime/aggregate/compute.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/frameworks/cointime/supply/vecs.rs))
- Added the Bedrock model with raw, cointime, coinflow, and horizon-weighted URPDs; P95, P98, P99, P99.5, and P99.9 loss thresholds; floor percentiles; and L10 through L90 price levels ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/models/bedrock/compute.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/models/bedrock/vecs.rs))
- Added the Capital Sentiment model with ten named phases, a score, and long/short state derived from spot price, capitalized-price references, and the one-year price moving average ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/capital_sentiment_phase.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/models/capital_sentiment/compute.rs))
- Moved Rarity Meter from indicators into the models tree and expanded it with full-history, local, and cycle variants; percentile components; rank and tail thresholds; and extreme-state metrics for coins in loss, profit taking, capitulation, peak regret, and seller exhaustion ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/models/rarity_meter/components.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/models/rarity_meter/extremes.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/models/rarity_meter/percentiles.rs))
#### URPD
- Added `raw`, `cointime`, and `coinflow` URPD weighting for latest, dated, and discovery queries. Responses now identify their selected weight, and weighted aggregate distributions are persisted for model and API reuse ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/urpd_weight.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_query/src/impl/urpd.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_server/src/api/urpd.rs))
#### Mining pools
- Added DMND as mining-pool ID 171, removed fixed pool-count assumptions, added pool JSON ID/slug validation, and exposed each block's ordinal `block_number` among blocks attributed to its pool. The pool catalog can now grow without changing array constants in consumers ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/pools-v2.json), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/pools.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/block_pool.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/pools/pool_heights.rs))
#### `website_next`
- Added Bitview Ask, an entirely browser-side assistant using the approximately 580 MB Bonsai 4B model through WebGPU. Model files and conversations stay in the browser, with streaming responses, multiple chats, conversation compaction, stop/copy/remove controls, Markdown rendering, inline charts, and timing details ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/ask/model.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/ask/worker.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/ask/storage.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/ask/conversation/index.js))
- Added local assistant tools for source search, metric discovery and retrieval, OpenAPI endpoint routing and execution, chart creation, evidence tracking, numeric grounding, and arithmetic. A generated compressed source catalog supplies searchable project context without a server-side assistant service ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/ask/tools/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/ask/tools/source/search.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/ask/tools/api/routing.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/ask/tools/chart.js))
- Added a complete chain and block explorer with confirmed and projected block navigation, block headers, difficulty, miner attribution, rewards, fee charts, transaction lists, a transaction heatmap, filters, inspection, receipts, and QR rendering ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/explore/chain/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/explore/block/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/explore/block/preview/heatmap/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/explore/block/receipt/index.js))
- Moved Learn's plotting implementation into a shared chart system and expanded it with reusable area, bar, line, stacked, dot, and XY plots; legends; markers; scrubbers; fullscreen mode; interpolation; loading; persisted settings; and unit-aware formatting ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/chart/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/chart/plot.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/chart/xy/index.js))
- Expanded the watch-only wallet with stronger descriptor parsing, multisig derivation, scan-session handling, client-side address-hash lookup, activity and metadata loading, transaction history, holdings, address inspection, receive flow, and QR rendering ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/wallets/derive/descriptor-parser.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/wallets/derive/multisig.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/wallets/scan/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/wallets/wallet/index.js))
- Added shared brand, BTC, USD, mining-pool, legend, dialog, QR, cube, interaction, and color components used across Explore, Learn, Ask, and Wallets ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/brand/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/btc/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/pools/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website_next/qr/index.js))
#### `website`
- Added classic website chart groups for Coinflow, expanded Cointime age ranges, Bedrock, Capital Sentiment, Rarity Meter, and OP_RETURN, and updated distribution, market, mining, unit, color, and URPD heatmap definitions for the new metric tree ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website/scripts/options/frameworks/coinflow.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website/scripts/options/models/bedrock.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website/scripts/options/models/capital-sentiment.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website/scripts/options/network/op-return.js))
- Added raw, cointime-weighted, and coinflow-weighted URPD heatmap trees across all, STH, LTH, and age-band cohorts, and exposed the new framework/model groupings through the website option hierarchy ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website/src/heatmap/urpd.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website/scripts/options/partial.js))
#### Owned imported crates
- Added `rawdb` from the project's `anydb` repository: a non-transactional, region-based, single-file mmap store with sparse allocation, automatic region movement, hole punching, concurrent readers, explicit durability, capacity reservation, and ordered batched writes. It is now the storage foundation for `vecdb` ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/rawdb/src/lib.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/rawdb/src/region.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/rawdb/src/hole_punch.rs))
- Added `vecdb` from `anydb`: persistent fixed-size raw and compressed vectors, read-only and read-write views, typed cursors, cloneable caches, eager and lazy computation, stamped rollback, and Pco/LZ4/Zstd storage. BRK-side work added initial-capacity reservation, safe rollback when stamped writes omit change files, checked debug indexing, cache-generation invalidation, single-source lazy derivations, explicit binary transforms, and expanded rollback/capacity/cache tests ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/src/lib.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/src/base/rollback.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/src/variants/cached/mod.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/tests/rollback.rs))
- Added `vecdb_derive` from `anydb`, providing `Bytes` and `Pco` derive macros for custom fixed-size wrappers, including generic and nested-generic delegation to the wrapped type ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb_derive/src/lib.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb_derive/tests/bytes_generics.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb_derive/tests/pco_generics.rs))
- Added the Rust `quickmatch` implementation from the project's Quickmatch repository for low-allocation metric and source discovery. It includes bounded joined-word queries, ASCII separator lookup, extracted trigram scoring, deterministic ranking, and a fix for joined-word maximum-length handling ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/quickmatch/src/lib.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/quickmatch/src/config.rs))
#### BRK-maintained storage forks
- Added the BRK-maintained Byteview fork under the package name `brk_byteview`, retaining the Rust library name `byteview` for source compatibility ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/byteview/Cargo.toml), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/byteview/README.md))
- Added the BRK-maintained Fjall and LSM-tree forks under the package names `brk_fjall` and `brk_lsm_tree`, while retaining the `fjall` and `lsm_tree` Rust library names. The forks remove unused blob/value-log, FIFO/tiered compaction, transaction, fixture, test, and dependency surfaces while preserving the LZ4, simple-keyspace, and leveled-LSM functionality used by BRK ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/fjall/Cargo.toml), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/lsm-tree/Cargo.toml))
- Improved the maintained storage stack's exclusive point reads, Bloom filtering, table and super-version read paths, ingestion/recovery behavior, and macOS metadata-file recovery handling, with focused regression coverage for snapshots, recovery, ingestion, checksums, ranges, tombstones, and concurrent reads ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/lsm-tree/tests/exclusive_point_read.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/lsm-tree/src/version/super_version.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/fjall/src/recovery.rs))
#### Benchmarks
- Added and refreshed full BRK, indexer, and computer benchmark harnesses together with committed CSV and SVG histories, including the v0.11.0 M3 Pro run and comparison data for earlier releases and machines ([source](https://github.com/bitcoinresearchkit/brk/tree/v0.11.0/benches/brk), [source](https://github.com/bitcoinresearchkit/brk/tree/v0.11.0/benches/brk_indexer), [source](https://github.com/bitcoinresearchkit/brk/tree/v0.11.0/benches/brk_computer))
### Bug Fixes
#### Queries and API
- Added explicit confirmed `chain_stats.balance`, signed pending `mempool_stats.balance_delta`, and total `balance` fields to address responses, fixing total balances to include both confirmed chain state and current mempool changes ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/addr_chain_stats.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/addr_mempool_stats.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/addr_stats.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_query/src/impl/addr/stats.rs))
- Fixed typed index and read-only reader handling across address transactions, UTXOs, blocks, transactions, pools, series, CPFP, and mempool queries, including reading transaction input values from the consolidated input-value vector ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_query/src/vecs.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_query/src/impl/tx.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_query/src/impl/block/txs.rs))
- Fixed BRK price-fetcher chunk lookup at height and date boundaries by calculating a normalized chunk key and offset and refetching incomplete cached chunks when necessary ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_fetcher/src/brk.rs))
#### Storage
- Fixed `vecdb` rollback and truncation behavior, including rollback after writes without change files, raw final-page handling, compressed read/write state, and restoration of safe lengths after restart ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/src/base/rollback.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/tests/rollback_truncation.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/tests/raw_last_page.rs))
- Fixed stale cache publication by invalidating in-flight `vecdb` materializations when the source generation changes, preventing an old computation from replacing newer cached data ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/src/variants/cached/mod.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/vecdb/tests/write_visibility.rs))
- Fixed owned-store ingest persistence so removals and insertions are applied in order and survive database reopen, with a regression test covering repeated synchronous ingest ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_store/src/lib.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_store/tests/owned_ingest.rs))
- Fixed LSM exclusive point reads, Bloom expectations, recovery cleanup, ingestion invariants, table checksums, weak tombstones, snapshot visibility, and super-version read consistency in the BRK-maintained forks ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/lsm-tree/tests/exclusive_point_read.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/lsm-tree/tests/recover_cleanup_orphans.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/lsm-tree/tests/table_full_file_checksum.rs))
### Internal Changes
#### Computation and indexing
- Refactored block, transaction, input, output, address, and script processing into focused stages with shared caches and typed stored vectors. This removes duplicate resolution work and makes OP_RETURN, policy, sigops, and transaction-feature analysis part of the normal indexer pipeline ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_indexer/src/processor/mod.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_indexer/src/processor/transaction/mod.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_indexer/src/stores.rs))
- Moved indexer safe-length publication to the successful end of `Computer::compute`, after all joined computation stages complete, so readers only observe a newly indexed range once the full pipeline has made it queryable ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/lib.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_indexer/src/lib.rs))
- Removed the redundant `capitalized_cap_raw` field from `FundedAddrData`, shrinking every funded-address record from 64 to 48 bytes; receive and spend operations now return their exact realized-cap deltas for aggregate computation ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/funded_addr_data.rs))
- Overhauled metric computation around cached first-height, date, timestamp, lookback-window, moving-average, and source boundaries; single-source lazy per-block calculations; reusable transforms; and fewer persisted duplicates ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/blocks/lookback/cached_window_start.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/market/moving_average/cached_sma_source.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/internal/transform/mod.rs))
- Generalized daily and per-block metric containers and accelerated distribution, address, cohort, cost-basis, Fenwick-tree, transfer, and output-type processing with reusable caches and typed readers ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/internal/per_block/mod.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/distribution/all_chain_cache.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_computer/src/distribution/block/cohort/transfer_address_cache.rs))
- Added `VecIndex` implementations across BRK's typed indexes and migrated indexer, computer, mempool, oracle, query, store, and traversable code to the new typed vector/read-only reader interfaces ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_types/src/vec_index.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_mempool/src/snapshot/builder.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_oracle/examples/report.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_traversable/src/lib.rs))
- Updated traversable derivation so hidden fields remain part of exportable storage traversal while staying absent from the public API tree, preventing hidden persisted vectors from being dropped during retention/export operations ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_traversable_derive/src/lib.rs))
#### Runtime and tooling
- Added caller-selected fallback log levels through `brk_logger::init_with_default_level` while preserving `LOG` and `RUST_LOG` precedence ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_logger/src/lib.rs))
- Changed the website example server to try ports 3110 and 3111 in order, allowing it to coexist with another local BRK service when the default port is occupied ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_website/examples/website.rs))
- Updated the release test workflow to exclude the external `mempool_compat` integration suite, keeping network-dependent mempool.space compatibility checks out of crate releases ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/scripts/release.sh))
- Updated the workspace Rust toolchain to 1.97.1, aligned publishable workspace packages and generated clients at version 0.11.0, and refreshed third-party dependencies ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/rust-toolchain.toml), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/Cargo.toml))
#### Documentation and generated artifacts
- Regenerated the Rust, JavaScript, and Python clients, API trees, OpenAPI schemas, JavaScript TypeDoc pages, Python documentation, MCP manifest, and compact/full LLM documentation for the complete v0.11.0 API ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_client/src/lib.rs), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/modules/brk-client/index.js), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/packages/brk_client/brk_client/__init__.py), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/website/llms.txt))
- Updated crate READMEs and API documentation to describe the official REST and stateless MCP instances and the new monorepo-owned storage/search crates ([source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk/README.md), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_cli/README.md), [source](https://github.com/bitcoinresearchkit/brk/blob/v0.11.0/crates/brk_server/README.md))
[View changes](https://github.com/bitcoinresearchkit/brk/compare/v0.3.6...v0.11.0)
## [v0.3.6](https://github.com/bitcoinresearchkit/brk/releases/tag/v0.3.6) - 2026-06-27
### Bug Fixes
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -2507,7 +2507,7 @@ function createSeriesPattern35(client, name) { return /** @type {SeriesPattern35
/**
* @typedef {Object} IndexPct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99ScorePattern
* @property {SeriesPattern1<StoredI8>} index
* @property {CentsSatsUsdPattern} pct001
* @property {CentsSatsUsdPattern} pct01
* @property {CentsSatsUsdPattern} pct05
* @property {CentsSatsUsdPattern} pct1
* @property {CentsSatsUsdPattern} pct10
@@ -2538,7 +2538,7 @@ function createSeriesPattern35(client, name) { return /** @type {SeriesPattern35
function createIndexPct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99ScorePattern(client, acc) {
return {
index: createSeriesPattern1(client, _m(acc, 'index')),
pct001: createCentsSatsUsdPattern(client, _m(acc, 'pct0_01')),
pct01: createCentsSatsUsdPattern(client, _m(acc, 'pct0_1')),
pct05: createCentsSatsUsdPattern(client, _m(acc, 'pct0_5')),
pct1: createCentsSatsUsdPattern(client, _m(acc, 'pct01')),
pct10: createCentsSatsUsdPattern(client, _m(acc, 'pct10')),
@@ -2616,7 +2616,7 @@ function createPct05Pct10Pct15Pct20Pct25Pct30Pct35Pct40Pct45Pct50Pct55Pct60Pct65
/**
* @typedef {Object} Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99Pattern
* @property {PpmPriceRatioPattern} pct001
* @property {PpmPriceRatioPattern} pct01
* @property {PpmPriceRatioPattern} pct05
* @property {PpmPriceRatioPattern} pct1
* @property {PpmPriceRatioPattern} pct10
@@ -2645,7 +2645,7 @@ function createPct05Pct10Pct15Pct20Pct25Pct30Pct35Pct40Pct45Pct50Pct55Pct60Pct65
*/
function createPct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99Pattern(client, acc) {
return {
pct001: createPpmPriceRatioPattern(client, acc, 'pct0_01'),
pct01: createPpmPriceRatioPattern(client, acc, 'pct0_1'),
pct05: createPpmPriceRatioPattern(client, acc, 'pct0_5'),
pct1: createPpmPriceRatioPattern(client, acc, 'pct1'),
pct10: createPpmPriceRatioPattern(client, acc, 'pct10'),
+2 -2
View File
@@ -3037,7 +3037,7 @@ class IndexPct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct
def __init__(self, client: BrkClient, acc: str):
"""Create pattern node with accumulated series name."""
self.index: SeriesPattern1[StoredI8] = SeriesPattern1(client, _m(acc, 'index'))
self.pct0_01: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'pct0_01'))
self.pct0_1: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'pct0_1'))
self.pct0_5: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'pct0_5'))
self.pct1: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'pct01'))
self.pct10: CentsSatsUsdPattern = CentsSatsUsdPattern(client, _m(acc, 'pct10'))
@@ -3088,7 +3088,7 @@ class Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct
def __init__(self, client: BrkClient, acc: str):
"""Create pattern node with accumulated series name."""
self.pct0_01: PpmPriceRatioPattern = PpmPriceRatioPattern(client, acc, 'pct0_01')
self.pct0_1: PpmPriceRatioPattern = PpmPriceRatioPattern(client, acc, 'pct0_1')
self.pct0_5: PpmPriceRatioPattern = PpmPriceRatioPattern(client, acc, 'pct0_5')
self.pct1: PpmPriceRatioPattern = PpmPriceRatioPattern(client, acc, 'pct1')
self.pct10: PpmPriceRatioPattern = PpmPriceRatioPattern(client, acc, 'pct10')
+2 -1
View File
@@ -2,7 +2,7 @@
> Generated from BRK's OpenAPI specification and metric tree. Do not edit this file manually.
- Version: `v0.3.6`
- Version: `v0.11.0`
- Base URL: https://bitview.space
- MCP endpoint: https://mcp.bitview.space/
- Metrics: 57886
@@ -2071,3 +2071,4 @@ curl -s "https://bitview.space/version"
### `Witness`
`string[]`
+1 -1
View File
@@ -4,7 +4,7 @@
## API
- Version: `v0.3.6`
- Version: `v0.11.0`
- Base URL: https://bitview.space
- [Full plain-text reference](https://bitview.space/llms-full.txt)
- [Compact OpenAPI](https://bitview.space/api.json)
@@ -81,7 +81,7 @@ export function createRarityMeterSection() {
unit: Unit.count,
colorFn: (value) =>
/** @type {const} */ ([
colors.ratioPct._0_01,
colors.ratioPct._0_1,
colors.ratioPct._0_5,
colors.ratioPct._1,
colors.ratioPct._2,
@@ -98,7 +98,7 @@ export function createRarityMeterSection() {
series: meter.score,
name: "Score",
unit: Unit.count,
color: [colors.ratioPct._99_9, colors.ratioPct._0_01],
color: [colors.ratioPct._99_9, colors.ratioPct._0_1],
defaultActive: false,
}),
],
+6 -6
View File
@@ -626,7 +626,7 @@ export function simplePriceRatioTree({ pattern, title, legend, color }) {
}
/**
* @param {{ pct001: AnyPricePattern, pct05: AnyPricePattern, pct1: AnyPricePattern, pct2: AnyPricePattern, pct5: AnyPricePattern, pct10: AnyPricePattern, pct20: AnyPricePattern, pct30: AnyPricePattern, pct40: AnyPricePattern, pct50: AnyPricePattern, pct60: AnyPricePattern, pct70: AnyPricePattern, pct80: AnyPricePattern, pct90: AnyPricePattern, pct95: AnyPricePattern, pct98: AnyPricePattern, pct99: AnyPricePattern, pct995: AnyPricePattern, pct999: AnyPricePattern }} p
* @param {{ pct01: AnyPricePattern, pct05: AnyPricePattern, pct1: AnyPricePattern, pct2: AnyPricePattern, pct5: AnyPricePattern, pct10: AnyPricePattern, pct20: AnyPricePattern, pct30: AnyPricePattern, pct40: AnyPricePattern, pct50: AnyPricePattern, pct60: AnyPricePattern, pct70: AnyPricePattern, pct80: AnyPricePattern, pct90: AnyPricePattern, pct95: AnyPricePattern, pct98: AnyPricePattern, pct99: AnyPricePattern, pct995: AnyPricePattern, pct999: AnyPricePattern }} p
*/
export function percentileBands(p) {
return percentileBandsWith(p, (e) => e);
@@ -635,7 +635,7 @@ export function percentileBands(p) {
/**
* @template E
* @template T
* @param {{ pct001: E, pct05: E, pct1: E, pct2: E, pct5: E, pct10: E, pct20: E, pct30: E, pct40: E, pct50: E, pct60: E, pct70: E, pct80: E, pct90: E, pct95: E, pct98: E, pct99: E, pct995: E, pct999: E }} p
* @param {{ pct01: E, pct05: E, pct1: E, pct2: E, pct5: E, pct10: E, pct20: E, pct30: E, pct40: E, pct50: E, pct60: E, pct70: E, pct80: E, pct90: E, pct95: E, pct98: E, pct99: E, pct995: E, pct999: E }} p
* @param {(entry: E) => T} extract
*/
export function percentileBandsWith(p, extract) {
@@ -704,9 +704,9 @@ export function percentileBandsWith(p, extract) {
lineStyle: 0,
},
{
name: "P0.01",
prop: extract(p.pct001),
color: colors.ratioPct._0_01,
name: "P0.1",
prop: extract(p.pct01),
color: colors.ratioPct._0_1,
defaultActive: true,
lineStyle: 0,
},
@@ -761,7 +761,7 @@ function ratioBands(bands) {
/**
* @typedef {{ price: AnyPricePattern, ratio: AnySeriesPattern }} PriceRatioBand
* @typedef {Record<"pct001" | "pct05" | "pct1" | "pct2" | "pct5" | "pct10" | "pct20" | "pct30" | "pct40" | "pct50" | "pct60" | "pct70" | "pct80" | "pct90" | "pct95" | "pct98" | "pct99" | "pct995" | "pct999", PriceRatioBand>} PriceRatioPercentiles
* @typedef {Record<"pct01" | "pct05" | "pct1" | "pct2" | "pct5" | "pct10" | "pct20" | "pct30" | "pct40" | "pct50" | "pct60" | "pct70" | "pct80" | "pct90" | "pct95" | "pct98" | "pct99" | "pct995" | "pct999", PriceRatioBand>} PriceRatioPercentiles
*/
/**
+1 -1
View File
@@ -246,7 +246,7 @@ export const colors = {
_2: palette.sky,
_1: palette.blue,
_0_5: palette.indigo,
_0_01: palette.purple,
_0_1: palette.purple,
},
bedrock: {
+2 -1
View File
@@ -2,7 +2,7 @@
> Generated from BRK's OpenAPI specification and metric tree. Do not edit this file manually.
- Version: `v0.3.6`
- Version: `v0.11.0`
- Base URL: https://bitview.space
- MCP endpoint: https://mcp.bitview.space/
- Metrics: 57886
@@ -2071,3 +2071,4 @@ curl -s "https://bitview.space/version"
### `Witness`
`string[]`
+1 -1
View File
@@ -4,7 +4,7 @@
## API
- Version: `v0.3.6`
- Version: `v0.11.0`
- Base URL: https://bitview.space
- [Full plain-text reference](https://bitview.space/llms-full.txt)
- [Compact OpenAPI](https://bitview.space/api.json)