From 7bf0220f2518771c6e4a8745fa0c83b4be4e8f2e Mon Sep 17 00:00:00 2001 From: nym21 Date: Sun, 1 Mar 2026 12:46:07 +0100 Subject: [PATCH] global: snapshot --- .../src/generators/javascript/client.rs | 6 +- .../src/generators/python/client.rs | 12 +- crates/brk_client/src/lib.rs | 1100 ++++++++--------- crates/brk_computer/src/blocks/mod.rs | 2 - crates/brk_computer/src/blocks/time/vecs.rs | 8 +- .../src/distribution/metrics/realized/base.rs | 24 + .../src/distribution/metrics/relative/base.rs | 30 +- crates/brk_computer/src/indexes/height.rs | 6 +- crates/brk_computer/src/indexes/minute1.rs | 20 - crates/brk_computer/src/indexes/minute5.rs | 20 - crates/brk_computer/src/indexes/mod.rs | 62 +- .../src/internal/eager_indexes.rs | 60 +- .../src/internal/from_height/constant.rs | 10 +- .../src/internal/height_derived/last.rs | 4 +- .../src/internal/height_derived/lazy_last.rs | 4 +- crates/brk_computer/src/internal/indexes.rs | 57 +- .../src/internal/lazy_eager_indexes.rs | 6 +- .../internal/transform/block_count_target.rs | 22 +- crates/brk_computer/src/market/ath/compute.rs | 9 +- .../src/market/indicators/compute.rs | 2 +- .../brk_computer/src/market/indicators/rsi.rs | 2 +- .../src/market/indicators/smoothing.rs | 6 +- .../brk_computer/src/market/range/compute.rs | 12 +- crates/brk_computer/src/prices/ohlcs.rs | 26 +- crates/brk_types/src/index.rs | 22 +- crates/brk_types/src/indexes.rs | 8 +- crates/brk_types/src/lib.rs | 4 - crates/brk_types/src/metricdata.rs | 7 - crates/brk_types/src/minute1.rs | 88 -- crates/brk_types/src/minute5.rs | 88 -- modules/brk-client/index.js | 1084 ++++++++-------- packages/brk_client/brk_client/__init__.py | 648 +++++----- packages/brk_client/tests/test_metric_data.py | 31 - website/scripts/panes/chart.js | 2 +- website/scripts/utils/serde.js | 2 +- 35 files changed, 1450 insertions(+), 2044 deletions(-) delete mode 100644 crates/brk_computer/src/indexes/minute1.rs delete mode 100644 crates/brk_computer/src/indexes/minute5.rs delete mode 100644 crates/brk_types/src/minute1.rs delete mode 100644 crates/brk_types/src/minute5.rs diff --git a/crates/brk_bindgen/src/generators/javascript/client.rs b/crates/brk_bindgen/src/generators/javascript/client.rs index eca97c824..c0c0e8fd5 100644 --- a/crates/brk_bindgen/src/generators/javascript/client.rs +++ b/crates/brk_bindgen/src/generators/javascript/client.rs @@ -55,7 +55,7 @@ const _MS_PER_DAY = 86400000; const _MS_PER_WEEK = 7 * _MS_PER_DAY; const _EPOCH_MS = 1230768000000; const _DATE_INDEXES = new Set([ - 'minute1', 'minute5', 'minute10', 'minute30', + 'minute10', 'minute30', 'hour1', 'hour4', 'hour12', 'day1', 'day3', 'week1', 'month1', 'month3', 'month6', @@ -73,8 +73,6 @@ const _addMonths = (months) => new Date(2009, months, 1); */ function indexToDate(index, i) {{ switch (index) {{ - case 'minute1': return new Date(_EPOCH_MS + i * 60000); - case 'minute5': return new Date(_EPOCH_MS + i * 300000); case 'minute10': return new Date(_EPOCH_MS + i * 600000); case 'minute30': return new Date(_EPOCH_MS + i * 1800000); case 'hour1': return new Date(_EPOCH_MS + i * 3600000); @@ -102,8 +100,6 @@ function indexToDate(index, i) {{ function dateToIndex(index, d) {{ const ms = d.getTime(); switch (index) {{ - case 'minute1': return Math.floor((ms - _EPOCH_MS) / 60000); - case 'minute5': return Math.floor((ms - _EPOCH_MS) / 300000); case 'minute10': return Math.floor((ms - _EPOCH_MS) / 600000); case 'minute30': return Math.floor((ms - _EPOCH_MS) / 1800000); case 'hour1': return Math.floor((ms - _EPOCH_MS) / 3600000); diff --git a/crates/brk_bindgen/src/generators/python/client.rs b/crates/brk_bindgen/src/generators/python/client.rs index f76db7b5d..6fb68602a 100644 --- a/crates/brk_bindgen/src/generators/python/client.rs +++ b/crates/brk_bindgen/src/generators/python/client.rs @@ -136,7 +136,7 @@ _GENESIS = date(2009, 1, 3) # day1 0, week1 0 _DAY_ONE = date(2009, 1, 9) # day1 1 (6 day gap after genesis) _EPOCH = datetime(2009, 1, 1, tzinfo=timezone.utc) _DATE_INDEXES = frozenset([ - 'minute1', 'minute5', 'minute10', 'minute30', + 'minute10', 'minute30', 'hour1', 'hour4', 'hour12', 'day1', 'day3', 'week1', 'month1', 'month3', 'month6', @@ -145,11 +145,7 @@ _DATE_INDEXES = frozenset([ def _index_to_date(index: str, i: int) -> Union[date, datetime]: """Convert an index value to a date/datetime for date-based indexes.""" - if index == 'minute1': - return _EPOCH + timedelta(minutes=i) - elif index == 'minute5': - return _EPOCH + timedelta(minutes=i * 5) - elif index == 'minute10': + if index == 'minute10': return _EPOCH + timedelta(minutes=i * 10) elif index == 'minute30': return _EPOCH + timedelta(minutes=i * 30) @@ -187,13 +183,13 @@ def _date_to_index(index: str, d: Union[date, datetime]) -> int: Returns the floor index (latest index whose date is <= the given date). For sub-day indexes (minute*, hour*), a plain date is treated as midnight UTC. """ - if index in ('minute1', 'minute5', 'minute10', 'minute30', 'hour1', 'hour4', 'hour12'): + if index in ('minute10', 'minute30', 'hour1', 'hour4', 'hour12'): if isinstance(d, datetime): dt = d if d.tzinfo else d.replace(tzinfo=timezone.utc) else: dt = datetime(d.year, d.month, d.day, tzinfo=timezone.utc) secs = int((dt - _EPOCH).total_seconds()) - div = {{'minute1': 60, 'minute5': 300, 'minute10': 600, 'minute30': 1800, + div = {{'minute10': 600, 'minute30': 1800, 'hour1': 3600, 'hour4': 14400, 'hour12': 43200}} return secs // div[index] dd = d.date() if isinstance(d, datetime) else d diff --git a/crates/brk_client/src/lib.rs b/crates/brk_client/src/lib.rs index 1bd73fa08..8c86311fb 100644 --- a/crates/brk_client/src/lib.rs +++ b/crates/brk_client/src/lib.rs @@ -370,43 +370,41 @@ impl RangeBuilder { // Static index arrays -const _I1: &[Index] = &[Index::Minute1, Index::Minute5, Index::Minute10, Index::Minute30, Index::Hour1, Index::Hour4, Index::Hour12, Index::Day1, Index::Day3, Index::Week1, Index::Month1, Index::Month3, Index::Month6, Index::Year1, Index::Year10, Index::HalvingEpoch, Index::DifficultyEpoch, Index::Height]; -const _I2: &[Index] = &[Index::Minute1, Index::Minute5, Index::Minute10, Index::Minute30, Index::Hour1, Index::Hour4, Index::Hour12, Index::Day1, Index::Day3, Index::Week1, Index::Month1, Index::Month3, Index::Month6, Index::Year1, Index::Year10, Index::HalvingEpoch, Index::DifficultyEpoch]; -const _I3: &[Index] = &[Index::Minute1]; -const _I4: &[Index] = &[Index::Minute5]; -const _I5: &[Index] = &[Index::Minute10]; -const _I6: &[Index] = &[Index::Minute30]; -const _I7: &[Index] = &[Index::Hour1]; -const _I8: &[Index] = &[Index::Hour4]; -const _I9: &[Index] = &[Index::Hour12]; -const _I10: &[Index] = &[Index::Day1]; -const _I11: &[Index] = &[Index::Day3]; -const _I12: &[Index] = &[Index::Week1]; -const _I13: &[Index] = &[Index::Month1]; -const _I14: &[Index] = &[Index::Month3]; -const _I15: &[Index] = &[Index::Month6]; -const _I16: &[Index] = &[Index::Year1]; -const _I17: &[Index] = &[Index::Year10]; -const _I18: &[Index] = &[Index::HalvingEpoch]; -const _I19: &[Index] = &[Index::DifficultyEpoch]; -const _I20: &[Index] = &[Index::Height]; -const _I21: &[Index] = &[Index::TxIndex]; -const _I22: &[Index] = &[Index::TxInIndex]; -const _I23: &[Index] = &[Index::TxOutIndex]; -const _I24: &[Index] = &[Index::EmptyOutputIndex]; -const _I25: &[Index] = &[Index::OpReturnIndex]; -const _I26: &[Index] = &[Index::P2AAddressIndex]; -const _I27: &[Index] = &[Index::P2MSOutputIndex]; -const _I28: &[Index] = &[Index::P2PK33AddressIndex]; -const _I29: &[Index] = &[Index::P2PK65AddressIndex]; -const _I30: &[Index] = &[Index::P2PKHAddressIndex]; -const _I31: &[Index] = &[Index::P2SHAddressIndex]; -const _I32: &[Index] = &[Index::P2TRAddressIndex]; -const _I33: &[Index] = &[Index::P2WPKHAddressIndex]; -const _I34: &[Index] = &[Index::P2WSHAddressIndex]; -const _I35: &[Index] = &[Index::UnknownOutputIndex]; -const _I36: &[Index] = &[Index::FundedAddressIndex]; -const _I37: &[Index] = &[Index::EmptyAddressIndex]; +const _I1: &[Index] = &[Index::Minute10, Index::Minute30, Index::Hour1, Index::Hour4, Index::Hour12, Index::Day1, Index::Day3, Index::Week1, Index::Month1, Index::Month3, Index::Month6, Index::Year1, Index::Year10, Index::HalvingEpoch, Index::DifficultyEpoch, Index::Height]; +const _I2: &[Index] = &[Index::Minute10, Index::Minute30, Index::Hour1, Index::Hour4, Index::Hour12, Index::Day1, Index::Day3, Index::Week1, Index::Month1, Index::Month3, Index::Month6, Index::Year1, Index::Year10, Index::HalvingEpoch, Index::DifficultyEpoch]; +const _I3: &[Index] = &[Index::Minute10]; +const _I4: &[Index] = &[Index::Minute30]; +const _I5: &[Index] = &[Index::Hour1]; +const _I6: &[Index] = &[Index::Hour4]; +const _I7: &[Index] = &[Index::Hour12]; +const _I8: &[Index] = &[Index::Day1]; +const _I9: &[Index] = &[Index::Day3]; +const _I10: &[Index] = &[Index::Week1]; +const _I11: &[Index] = &[Index::Month1]; +const _I12: &[Index] = &[Index::Month3]; +const _I13: &[Index] = &[Index::Month6]; +const _I14: &[Index] = &[Index::Year1]; +const _I15: &[Index] = &[Index::Year10]; +const _I16: &[Index] = &[Index::HalvingEpoch]; +const _I17: &[Index] = &[Index::DifficultyEpoch]; +const _I18: &[Index] = &[Index::Height]; +const _I19: &[Index] = &[Index::TxIndex]; +const _I20: &[Index] = &[Index::TxInIndex]; +const _I21: &[Index] = &[Index::TxOutIndex]; +const _I22: &[Index] = &[Index::EmptyOutputIndex]; +const _I23: &[Index] = &[Index::OpReturnIndex]; +const _I24: &[Index] = &[Index::P2AAddressIndex]; +const _I25: &[Index] = &[Index::P2MSOutputIndex]; +const _I26: &[Index] = &[Index::P2PK33AddressIndex]; +const _I27: &[Index] = &[Index::P2PK65AddressIndex]; +const _I28: &[Index] = &[Index::P2PKHAddressIndex]; +const _I29: &[Index] = &[Index::P2SHAddressIndex]; +const _I30: &[Index] = &[Index::P2TRAddressIndex]; +const _I31: &[Index] = &[Index::P2WPKHAddressIndex]; +const _I32: &[Index] = &[Index::P2WSHAddressIndex]; +const _I33: &[Index] = &[Index::UnknownOutputIndex]; +const _I34: &[Index] = &[Index::FundedAddressIndex]; +const _I35: &[Index] = &[Index::EmptyAddressIndex]; #[inline] fn _ep(c: &Arc, n: &Arc, i: Index) -> MetricEndpointBuilder { @@ -422,8 +420,6 @@ fn _dep(c: &Arc, n: &Arc, i: Index) -> pub struct MetricPattern1By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern1By { - pub fn minute1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute1) } - pub fn minute5(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute5) } pub fn minute10(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute10) } pub fn minute30(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute30) } pub fn hour1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Hour1) } @@ -453,8 +449,6 @@ impl MetricPattern for MetricPattern1 { fn get(&self, pub struct MetricPattern2By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern2By { - pub fn minute1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute1) } - pub fn minute5(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute5) } pub fn minute10(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute10) } pub fn minute30(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute30) } pub fn hour1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Hour1) } @@ -483,7 +477,7 @@ impl MetricPattern for MetricPattern2 { fn get(&self, pub struct MetricPattern3By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern3By { - pub fn minute1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute1) } + pub fn minute10(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute10) } } pub struct MetricPattern3 { name: Arc, pub by: MetricPattern3By } @@ -497,7 +491,7 @@ impl MetricPattern for MetricPattern3 { fn get(&self, pub struct MetricPattern4By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern4By { - pub fn minute5(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute5) } + pub fn minute30(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute30) } } pub struct MetricPattern4 { name: Arc, pub by: MetricPattern4By } @@ -511,7 +505,7 @@ impl MetricPattern for MetricPattern4 { fn get(&self, pub struct MetricPattern5By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern5By { - pub fn minute10(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute10) } + pub fn hour1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Hour1) } } pub struct MetricPattern5 { name: Arc, pub by: MetricPattern5By } @@ -525,7 +519,7 @@ impl MetricPattern for MetricPattern5 { fn get(&self, pub struct MetricPattern6By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern6By { - pub fn minute30(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Minute30) } + pub fn hour4(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Hour4) } } pub struct MetricPattern6 { name: Arc, pub by: MetricPattern6By } @@ -539,7 +533,7 @@ impl MetricPattern for MetricPattern6 { fn get(&self, pub struct MetricPattern7By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern7By { - pub fn hour1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Hour1) } + pub fn hour12(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Hour12) } } pub struct MetricPattern7 { name: Arc, pub by: MetricPattern7By } @@ -553,7 +547,7 @@ impl MetricPattern for MetricPattern7 { fn get(&self, pub struct MetricPattern8By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern8By { - pub fn hour4(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Hour4) } + pub fn day1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Day1) } } pub struct MetricPattern8 { name: Arc, pub by: MetricPattern8By } @@ -567,7 +561,7 @@ impl MetricPattern for MetricPattern8 { fn get(&self, pub struct MetricPattern9By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern9By { - pub fn hour12(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Hour12) } + pub fn day3(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Day3) } } pub struct MetricPattern9 { name: Arc, pub by: MetricPattern9By } @@ -581,7 +575,7 @@ impl MetricPattern for MetricPattern9 { fn get(&self, pub struct MetricPattern10By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern10By { - pub fn day1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Day1) } + pub fn week1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Week1) } } pub struct MetricPattern10 { name: Arc, pub by: MetricPattern10By } @@ -595,7 +589,7 @@ impl MetricPattern for MetricPattern10 { fn get(&self pub struct MetricPattern11By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern11By { - pub fn day3(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Day3) } + pub fn month1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Month1) } } pub struct MetricPattern11 { name: Arc, pub by: MetricPattern11By } @@ -609,7 +603,7 @@ impl MetricPattern for MetricPattern11 { fn get(&self pub struct MetricPattern12By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern12By { - pub fn week1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Week1) } + pub fn month3(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Month3) } } pub struct MetricPattern12 { name: Arc, pub by: MetricPattern12By } @@ -623,7 +617,7 @@ impl MetricPattern for MetricPattern12 { fn get(&self pub struct MetricPattern13By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern13By { - pub fn month1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Month1) } + pub fn month6(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Month6) } } pub struct MetricPattern13 { name: Arc, pub by: MetricPattern13By } @@ -637,7 +631,7 @@ impl MetricPattern for MetricPattern13 { fn get(&self pub struct MetricPattern14By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern14By { - pub fn month3(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Month3) } + pub fn year1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Year1) } } pub struct MetricPattern14 { name: Arc, pub by: MetricPattern14By } @@ -651,7 +645,7 @@ impl MetricPattern for MetricPattern14 { fn get(&self pub struct MetricPattern15By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern15By { - pub fn month6(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Month6) } + pub fn year10(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Year10) } } pub struct MetricPattern15 { name: Arc, pub by: MetricPattern15By } @@ -665,7 +659,7 @@ impl MetricPattern for MetricPattern15 { fn get(&self pub struct MetricPattern16By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern16By { - pub fn year1(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Year1) } + pub fn halvingepoch(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::HalvingEpoch) } } pub struct MetricPattern16 { name: Arc, pub by: MetricPattern16By } @@ -679,7 +673,7 @@ impl MetricPattern for MetricPattern16 { fn get(&self pub struct MetricPattern17By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern17By { - pub fn year10(&self) -> DateMetricEndpointBuilder { _dep(&self.client, &self.name, Index::Year10) } + pub fn difficultyepoch(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::DifficultyEpoch) } } pub struct MetricPattern17 { name: Arc, pub by: MetricPattern17By } @@ -693,7 +687,7 @@ impl MetricPattern for MetricPattern17 { fn get(&self pub struct MetricPattern18By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern18By { - pub fn halvingepoch(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::HalvingEpoch) } + pub fn height(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::Height) } } pub struct MetricPattern18 { name: Arc, pub by: MetricPattern18By } @@ -707,7 +701,7 @@ impl MetricPattern for MetricPattern18 { fn get(&self pub struct MetricPattern19By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern19By { - pub fn difficultyepoch(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::DifficultyEpoch) } + pub fn txindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::TxIndex) } } pub struct MetricPattern19 { name: Arc, pub by: MetricPattern19By } @@ -721,7 +715,7 @@ impl MetricPattern for MetricPattern19 { fn get(&self pub struct MetricPattern20By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern20By { - pub fn height(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::Height) } + pub fn txinindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::TxInIndex) } } pub struct MetricPattern20 { name: Arc, pub by: MetricPattern20By } @@ -735,7 +729,7 @@ impl MetricPattern for MetricPattern20 { fn get(&self pub struct MetricPattern21By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern21By { - pub fn txindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::TxIndex) } + pub fn txoutindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::TxOutIndex) } } pub struct MetricPattern21 { name: Arc, pub by: MetricPattern21By } @@ -749,7 +743,7 @@ impl MetricPattern for MetricPattern21 { fn get(&self pub struct MetricPattern22By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern22By { - pub fn txinindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::TxInIndex) } + pub fn emptyoutputindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::EmptyOutputIndex) } } pub struct MetricPattern22 { name: Arc, pub by: MetricPattern22By } @@ -763,7 +757,7 @@ impl MetricPattern for MetricPattern22 { fn get(&self pub struct MetricPattern23By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern23By { - pub fn txoutindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::TxOutIndex) } + pub fn opreturnindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::OpReturnIndex) } } pub struct MetricPattern23 { name: Arc, pub by: MetricPattern23By } @@ -777,7 +771,7 @@ impl MetricPattern for MetricPattern23 { fn get(&self pub struct MetricPattern24By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern24By { - pub fn emptyoutputindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::EmptyOutputIndex) } + pub fn p2aaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2AAddressIndex) } } pub struct MetricPattern24 { name: Arc, pub by: MetricPattern24By } @@ -791,7 +785,7 @@ impl MetricPattern for MetricPattern24 { fn get(&self pub struct MetricPattern25By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern25By { - pub fn opreturnindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::OpReturnIndex) } + pub fn p2msoutputindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2MSOutputIndex) } } pub struct MetricPattern25 { name: Arc, pub by: MetricPattern25By } @@ -805,7 +799,7 @@ impl MetricPattern for MetricPattern25 { fn get(&self pub struct MetricPattern26By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern26By { - pub fn p2aaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2AAddressIndex) } + pub fn p2pk33addressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2PK33AddressIndex) } } pub struct MetricPattern26 { name: Arc, pub by: MetricPattern26By } @@ -819,7 +813,7 @@ impl MetricPattern for MetricPattern26 { fn get(&self pub struct MetricPattern27By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern27By { - pub fn p2msoutputindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2MSOutputIndex) } + pub fn p2pk65addressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2PK65AddressIndex) } } pub struct MetricPattern27 { name: Arc, pub by: MetricPattern27By } @@ -833,7 +827,7 @@ impl MetricPattern for MetricPattern27 { fn get(&self pub struct MetricPattern28By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern28By { - pub fn p2pk33addressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2PK33AddressIndex) } + pub fn p2pkhaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2PKHAddressIndex) } } pub struct MetricPattern28 { name: Arc, pub by: MetricPattern28By } @@ -847,7 +841,7 @@ impl MetricPattern for MetricPattern28 { fn get(&self pub struct MetricPattern29By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern29By { - pub fn p2pk65addressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2PK65AddressIndex) } + pub fn p2shaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2SHAddressIndex) } } pub struct MetricPattern29 { name: Arc, pub by: MetricPattern29By } @@ -861,7 +855,7 @@ impl MetricPattern for MetricPattern29 { fn get(&self pub struct MetricPattern30By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern30By { - pub fn p2pkhaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2PKHAddressIndex) } + pub fn p2traddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2TRAddressIndex) } } pub struct MetricPattern30 { name: Arc, pub by: MetricPattern30By } @@ -875,7 +869,7 @@ impl MetricPattern for MetricPattern30 { fn get(&self pub struct MetricPattern31By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern31By { - pub fn p2shaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2SHAddressIndex) } + pub fn p2wpkhaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2WPKHAddressIndex) } } pub struct MetricPattern31 { name: Arc, pub by: MetricPattern31By } @@ -889,7 +883,7 @@ impl MetricPattern for MetricPattern31 { fn get(&self pub struct MetricPattern32By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern32By { - pub fn p2traddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2TRAddressIndex) } + pub fn p2wshaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2WSHAddressIndex) } } pub struct MetricPattern32 { name: Arc, pub by: MetricPattern32By } @@ -903,7 +897,7 @@ impl MetricPattern for MetricPattern32 { fn get(&self pub struct MetricPattern33By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern33By { - pub fn p2wpkhaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2WPKHAddressIndex) } + pub fn unknownoutputindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::UnknownOutputIndex) } } pub struct MetricPattern33 { name: Arc, pub by: MetricPattern33By } @@ -917,7 +911,7 @@ impl MetricPattern for MetricPattern33 { fn get(&self pub struct MetricPattern34By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern34By { - pub fn p2wshaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::P2WSHAddressIndex) } + pub fn fundedaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::FundedAddressIndex) } } pub struct MetricPattern34 { name: Arc, pub by: MetricPattern34By } @@ -931,7 +925,7 @@ impl MetricPattern for MetricPattern34 { fn get(&self pub struct MetricPattern35By { client: Arc, name: Arc, _marker: std::marker::PhantomData } impl MetricPattern35By { - pub fn unknownoutputindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::UnknownOutputIndex) } + pub fn emptyaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::EmptyAddressIndex) } } pub struct MetricPattern35 { name: Arc, pub by: MetricPattern35By } @@ -943,34 +937,6 @@ impl MetricPattern35 { impl AnyMetricPattern for MetricPattern35 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I35 } } impl MetricPattern for MetricPattern35 { fn get(&self, index: Index) -> Option> { _I35.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } -pub struct MetricPattern36By { client: Arc, name: Arc, _marker: std::marker::PhantomData } -impl MetricPattern36By { - pub fn fundedaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::FundedAddressIndex) } -} - -pub struct MetricPattern36 { name: Arc, pub by: MetricPattern36By } -impl MetricPattern36 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: MetricPattern36By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } -} - -impl AnyMetricPattern for MetricPattern36 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I36 } } -impl MetricPattern for MetricPattern36 { fn get(&self, index: Index) -> Option> { _I36.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } - -pub struct MetricPattern37By { client: Arc, name: Arc, _marker: std::marker::PhantomData } -impl MetricPattern37By { - pub fn emptyaddressindex(&self) -> MetricEndpointBuilder { _ep(&self.client, &self.name, Index::EmptyAddressIndex) } -} - -pub struct MetricPattern37 { name: Arc, pub by: MetricPattern37By } -impl MetricPattern37 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: MetricPattern37By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } -} - -impl AnyMetricPattern for MetricPattern37 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I37 } } -impl MetricPattern for MetricPattern37 { fn get(&self, index: Index) -> Option> { _I37.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } - // Reusable pattern structs /// Pattern struct for repeated tree structure. @@ -994,9 +960,9 @@ pub struct AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedS pub adjusted_value_destroyed_24h: MetricPattern1, pub adjusted_value_destroyed_30d: MetricPattern1, pub adjusted_value_destroyed_7d: MetricPattern1, - pub cap_raw: MetricPattern20, + pub cap_raw: MetricPattern18, pub capitulation_flow: MetricPattern1, - pub investor_cap_raw: MetricPattern20, + pub investor_cap_raw: MetricPattern18, pub investor_price: SatsUsdPattern, pub investor_price_cents: MetricPattern1, pub investor_price_extra: RatioPattern2, @@ -1106,9 +1072,9 @@ impl AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSen adjusted_value_destroyed_24h: MetricPattern1::new(client.clone(), _m(&acc, "adjusted_value_destroyed_24h")), adjusted_value_destroyed_30d: MetricPattern1::new(client.clone(), _m(&acc, "adjusted_value_destroyed_30d")), adjusted_value_destroyed_7d: MetricPattern1::new(client.clone(), _m(&acc, "adjusted_value_destroyed_7d")), - cap_raw: MetricPattern20::new(client.clone(), _m(&acc, "cap_raw")), + cap_raw: MetricPattern18::new(client.clone(), _m(&acc, "cap_raw")), capitulation_flow: MetricPattern1::new(client.clone(), _m(&acc, "capitulation_flow")), - investor_cap_raw: MetricPattern20::new(client.clone(), _m(&acc, "investor_cap_raw")), + investor_cap_raw: MetricPattern18::new(client.clone(), _m(&acc, "investor_cap_raw")), investor_price: SatsUsdPattern::new(client.clone(), _m(&acc, "investor_price")), investor_price_cents: MetricPattern1::new(client.clone(), _m(&acc, "investor_price_cents")), investor_price_extra: RatioPattern2::new(client.clone(), _m(&acc, "investor_price_ratio")), @@ -1218,9 +1184,9 @@ pub struct AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedS pub adjusted_value_destroyed_24h: MetricPattern1, pub adjusted_value_destroyed_30d: MetricPattern1, pub adjusted_value_destroyed_7d: MetricPattern1, - pub cap_raw: MetricPattern20, + pub cap_raw: MetricPattern18, pub capitulation_flow: MetricPattern1, - pub investor_cap_raw: MetricPattern20, + pub investor_cap_raw: MetricPattern18, pub investor_price: SatsUsdPattern, pub investor_price_cents: MetricPattern1, pub investor_price_extra: RatioPattern2, @@ -1315,9 +1281,9 @@ impl AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSen adjusted_value_destroyed_24h: MetricPattern1::new(client.clone(), _m(&acc, "adjusted_value_destroyed_24h")), adjusted_value_destroyed_30d: MetricPattern1::new(client.clone(), _m(&acc, "adjusted_value_destroyed_30d")), adjusted_value_destroyed_7d: MetricPattern1::new(client.clone(), _m(&acc, "adjusted_value_destroyed_7d")), - cap_raw: MetricPattern20::new(client.clone(), _m(&acc, "cap_raw")), + cap_raw: MetricPattern18::new(client.clone(), _m(&acc, "cap_raw")), capitulation_flow: MetricPattern1::new(client.clone(), _m(&acc, "capitulation_flow")), - investor_cap_raw: MetricPattern20::new(client.clone(), _m(&acc, "investor_cap_raw")), + investor_cap_raw: MetricPattern18::new(client.clone(), _m(&acc, "investor_cap_raw")), investor_price: SatsUsdPattern::new(client.clone(), _m(&acc, "investor_price")), investor_price_cents: MetricPattern1::new(client.clone(), _m(&acc, "investor_price_cents")), investor_price_extra: RatioPattern2::new(client.clone(), _m(&acc, "investor_price_ratio")), @@ -1393,9 +1359,9 @@ impl AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSen /// Pattern struct for repeated tree structure. pub struct CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2 { - pub cap_raw: MetricPattern20, + pub cap_raw: MetricPattern18, pub capitulation_flow: MetricPattern1, - pub investor_cap_raw: MetricPattern20, + pub investor_cap_raw: MetricPattern18, pub investor_price: SatsUsdPattern, pub investor_price_cents: MetricPattern1, pub investor_price_extra: RatioPattern2, @@ -1486,9 +1452,9 @@ impl CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTot /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - cap_raw: MetricPattern20::new(client.clone(), _m(&acc, "cap_raw")), + cap_raw: MetricPattern18::new(client.clone(), _m(&acc, "cap_raw")), capitulation_flow: MetricPattern1::new(client.clone(), _m(&acc, "capitulation_flow")), - investor_cap_raw: MetricPattern20::new(client.clone(), _m(&acc, "investor_cap_raw")), + investor_cap_raw: MetricPattern18::new(client.clone(), _m(&acc, "investor_cap_raw")), investor_price: SatsUsdPattern::new(client.clone(), _m(&acc, "investor_price")), investor_price_cents: MetricPattern1::new(client.clone(), _m(&acc, "investor_price_cents")), investor_price_extra: RatioPattern2::new(client.clone(), _m(&acc, "investor_price_ratio")), @@ -1579,9 +1545,9 @@ impl CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTot /// Pattern struct for repeated tree structure. pub struct CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern { - pub cap_raw: MetricPattern20, + pub cap_raw: MetricPattern18, pub capitulation_flow: MetricPattern1, - pub investor_cap_raw: MetricPattern20, + pub investor_cap_raw: MetricPattern18, pub investor_price: SatsUsdPattern, pub investor_price_cents: MetricPattern1, pub investor_price_extra: RatioPattern2, @@ -1657,9 +1623,9 @@ impl CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTot /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - cap_raw: MetricPattern20::new(client.clone(), _m(&acc, "cap_raw")), + cap_raw: MetricPattern18::new(client.clone(), _m(&acc, "cap_raw")), capitulation_flow: MetricPattern1::new(client.clone(), _m(&acc, "capitulation_flow")), - investor_cap_raw: MetricPattern20::new(client.clone(), _m(&acc, "investor_cap_raw")), + investor_cap_raw: MetricPattern18::new(client.clone(), _m(&acc, "investor_cap_raw")), investor_price: SatsUsdPattern::new(client.clone(), _m(&acc, "investor_price")), investor_price_cents: MetricPattern1::new(client.clone(), _m(&acc, "investor_price_cents")), investor_price_extra: RatioPattern2::new(client.clone(), _m(&acc, "investor_price_ratio")), @@ -2059,11 +2025,11 @@ impl RatioPattern3 { pub struct GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern { pub greed_index: MetricPattern1, pub invested_capital_in_loss: MetricPattern1, - pub invested_capital_in_loss_raw: MetricPattern20, + pub invested_capital_in_loss_raw: MetricPattern18, pub invested_capital_in_profit: MetricPattern1, - pub invested_capital_in_profit_raw: MetricPattern20, - pub investor_cap_in_loss_raw: MetricPattern20, - pub investor_cap_in_profit_raw: MetricPattern20, + pub invested_capital_in_profit_raw: MetricPattern18, + pub investor_cap_in_loss_raw: MetricPattern18, + pub investor_cap_in_profit_raw: MetricPattern18, pub neg_unrealized_loss: MetricPattern1, pub net_sentiment: MetricPattern1, pub net_unrealized_pnl: MetricPattern1, @@ -2082,11 +2048,11 @@ impl GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern { Self { greed_index: MetricPattern1::new(client.clone(), _m(&acc, "greed_index")), invested_capital_in_loss: MetricPattern1::new(client.clone(), _m(&acc, "invested_capital_in_loss")), - invested_capital_in_loss_raw: MetricPattern20::new(client.clone(), _m(&acc, "invested_capital_in_loss_raw")), + invested_capital_in_loss_raw: MetricPattern18::new(client.clone(), _m(&acc, "invested_capital_in_loss_raw")), invested_capital_in_profit: MetricPattern1::new(client.clone(), _m(&acc, "invested_capital_in_profit")), - invested_capital_in_profit_raw: MetricPattern20::new(client.clone(), _m(&acc, "invested_capital_in_profit_raw")), - investor_cap_in_loss_raw: MetricPattern20::new(client.clone(), _m(&acc, "investor_cap_in_loss_raw")), - investor_cap_in_profit_raw: MetricPattern20::new(client.clone(), _m(&acc, "investor_cap_in_profit_raw")), + invested_capital_in_profit_raw: MetricPattern18::new(client.clone(), _m(&acc, "invested_capital_in_profit_raw")), + investor_cap_in_loss_raw: MetricPattern18::new(client.clone(), _m(&acc, "investor_cap_in_loss_raw")), + investor_cap_in_profit_raw: MetricPattern18::new(client.clone(), _m(&acc, "investor_cap_in_profit_raw")), neg_unrealized_loss: MetricPattern1::new(client.clone(), _m(&acc, "neg_unrealized_loss")), net_sentiment: MetricPattern1::new(client.clone(), _m(&acc, "net_sentiment")), net_unrealized_pnl: MetricPattern1::new(client.clone(), _m(&acc, "net_unrealized_pnl")), @@ -2105,11 +2071,11 @@ impl GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern { pub struct GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern { pub greed_index: MetricPattern1, pub invested_capital_in_loss: MetricPattern1, - pub invested_capital_in_loss_raw: MetricPattern20, + pub invested_capital_in_loss_raw: MetricPattern18, pub invested_capital_in_profit: MetricPattern1, - pub invested_capital_in_profit_raw: MetricPattern20, - pub investor_cap_in_loss_raw: MetricPattern20, - pub investor_cap_in_profit_raw: MetricPattern20, + pub invested_capital_in_profit_raw: MetricPattern18, + pub investor_cap_in_loss_raw: MetricPattern18, + pub investor_cap_in_profit_raw: MetricPattern18, pub neg_unrealized_loss: MetricPattern1, pub net_sentiment: MetricPattern1, pub net_unrealized_pnl: MetricPattern1, @@ -2127,11 +2093,11 @@ impl GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern { Self { greed_index: MetricPattern1::new(client.clone(), _m(&acc, "greed_index")), invested_capital_in_loss: MetricPattern1::new(client.clone(), _m(&acc, "invested_capital_in_loss")), - invested_capital_in_loss_raw: MetricPattern20::new(client.clone(), _m(&acc, "invested_capital_in_loss_raw")), + invested_capital_in_loss_raw: MetricPattern18::new(client.clone(), _m(&acc, "invested_capital_in_loss_raw")), invested_capital_in_profit: MetricPattern1::new(client.clone(), _m(&acc, "invested_capital_in_profit")), - invested_capital_in_profit_raw: MetricPattern20::new(client.clone(), _m(&acc, "invested_capital_in_profit_raw")), - investor_cap_in_loss_raw: MetricPattern20::new(client.clone(), _m(&acc, "investor_cap_in_loss_raw")), - investor_cap_in_profit_raw: MetricPattern20::new(client.clone(), _m(&acc, "investor_cap_in_profit_raw")), + invested_capital_in_profit_raw: MetricPattern18::new(client.clone(), _m(&acc, "invested_capital_in_profit_raw")), + investor_cap_in_loss_raw: MetricPattern18::new(client.clone(), _m(&acc, "investor_cap_in_loss_raw")), + investor_cap_in_profit_raw: MetricPattern18::new(client.clone(), _m(&acc, "investor_cap_in_profit_raw")), neg_unrealized_loss: MetricPattern1::new(client.clone(), _m(&acc, "neg_unrealized_loss")), net_sentiment: MetricPattern1::new(client.clone(), _m(&acc, "net_sentiment")), net_unrealized_pnl: MetricPattern1::new(client.clone(), _m(&acc, "net_unrealized_pnl")), @@ -2371,34 +2337,34 @@ impl _201520162017201820192020202120222023202420252026Patte /// Pattern struct for repeated tree structure. pub struct AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern { - pub average: MetricPattern20, - pub cumulative: MetricPattern20, - pub max: MetricPattern20, - pub median: MetricPattern20, - pub min: MetricPattern20, - pub pct10: MetricPattern20, - pub pct25: MetricPattern20, - pub pct75: MetricPattern20, - pub pct90: MetricPattern20, + pub average: MetricPattern18, + pub cumulative: MetricPattern18, + pub max: MetricPattern18, + pub median: MetricPattern18, + pub min: MetricPattern18, + pub pct10: MetricPattern18, + pub pct25: MetricPattern18, + pub pct75: MetricPattern18, + pub pct90: MetricPattern18, pub rolling: AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern, - pub sum: MetricPattern20, + pub sum: MetricPattern18, } impl AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - average: MetricPattern20::new(client.clone(), _m(&acc, "average")), - cumulative: MetricPattern20::new(client.clone(), _m(&acc, "cumulative")), - max: MetricPattern20::new(client.clone(), _m(&acc, "max")), - median: MetricPattern20::new(client.clone(), _m(&acc, "median")), - min: MetricPattern20::new(client.clone(), _m(&acc, "min")), - pct10: MetricPattern20::new(client.clone(), _m(&acc, "pct10")), - pct25: MetricPattern20::new(client.clone(), _m(&acc, "pct25")), - pct75: MetricPattern20::new(client.clone(), _m(&acc, "pct75")), - pct90: MetricPattern20::new(client.clone(), _m(&acc, "pct90")), + average: MetricPattern18::new(client.clone(), _m(&acc, "average")), + cumulative: MetricPattern18::new(client.clone(), _m(&acc, "cumulative")), + max: MetricPattern18::new(client.clone(), _m(&acc, "max")), + median: MetricPattern18::new(client.clone(), _m(&acc, "median")), + min: MetricPattern18::new(client.clone(), _m(&acc, "min")), + pct10: MetricPattern18::new(client.clone(), _m(&acc, "pct10")), + pct25: MetricPattern18::new(client.clone(), _m(&acc, "pct25")), + pct75: MetricPattern18::new(client.clone(), _m(&acc, "pct75")), + pct90: MetricPattern18::new(client.clone(), _m(&acc, "pct90")), rolling: AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), acc.clone()), - sum: MetricPattern20::new(client.clone(), _m(&acc, "sum")), + sum: MetricPattern18::new(client.clone(), _m(&acc, "sum")), } } } @@ -2407,7 +2373,7 @@ impl AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern { pub struct AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern { pub average: _1y24h30d7dPattern, pub cumulative: MetricPattern1, - pub height: MetricPattern20, + pub height: MetricPattern18, pub max: _1y24h30d7dPattern, pub median: _1y24h30d7dPattern, pub min: _1y24h30d7dPattern, @@ -2424,7 +2390,7 @@ impl AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern { Self { average: _1y24h30d7dPattern::new(client.clone(), _m(&acc, "average")), cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), - height: MetricPattern20::new(client.clone(), acc.clone()), + height: MetricPattern18::new(client.clone(), acc.clone()), max: _1y24h30d7dPattern::new(client.clone(), _m(&acc, "max")), median: _1y24h30d7dPattern::new(client.clone(), _m(&acc, "median")), min: _1y24h30d7dPattern::new(client.clone(), _m(&acc, "min")), @@ -2592,7 +2558,7 @@ impl AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern { /// Pattern struct for repeated tree structure. pub struct AverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern { pub average: _1y24h30d7dPattern, - pub height: MetricPattern20, + pub height: MetricPattern18, pub max: _1y24h30d7dPattern, pub median: _1y24h30d7dPattern, pub min: _1y24h30d7dPattern, @@ -2607,7 +2573,7 @@ impl AverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern, acc: String) -> Self { Self { average: _1y24h30d7dPattern::new(client.clone(), _m(&acc, "average")), - height: MetricPattern20::new(client.clone(), acc.clone()), + height: MetricPattern18::new(client.clone(), acc.clone()), max: _1y24h30d7dPattern::new(client.clone(), _m(&acc, "max")), median: _1y24h30d7dPattern::new(client.clone(), _m(&acc, "median")), min: _1y24h30d7dPattern::new(client.clone(), _m(&acc, "min")), @@ -2621,28 +2587,28 @@ impl AverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern { - pub average: MetricPattern20, - pub max: MetricPattern20, - pub median: MetricPattern20, - pub min: MetricPattern20, - pub pct10: MetricPattern20, - pub pct25: MetricPattern20, - pub pct75: MetricPattern20, - pub pct90: MetricPattern20, + pub average: MetricPattern18, + pub max: MetricPattern18, + pub median: MetricPattern18, + pub min: MetricPattern18, + pub pct10: MetricPattern18, + pub pct25: MetricPattern18, + pub pct75: MetricPattern18, + pub pct90: MetricPattern18, } impl AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern { /// Create a new pattern node with accumulated metric name. pub fn new(client: Arc, acc: String) -> Self { Self { - average: MetricPattern20::new(client.clone(), _m(&acc, "average")), - max: MetricPattern20::new(client.clone(), _m(&acc, "max")), - median: MetricPattern20::new(client.clone(), _m(&acc, "median")), - min: MetricPattern20::new(client.clone(), _m(&acc, "min")), - pct10: MetricPattern20::new(client.clone(), _m(&acc, "pct10")), - pct25: MetricPattern20::new(client.clone(), _m(&acc, "pct25")), - pct75: MetricPattern20::new(client.clone(), _m(&acc, "pct75")), - pct90: MetricPattern20::new(client.clone(), _m(&acc, "pct90")), + average: MetricPattern18::new(client.clone(), _m(&acc, "average")), + max: MetricPattern18::new(client.clone(), _m(&acc, "max")), + median: MetricPattern18::new(client.clone(), _m(&acc, "median")), + min: MetricPattern18::new(client.clone(), _m(&acc, "min")), + pct10: MetricPattern18::new(client.clone(), _m(&acc, "pct10")), + pct25: MetricPattern18::new(client.clone(), _m(&acc, "pct25")), + pct75: MetricPattern18::new(client.clone(), _m(&acc, "pct75")), + pct90: MetricPattern18::new(client.clone(), _m(&acc, "pct90")), } } } @@ -2679,9 +2645,9 @@ pub struct _1y24h30d7dBtcSatsUsdPattern { pub _24h: BtcSatsUsdPattern, pub _30d: BtcSatsUsdPattern, pub _7d: BtcSatsUsdPattern, - pub btc: MetricPattern20, - pub sats: MetricPattern20, - pub usd: MetricPattern20, + pub btc: MetricPattern18, + pub sats: MetricPattern18, + pub usd: MetricPattern18, } impl _1y24h30d7dBtcSatsUsdPattern { @@ -2692,9 +2658,9 @@ impl _1y24h30d7dBtcSatsUsdPattern { _24h: BtcSatsUsdPattern::new(client.clone(), _m(&acc, "24h")), _30d: BtcSatsUsdPattern::new(client.clone(), _m(&acc, "30d")), _7d: BtcSatsUsdPattern::new(client.clone(), _m(&acc, "7d")), - btc: MetricPattern20::new(client.clone(), _m(&acc, "btc")), - sats: MetricPattern20::new(client.clone(), acc.clone()), - usd: MetricPattern20::new(client.clone(), _m(&acc, "usd")), + btc: MetricPattern18::new(client.clone(), _m(&acc, "btc")), + sats: MetricPattern18::new(client.clone(), acc.clone()), + usd: MetricPattern18::new(client.clone(), _m(&acc, "usd")), } } } @@ -2855,8 +2821,8 @@ impl BalanceBothReactivatedReceivingSendingPattern { pub struct CoinblocksCoindaysSatblocksSatdaysSentPattern { pub coinblocks_destroyed: CumulativeHeightSumPattern, pub coindays_destroyed: CumulativeHeightSumPattern, - pub satblocks_destroyed: MetricPattern20, - pub satdays_destroyed: MetricPattern20, + pub satblocks_destroyed: MetricPattern18, + pub satdays_destroyed: MetricPattern18, pub sent: BaseCumulativePattern, pub sent_14d_ema: BtcSatsUsdPattern, } @@ -2867,8 +2833,8 @@ impl CoinblocksCoindaysSatblocksSatdaysSentPattern { Self { coinblocks_destroyed: CumulativeHeightSumPattern::new(client.clone(), _m(&acc, "coinblocks_destroyed")), coindays_destroyed: CumulativeHeightSumPattern::new(client.clone(), _m(&acc, "coindays_destroyed")), - satblocks_destroyed: MetricPattern20::new(client.clone(), _m(&acc, "satblocks_destroyed")), - satdays_destroyed: MetricPattern20::new(client.clone(), _m(&acc, "satdays_destroyed")), + satblocks_destroyed: MetricPattern18::new(client.clone(), _m(&acc, "satblocks_destroyed")), + satdays_destroyed: MetricPattern18::new(client.clone(), _m(&acc, "satdays_destroyed")), sent: BaseCumulativePattern::new(client.clone(), _m(&acc, "sent")), sent_14d_ema: BtcSatsUsdPattern::new(client.clone(), _m(&acc, "sent_14d_ema")), } @@ -3033,7 +2999,7 @@ impl HistogramLineSignalPattern { pub struct _6bBlockTxindexPattern { pub _6b: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern, pub block: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern, - pub txindex: MetricPattern21, + pub txindex: MetricPattern19, } impl _6bBlockTxindexPattern { @@ -3042,7 +3008,7 @@ impl _6bBlockTxindexPattern { Self { _6b: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), _m(&acc, "6b")), block: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), acc.clone()), - txindex: MetricPattern21::new(client.clone(), acc.clone()), + txindex: MetricPattern19::new(client.clone(), acc.clone()), } } } @@ -3050,7 +3016,7 @@ impl _6bBlockTxindexPattern { /// Pattern struct for repeated tree structure. pub struct CumulativeHeightSumPattern { pub cumulative: MetricPattern1, - pub height: MetricPattern20, + pub height: MetricPattern18, pub sum: _1y24h30d7dPattern, } @@ -3059,7 +3025,7 @@ impl CumulativeHeightSumPattern { pub fn new(client: Arc, acc: String) -> Self { Self { cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), - height: MetricPattern20::new(client.clone(), acc.clone()), + height: MetricPattern18::new(client.clone(), acc.clone()), sum: _1y24h30d7dPattern::new(client.clone(), acc.clone()), } } @@ -3100,7 +3066,7 @@ impl BaseCumulativePattern { /// Pattern struct for repeated tree structure. pub struct CumulativeHeightPattern { pub cumulative: MetricPattern1, - pub height: MetricPattern20, + pub height: MetricPattern18, } impl CumulativeHeightPattern { @@ -3108,7 +3074,7 @@ impl CumulativeHeightPattern { pub fn new(client: Arc, acc: String) -> Self { Self { cumulative: MetricPattern1::new(client.clone(), _m(&acc, "cumulative")), - height: MetricPattern20::new(client.clone(), acc.clone()), + height: MetricPattern18::new(client.clone(), acc.clone()), } } } @@ -3238,10 +3204,10 @@ impl MetricsTree { /// Metrics tree node. pub struct MetricsTree_Blocks { - pub blockhash: MetricPattern20, + pub blockhash: MetricPattern18, pub difficulty: MetricsTree_Blocks_Difficulty, pub time: MetricsTree_Blocks_Time, - pub total_size: MetricPattern20, + pub total_size: MetricPattern18, pub weight: MetricsTree_Blocks_Weight, pub count: MetricsTree_Blocks_Count, pub interval: AverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern, @@ -3254,10 +3220,10 @@ pub struct MetricsTree_Blocks { impl MetricsTree_Blocks { pub fn new(client: Arc, base_path: String) -> Self { Self { - blockhash: MetricPattern20::new(client.clone(), "blockhash".to_string()), + blockhash: MetricPattern18::new(client.clone(), "blockhash".to_string()), difficulty: MetricsTree_Blocks_Difficulty::new(client.clone(), format!("{base_path}_difficulty")), time: MetricsTree_Blocks_Time::new(client.clone(), format!("{base_path}_time")), - total_size: MetricPattern20::new(client.clone(), "total_size".to_string()), + total_size: MetricPattern18::new(client.clone(), "total_size".to_string()), weight: MetricsTree_Blocks_Weight::new(client.clone(), format!("{base_path}_weight")), count: MetricsTree_Blocks_Count::new(client.clone(), format!("{base_path}_count")), interval: AverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), "block_interval".to_string()), @@ -3295,23 +3261,23 @@ impl MetricsTree_Blocks_Difficulty { /// Metrics tree node. pub struct MetricsTree_Blocks_Time { pub timestamp: MetricPattern1, - pub date: MetricPattern20, - pub timestamp_monotonic: MetricPattern20, + pub date: MetricPattern18, + pub timestamp_monotonic: MetricPattern18, } impl MetricsTree_Blocks_Time { pub fn new(client: Arc, base_path: String) -> Self { Self { timestamp: MetricPattern1::new(client.clone(), "timestamp".to_string()), - date: MetricPattern20::new(client.clone(), "date".to_string()), - timestamp_monotonic: MetricPattern20::new(client.clone(), "timestamp_monotonic".to_string()), + date: MetricPattern18::new(client.clone(), "date".to_string()), + timestamp_monotonic: MetricPattern18::new(client.clone(), "timestamp_monotonic".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Blocks_Weight { - pub base: MetricPattern20, + pub base: MetricPattern18, pub cumulative: MetricPattern1, pub sum: _1y24h30d7dPattern, pub average: _1y24h30d7dPattern, @@ -3327,7 +3293,7 @@ pub struct MetricsTree_Blocks_Weight { impl MetricsTree_Blocks_Weight { pub fn new(client: Arc, base_path: String) -> Self { Self { - base: MetricPattern20::new(client.clone(), "block_weight".to_string()), + base: MetricPattern18::new(client.clone(), "block_weight".to_string()), cumulative: MetricPattern1::new(client.clone(), "block_weight_cumulative".to_string()), sum: _1y24h30d7dPattern::new(client.clone(), "block_weight_sum".to_string()), average: _1y24h30d7dPattern::new(client.clone(), "block_weight_average".to_string()), @@ -3347,37 +3313,37 @@ pub struct MetricsTree_Blocks_Count { pub block_count_target: MetricPattern1, pub block_count: CumulativeHeightSumPattern, pub block_count_sum: _1y24h30d7dPattern, - pub height_1h_ago: MetricPattern20, - pub height_24h_ago: MetricPattern20, - pub height_3d_ago: MetricPattern20, - pub height_1w_ago: MetricPattern20, - pub height_8d_ago: MetricPattern20, - pub height_9d_ago: MetricPattern20, - pub height_12d_ago: MetricPattern20, - pub height_13d_ago: MetricPattern20, - pub height_2w_ago: MetricPattern20, - pub height_21d_ago: MetricPattern20, - pub height_26d_ago: MetricPattern20, - pub height_1m_ago: MetricPattern20, - pub height_34d_ago: MetricPattern20, - pub height_55d_ago: MetricPattern20, - pub height_2m_ago: MetricPattern20, - pub height_89d_ago: MetricPattern20, - pub height_111d_ago: MetricPattern20, - pub height_144d_ago: MetricPattern20, - pub height_3m_ago: MetricPattern20, - pub height_6m_ago: MetricPattern20, - pub height_200d_ago: MetricPattern20, - pub height_350d_ago: MetricPattern20, - pub height_1y_ago: MetricPattern20, - pub height_2y_ago: MetricPattern20, - pub height_200w_ago: MetricPattern20, - pub height_3y_ago: MetricPattern20, - pub height_4y_ago: MetricPattern20, - pub height_5y_ago: MetricPattern20, - pub height_6y_ago: MetricPattern20, - pub height_8y_ago: MetricPattern20, - pub height_10y_ago: MetricPattern20, + pub height_1h_ago: MetricPattern18, + pub height_24h_ago: MetricPattern18, + pub height_3d_ago: MetricPattern18, + pub height_1w_ago: MetricPattern18, + pub height_8d_ago: MetricPattern18, + pub height_9d_ago: MetricPattern18, + pub height_12d_ago: MetricPattern18, + pub height_13d_ago: MetricPattern18, + pub height_2w_ago: MetricPattern18, + pub height_21d_ago: MetricPattern18, + pub height_26d_ago: MetricPattern18, + pub height_1m_ago: MetricPattern18, + pub height_34d_ago: MetricPattern18, + pub height_55d_ago: MetricPattern18, + pub height_2m_ago: MetricPattern18, + pub height_89d_ago: MetricPattern18, + pub height_111d_ago: MetricPattern18, + pub height_144d_ago: MetricPattern18, + pub height_3m_ago: MetricPattern18, + pub height_6m_ago: MetricPattern18, + pub height_200d_ago: MetricPattern18, + pub height_350d_ago: MetricPattern18, + pub height_1y_ago: MetricPattern18, + pub height_2y_ago: MetricPattern18, + pub height_200w_ago: MetricPattern18, + pub height_3y_ago: MetricPattern18, + pub height_4y_ago: MetricPattern18, + pub height_5y_ago: MetricPattern18, + pub height_6y_ago: MetricPattern18, + pub height_8y_ago: MetricPattern18, + pub height_10y_ago: MetricPattern18, } impl MetricsTree_Blocks_Count { @@ -3386,37 +3352,37 @@ impl MetricsTree_Blocks_Count { block_count_target: MetricPattern1::new(client.clone(), "block_count_target".to_string()), block_count: CumulativeHeightSumPattern::new(client.clone(), "block_count".to_string()), block_count_sum: _1y24h30d7dPattern::new(client.clone(), "block_count_sum".to_string()), - height_1h_ago: MetricPattern20::new(client.clone(), "height_1h_ago".to_string()), - height_24h_ago: MetricPattern20::new(client.clone(), "height_24h_ago".to_string()), - height_3d_ago: MetricPattern20::new(client.clone(), "height_3d_ago".to_string()), - height_1w_ago: MetricPattern20::new(client.clone(), "height_1w_ago".to_string()), - height_8d_ago: MetricPattern20::new(client.clone(), "height_8d_ago".to_string()), - height_9d_ago: MetricPattern20::new(client.clone(), "height_9d_ago".to_string()), - height_12d_ago: MetricPattern20::new(client.clone(), "height_12d_ago".to_string()), - height_13d_ago: MetricPattern20::new(client.clone(), "height_13d_ago".to_string()), - height_2w_ago: MetricPattern20::new(client.clone(), "height_2w_ago".to_string()), - height_21d_ago: MetricPattern20::new(client.clone(), "height_21d_ago".to_string()), - height_26d_ago: MetricPattern20::new(client.clone(), "height_26d_ago".to_string()), - height_1m_ago: MetricPattern20::new(client.clone(), "height_1m_ago".to_string()), - height_34d_ago: MetricPattern20::new(client.clone(), "height_34d_ago".to_string()), - height_55d_ago: MetricPattern20::new(client.clone(), "height_55d_ago".to_string()), - height_2m_ago: MetricPattern20::new(client.clone(), "height_2m_ago".to_string()), - height_89d_ago: MetricPattern20::new(client.clone(), "height_89d_ago".to_string()), - height_111d_ago: MetricPattern20::new(client.clone(), "height_111d_ago".to_string()), - height_144d_ago: MetricPattern20::new(client.clone(), "height_144d_ago".to_string()), - height_3m_ago: MetricPattern20::new(client.clone(), "height_3m_ago".to_string()), - height_6m_ago: MetricPattern20::new(client.clone(), "height_6m_ago".to_string()), - height_200d_ago: MetricPattern20::new(client.clone(), "height_200d_ago".to_string()), - height_350d_ago: MetricPattern20::new(client.clone(), "height_350d_ago".to_string()), - height_1y_ago: MetricPattern20::new(client.clone(), "height_1y_ago".to_string()), - height_2y_ago: MetricPattern20::new(client.clone(), "height_2y_ago".to_string()), - height_200w_ago: MetricPattern20::new(client.clone(), "height_200w_ago".to_string()), - height_3y_ago: MetricPattern20::new(client.clone(), "height_3y_ago".to_string()), - height_4y_ago: MetricPattern20::new(client.clone(), "height_4y_ago".to_string()), - height_5y_ago: MetricPattern20::new(client.clone(), "height_5y_ago".to_string()), - height_6y_ago: MetricPattern20::new(client.clone(), "height_6y_ago".to_string()), - height_8y_ago: MetricPattern20::new(client.clone(), "height_8y_ago".to_string()), - height_10y_ago: MetricPattern20::new(client.clone(), "height_10y_ago".to_string()), + height_1h_ago: MetricPattern18::new(client.clone(), "height_1h_ago".to_string()), + height_24h_ago: MetricPattern18::new(client.clone(), "height_24h_ago".to_string()), + height_3d_ago: MetricPattern18::new(client.clone(), "height_3d_ago".to_string()), + height_1w_ago: MetricPattern18::new(client.clone(), "height_1w_ago".to_string()), + height_8d_ago: MetricPattern18::new(client.clone(), "height_8d_ago".to_string()), + height_9d_ago: MetricPattern18::new(client.clone(), "height_9d_ago".to_string()), + height_12d_ago: MetricPattern18::new(client.clone(), "height_12d_ago".to_string()), + height_13d_ago: MetricPattern18::new(client.clone(), "height_13d_ago".to_string()), + height_2w_ago: MetricPattern18::new(client.clone(), "height_2w_ago".to_string()), + height_21d_ago: MetricPattern18::new(client.clone(), "height_21d_ago".to_string()), + height_26d_ago: MetricPattern18::new(client.clone(), "height_26d_ago".to_string()), + height_1m_ago: MetricPattern18::new(client.clone(), "height_1m_ago".to_string()), + height_34d_ago: MetricPattern18::new(client.clone(), "height_34d_ago".to_string()), + height_55d_ago: MetricPattern18::new(client.clone(), "height_55d_ago".to_string()), + height_2m_ago: MetricPattern18::new(client.clone(), "height_2m_ago".to_string()), + height_89d_ago: MetricPattern18::new(client.clone(), "height_89d_ago".to_string()), + height_111d_ago: MetricPattern18::new(client.clone(), "height_111d_ago".to_string()), + height_144d_ago: MetricPattern18::new(client.clone(), "height_144d_ago".to_string()), + height_3m_ago: MetricPattern18::new(client.clone(), "height_3m_ago".to_string()), + height_6m_ago: MetricPattern18::new(client.clone(), "height_6m_ago".to_string()), + height_200d_ago: MetricPattern18::new(client.clone(), "height_200d_ago".to_string()), + height_350d_ago: MetricPattern18::new(client.clone(), "height_350d_ago".to_string()), + height_1y_ago: MetricPattern18::new(client.clone(), "height_1y_ago".to_string()), + height_2y_ago: MetricPattern18::new(client.clone(), "height_2y_ago".to_string()), + height_200w_ago: MetricPattern18::new(client.clone(), "height_200w_ago".to_string()), + height_3y_ago: MetricPattern18::new(client.clone(), "height_3y_ago".to_string()), + height_4y_ago: MetricPattern18::new(client.clone(), "height_4y_ago".to_string()), + height_5y_ago: MetricPattern18::new(client.clone(), "height_5y_ago".to_string()), + height_6y_ago: MetricPattern18::new(client.clone(), "height_6y_ago".to_string()), + height_8y_ago: MetricPattern18::new(client.clone(), "height_8y_ago".to_string()), + height_10y_ago: MetricPattern18::new(client.clone(), "height_10y_ago".to_string()), } } } @@ -3471,16 +3437,16 @@ impl MetricsTree_Blocks_Size { /// Metrics tree node. pub struct MetricsTree_Transactions { - pub first_txindex: MetricPattern20, - pub height: MetricPattern21, - pub txid: MetricPattern21, - pub txversion: MetricPattern21, - pub rawlocktime: MetricPattern21, - pub base_size: MetricPattern21, - pub total_size: MetricPattern21, - pub is_explicitly_rbf: MetricPattern21, - pub first_txinindex: MetricPattern21, - pub first_txoutindex: MetricPattern21, + pub first_txindex: MetricPattern18, + pub height: MetricPattern19, + pub txid: MetricPattern19, + pub txversion: MetricPattern19, + pub rawlocktime: MetricPattern19, + pub base_size: MetricPattern19, + pub total_size: MetricPattern19, + pub is_explicitly_rbf: MetricPattern19, + pub first_txinindex: MetricPattern19, + pub first_txoutindex: MetricPattern19, pub count: MetricsTree_Transactions_Count, pub size: MetricsTree_Transactions_Size, pub fees: MetricsTree_Transactions_Fees, @@ -3491,16 +3457,16 @@ pub struct MetricsTree_Transactions { impl MetricsTree_Transactions { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_txindex: MetricPattern20::new(client.clone(), "first_txindex".to_string()), - height: MetricPattern21::new(client.clone(), "height".to_string()), - txid: MetricPattern21::new(client.clone(), "txid".to_string()), - txversion: MetricPattern21::new(client.clone(), "txversion".to_string()), - rawlocktime: MetricPattern21::new(client.clone(), "rawlocktime".to_string()), - base_size: MetricPattern21::new(client.clone(), "base_size".to_string()), - total_size: MetricPattern21::new(client.clone(), "total_size".to_string()), - is_explicitly_rbf: MetricPattern21::new(client.clone(), "is_explicitly_rbf".to_string()), - first_txinindex: MetricPattern21::new(client.clone(), "first_txinindex".to_string()), - first_txoutindex: MetricPattern21::new(client.clone(), "first_txoutindex".to_string()), + first_txindex: MetricPattern18::new(client.clone(), "first_txindex".to_string()), + height: MetricPattern19::new(client.clone(), "height".to_string()), + txid: MetricPattern19::new(client.clone(), "txid".to_string()), + txversion: MetricPattern19::new(client.clone(), "txversion".to_string()), + rawlocktime: MetricPattern19::new(client.clone(), "rawlocktime".to_string()), + base_size: MetricPattern19::new(client.clone(), "base_size".to_string()), + total_size: MetricPattern19::new(client.clone(), "total_size".to_string()), + is_explicitly_rbf: MetricPattern19::new(client.clone(), "is_explicitly_rbf".to_string()), + first_txinindex: MetricPattern19::new(client.clone(), "first_txinindex".to_string()), + first_txoutindex: MetricPattern19::new(client.clone(), "first_txoutindex".to_string()), count: MetricsTree_Transactions_Count::new(client.clone(), format!("{base_path}_count")), size: MetricsTree_Transactions_Size::new(client.clone(), format!("{base_path}_size")), fees: MetricsTree_Transactions_Fees::new(client.clone(), format!("{base_path}_fees")), @@ -3513,14 +3479,14 @@ impl MetricsTree_Transactions { /// Metrics tree node. pub struct MetricsTree_Transactions_Count { pub tx_count: AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern, - pub is_coinbase: MetricPattern21, + pub is_coinbase: MetricPattern19, } impl MetricsTree_Transactions_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { tx_count: AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), "tx_count".to_string()), - is_coinbase: MetricPattern21::new(client.clone(), "is_coinbase".to_string()), + is_coinbase: MetricPattern19::new(client.clone(), "is_coinbase".to_string()), } } } @@ -3542,8 +3508,8 @@ impl MetricsTree_Transactions_Size { /// Metrics tree node. pub struct MetricsTree_Transactions_Fees { - pub input_value: MetricPattern21, - pub output_value: MetricPattern21, + pub input_value: MetricPattern19, + pub output_value: MetricPattern19, pub fee: _6bBlockTxindexPattern, pub fee_rate: _6bBlockTxindexPattern, } @@ -3551,8 +3517,8 @@ pub struct MetricsTree_Transactions_Fees { impl MetricsTree_Transactions_Fees { pub fn new(client: Arc, base_path: String) -> Self { Self { - input_value: MetricPattern21::new(client.clone(), "input_value".to_string()), - output_value: MetricPattern21::new(client.clone(), "output_value".to_string()), + input_value: MetricPattern19::new(client.clone(), "input_value".to_string()), + output_value: MetricPattern19::new(client.clone(), "output_value".to_string()), fee: _6bBlockTxindexPattern::new(client.clone(), "fee".to_string()), fee_rate: _6bBlockTxindexPattern::new(client.clone(), "fee_rate".to_string()), } @@ -3601,11 +3567,11 @@ impl MetricsTree_Transactions_Volume { /// Metrics tree node. pub struct MetricsTree_Inputs { - pub first_txinindex: MetricPattern20, - pub outpoint: MetricPattern22, - pub txindex: MetricPattern22, - pub outputtype: MetricPattern22, - pub typeindex: MetricPattern22, + pub first_txinindex: MetricPattern18, + pub outpoint: MetricPattern20, + pub txindex: MetricPattern20, + pub outputtype: MetricPattern20, + pub typeindex: MetricPattern20, pub spent: MetricsTree_Inputs_Spent, pub count: AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern, } @@ -3613,11 +3579,11 @@ pub struct MetricsTree_Inputs { impl MetricsTree_Inputs { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_txinindex: MetricPattern20::new(client.clone(), "first_txinindex".to_string()), - outpoint: MetricPattern22::new(client.clone(), "outpoint".to_string()), - txindex: MetricPattern22::new(client.clone(), "txindex".to_string()), - outputtype: MetricPattern22::new(client.clone(), "outputtype".to_string()), - typeindex: MetricPattern22::new(client.clone(), "typeindex".to_string()), + first_txinindex: MetricPattern18::new(client.clone(), "first_txinindex".to_string()), + outpoint: MetricPattern20::new(client.clone(), "outpoint".to_string()), + txindex: MetricPattern20::new(client.clone(), "txindex".to_string()), + outputtype: MetricPattern20::new(client.clone(), "outputtype".to_string()), + typeindex: MetricPattern20::new(client.clone(), "typeindex".to_string()), spent: MetricsTree_Inputs_Spent::new(client.clone(), format!("{base_path}_spent")), count: AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern::new(client.clone(), "input_count".to_string()), } @@ -3626,26 +3592,26 @@ impl MetricsTree_Inputs { /// Metrics tree node. pub struct MetricsTree_Inputs_Spent { - pub txoutindex: MetricPattern22, - pub value: MetricPattern22, + pub txoutindex: MetricPattern20, + pub value: MetricPattern20, } impl MetricsTree_Inputs_Spent { pub fn new(client: Arc, base_path: String) -> Self { Self { - txoutindex: MetricPattern22::new(client.clone(), "txoutindex".to_string()), - value: MetricPattern22::new(client.clone(), "value".to_string()), + txoutindex: MetricPattern20::new(client.clone(), "txoutindex".to_string()), + value: MetricPattern20::new(client.clone(), "value".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Outputs { - pub first_txoutindex: MetricPattern20, - pub value: MetricPattern23, - pub outputtype: MetricPattern23, - pub typeindex: MetricPattern23, - pub txindex: MetricPattern23, + pub first_txoutindex: MetricPattern18, + pub value: MetricPattern21, + pub outputtype: MetricPattern21, + pub typeindex: MetricPattern21, + pub txindex: MetricPattern21, pub spent: MetricsTree_Outputs_Spent, pub count: MetricsTree_Outputs_Count, } @@ -3653,11 +3619,11 @@ pub struct MetricsTree_Outputs { impl MetricsTree_Outputs { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_txoutindex: MetricPattern20::new(client.clone(), "first_txoutindex".to_string()), - value: MetricPattern23::new(client.clone(), "value".to_string()), - outputtype: MetricPattern23::new(client.clone(), "outputtype".to_string()), - typeindex: MetricPattern23::new(client.clone(), "typeindex".to_string()), - txindex: MetricPattern23::new(client.clone(), "txindex".to_string()), + first_txoutindex: MetricPattern18::new(client.clone(), "first_txoutindex".to_string()), + value: MetricPattern21::new(client.clone(), "value".to_string()), + outputtype: MetricPattern21::new(client.clone(), "outputtype".to_string()), + typeindex: MetricPattern21::new(client.clone(), "typeindex".to_string()), + txindex: MetricPattern21::new(client.clone(), "txindex".to_string()), spent: MetricsTree_Outputs_Spent::new(client.clone(), format!("{base_path}_spent")), count: MetricsTree_Outputs_Count::new(client.clone(), format!("{base_path}_count")), } @@ -3666,13 +3632,13 @@ impl MetricsTree_Outputs { /// Metrics tree node. pub struct MetricsTree_Outputs_Spent { - pub txinindex: MetricPattern23, + pub txinindex: MetricPattern21, } impl MetricsTree_Outputs_Spent { pub fn new(client: Arc, base_path: String) -> Self { Self { - txinindex: MetricPattern23::new(client.clone(), "txinindex".to_string()), + txinindex: MetricPattern21::new(client.clone(), "txinindex".to_string()), } } } @@ -3694,57 +3660,57 @@ impl MetricsTree_Outputs_Count { /// Metrics tree node. pub struct MetricsTree_Addresses { - pub first_p2pk65addressindex: MetricPattern20, - pub first_p2pk33addressindex: MetricPattern20, - pub first_p2pkhaddressindex: MetricPattern20, - pub first_p2shaddressindex: MetricPattern20, - pub first_p2wpkhaddressindex: MetricPattern20, - pub first_p2wshaddressindex: MetricPattern20, - pub first_p2traddressindex: MetricPattern20, - pub first_p2aaddressindex: MetricPattern20, - pub p2pk65bytes: MetricPattern29, - pub p2pk33bytes: MetricPattern28, - pub p2pkhbytes: MetricPattern30, - pub p2shbytes: MetricPattern31, - pub p2wpkhbytes: MetricPattern33, - pub p2wshbytes: MetricPattern34, - pub p2trbytes: MetricPattern32, - pub p2abytes: MetricPattern26, + pub first_p2pk65addressindex: MetricPattern18, + pub first_p2pk33addressindex: MetricPattern18, + pub first_p2pkhaddressindex: MetricPattern18, + pub first_p2shaddressindex: MetricPattern18, + pub first_p2wpkhaddressindex: MetricPattern18, + pub first_p2wshaddressindex: MetricPattern18, + pub first_p2traddressindex: MetricPattern18, + pub first_p2aaddressindex: MetricPattern18, + pub p2pk65bytes: MetricPattern27, + pub p2pk33bytes: MetricPattern26, + pub p2pkhbytes: MetricPattern28, + pub p2shbytes: MetricPattern29, + pub p2wpkhbytes: MetricPattern31, + pub p2wshbytes: MetricPattern32, + pub p2trbytes: MetricPattern30, + pub p2abytes: MetricPattern24, } impl MetricsTree_Addresses { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_p2pk65addressindex: MetricPattern20::new(client.clone(), "first_p2pk65addressindex".to_string()), - first_p2pk33addressindex: MetricPattern20::new(client.clone(), "first_p2pk33addressindex".to_string()), - first_p2pkhaddressindex: MetricPattern20::new(client.clone(), "first_p2pkhaddressindex".to_string()), - first_p2shaddressindex: MetricPattern20::new(client.clone(), "first_p2shaddressindex".to_string()), - first_p2wpkhaddressindex: MetricPattern20::new(client.clone(), "first_p2wpkhaddressindex".to_string()), - first_p2wshaddressindex: MetricPattern20::new(client.clone(), "first_p2wshaddressindex".to_string()), - first_p2traddressindex: MetricPattern20::new(client.clone(), "first_p2traddressindex".to_string()), - first_p2aaddressindex: MetricPattern20::new(client.clone(), "first_p2aaddressindex".to_string()), - p2pk65bytes: MetricPattern29::new(client.clone(), "p2pk65bytes".to_string()), - p2pk33bytes: MetricPattern28::new(client.clone(), "p2pk33bytes".to_string()), - p2pkhbytes: MetricPattern30::new(client.clone(), "p2pkhbytes".to_string()), - p2shbytes: MetricPattern31::new(client.clone(), "p2shbytes".to_string()), - p2wpkhbytes: MetricPattern33::new(client.clone(), "p2wpkhbytes".to_string()), - p2wshbytes: MetricPattern34::new(client.clone(), "p2wshbytes".to_string()), - p2trbytes: MetricPattern32::new(client.clone(), "p2trbytes".to_string()), - p2abytes: MetricPattern26::new(client.clone(), "p2abytes".to_string()), + first_p2pk65addressindex: MetricPattern18::new(client.clone(), "first_p2pk65addressindex".to_string()), + first_p2pk33addressindex: MetricPattern18::new(client.clone(), "first_p2pk33addressindex".to_string()), + first_p2pkhaddressindex: MetricPattern18::new(client.clone(), "first_p2pkhaddressindex".to_string()), + first_p2shaddressindex: MetricPattern18::new(client.clone(), "first_p2shaddressindex".to_string()), + first_p2wpkhaddressindex: MetricPattern18::new(client.clone(), "first_p2wpkhaddressindex".to_string()), + first_p2wshaddressindex: MetricPattern18::new(client.clone(), "first_p2wshaddressindex".to_string()), + first_p2traddressindex: MetricPattern18::new(client.clone(), "first_p2traddressindex".to_string()), + first_p2aaddressindex: MetricPattern18::new(client.clone(), "first_p2aaddressindex".to_string()), + p2pk65bytes: MetricPattern27::new(client.clone(), "p2pk65bytes".to_string()), + p2pk33bytes: MetricPattern26::new(client.clone(), "p2pk33bytes".to_string()), + p2pkhbytes: MetricPattern28::new(client.clone(), "p2pkhbytes".to_string()), + p2shbytes: MetricPattern29::new(client.clone(), "p2shbytes".to_string()), + p2wpkhbytes: MetricPattern31::new(client.clone(), "p2wpkhbytes".to_string()), + p2wshbytes: MetricPattern32::new(client.clone(), "p2wshbytes".to_string()), + p2trbytes: MetricPattern30::new(client.clone(), "p2trbytes".to_string()), + p2abytes: MetricPattern24::new(client.clone(), "p2abytes".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Scripts { - pub first_emptyoutputindex: MetricPattern20, - pub first_opreturnindex: MetricPattern20, - pub first_p2msoutputindex: MetricPattern20, - pub first_unknownoutputindex: MetricPattern20, - pub empty_to_txindex: MetricPattern24, - pub opreturn_to_txindex: MetricPattern25, - pub p2ms_to_txindex: MetricPattern27, - pub unknown_to_txindex: MetricPattern35, + pub first_emptyoutputindex: MetricPattern18, + pub first_opreturnindex: MetricPattern18, + pub first_p2msoutputindex: MetricPattern18, + pub first_unknownoutputindex: MetricPattern18, + pub empty_to_txindex: MetricPattern22, + pub opreturn_to_txindex: MetricPattern23, + pub p2ms_to_txindex: MetricPattern25, + pub unknown_to_txindex: MetricPattern33, pub count: MetricsTree_Scripts_Count, pub value: MetricsTree_Scripts_Value, pub adoption: MetricsTree_Scripts_Adoption, @@ -3753,14 +3719,14 @@ pub struct MetricsTree_Scripts { impl MetricsTree_Scripts { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_emptyoutputindex: MetricPattern20::new(client.clone(), "first_emptyoutputindex".to_string()), - first_opreturnindex: MetricPattern20::new(client.clone(), "first_opreturnindex".to_string()), - first_p2msoutputindex: MetricPattern20::new(client.clone(), "first_p2msoutputindex".to_string()), - first_unknownoutputindex: MetricPattern20::new(client.clone(), "first_unknownoutputindex".to_string()), - empty_to_txindex: MetricPattern24::new(client.clone(), "txindex".to_string()), - opreturn_to_txindex: MetricPattern25::new(client.clone(), "txindex".to_string()), - p2ms_to_txindex: MetricPattern27::new(client.clone(), "txindex".to_string()), - unknown_to_txindex: MetricPattern35::new(client.clone(), "txindex".to_string()), + first_emptyoutputindex: MetricPattern18::new(client.clone(), "first_emptyoutputindex".to_string()), + first_opreturnindex: MetricPattern18::new(client.clone(), "first_opreturnindex".to_string()), + first_p2msoutputindex: MetricPattern18::new(client.clone(), "first_p2msoutputindex".to_string()), + first_unknownoutputindex: MetricPattern18::new(client.clone(), "first_unknownoutputindex".to_string()), + empty_to_txindex: MetricPattern22::new(client.clone(), "txindex".to_string()), + opreturn_to_txindex: MetricPattern23::new(client.clone(), "txindex".to_string()), + p2ms_to_txindex: MetricPattern25::new(client.clone(), "txindex".to_string()), + unknown_to_txindex: MetricPattern33::new(client.clone(), "txindex".to_string()), count: MetricsTree_Scripts_Count::new(client.clone(), format!("{base_path}_count")), value: MetricsTree_Scripts_Value::new(client.clone(), format!("{base_path}_value")), adoption: MetricsTree_Scripts_Adoption::new(client.clone(), format!("{base_path}_adoption")), @@ -3936,15 +3902,15 @@ impl MetricsTree_Mining_Hashrate { /// Metrics tree node. pub struct MetricsTree_Positions { - pub block_position: MetricPattern20, - pub tx_position: MetricPattern21, + pub block_position: MetricPattern18, + pub tx_position: MetricPattern19, } impl MetricsTree_Positions { pub fn new(client: Arc, base_path: String) -> Self { Self { - block_position: MetricPattern20::new(client.clone(), "position".to_string()), - tx_position: MetricPattern21::new(client.clone(), "position".to_string()), + block_position: MetricPattern18::new(client.clone(), "position".to_string()), + tx_position: MetricPattern19::new(client.clone(), "position".to_string()), } } } @@ -4096,16 +4062,16 @@ impl MetricsTree_Cointime_Adjusted { /// Metrics tree node. pub struct MetricsTree_Cointime_ReserveRisk { - pub vocdd_365d_median: MetricPattern20, - pub hodl_bank: MetricPattern20, + pub vocdd_365d_median: MetricPattern18, + pub hodl_bank: MetricPattern18, pub reserve_risk: MetricPattern1, } impl MetricsTree_Cointime_ReserveRisk { pub fn new(client: Arc, base_path: String) -> Self { Self { - vocdd_365d_median: MetricPattern20::new(client.clone(), "vocdd_365d_median".to_string()), - hodl_bank: MetricPattern20::new(client.clone(), "hodl_bank".to_string()), + vocdd_365d_median: MetricPattern18::new(client.clone(), "vocdd_365d_median".to_string()), + hodl_bank: MetricPattern18::new(client.clone(), "hodl_bank".to_string()), reserve_risk: MetricPattern1::new(client.clone(), "reserve_risk".to_string()), } } @@ -4164,8 +4130,6 @@ pub struct MetricsTree_Indexes { pub height: MetricsTree_Indexes_Height, pub difficultyepoch: MetricsTree_Indexes_Difficultyepoch, pub halvingepoch: MetricsTree_Indexes_Halvingepoch, - pub minute1: MetricsTree_Indexes_Minute1, - pub minute5: MetricsTree_Indexes_Minute5, pub minute10: MetricsTree_Indexes_Minute10, pub minute30: MetricsTree_Indexes_Minute30, pub hour1: MetricsTree_Indexes_Hour1, @@ -4191,8 +4155,6 @@ impl MetricsTree_Indexes { height: MetricsTree_Indexes_Height::new(client.clone(), format!("{base_path}_height")), difficultyepoch: MetricsTree_Indexes_Difficultyepoch::new(client.clone(), format!("{base_path}_difficultyepoch")), halvingepoch: MetricsTree_Indexes_Halvingepoch::new(client.clone(), format!("{base_path}_halvingepoch")), - minute1: MetricsTree_Indexes_Minute1::new(client.clone(), format!("{base_path}_minute1")), - minute5: MetricsTree_Indexes_Minute5::new(client.clone(), format!("{base_path}_minute5")), minute10: MetricsTree_Indexes_Minute10::new(client.clone(), format!("{base_path}_minute10")), minute30: MetricsTree_Indexes_Minute30::new(client.clone(), format!("{base_path}_minute30")), hour1: MetricsTree_Indexes_Hour1::new(client.clone(), format!("{base_path}_hour1")), @@ -4250,521 +4212,487 @@ impl MetricsTree_Indexes_Address { /// Metrics tree node. pub struct MetricsTree_Indexes_Address_P2pk33 { - pub identity: MetricPattern28, + pub identity: MetricPattern26, } impl MetricsTree_Indexes_Address_P2pk33 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern28::new(client.clone(), "p2pk33addressindex".to_string()), + identity: MetricPattern26::new(client.clone(), "p2pk33addressindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_P2pk65 { - pub identity: MetricPattern29, + pub identity: MetricPattern27, } impl MetricsTree_Indexes_Address_P2pk65 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern29::new(client.clone(), "p2pk65addressindex".to_string()), + identity: MetricPattern27::new(client.clone(), "p2pk65addressindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_P2pkh { - pub identity: MetricPattern30, + pub identity: MetricPattern28, } impl MetricsTree_Indexes_Address_P2pkh { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern30::new(client.clone(), "p2pkhaddressindex".to_string()), + identity: MetricPattern28::new(client.clone(), "p2pkhaddressindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_P2sh { - pub identity: MetricPattern31, + pub identity: MetricPattern29, } impl MetricsTree_Indexes_Address_P2sh { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern31::new(client.clone(), "p2shaddressindex".to_string()), + identity: MetricPattern29::new(client.clone(), "p2shaddressindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_P2tr { - pub identity: MetricPattern32, + pub identity: MetricPattern30, } impl MetricsTree_Indexes_Address_P2tr { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern32::new(client.clone(), "p2traddressindex".to_string()), + identity: MetricPattern30::new(client.clone(), "p2traddressindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_P2wpkh { - pub identity: MetricPattern33, + pub identity: MetricPattern31, } impl MetricsTree_Indexes_Address_P2wpkh { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern33::new(client.clone(), "p2wpkhaddressindex".to_string()), + identity: MetricPattern31::new(client.clone(), "p2wpkhaddressindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_P2wsh { - pub identity: MetricPattern34, + pub identity: MetricPattern32, } impl MetricsTree_Indexes_Address_P2wsh { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern34::new(client.clone(), "p2wshaddressindex".to_string()), + identity: MetricPattern32::new(client.clone(), "p2wshaddressindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_P2a { - pub identity: MetricPattern26, + pub identity: MetricPattern24, } impl MetricsTree_Indexes_Address_P2a { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern26::new(client.clone(), "p2aaddressindex".to_string()), + identity: MetricPattern24::new(client.clone(), "p2aaddressindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_P2ms { - pub identity: MetricPattern27, + pub identity: MetricPattern25, } impl MetricsTree_Indexes_Address_P2ms { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern27::new(client.clone(), "p2msoutputindex".to_string()), + identity: MetricPattern25::new(client.clone(), "p2msoutputindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_Empty { - pub identity: MetricPattern24, + pub identity: MetricPattern22, } impl MetricsTree_Indexes_Address_Empty { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern24::new(client.clone(), "emptyoutputindex".to_string()), + identity: MetricPattern22::new(client.clone(), "emptyoutputindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_Unknown { - pub identity: MetricPattern35, + pub identity: MetricPattern33, } impl MetricsTree_Indexes_Address_Unknown { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern35::new(client.clone(), "unknownoutputindex".to_string()), + identity: MetricPattern33::new(client.clone(), "unknownoutputindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Address_Opreturn { - pub identity: MetricPattern25, + pub identity: MetricPattern23, } impl MetricsTree_Indexes_Address_Opreturn { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern25::new(client.clone(), "opreturnindex".to_string()), + identity: MetricPattern23::new(client.clone(), "opreturnindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Height { - pub identity: MetricPattern20, - pub minute1: MetricPattern20, - pub minute5: MetricPattern20, - pub minute10: MetricPattern20, - pub minute30: MetricPattern20, - pub hour1: MetricPattern20, - pub hour4: MetricPattern20, - pub hour12: MetricPattern20, - pub day1: MetricPattern20, - pub day3: MetricPattern20, - pub difficultyepoch: MetricPattern20, - pub halvingepoch: MetricPattern20, - pub week1: MetricPattern20, - pub month1: MetricPattern20, - pub month3: MetricPattern20, - pub month6: MetricPattern20, - pub year1: MetricPattern20, - pub year10: MetricPattern20, - pub txindex_count: MetricPattern20, + pub identity: MetricPattern18, + pub minute10: MetricPattern18, + pub minute30: MetricPattern18, + pub hour1: MetricPattern18, + pub hour4: MetricPattern18, + pub hour12: MetricPattern18, + pub day1: MetricPattern18, + pub day3: MetricPattern18, + pub difficultyepoch: MetricPattern18, + pub halvingepoch: MetricPattern18, + pub week1: MetricPattern18, + pub month1: MetricPattern18, + pub month3: MetricPattern18, + pub month6: MetricPattern18, + pub year1: MetricPattern18, + pub year10: MetricPattern18, + pub txindex_count: MetricPattern18, } impl MetricsTree_Indexes_Height { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern20::new(client.clone(), "height".to_string()), - minute1: MetricPattern20::new(client.clone(), "minute1".to_string()), - minute5: MetricPattern20::new(client.clone(), "minute5".to_string()), - minute10: MetricPattern20::new(client.clone(), "minute10".to_string()), - minute30: MetricPattern20::new(client.clone(), "minute30".to_string()), - hour1: MetricPattern20::new(client.clone(), "hour1".to_string()), - hour4: MetricPattern20::new(client.clone(), "hour4".to_string()), - hour12: MetricPattern20::new(client.clone(), "hour12".to_string()), - day1: MetricPattern20::new(client.clone(), "day1".to_string()), - day3: MetricPattern20::new(client.clone(), "day3".to_string()), - difficultyepoch: MetricPattern20::new(client.clone(), "difficultyepoch".to_string()), - halvingepoch: MetricPattern20::new(client.clone(), "halvingepoch".to_string()), - week1: MetricPattern20::new(client.clone(), "week1".to_string()), - month1: MetricPattern20::new(client.clone(), "month1".to_string()), - month3: MetricPattern20::new(client.clone(), "month3".to_string()), - month6: MetricPattern20::new(client.clone(), "month6".to_string()), - year1: MetricPattern20::new(client.clone(), "year1".to_string()), - year10: MetricPattern20::new(client.clone(), "year10".to_string()), - txindex_count: MetricPattern20::new(client.clone(), "txindex_count".to_string()), + identity: MetricPattern18::new(client.clone(), "height".to_string()), + minute10: MetricPattern18::new(client.clone(), "minute10".to_string()), + minute30: MetricPattern18::new(client.clone(), "minute30".to_string()), + hour1: MetricPattern18::new(client.clone(), "hour1".to_string()), + hour4: MetricPattern18::new(client.clone(), "hour4".to_string()), + hour12: MetricPattern18::new(client.clone(), "hour12".to_string()), + day1: MetricPattern18::new(client.clone(), "day1".to_string()), + day3: MetricPattern18::new(client.clone(), "day3".to_string()), + difficultyepoch: MetricPattern18::new(client.clone(), "difficultyepoch".to_string()), + halvingepoch: MetricPattern18::new(client.clone(), "halvingepoch".to_string()), + week1: MetricPattern18::new(client.clone(), "week1".to_string()), + month1: MetricPattern18::new(client.clone(), "month1".to_string()), + month3: MetricPattern18::new(client.clone(), "month3".to_string()), + month6: MetricPattern18::new(client.clone(), "month6".to_string()), + year1: MetricPattern18::new(client.clone(), "year1".to_string()), + year10: MetricPattern18::new(client.clone(), "year10".to_string()), + txindex_count: MetricPattern18::new(client.clone(), "txindex_count".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Difficultyepoch { - pub identity: MetricPattern19, - pub first_height: MetricPattern19, - pub height_count: MetricPattern19, + pub identity: MetricPattern17, + pub first_height: MetricPattern17, + pub height_count: MetricPattern17, } impl MetricsTree_Indexes_Difficultyepoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern19::new(client.clone(), "difficultyepoch".to_string()), - first_height: MetricPattern19::new(client.clone(), "first_height".to_string()), - height_count: MetricPattern19::new(client.clone(), "height_count".to_string()), + identity: MetricPattern17::new(client.clone(), "difficultyepoch".to_string()), + first_height: MetricPattern17::new(client.clone(), "first_height".to_string()), + height_count: MetricPattern17::new(client.clone(), "height_count".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Halvingepoch { - pub identity: MetricPattern18, - pub first_height: MetricPattern18, + pub identity: MetricPattern16, + pub first_height: MetricPattern16, } impl MetricsTree_Indexes_Halvingepoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern18::new(client.clone(), "halvingepoch".to_string()), - first_height: MetricPattern18::new(client.clone(), "first_height".to_string()), - } - } -} - -/// Metrics tree node. -pub struct MetricsTree_Indexes_Minute1 { - pub identity: MetricPattern3, - pub first_height: MetricPattern3, -} - -impl MetricsTree_Indexes_Minute1 { - pub fn new(client: Arc, base_path: String) -> Self { - Self { - identity: MetricPattern3::new(client.clone(), "minute1".to_string()), - first_height: MetricPattern3::new(client.clone(), "minute1_first_height".to_string()), - } - } -} - -/// Metrics tree node. -pub struct MetricsTree_Indexes_Minute5 { - pub identity: MetricPattern4, - pub first_height: MetricPattern4, -} - -impl MetricsTree_Indexes_Minute5 { - pub fn new(client: Arc, base_path: String) -> Self { - Self { - identity: MetricPattern4::new(client.clone(), "minute5".to_string()), - first_height: MetricPattern4::new(client.clone(), "minute5_first_height".to_string()), + identity: MetricPattern16::new(client.clone(), "halvingepoch".to_string()), + first_height: MetricPattern16::new(client.clone(), "first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Minute10 { - pub identity: MetricPattern5, - pub first_height: MetricPattern5, + pub identity: MetricPattern3, + pub first_height: MetricPattern3, } impl MetricsTree_Indexes_Minute10 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern5::new(client.clone(), "minute10".to_string()), - first_height: MetricPattern5::new(client.clone(), "minute10_first_height".to_string()), + identity: MetricPattern3::new(client.clone(), "minute10".to_string()), + first_height: MetricPattern3::new(client.clone(), "minute10_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Minute30 { - pub identity: MetricPattern6, - pub first_height: MetricPattern6, + pub identity: MetricPattern4, + pub first_height: MetricPattern4, } impl MetricsTree_Indexes_Minute30 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern6::new(client.clone(), "minute30".to_string()), - first_height: MetricPattern6::new(client.clone(), "minute30_first_height".to_string()), + identity: MetricPattern4::new(client.clone(), "minute30".to_string()), + first_height: MetricPattern4::new(client.clone(), "minute30_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Hour1 { - pub identity: MetricPattern7, - pub first_height: MetricPattern7, + pub identity: MetricPattern5, + pub first_height: MetricPattern5, } impl MetricsTree_Indexes_Hour1 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern7::new(client.clone(), "hour1".to_string()), - first_height: MetricPattern7::new(client.clone(), "hour1_first_height".to_string()), + identity: MetricPattern5::new(client.clone(), "hour1".to_string()), + first_height: MetricPattern5::new(client.clone(), "hour1_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Hour4 { - pub identity: MetricPattern8, - pub first_height: MetricPattern8, + pub identity: MetricPattern6, + pub first_height: MetricPattern6, } impl MetricsTree_Indexes_Hour4 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern8::new(client.clone(), "hour4".to_string()), - first_height: MetricPattern8::new(client.clone(), "hour4_first_height".to_string()), + identity: MetricPattern6::new(client.clone(), "hour4".to_string()), + first_height: MetricPattern6::new(client.clone(), "hour4_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Hour12 { - pub identity: MetricPattern9, - pub first_height: MetricPattern9, + pub identity: MetricPattern7, + pub first_height: MetricPattern7, } impl MetricsTree_Indexes_Hour12 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern9::new(client.clone(), "hour12".to_string()), - first_height: MetricPattern9::new(client.clone(), "hour12_first_height".to_string()), + identity: MetricPattern7::new(client.clone(), "hour12".to_string()), + first_height: MetricPattern7::new(client.clone(), "hour12_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Day1 { - pub identity: MetricPattern10, - pub date: MetricPattern10, - pub first_height: MetricPattern10, - pub height_count: MetricPattern10, + pub identity: MetricPattern8, + pub date: MetricPattern8, + pub first_height: MetricPattern8, + pub height_count: MetricPattern8, } impl MetricsTree_Indexes_Day1 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern10::new(client.clone(), "day1".to_string()), - date: MetricPattern10::new(client.clone(), "date".to_string()), - first_height: MetricPattern10::new(client.clone(), "first_height".to_string()), - height_count: MetricPattern10::new(client.clone(), "height_count".to_string()), + identity: MetricPattern8::new(client.clone(), "day1".to_string()), + date: MetricPattern8::new(client.clone(), "date".to_string()), + first_height: MetricPattern8::new(client.clone(), "first_height".to_string()), + height_count: MetricPattern8::new(client.clone(), "height_count".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Day3 { - pub identity: MetricPattern11, - pub first_height: MetricPattern11, + pub identity: MetricPattern9, + pub first_height: MetricPattern9, } impl MetricsTree_Indexes_Day3 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern11::new(client.clone(), "day3".to_string()), - first_height: MetricPattern11::new(client.clone(), "day3_first_height".to_string()), + identity: MetricPattern9::new(client.clone(), "day3".to_string()), + first_height: MetricPattern9::new(client.clone(), "day3_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Week1 { - pub identity: MetricPattern12, - pub date: MetricPattern12, - pub first_height: MetricPattern12, + pub identity: MetricPattern10, + pub date: MetricPattern10, + pub first_height: MetricPattern10, } impl MetricsTree_Indexes_Week1 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern12::new(client.clone(), "week1".to_string()), - date: MetricPattern12::new(client.clone(), "date".to_string()), - first_height: MetricPattern12::new(client.clone(), "week1_first_height".to_string()), + identity: MetricPattern10::new(client.clone(), "week1".to_string()), + date: MetricPattern10::new(client.clone(), "date".to_string()), + first_height: MetricPattern10::new(client.clone(), "week1_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Month1 { - pub identity: MetricPattern13, - pub date: MetricPattern13, - pub first_height: MetricPattern13, + pub identity: MetricPattern11, + pub date: MetricPattern11, + pub first_height: MetricPattern11, } impl MetricsTree_Indexes_Month1 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern13::new(client.clone(), "month1".to_string()), - date: MetricPattern13::new(client.clone(), "date".to_string()), - first_height: MetricPattern13::new(client.clone(), "month1_first_height".to_string()), + identity: MetricPattern11::new(client.clone(), "month1".to_string()), + date: MetricPattern11::new(client.clone(), "date".to_string()), + first_height: MetricPattern11::new(client.clone(), "month1_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Month3 { - pub identity: MetricPattern14, - pub date: MetricPattern14, - pub first_height: MetricPattern14, + pub identity: MetricPattern12, + pub date: MetricPattern12, + pub first_height: MetricPattern12, } impl MetricsTree_Indexes_Month3 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern14::new(client.clone(), "month3".to_string()), - date: MetricPattern14::new(client.clone(), "date".to_string()), - first_height: MetricPattern14::new(client.clone(), "month3_first_height".to_string()), + identity: MetricPattern12::new(client.clone(), "month3".to_string()), + date: MetricPattern12::new(client.clone(), "date".to_string()), + first_height: MetricPattern12::new(client.clone(), "month3_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Month6 { - pub identity: MetricPattern15, - pub date: MetricPattern15, - pub first_height: MetricPattern15, + pub identity: MetricPattern13, + pub date: MetricPattern13, + pub first_height: MetricPattern13, } impl MetricsTree_Indexes_Month6 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern15::new(client.clone(), "month6".to_string()), - date: MetricPattern15::new(client.clone(), "date".to_string()), - first_height: MetricPattern15::new(client.clone(), "month6_first_height".to_string()), + identity: MetricPattern13::new(client.clone(), "month6".to_string()), + date: MetricPattern13::new(client.clone(), "date".to_string()), + first_height: MetricPattern13::new(client.clone(), "month6_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Year1 { - pub identity: MetricPattern16, - pub date: MetricPattern16, - pub first_height: MetricPattern16, + pub identity: MetricPattern14, + pub date: MetricPattern14, + pub first_height: MetricPattern14, } impl MetricsTree_Indexes_Year1 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern16::new(client.clone(), "year1".to_string()), - date: MetricPattern16::new(client.clone(), "date".to_string()), - first_height: MetricPattern16::new(client.clone(), "year1_first_height".to_string()), + identity: MetricPattern14::new(client.clone(), "year1".to_string()), + date: MetricPattern14::new(client.clone(), "date".to_string()), + first_height: MetricPattern14::new(client.clone(), "year1_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Year10 { - pub identity: MetricPattern17, - pub date: MetricPattern17, - pub first_height: MetricPattern17, + pub identity: MetricPattern15, + pub date: MetricPattern15, + pub first_height: MetricPattern15, } impl MetricsTree_Indexes_Year10 { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern17::new(client.clone(), "year10".to_string()), - date: MetricPattern17::new(client.clone(), "date".to_string()), - first_height: MetricPattern17::new(client.clone(), "year10_first_height".to_string()), + identity: MetricPattern15::new(client.clone(), "year10".to_string()), + date: MetricPattern15::new(client.clone(), "date".to_string()), + first_height: MetricPattern15::new(client.clone(), "year10_first_height".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Txindex { - pub identity: MetricPattern21, - pub input_count: MetricPattern21, - pub output_count: MetricPattern21, + pub identity: MetricPattern19, + pub input_count: MetricPattern19, + pub output_count: MetricPattern19, } impl MetricsTree_Indexes_Txindex { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern21::new(client.clone(), "txindex".to_string()), - input_count: MetricPattern21::new(client.clone(), "input_count".to_string()), - output_count: MetricPattern21::new(client.clone(), "output_count".to_string()), + identity: MetricPattern19::new(client.clone(), "txindex".to_string()), + input_count: MetricPattern19::new(client.clone(), "input_count".to_string()), + output_count: MetricPattern19::new(client.clone(), "output_count".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Txinindex { - pub identity: MetricPattern22, + pub identity: MetricPattern20, } impl MetricsTree_Indexes_Txinindex { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern22::new(client.clone(), "txinindex".to_string()), + identity: MetricPattern20::new(client.clone(), "txinindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Indexes_Txoutindex { - pub identity: MetricPattern23, + pub identity: MetricPattern21, } impl MetricsTree_Indexes_Txoutindex { pub fn new(client: Arc, base_path: String) -> Self { Self { - identity: MetricPattern23::new(client.clone(), "txoutindex".to_string()), + identity: MetricPattern21::new(client.clone(), "txoutindex".to_string()), } } } @@ -4863,7 +4791,7 @@ pub struct MetricsTree_Market_Returns { pub _1d_returns_1w_sd: SdSmaPattern, pub _1d_returns_1m_sd: SdSmaPattern, pub _1d_returns_1y_sd: SdSmaPattern, - pub downside_returns: MetricPattern20, + pub downside_returns: MetricPattern18, pub downside_1w_sd: SdSmaPattern, pub downside_1m_sd: SdSmaPattern, pub downside_1y_sd: SdSmaPattern, @@ -4877,7 +4805,7 @@ impl MetricsTree_Market_Returns { _1d_returns_1w_sd: SdSmaPattern::new(client.clone(), "1d_returns_1w_sd".to_string()), _1d_returns_1m_sd: SdSmaPattern::new(client.clone(), "1d_returns_1m_sd".to_string()), _1d_returns_1y_sd: SdSmaPattern::new(client.clone(), "1d_returns_1y_sd".to_string()), - downside_returns: MetricPattern20::new(client.clone(), "downside_returns".to_string()), + downside_returns: MetricPattern18::new(client.clone(), "downside_returns".to_string()), downside_1w_sd: SdSmaPattern::new(client.clone(), "downside_1w_sd".to_string()), downside_1m_sd: SdSmaPattern::new(client.clone(), "downside_1m_sd".to_string()), downside_1y_sd: SdSmaPattern::new(client.clone(), "downside_1y_sd".to_string()), @@ -5067,7 +4995,7 @@ impl MetricsTree_Market_MovingAverage { /// Metrics tree node. pub struct MetricsTree_Market_Dca { - pub dca_sats_per_day: MetricPattern20, + pub dca_sats_per_day: MetricPattern18, pub period_stack: _10y1m1w1y2y3m3y4y5y6m6y8yPattern3, pub period_average_price: MetricsTree_Market_Dca_PeriodAveragePrice, pub period_returns: _10y1m1w1y2y3m3y4y5y6m6y8yPattern2, @@ -5094,7 +5022,7 @@ pub struct MetricsTree_Market_Dca { impl MetricsTree_Market_Dca { pub fn new(client: Arc, base_path: String) -> Self { Self { - dca_sats_per_day: MetricPattern20::new(client.clone(), "dca_sats_per_day".to_string()), + dca_sats_per_day: MetricPattern18::new(client.clone(), "dca_sats_per_day".to_string()), period_stack: _10y1m1w1y2y3m3y4y5y6m6y8yPattern3::new(client.clone(), "dca_stack".to_string()), period_average_price: MetricsTree_Market_Dca_PeriodAveragePrice::new(client.clone(), format!("{base_path}_period_average_price")), period_returns: _10y1m1w1y2y3m3y4y5y6m6y8yPattern2::new(client.clone(), "dca_returns".to_string()), @@ -5576,14 +5504,14 @@ impl MetricsTree_Market_Indicators_Macd_1m { /// Metrics tree node. pub struct MetricsTree_Pools { - pub height_to_pool: MetricPattern20, + pub height_to_pool: MetricPattern18, pub vecs: MetricsTree_Pools_Vecs, } impl MetricsTree_Pools { pub fn new(client: Arc, base_path: String) -> Self { Self { - height_to_pool: MetricPattern20::new(client.clone(), "pool".to_string()), + height_to_pool: MetricPattern18::new(client.clone(), "pool".to_string()), vecs: MetricsTree_Pools_Vecs::new(client.clone(), format!("{base_path}_vecs")), } } @@ -6013,7 +5941,7 @@ impl MetricsTree_Prices_Price { /// Metrics tree node. pub struct MetricsTree_Distribution { - pub supply_state: MetricPattern20, + pub supply_state: MetricPattern18, pub any_address_indexes: MetricsTree_Distribution_AnyAddressIndexes, pub addresses_data: MetricsTree_Distribution_AddressesData, pub utxo_cohorts: MetricsTree_Distribution_UtxoCohorts, @@ -6024,14 +5952,14 @@ pub struct MetricsTree_Distribution { pub total_addr_count: MetricsTree_Distribution_TotalAddrCount, pub new_addr_count: MetricsTree_Distribution_NewAddrCount, pub growth_rate: MetricsTree_Distribution_GrowthRate, - pub fundedaddressindex: MetricPattern36, - pub emptyaddressindex: MetricPattern37, + pub fundedaddressindex: MetricPattern34, + pub emptyaddressindex: MetricPattern35, } impl MetricsTree_Distribution { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply_state: MetricPattern20::new(client.clone(), "supply_state".to_string()), + supply_state: MetricPattern18::new(client.clone(), "supply_state".to_string()), any_address_indexes: MetricsTree_Distribution_AnyAddressIndexes::new(client.clone(), format!("{base_path}_any_address_indexes")), addresses_data: MetricsTree_Distribution_AddressesData::new(client.clone(), format!("{base_path}_addresses_data")), utxo_cohorts: MetricsTree_Distribution_UtxoCohorts::new(client.clone(), format!("{base_path}_utxo_cohorts")), @@ -6042,50 +5970,50 @@ impl MetricsTree_Distribution { total_addr_count: MetricsTree_Distribution_TotalAddrCount::new(client.clone(), format!("{base_path}_total_addr_count")), new_addr_count: MetricsTree_Distribution_NewAddrCount::new(client.clone(), format!("{base_path}_new_addr_count")), growth_rate: MetricsTree_Distribution_GrowthRate::new(client.clone(), format!("{base_path}_growth_rate")), - fundedaddressindex: MetricPattern36::new(client.clone(), "fundedaddressindex".to_string()), - emptyaddressindex: MetricPattern37::new(client.clone(), "emptyaddressindex".to_string()), + fundedaddressindex: MetricPattern34::new(client.clone(), "fundedaddressindex".to_string()), + emptyaddressindex: MetricPattern35::new(client.clone(), "emptyaddressindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Distribution_AnyAddressIndexes { - pub p2a: MetricPattern26, - pub p2pk33: MetricPattern28, - pub p2pk65: MetricPattern29, - pub p2pkh: MetricPattern30, - pub p2sh: MetricPattern31, - pub p2tr: MetricPattern32, - pub p2wpkh: MetricPattern33, - pub p2wsh: MetricPattern34, + pub p2a: MetricPattern24, + pub p2pk33: MetricPattern26, + pub p2pk65: MetricPattern27, + pub p2pkh: MetricPattern28, + pub p2sh: MetricPattern29, + pub p2tr: MetricPattern30, + pub p2wpkh: MetricPattern31, + pub p2wsh: MetricPattern32, } impl MetricsTree_Distribution_AnyAddressIndexes { pub fn new(client: Arc, base_path: String) -> Self { Self { - p2a: MetricPattern26::new(client.clone(), "anyaddressindex".to_string()), - p2pk33: MetricPattern28::new(client.clone(), "anyaddressindex".to_string()), - p2pk65: MetricPattern29::new(client.clone(), "anyaddressindex".to_string()), - p2pkh: MetricPattern30::new(client.clone(), "anyaddressindex".to_string()), - p2sh: MetricPattern31::new(client.clone(), "anyaddressindex".to_string()), - p2tr: MetricPattern32::new(client.clone(), "anyaddressindex".to_string()), - p2wpkh: MetricPattern33::new(client.clone(), "anyaddressindex".to_string()), - p2wsh: MetricPattern34::new(client.clone(), "anyaddressindex".to_string()), + p2a: MetricPattern24::new(client.clone(), "anyaddressindex".to_string()), + p2pk33: MetricPattern26::new(client.clone(), "anyaddressindex".to_string()), + p2pk65: MetricPattern27::new(client.clone(), "anyaddressindex".to_string()), + p2pkh: MetricPattern28::new(client.clone(), "anyaddressindex".to_string()), + p2sh: MetricPattern29::new(client.clone(), "anyaddressindex".to_string()), + p2tr: MetricPattern30::new(client.clone(), "anyaddressindex".to_string()), + p2wpkh: MetricPattern31::new(client.clone(), "anyaddressindex".to_string()), + p2wsh: MetricPattern32::new(client.clone(), "anyaddressindex".to_string()), } } } /// Metrics tree node. pub struct MetricsTree_Distribution_AddressesData { - pub funded: MetricPattern36, - pub empty: MetricPattern37, + pub funded: MetricPattern34, + pub empty: MetricPattern35, } impl MetricsTree_Distribution_AddressesData { pub fn new(client: Arc, base_path: String) -> Self { Self { - funded: MetricPattern36::new(client.clone(), "fundedaddressdata".to_string()), - empty: MetricPattern37::new(client.clone(), "emptyaddressdata".to_string()), + funded: MetricPattern34::new(client.clone(), "fundedaddressdata".to_string()), + empty: MetricPattern35::new(client.clone(), "emptyaddressdata".to_string()), } } } diff --git a/crates/brk_computer/src/blocks/mod.rs b/crates/brk_computer/src/blocks/mod.rs index d3e8fe0b5..e82a7564e 100644 --- a/crates/brk_computer/src/blocks/mod.rs +++ b/crates/brk_computer/src/blocks/mod.rs @@ -24,8 +24,6 @@ pub const DB_NAME: &str = "blocks"; pub(crate) const TARGET_BLOCKS_PER_DAY_F64: f64 = 144.0; pub(crate) const TARGET_BLOCKS_PER_DAY_F32: f32 = 144.0; -pub(crate) const TARGET_BLOCKS_PER_MINUTE1: u64 = 0; -pub(crate) const TARGET_BLOCKS_PER_MINUTE5: u64 = 0; pub(crate) const TARGET_BLOCKS_PER_MINUTE10: u64 = 1; pub(crate) const TARGET_BLOCKS_PER_MINUTE30: u64 = 3; pub(crate) const TARGET_BLOCKS_PER_HOUR1: u64 = 6; diff --git a/crates/brk_computer/src/blocks/time/vecs.rs b/crates/brk_computer/src/blocks/time/vecs.rs index ae5564d01..b067992a1 100644 --- a/crates/brk_computer/src/blocks/time/vecs.rs +++ b/crates/brk_computer/src/blocks/time/vecs.rs @@ -1,8 +1,8 @@ use brk_error::Result; use brk_traversable::Traversable; use brk_types::{ - Date, Day1, Day3, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour12, Hour4, Minute1, - Minute10, Minute30, Minute5, Month1, Month3, Month6, Timestamp, Week1, Year1, Year10, + Date, Day1, Day3, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour12, Hour4, + Minute10, Minute30, Month1, Month3, Month6, Timestamp, Week1, Year1, Year10, }; use derive_more::{Deref, DerefMut}; use vecdb::{EagerVec, Exit, LazyVecFrom1, PcoVec, Rw, StorageMode}; @@ -19,7 +19,7 @@ pub struct Vecs { /// Per-period timestamp indexes. /// -/// Time-based periods (minute1–year10) are lazy: `idx.to_timestamp()` is a pure +/// Time-based periods (minute10–year10) are lazy: `idx.to_timestamp()` is a pure /// function of the index, so no storage or decompression is needed. /// Epoch-based periods (halvingepoch, difficultyepoch) are eager: their timestamps /// come from block data via `compute_indirect`. @@ -28,8 +28,6 @@ pub struct Vecs { pub struct TimestampIndexes( #[allow(clippy::type_complexity)] pub Indexes< - LazyVecFrom1, - LazyVecFrom1, LazyVecFrom1, LazyVecFrom1, LazyVecFrom1, diff --git a/crates/brk_computer/src/distribution/metrics/realized/base.rs b/crates/brk_computer/src/distribution/metrics/realized/base.rs index 527dbaf7c..d7f8e7446 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/base.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/base.rs @@ -867,6 +867,30 @@ impl RealizedBase { exit, )?; + self.lower_price_band.usd.height.compute_transform2( + starting_indexes.height, + &self.realized_price.usd.height, + &self.investor_price.usd.height, + |(i, rp, ip, ..)| { + let rp = f64::from(rp); + let ip = f64::from(ip); + (i, Dollars::from(rp * rp / ip)) + }, + exit, + )?; + + self.upper_price_band.usd.height.compute_transform2( + starting_indexes.height, + &self.investor_price.usd.height, + &self.realized_price.usd.height, + |(i, ip, rp, ..)| { + let ip = f64::from(ip); + let rp = f64::from(rp); + (i, Dollars::from(ip * ip / rp)) + }, + exit, + )?; + self.realized_cap_30d_delta.height.compute_rolling_change( starting_indexes.height, &blocks.count.height_1m_ago, diff --git a/crates/brk_computer/src/distribution/metrics/relative/base.rs b/crates/brk_computer/src/distribution/metrics/relative/base.rs index 2bd294dcf..ffaff7bac 100644 --- a/crates/brk_computer/src/distribution/metrics/relative/base.rs +++ b/crates/brk_computer/src/distribution/metrics/relative/base.rs @@ -1,11 +1,12 @@ use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Dollars, Height, Sats, StoredF32, StoredF64, Version}; -use vecdb::{Exit, ReadableVec, Rw, StorageMode}; +use vecdb::{Exit, ReadableCloneableVec, ReadableVec, Rw, StorageMode}; use crate::internal::{ - ComputedFromHeightLast, + ComputedFromHeightLast, LazyFromHeightLast, NegPercentageDollarsF32, PercentageDollarsF32, PercentageSatsF64, + StoredF32Identity, }; use crate::distribution::metrics::{ImportConfig, RealizedBase, UnrealizedBase}; @@ -24,7 +25,7 @@ pub struct RelativeBase { pub unrealized_loss_rel_to_market_cap: ComputedFromHeightLast, pub neg_unrealized_loss_rel_to_market_cap: ComputedFromHeightLast, pub net_unrealized_pnl_rel_to_market_cap: ComputedFromHeightLast, - pub nupl: ComputedFromHeightLast, + pub nupl: LazyFromHeightLast, // === Invested Capital in Profit/Loss as % of Realized Cap === pub invested_capital_in_profit_pct: ComputedFromHeightLast, @@ -36,6 +37,17 @@ impl RelativeBase { let v1 = Version::ONE; let v2 = Version::new(2); + let net_unrealized_pnl_rel_to_market_cap = ComputedFromHeightLast::forced_import( + cfg.db, &cfg.name("net_unrealized_pnl_rel_to_market_cap"), cfg.version + v2, cfg.indexes, + )?; + + let nupl = LazyFromHeightLast::from_computed::( + &cfg.name("nupl"), + cfg.version + v2, + net_unrealized_pnl_rel_to_market_cap.height.read_only_boxed_clone(), + &net_unrealized_pnl_rel_to_market_cap, + ); + Ok(Self { supply_in_profit_rel_to_own_supply: ComputedFromHeightLast::forced_import( cfg.db, &cfg.name("supply_in_profit_rel_to_own_supply"), cfg.version + v1, cfg.indexes, @@ -52,12 +64,8 @@ impl RelativeBase { neg_unrealized_loss_rel_to_market_cap: ComputedFromHeightLast::forced_import( cfg.db, &cfg.name("neg_unrealized_loss_rel_to_market_cap"), cfg.version + v2, cfg.indexes, )?, - net_unrealized_pnl_rel_to_market_cap: ComputedFromHeightLast::forced_import( - cfg.db, &cfg.name("net_unrealized_pnl_rel_to_market_cap"), cfg.version + v2, cfg.indexes, - )?, - nupl: ComputedFromHeightLast::forced_import( - cfg.db, &cfg.name("nupl"), cfg.version + v2, cfg.indexes, - )?, + net_unrealized_pnl_rel_to_market_cap, + nupl, invested_capital_in_profit_pct: ComputedFromHeightLast::forced_import( cfg.db, &cfg.name("invested_capital_in_profit_pct"), cfg.version, cfg.indexes, )?, @@ -100,10 +108,6 @@ impl RelativeBase { .compute_binary::( max_from, &unrealized.net_unrealized_pnl.height, market_cap, exit, )?; - self.nupl - .compute_binary::( - max_from, &unrealized.net_unrealized_pnl.height, market_cap, exit, - )?; self.invested_capital_in_profit_pct .compute_binary::( max_from, &unrealized.invested_capital_in_profit.height, &realized.realized_cap.height, exit, diff --git a/crates/brk_computer/src/indexes/height.rs b/crates/brk_computer/src/indexes/height.rs index d6bf8076d..285418817 100644 --- a/crates/brk_computer/src/indexes/height.rs +++ b/crates/brk_computer/src/indexes/height.rs @@ -1,7 +1,7 @@ use brk_traversable::Traversable; use brk_types::{ Day1, Day3, Year10, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour12, Hour4, - Minute1, Minute10, Minute30, Minute5, Month1, Month3, Month6, StoredU64, Version, Week1, + Minute10, Minute30, Month1, Month3, Month6, StoredU64, Version, Week1, Year1, }; use vecdb::{Database, EagerVec, ImportableVec, PcoVec, Rw, StorageMode}; @@ -11,8 +11,6 @@ use brk_error::Result; #[derive(Traversable)] pub struct Vecs { pub identity: M::Stored>>, - pub minute1: M::Stored>>, - pub minute5: M::Stored>>, pub minute10: M::Stored>>, pub minute30: M::Stored>>, pub hour1: M::Stored>>, @@ -35,8 +33,6 @@ impl Vecs { pub(crate) fn forced_import(db: &Database, version: Version) -> Result { Ok(Self { identity: EagerVec::forced_import(db, "height", version)?, - minute1: EagerVec::forced_import(db, "minute1", version)?, - minute5: EagerVec::forced_import(db, "minute5", version)?, minute10: EagerVec::forced_import(db, "minute10", version)?, minute30: EagerVec::forced_import(db, "minute30", version)?, hour1: EagerVec::forced_import(db, "hour1", version)?, diff --git a/crates/brk_computer/src/indexes/minute1.rs b/crates/brk_computer/src/indexes/minute1.rs deleted file mode 100644 index c728e8550..000000000 --- a/crates/brk_computer/src/indexes/minute1.rs +++ /dev/null @@ -1,20 +0,0 @@ -use brk_traversable::Traversable; -use brk_types::{Height, Minute1, Version}; -use vecdb::{Database, EagerVec, ImportableVec, PcoVec, Rw, StorageMode}; - -use brk_error::Result; - -#[derive(Traversable)] -pub struct Vecs { - pub identity: M::Stored>>, - pub first_height: M::Stored>>, -} - -impl Vecs { - pub(crate) fn forced_import(db: &Database, version: Version) -> Result { - Ok(Self { - identity: EagerVec::forced_import(db, "minute1", version)?, - first_height: EagerVec::forced_import(db, "minute1_first_height", version)?, - }) - } -} diff --git a/crates/brk_computer/src/indexes/minute5.rs b/crates/brk_computer/src/indexes/minute5.rs deleted file mode 100644 index 82c060e29..000000000 --- a/crates/brk_computer/src/indexes/minute5.rs +++ /dev/null @@ -1,20 +0,0 @@ -use brk_traversable::Traversable; -use brk_types::{Height, Minute5, Version}; -use vecdb::{Database, EagerVec, ImportableVec, PcoVec, Rw, StorageMode}; - -use brk_error::Result; - -#[derive(Traversable)] -pub struct Vecs { - pub identity: M::Stored>>, - pub first_height: M::Stored>>, -} - -impl Vecs { - pub(crate) fn forced_import(db: &Database, version: Version) -> Result { - Ok(Self { - identity: EagerVec::forced_import(db, "minute5", version)?, - first_height: EagerVec::forced_import(db, "minute5_first_height", version)?, - }) - } -} diff --git a/crates/brk_computer/src/indexes/mod.rs b/crates/brk_computer/src/indexes/mod.rs index 9fe6e2573..c4ba9e81b 100644 --- a/crates/brk_computer/src/indexes/mod.rs +++ b/crates/brk_computer/src/indexes/mod.rs @@ -7,10 +7,8 @@ mod height; mod hour1; mod hour12; mod hour4; -mod minute1; mod minute10; mod minute30; -mod minute5; mod month1; mod month3; mod month6; @@ -27,7 +25,7 @@ use brk_error::Result; use brk_indexer::Indexer; use brk_traversable::Traversable; use brk_types::{ - Date, Day1, Day3, Hour1, Hour4, Hour12, Indexes, Minute1, Minute5, Minute10, Minute30, Month1, + Date, Day1, Day3, Hour1, Hour4, Hour12, Indexes, Minute10, Minute30, Month1, Month3, Month6, Version, Week1, Year1, Year10, }; use vecdb::{Database, Exit, PAGE_SIZE, ReadableVec, Rw, StorageMode}; @@ -44,8 +42,6 @@ pub use height::Vecs as HeightVecs; pub use hour1::Vecs as Hour1Vecs; pub use hour4::Vecs as Hour4Vecs; pub use hour12::Vecs as Hour12Vecs; -pub use minute1::Vecs as Minute1Vecs; -pub use minute5::Vecs as Minute5Vecs; pub use minute10::Vecs as Minute10Vecs; pub use minute30::Vecs as Minute30Vecs; pub use month1::Vecs as Month1Vecs; @@ -68,8 +64,6 @@ pub struct Vecs { pub height: HeightVecs, pub difficultyepoch: DifficultyEpochVecs, pub halvingepoch: HalvingEpochVecs, - pub minute1: Minute1Vecs, - pub minute5: Minute5Vecs, pub minute10: Minute10Vecs, pub minute30: Minute30Vecs, pub hour1: Hour1Vecs, @@ -104,8 +98,6 @@ impl Vecs { height: HeightVecs::forced_import(&db, version)?, difficultyepoch: DifficultyEpochVecs::forced_import(&db, version)?, halvingepoch: HalvingEpochVecs::forced_import(&db, version)?, - minute1: Minute1Vecs::forced_import(&db, version)?, - minute5: Minute5Vecs::forced_import(&db, version)?, minute10: Minute10Vecs::forced_import(&db, version)?, minute30: Minute30Vecs::forced_import(&db, version)?, hour1: Hour1Vecs::forced_import(&db, version)?, @@ -190,22 +182,6 @@ impl Vecs { // --- Timestamp-based height → period mappings --- - // Minute1 - self.height.minute1.compute_transform( - starting_indexes.height, - &blocks_time.timestamp_monotonic, - |(h, ts, _)| (h, Minute1::from_timestamp(ts)), - exit, - )?; - - // Minute5 - self.height.minute5.compute_transform( - starting_indexes.height, - &blocks_time.timestamp_monotonic, - |(h, ts, _)| (h, Minute5::from_timestamp(ts)), - exit, - )?; - // Minute10 self.height.minute10.compute_transform( starting_indexes.height, @@ -376,16 +352,6 @@ impl Vecs { // --- Starting values from height → period mappings --- - let starting_minute1 = self - .height - .minute1 - .collect_one(decremented_starting_height) - .unwrap_or_default(); - let starting_minute5 = self - .height - .minute5 - .collect_one(decremented_starting_height) - .unwrap_or_default(); let starting_minute10 = self .height .minute10 @@ -449,30 +415,6 @@ impl Vecs { // --- Compute period-level vecs (first_height + identity) --- - // Minute1 - self.minute1.first_height.compute_first_per_index( - starting_indexes.height, - &self.height.minute1, - exit, - )?; - self.minute1.identity.compute_from_index( - starting_minute1, - &self.minute1.first_height, - exit, - )?; - - // Minute5 - self.minute5.first_height.compute_first_per_index( - starting_indexes.height, - &self.height.minute5, - exit, - )?; - self.minute5.identity.compute_from_index( - starting_minute5, - &self.minute5.first_height, - exit, - )?; - // Minute10 self.minute10.first_height.compute_first_per_index( starting_indexes.height, @@ -669,8 +611,6 @@ impl Vecs { Ok(ComputeIndexes::new( starting_indexes, - starting_minute1, - starting_minute5, starting_minute10, starting_minute30, starting_hour1, diff --git a/crates/brk_computer/src/internal/eager_indexes.rs b/crates/brk_computer/src/internal/eager_indexes.rs index 83997e410..7991fec9d 100644 --- a/crates/brk_computer/src/internal/eager_indexes.rs +++ b/crates/brk_computer/src/internal/eager_indexes.rs @@ -7,7 +7,7 @@ use brk_error::Result; use brk_traversable::Traversable; use brk_types::{ - Day1, Day3, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour4, Hour12, Minute1, Minute5, + Day1, Day3, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour4, Hour12, Minute10, Minute30, Month1, Month3, Month6, Version, Week1, Year1, Year10, }; use derive_more::{Deref, DerefMut}; @@ -18,7 +18,7 @@ use vecdb::{ }; use crate::{ - ComputeIndexes, indexes, indexes_from, + ComputeIndexes, indexes, indexes_apply, indexes_from, internal::{ComputedVecValue, Indexes, NumericValue}, }; @@ -27,8 +27,6 @@ use crate::{ pub struct EagerIndexes( #[allow(clippy::type_complexity)] pub Indexes< - ::Stored>>, - ::Stored>>, ::Stored>>, ::Stored>>, ::Stored>>, @@ -86,23 +84,7 @@ where }; } - period!(minute1); - period!(minute5); - period!(minute10); - period!(minute30); - period!(hour1); - period!(hour4); - period!(hour12); - period!(day1); - period!(day3); - period!(week1); - period!(month1); - period!(month3); - period!(month6); - period!(year1); - period!(year10); - period!(halvingepoch); - period!(difficultyepoch); + indexes_apply!(period); Ok(()) } @@ -131,23 +113,7 @@ where }; } - period!(minute1); - period!(minute5); - period!(minute10); - period!(minute30); - period!(hour1); - period!(hour4); - period!(hour12); - period!(day1); - period!(day3); - period!(week1); - period!(month1); - period!(month3); - period!(month6); - period!(year1); - period!(year10); - period!(halvingepoch); - period!(difficultyepoch); + indexes_apply!(period); Ok(()) } @@ -176,23 +142,7 @@ where }; } - period!(minute1); - period!(minute5); - period!(minute10); - period!(minute30); - period!(hour1); - period!(hour4); - period!(hour12); - period!(day1); - period!(day3); - period!(week1); - period!(month1); - period!(month3); - period!(month6); - period!(year1); - period!(year10); - period!(halvingepoch); - period!(difficultyepoch); + indexes_apply!(period); Ok(()) } diff --git a/crates/brk_computer/src/internal/from_height/constant.rs b/crates/brk_computer/src/internal/from_height/constant.rs index baeb229fb..4314a4b4b 100644 --- a/crates/brk_computer/src/internal/from_height/constant.rs +++ b/crates/brk_computer/src/internal/from_height/constant.rs @@ -1,7 +1,7 @@ use brk_traversable::Traversable; use brk_types::{ - Day1, Day3, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour12, Hour4, Minute1, Minute10, - Minute30, Minute5, Month1, Month3, Month6, Version, Week1, Year1, Year10, + Day1, Day3, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour12, Hour4, + Minute10, Minute30, Month1, Month3, Month6, Version, Week1, Year1, Year10, }; use schemars::JsonSchema; use serde::Serialize; @@ -18,8 +18,6 @@ where T: VecValue + Formattable + Serialize + JsonSchema, { pub height: LazyVecFrom1, - pub minute1: LazyVecFrom1, - pub minute5: LazyVecFrom1, pub minute10: LazyVecFrom1, pub minute30: LazyVecFrom1, pub hour1: LazyVecFrom1, @@ -42,8 +40,6 @@ impl ConstantVecs { pub(crate) fn new(name: &str, version: Version, indexes: &indexes::Vecs) -> Self where F: UnaryTransform - + UnaryTransform - + UnaryTransform + UnaryTransform + UnaryTransform + UnaryTransform @@ -76,8 +72,6 @@ impl ConstantVecs { version, indexes.height.identity.read_only_boxed_clone(), ), - minute1: period!(minute1, Minute1), - minute5: period!(minute5, Minute5), minute10: period!(minute10, Minute10), minute30: period!(minute30, Minute30), hour1: period!(hour1, Hour1), diff --git a/crates/brk_computer/src/internal/height_derived/last.rs b/crates/brk_computer/src/internal/height_derived/last.rs index 1a369650f..70a9f47ed 100644 --- a/crates/brk_computer/src/internal/height_derived/last.rs +++ b/crates/brk_computer/src/internal/height_derived/last.rs @@ -3,7 +3,7 @@ use brk_traversable::Traversable; use brk_types::{ Day1, Day3, DifficultyEpoch, FromCoarserIndex, HalvingEpoch, Height, Hour1, Hour4, Hour12, - Minute1, Minute5, Minute10, Minute30, Month1, Month3, Month6, Version, Week1, Year1, Year10, + Minute10, Minute30, Month1, Month3, Month6, Version, Week1, Year1, Year10, }; use derive_more::{Deref, DerefMut}; use schemars::JsonSchema; @@ -21,8 +21,6 @@ use crate::{ pub struct ComputedHeightDerivedLast( #[allow(clippy::type_complexity)] pub Indexes< - LazyAggVec, Height, Height, T>, - LazyAggVec, Height, Height, T>, LazyAggVec, Height, Height, T>, LazyAggVec, Height, Height, T>, LazyAggVec, Height, Height, T>, diff --git a/crates/brk_computer/src/internal/height_derived/lazy_last.rs b/crates/brk_computer/src/internal/height_derived/lazy_last.rs index 64ee1c9e2..7d774defa 100644 --- a/crates/brk_computer/src/internal/height_derived/lazy_last.rs +++ b/crates/brk_computer/src/internal/height_derived/lazy_last.rs @@ -4,7 +4,7 @@ use std::marker::PhantomData; use brk_traversable::Traversable; use brk_types::{ - Day1, Day3, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour4, Hour12, Minute1, Minute5, + Day1, Day3, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour4, Hour12, Minute10, Minute30, Month1, Month3, Month6, Version, Week1, Year1, Year10, }; use derive_more::{Deref, DerefMut}; @@ -60,8 +60,6 @@ where pub struct LazyHeightDerivedLast( #[allow(clippy::type_complexity)] pub Indexes< - LazyTransformLast, Option>, - LazyTransformLast, Option>, LazyTransformLast, Option>, LazyTransformLast, Option>, LazyTransformLast, Option>, diff --git a/crates/brk_computer/src/internal/indexes.rs b/crates/brk_computer/src/internal/indexes.rs index 083f734d0..a5a1869ee 100644 --- a/crates/brk_computer/src/internal/indexes.rs +++ b/crates/brk_computer/src/internal/indexes.rs @@ -1,15 +1,13 @@ -//! Base generic struct with 17 type parameters — one per time period/epoch index. +//! Base generic struct with 15 type parameters — one per time period/epoch index. //! -//! Foundation for all per-index types. Replaces the repetitive 17-field pattern +//! Foundation for all per-index types. Replaces the repetitive 15-field pattern //! found throughout height_derived types. use brk_traversable::Traversable; #[derive(Clone, Traversable)] #[traversable(merge)] -pub struct Indexes { - pub minute1: M1, - pub minute5: M5, +pub struct Indexes { pub minute10: M10, pub minute30: M30, pub hour1: H1, @@ -38,8 +36,6 @@ pub struct Indexes { $crate::internal::Indexes { - minute1: $period!(minute1), - minute5: $period!(minute5), minute10: $period!(minute10), minute30: $period!(minute30), hour1: $period!(hour1), @@ -63,29 +59,28 @@ macro_rules! indexes_from { }; } -/// Helper macro to apply a function/macro to each field of an `Indexes` value. +/// Imperative counterpart to `indexes_from!` — calls `$period!(field)` for each +/// period field and `$epoch!(field)` for each epoch field. #[macro_export] -macro_rules! indexes_map { - ($indexes:expr, |$field:ident| $body:expr) => {{ - let src = $indexes; - $crate::internal::Indexes { - minute1: { let $field = src.minute1; $body }, - minute5: { let $field = src.minute5; $body }, - minute10: { let $field = src.minute10; $body }, - minute30: { let $field = src.minute30; $body }, - hour1: { let $field = src.hour1; $body }, - hour4: { let $field = src.hour4; $body }, - hour12: { let $field = src.hour12; $body }, - day1: { let $field = src.day1; $body }, - day3: { let $field = src.day3; $body }, - week1: { let $field = src.week1; $body }, - month1: { let $field = src.month1; $body }, - month3: { let $field = src.month3; $body }, - month6: { let $field = src.month6; $body }, - year1: { let $field = src.year1; $body }, - year10: { let $field = src.year10; $body }, - halvingepoch: { let $field = src.halvingepoch; $body }, - difficultyepoch: { let $field = src.difficultyepoch; $body }, - } - }}; +macro_rules! indexes_apply { + ($period:ident, $epoch:ident) => { + $period!(minute10); + $period!(minute30); + $period!(hour1); + $period!(hour4); + $period!(hour12); + $period!(day1); + $period!(day3); + $period!(week1); + $period!(month1); + $period!(month3); + $period!(month6); + $period!(year1); + $period!(year10); + $epoch!(halvingepoch); + $epoch!(difficultyepoch); + }; + ($m:ident) => { + $crate::indexes_apply!($m, $m) + }; } diff --git a/crates/brk_computer/src/internal/lazy_eager_indexes.rs b/crates/brk_computer/src/internal/lazy_eager_indexes.rs index 30fa3f990..52a2d1c0b 100644 --- a/crates/brk_computer/src/internal/lazy_eager_indexes.rs +++ b/crates/brk_computer/src/internal/lazy_eager_indexes.rs @@ -5,8 +5,8 @@ use brk_traversable::Traversable; use brk_types::{ - Day1, Day3, DifficultyEpoch, HalvingEpoch, Hour1, Hour4, Hour12, Minute1, Minute5, Minute10, - Minute30, Month1, Month3, Month6, Version, Week1, Year1, Year10, + Day1, Day3, DifficultyEpoch, HalvingEpoch, Hour1, Hour4, Hour12, + Minute10, Minute30, Month1, Month3, Month6, Version, Week1, Year1, Year10, }; use derive_more::{Deref, DerefMut}; use schemars::JsonSchema; @@ -22,8 +22,6 @@ use crate::{ pub struct LazyEagerIndexes( #[allow(clippy::type_complexity)] pub Indexes< - LazyVecFrom1, - LazyVecFrom1, LazyVecFrom1, LazyVecFrom1, LazyVecFrom1, diff --git a/crates/brk_computer/src/internal/transform/block_count_target.rs b/crates/brk_computer/src/internal/transform/block_count_target.rs index 52fc4ea07..88d5b569e 100644 --- a/crates/brk_computer/src/internal/transform/block_count_target.rs +++ b/crates/brk_computer/src/internal/transform/block_count_target.rs @@ -1,14 +1,14 @@ use brk_types::{ - Day1, Day3, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour12, Hour4, Minute1, Minute10, - Minute30, Minute5, Month1, Month3, Month6, StoredU64, Week1, Year1, Year10, + Day1, Day3, DifficultyEpoch, HalvingEpoch, Height, Hour1, Hour12, Hour4, + Minute10, Minute30, Month1, Month3, Month6, StoredU64, Week1, Year1, Year10, }; use vecdb::UnaryTransform; use crate::blocks::{ TARGET_BLOCKS_PER_DAY, TARGET_BLOCKS_PER_DAY3, TARGET_BLOCKS_PER_DECADE, TARGET_BLOCKS_PER_HALVING, TARGET_BLOCKS_PER_HOUR1, TARGET_BLOCKS_PER_HOUR12, - TARGET_BLOCKS_PER_HOUR4, TARGET_BLOCKS_PER_MINUTE1, TARGET_BLOCKS_PER_MINUTE10, - TARGET_BLOCKS_PER_MINUTE30, TARGET_BLOCKS_PER_MINUTE5, TARGET_BLOCKS_PER_MONTH, + TARGET_BLOCKS_PER_HOUR4, TARGET_BLOCKS_PER_MINUTE10, + TARGET_BLOCKS_PER_MINUTE30, TARGET_BLOCKS_PER_MONTH, TARGET_BLOCKS_PER_QUARTER, TARGET_BLOCKS_PER_SEMESTER, TARGET_BLOCKS_PER_WEEK, TARGET_BLOCKS_PER_YEAR, }; @@ -22,20 +22,6 @@ impl UnaryTransform for BlockCountTarget { } } -impl UnaryTransform for BlockCountTarget { - #[inline(always)] - fn apply(_: Minute1) -> StoredU64 { - StoredU64::from(TARGET_BLOCKS_PER_MINUTE1) - } -} - -impl UnaryTransform for BlockCountTarget { - #[inline(always)] - fn apply(_: Minute5) -> StoredU64 { - StoredU64::from(TARGET_BLOCKS_PER_MINUTE5) - } -} - impl UnaryTransform for BlockCountTarget { #[inline(always)] fn apply(_: Minute10) -> StoredU64 { diff --git a/crates/brk_computer/src/market/ath/compute.rs b/crates/brk_computer/src/market/ath/compute.rs index 8c3549d29..35550256d 100644 --- a/crates/brk_computer/src/market/ath/compute.rs +++ b/crates/brk_computer/src/market/ath/compute.rs @@ -3,7 +3,7 @@ use brk_types::StoredU16; use vecdb::{Exit, ReadableVec, VecIndex}; use super::Vecs; -use crate::{ComputeIndexes, prices}; +use crate::{ComputeIndexes, prices, traits::ComputeDrawdown}; impl Vecs { pub(crate) fn compute( @@ -63,6 +63,13 @@ impl Vecs { exit, )?; + self.price_drawdown.height.compute_drawdown( + starting_indexes.height, + &prices.price.usd.height, + &self.price_ath.usd.height, + exit, + )?; + Ok(()) } } diff --git a/crates/brk_computer/src/market/indicators/compute.rs b/crates/brk_computer/src/market/indicators/compute.rs index df5285e5c..5275efd65 100644 --- a/crates/brk_computer/src/market/indicators/compute.rs +++ b/crates/brk_computer/src/market/indicators/compute.rs @@ -43,7 +43,7 @@ impl Vecs { |(h, close, low, high, ..)| { let range = *high - *low; let stoch = if range == 0.0 { - StoredF32::from(50.0) + StoredF32::NAN } else { StoredF32::from(((*close - *low) / range * 100.0) as f32) }; diff --git a/crates/brk_computer/src/market/indicators/rsi.rs b/crates/brk_computer/src/market/indicators/rsi.rs index 1ea9d9a29..0d38c6993 100644 --- a/crates/brk_computer/src/market/indicators/rsi.rs +++ b/crates/brk_computer/src/market/indicators/rsi.rs @@ -72,7 +72,7 @@ pub(super) fn compute( .map(|((r, mn), mx)| { let range = mx - mn; if range == 0.0 { - 50.0 + f32::NAN } else { (r - mn) / range * 100.0 } diff --git a/crates/brk_computer/src/market/indicators/smoothing.rs b/crates/brk_computer/src/market/indicators/smoothing.rs index 0b3b922ed..f0910d9dd 100644 --- a/crates/brk_computer/src/market/indicators/smoothing.rs +++ b/crates/brk_computer/src/market/indicators/smoothing.rs @@ -26,11 +26,7 @@ pub(super) fn compute_ema(source: &[f32], period: usize) -> Vec { for (i, &val) in source.iter().enumerate() { if i < period { sum += val; - if i == period - 1 { - result.push(sum / period as f32); - } else { - result.push(val); - } + result.push(sum / (i + 1) as f32); } else { let prev = result[i - 1]; result.push(val * k + prev * (1.0 - k)); diff --git a/crates/brk_computer/src/market/range/compute.rs b/crates/brk_computer/src/market/range/compute.rs index 601ff9bd4..3bb8e421c 100644 --- a/crates/brk_computer/src/market/range/compute.rs +++ b/crates/brk_computer/src/market/range/compute.rs @@ -102,18 +102,18 @@ impl Vecs { exit, )?; - // Choppiness index: 100 * log10(tr_2w_sum / (price_2w_max - price_2w_min)) / log10(14) - let log10n = 14.0f32.log10(); - self.price_2w_choppiness_index.height.compute_transform3( + self.price_2w_choppiness_index.height.compute_transform4( starting_indexes.height, &self.price_true_range_2w_sum.height, &self.price_2w_max.usd.height, &self.price_2w_min.usd.height, - |(h, tr_sum, max, min, ..)| { + &blocks.count.height_2w_ago, + |(h, tr_sum, max, min, window_start, ..)| { let range = *max - *min; - let ci = if range > 0.0 { + let n = (h.to_usize() - window_start.to_usize() + 1) as f32; + let ci = if range > 0.0 && n > 1.0 { StoredF32::from( - 100.0 * (*tr_sum / range as f32).log10() / log10n, + 100.0 * (*tr_sum / range as f32).log10() / n.log10(), ) } else { StoredF32::NAN diff --git a/crates/brk_computer/src/prices/ohlcs.rs b/crates/brk_computer/src/prices/ohlcs.rs index 08c78b673..62d6fbc72 100644 --- a/crates/brk_computer/src/prices/ohlcs.rs +++ b/crates/brk_computer/src/prices/ohlcs.rs @@ -2,7 +2,7 @@ use brk_error::Result; use brk_traversable::Traversable; use brk_types::{ Cents, Close, Day1, Day3, DifficultyEpoch, HalvingEpoch, High, Hour1, Hour4, Hour12, Low, - Minute1, Minute5, Minute10, Minute30, Month1, Month3, Month6, OHLCCents, Open, Version, Week1, + Minute10, Minute30, Month1, Month3, Month6, OHLCCents, Open, Version, Week1, Year1, Year10, }; use derive_more::{Deref, DerefMut}; @@ -14,7 +14,7 @@ use vecdb::{ }; use crate::{ - ComputeIndexes, indexes_from, + ComputeIndexes, indexes_apply, indexes_from, internal::{ComputedHeightDerivedLast, EagerIndexes, Indexes}, }; @@ -25,8 +25,6 @@ use crate::{ pub struct OhlcVecs( #[allow(clippy::type_complexity)] pub Indexes< - ::Stored>>, - ::Stored>>, ::Stored>>, ::Stored>>, ::Stored>>, @@ -132,23 +130,7 @@ impl OhlcVecs { }; } - period!(minute1); - period!(minute5); - period!(minute10); - period!(minute30); - period!(hour1); - period!(hour4); - period!(hour12); - period!(day1); - period!(day3); - period!(week1); - period!(month1); - period!(month3); - period!(month6); - period!(year1); - period!(year10); - epoch!(halvingepoch); - epoch!(difficultyepoch); + indexes_apply!(period, epoch); Ok(()) } @@ -161,8 +143,6 @@ impl OhlcVecs { pub struct LazyOhlcVecs( #[allow(clippy::type_complexity)] pub Indexes< - LazyVecFrom1, - LazyVecFrom1, LazyVecFrom1, LazyVecFrom1, LazyVecFrom1, diff --git a/crates/brk_types/src/index.rs b/crates/brk_types/src/index.rs index 6d8fb9bf6..802403079 100644 --- a/crates/brk_types/src/index.rs +++ b/crates/brk_types/src/index.rs @@ -9,13 +9,13 @@ use crate::PairOutputIndex; use super::{ Date, Day1, Day3, Year10, DifficultyEpoch, EmptyAddressIndex, EmptyOutputIndex, HalvingEpoch, - Height, Hour1, Hour4, Hour12, FundedAddressIndex, Minute1, Minute5, Minute10, Minute30, + Height, Hour1, Hour4, Hour12, FundedAddressIndex, Minute10, Minute30, Month1, OpReturnIndex, P2AAddressIndex, P2MSOutputIndex, P2PK33AddressIndex, P2PK65AddressIndex, P2PKHAddressIndex, P2SHAddressIndex, P2TRAddressIndex, P2WPKHAddressIndex, P2WSHAddressIndex, Month3, Month6, Timestamp, TxInIndex, TxIndex, TxOutIndex, UnknownOutputIndex, Week1, Year1, timestamp::INDEX_EPOCH, - minute1::MINUTE1_INTERVAL, minute5::MINUTE5_INTERVAL, minute10::MINUTE10_INTERVAL, + minute10::MINUTE10_INTERVAL, minute30::MINUTE30_INTERVAL, hour1::HOUR1_INTERVAL, hour4::HOUR4_INTERVAL, hour12::HOUR12_INTERVAL, }; @@ -26,8 +26,6 @@ use super::{ #[serde(rename_all = "lowercase")] #[schemars(example = Index::Day1)] pub enum Index { - Minute1, - Minute5, Minute10, Minute30, Hour1, @@ -65,10 +63,8 @@ pub enum Index { } impl Index { - pub const fn all() -> [Self; 36] { + pub const fn all() -> [Self; 34] { [ - Self::Minute1, - Self::Minute5, Self::Minute10, Self::Minute30, Self::Hour1, @@ -108,8 +104,6 @@ impl Index { pub fn possible_values(&self) -> &'static [&'static str] { match self { - Self::Minute1 => Minute1::to_possible_strings(), - Self::Minute5 => Minute5::to_possible_strings(), Self::Minute10 => Minute10::to_possible_strings(), Self::Minute30 => Minute30::to_possible_strings(), Self::Hour1 => Hour1::to_possible_strings(), @@ -157,8 +151,6 @@ impl Index { pub fn name(&self) -> &'static str { match self { - Self::Minute1 => ::to_string(), - Self::Minute5 => ::to_string(), Self::Minute10 => ::to_string(), Self::Minute30 => ::to_string(), Self::Hour1 => ::to_string(), @@ -209,9 +201,7 @@ impl Index { pub const fn is_date_based(&self) -> bool { matches!( self, - Self::Minute1 - | Self::Minute5 - | Self::Minute10 + Self::Minute10 | Self::Minute30 | Self::Hour1 | Self::Hour4 @@ -231,8 +221,6 @@ impl Index { /// Returns None for non-time-based indexes. pub fn index_to_timestamp(&self, i: usize) -> Option { let interval = match self { - Self::Minute1 => MINUTE1_INTERVAL, - Self::Minute5 => MINUTE5_INTERVAL, Self::Minute10 => MINUTE10_INTERVAL, Self::Minute30 => MINUTE30_INTERVAL, Self::Hour1 => HOUR1_INTERVAL, @@ -269,8 +257,6 @@ impl Index { /// Returns None for non-date-based indexes. pub fn timestamp_to_index(&self, ts: Timestamp) -> Option { let interval = match self { - Self::Minute1 => MINUTE1_INTERVAL, - Self::Minute5 => MINUTE5_INTERVAL, Self::Minute10 => MINUTE10_INTERVAL, Self::Minute30 => MINUTE30_INTERVAL, Self::Hour1 => HOUR1_INTERVAL, diff --git a/crates/brk_types/src/indexes.rs b/crates/brk_types/src/indexes.rs index 083b07b4d..dc425e400 100644 --- a/crates/brk_types/src/indexes.rs +++ b/crates/brk_types/src/indexes.rs @@ -2,7 +2,7 @@ use derive_more::{Deref, DerefMut}; use crate::{ Day1, Day3, Year10, DifficultyEpoch, EmptyOutputIndex, HalvingEpoch, Height, - Hour1, Hour4, Hour12, Minute1, Minute5, Minute10, Minute30, Month1, + Hour1, Hour4, Hour12, Minute10, Minute30, Month1, OpReturnIndex, OutputType, P2AAddressIndex, P2MSOutputIndex, P2PK33AddressIndex, P2PK65AddressIndex, P2PKHAddressIndex, P2SHAddressIndex, P2TRAddressIndex, P2WPKHAddressIndex, P2WSHAddressIndex, Month3, Month6, TxInIndex, TxIndex, TxOutIndex, TypeIndex, @@ -74,8 +74,6 @@ pub struct ComputeIndexes { #[deref] #[deref_mut] indexes: Indexes, - pub minute1: Minute1, - pub minute5: Minute5, pub minute10: Minute10, pub minute30: Minute30, pub hour1: Hour1, @@ -97,8 +95,6 @@ impl ComputeIndexes { #[allow(clippy::too_many_arguments)] pub fn new( indexes: Indexes, - minute1: Minute1, - minute5: Minute5, minute10: Minute10, minute30: Minute30, hour1: Hour1, @@ -117,8 +113,6 @@ impl ComputeIndexes { ) -> Self { Self { indexes, - minute1, - minute5, minute10, minute30, hour1, diff --git a/crates/brk_types/src/lib.rs b/crates/brk_types/src/lib.rs index 3c052c06e..762e0559f 100644 --- a/crates/brk_types/src/lib.rs +++ b/crates/brk_types/src/lib.rs @@ -96,8 +96,6 @@ mod day3; mod hour1; mod hour12; mod hour4; -mod minute1; -mod minute5; mod minute10; mod minute30; mod month1; @@ -285,8 +283,6 @@ pub use day3::*; pub use hour1::*; pub use hour12::*; pub use hour4::*; -pub use minute1::*; -pub use minute5::*; pub use minute10::*; pub use minute30::*; pub use month1::*; diff --git a/crates/brk_types/src/metricdata.rs b/crates/brk_types/src/metricdata.rs index 5a9ca5d53..739224ba7 100644 --- a/crates/brk_types/src/metricdata.rs +++ b/crates/brk_types/src/metricdata.rs @@ -529,13 +529,6 @@ mod tests { assert_eq!(Index::Hour1.timestamp_to_index(ts), Some(2)); } - #[test] - fn test_timestamp_to_index_minute5() { - // INDEX_EPOCH + 15 minutes (= 3 * 5min intervals) - let ts = Timestamp::new(1230768000 + 900); - assert_eq!(Index::Minute5.timestamp_to_index(ts), Some(3)); - } - #[test] fn test_timestamp_to_index_non_date_returns_none() { let ts = Timestamp::new(1230768000); diff --git a/crates/brk_types/src/minute1.rs b/crates/brk_types/src/minute1.rs deleted file mode 100644 index 8a76125e3..000000000 --- a/crates/brk_types/src/minute1.rs +++ /dev/null @@ -1,88 +0,0 @@ -use std::ops::Add; - -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; -use vecdb::{CheckedSub, Formattable, Pco, PrintableIndex}; - -use super::{Timestamp, INDEX_EPOCH}; - -pub const MINUTE1_INTERVAL: u32 = 60; - -#[derive( - Debug, - Default, - Clone, - Copy, - PartialEq, - Eq, - PartialOrd, - Ord, - Serialize, - Deserialize, - Pco, - JsonSchema, -)] -pub struct Minute1(u32); - -impl Minute1 { - pub fn from_timestamp(ts: Timestamp) -> Self { - Self((*ts - INDEX_EPOCH) / MINUTE1_INTERVAL) - } - - pub fn to_timestamp(&self) -> Timestamp { - Timestamp::new(INDEX_EPOCH + self.0 * MINUTE1_INTERVAL) - } -} - -impl From for usize { - #[inline] - fn from(value: Minute1) -> Self { - value.0 as usize - } -} - -impl From for Minute1 { - #[inline] - fn from(value: usize) -> Self { - Self(value as u32) - } -} - -impl Add for Minute1 { - type Output = Self; - fn add(self, rhs: usize) -> Self::Output { - Self(self.0 + rhs as u32) - } -} - -impl CheckedSub for Minute1 { - fn checked_sub(self, rhs: Self) -> Option { - self.0.checked_sub(rhs.0).map(Self) - } -} - -impl PrintableIndex for Minute1 { - fn to_string() -> &'static str { - "minute1" - } - - fn to_possible_strings() -> &'static [&'static str] { - &["1mn", "minute1"] - } -} - -impl std::fmt::Display for Minute1 { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let mut buf = itoa::Buffer::new(); - let str = buf.format(self.0); - f.write_str(str) - } -} - -impl Formattable for Minute1 { - #[inline(always)] - fn fmt_csv(&self, f: &mut String) -> std::fmt::Result { - use std::fmt::Write; - write!(f, "{}", self) - } -} diff --git a/crates/brk_types/src/minute5.rs b/crates/brk_types/src/minute5.rs deleted file mode 100644 index 7df6672c8..000000000 --- a/crates/brk_types/src/minute5.rs +++ /dev/null @@ -1,88 +0,0 @@ -use std::ops::Add; - -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; -use vecdb::{CheckedSub, Formattable, Pco, PrintableIndex}; - -use super::{Timestamp, INDEX_EPOCH}; - -pub const MINUTE5_INTERVAL: u32 = 300; - -#[derive( - Debug, - Default, - Clone, - Copy, - PartialEq, - Eq, - PartialOrd, - Ord, - Serialize, - Deserialize, - Pco, - JsonSchema, -)] -pub struct Minute5(u32); - -impl Minute5 { - pub fn from_timestamp(ts: Timestamp) -> Self { - Self((*ts - INDEX_EPOCH) / MINUTE5_INTERVAL) - } - - pub fn to_timestamp(&self) -> Timestamp { - Timestamp::new(INDEX_EPOCH + self.0 * MINUTE5_INTERVAL) - } -} - -impl From for usize { - #[inline] - fn from(value: Minute5) -> Self { - value.0 as usize - } -} - -impl From for Minute5 { - #[inline] - fn from(value: usize) -> Self { - Self(value as u32) - } -} - -impl Add for Minute5 { - type Output = Self; - fn add(self, rhs: usize) -> Self::Output { - Self(self.0 + rhs as u32) - } -} - -impl CheckedSub for Minute5 { - fn checked_sub(self, rhs: Self) -> Option { - self.0.checked_sub(rhs.0).map(Self) - } -} - -impl PrintableIndex for Minute5 { - fn to_string() -> &'static str { - "minute5" - } - - fn to_possible_strings() -> &'static [&'static str] { - &["5mn", "minute5"] - } -} - -impl std::fmt::Display for Minute5 { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let mut buf = itoa::Buffer::new(); - let str = buf.format(self.0); - f.write_str(str) - } -} - -impl Formattable for Minute5 { - #[inline(always)] - fn fmt_csv(&self, f: &mut String) -> std::fmt::Result { - use std::fmt::Write; - write!(f, "{}", self) - } -} diff --git a/modules/brk-client/index.js b/modules/brk-client/index.js index f2ca0e56b..77eaedb22 100644 --- a/modules/brk-client/index.js +++ b/modules/brk-client/index.js @@ -380,7 +380,7 @@ * Aggregation dimension for querying metrics. Includes time-based (date, week, month, year), * block-based (height, txindex), and address/output type indexes. * - * @typedef {("minute1"|"minute5"|"minute10"|"minute30"|"hour1"|"hour4"|"hour12"|"day1"|"day3"|"week1"|"month1"|"month3"|"month6"|"year1"|"year10"|"halvingepoch"|"difficultyepoch"|"height"|"txindex"|"txinindex"|"txoutindex"|"emptyoutputindex"|"opreturnindex"|"p2aaddressindex"|"p2msoutputindex"|"p2pk33addressindex"|"p2pk65addressindex"|"p2pkhaddressindex"|"p2shaddressindex"|"p2traddressindex"|"p2wpkhaddressindex"|"p2wshaddressindex"|"unknownoutputindex"|"fundedaddressindex"|"emptyaddressindex"|"pairoutputindex")} Index + * @typedef {("minute10"|"minute30"|"hour1"|"hour4"|"hour12"|"day1"|"day3"|"week1"|"month1"|"month3"|"month6"|"year1"|"year10"|"halvingepoch"|"difficultyepoch"|"height"|"txindex"|"txinindex"|"txoutindex"|"emptyoutputindex"|"opreturnindex"|"p2aaddressindex"|"p2msoutputindex"|"p2pk33addressindex"|"p2pk65addressindex"|"p2pkhaddressindex"|"p2shaddressindex"|"p2traddressindex"|"p2wpkhaddressindex"|"p2wshaddressindex"|"unknownoutputindex"|"fundedaddressindex"|"emptyaddressindex"|"pairoutputindex")} Index */ /** * Information about an available index and its query aliases @@ -481,10 +481,8 @@ * * @typedef {string} Metrics */ -/** @typedef {number} Minute1 */ /** @typedef {number} Minute10 */ /** @typedef {number} Minute30 */ -/** @typedef {number} Minute5 */ /** @typedef {number} Month1 */ /** @typedef {number} Month3 */ /** @typedef {number} Month6 */ @@ -925,7 +923,7 @@ const _MS_PER_DAY = 86400000; const _MS_PER_WEEK = 7 * _MS_PER_DAY; const _EPOCH_MS = 1230768000000; const _DATE_INDEXES = new Set([ - 'minute1', 'minute5', 'minute10', 'minute30', + 'minute10', 'minute30', 'hour1', 'hour4', 'hour12', 'day1', 'day3', 'week1', 'month1', 'month3', 'month6', @@ -943,8 +941,6 @@ const _addMonths = (months) => new Date(2009, months, 1); */ function indexToDate(index, i) { switch (index) { - case 'minute1': return new Date(_EPOCH_MS + i * 60000); - case 'minute5': return new Date(_EPOCH_MS + i * 300000); case 'minute10': return new Date(_EPOCH_MS + i * 600000); case 'minute30': return new Date(_EPOCH_MS + i * 1800000); case 'hour1': return new Date(_EPOCH_MS + i * 3600000); @@ -972,8 +968,6 @@ function indexToDate(index, i) { function dateToIndex(index, d) { const ms = d.getTime(); switch (index) { - case 'minute1': return Math.floor((ms - _EPOCH_MS) / 60000); - case 'minute5': return Math.floor((ms - _EPOCH_MS) / 300000); case 'minute10': return Math.floor((ms - _EPOCH_MS) / 600000); case 'minute30': return Math.floor((ms - _EPOCH_MS) / 1800000); case 'hour1': return Math.floor((ms - _EPOCH_MS) / 3600000); @@ -1371,43 +1365,41 @@ const _p = (prefix, acc) => acc ? `${prefix}_${acc}` : prefix; // Index group constants and factory -const _i1 = /** @type {const} */ (["minute1", "minute5", "minute10", "minute30", "hour1", "hour4", "hour12", "day1", "day3", "week1", "month1", "month3", "month6", "year1", "year10", "halvingepoch", "difficultyepoch", "height"]); -const _i2 = /** @type {const} */ (["minute1", "minute5", "minute10", "minute30", "hour1", "hour4", "hour12", "day1", "day3", "week1", "month1", "month3", "month6", "year1", "year10", "halvingepoch", "difficultyepoch"]); -const _i3 = /** @type {const} */ (["minute1"]); -const _i4 = /** @type {const} */ (["minute5"]); -const _i5 = /** @type {const} */ (["minute10"]); -const _i6 = /** @type {const} */ (["minute30"]); -const _i7 = /** @type {const} */ (["hour1"]); -const _i8 = /** @type {const} */ (["hour4"]); -const _i9 = /** @type {const} */ (["hour12"]); -const _i10 = /** @type {const} */ (["day1"]); -const _i11 = /** @type {const} */ (["day3"]); -const _i12 = /** @type {const} */ (["week1"]); -const _i13 = /** @type {const} */ (["month1"]); -const _i14 = /** @type {const} */ (["month3"]); -const _i15 = /** @type {const} */ (["month6"]); -const _i16 = /** @type {const} */ (["year1"]); -const _i17 = /** @type {const} */ (["year10"]); -const _i18 = /** @type {const} */ (["halvingepoch"]); -const _i19 = /** @type {const} */ (["difficultyepoch"]); -const _i20 = /** @type {const} */ (["height"]); -const _i21 = /** @type {const} */ (["txindex"]); -const _i22 = /** @type {const} */ (["txinindex"]); -const _i23 = /** @type {const} */ (["txoutindex"]); -const _i24 = /** @type {const} */ (["emptyoutputindex"]); -const _i25 = /** @type {const} */ (["opreturnindex"]); -const _i26 = /** @type {const} */ (["p2aaddressindex"]); -const _i27 = /** @type {const} */ (["p2msoutputindex"]); -const _i28 = /** @type {const} */ (["p2pk33addressindex"]); -const _i29 = /** @type {const} */ (["p2pk65addressindex"]); -const _i30 = /** @type {const} */ (["p2pkhaddressindex"]); -const _i31 = /** @type {const} */ (["p2shaddressindex"]); -const _i32 = /** @type {const} */ (["p2traddressindex"]); -const _i33 = /** @type {const} */ (["p2wpkhaddressindex"]); -const _i34 = /** @type {const} */ (["p2wshaddressindex"]); -const _i35 = /** @type {const} */ (["unknownoutputindex"]); -const _i36 = /** @type {const} */ (["fundedaddressindex"]); -const _i37 = /** @type {const} */ (["emptyaddressindex"]); +const _i1 = /** @type {const} */ (["minute10", "minute30", "hour1", "hour4", "hour12", "day1", "day3", "week1", "month1", "month3", "month6", "year1", "year10", "halvingepoch", "difficultyepoch", "height"]); +const _i2 = /** @type {const} */ (["minute10", "minute30", "hour1", "hour4", "hour12", "day1", "day3", "week1", "month1", "month3", "month6", "year1", "year10", "halvingepoch", "difficultyepoch"]); +const _i3 = /** @type {const} */ (["minute10"]); +const _i4 = /** @type {const} */ (["minute30"]); +const _i5 = /** @type {const} */ (["hour1"]); +const _i6 = /** @type {const} */ (["hour4"]); +const _i7 = /** @type {const} */ (["hour12"]); +const _i8 = /** @type {const} */ (["day1"]); +const _i9 = /** @type {const} */ (["day3"]); +const _i10 = /** @type {const} */ (["week1"]); +const _i11 = /** @type {const} */ (["month1"]); +const _i12 = /** @type {const} */ (["month3"]); +const _i13 = /** @type {const} */ (["month6"]); +const _i14 = /** @type {const} */ (["year1"]); +const _i15 = /** @type {const} */ (["year10"]); +const _i16 = /** @type {const} */ (["halvingepoch"]); +const _i17 = /** @type {const} */ (["difficultyepoch"]); +const _i18 = /** @type {const} */ (["height"]); +const _i19 = /** @type {const} */ (["txindex"]); +const _i20 = /** @type {const} */ (["txinindex"]); +const _i21 = /** @type {const} */ (["txoutindex"]); +const _i22 = /** @type {const} */ (["emptyoutputindex"]); +const _i23 = /** @type {const} */ (["opreturnindex"]); +const _i24 = /** @type {const} */ (["p2aaddressindex"]); +const _i25 = /** @type {const} */ (["p2msoutputindex"]); +const _i26 = /** @type {const} */ (["p2pk33addressindex"]); +const _i27 = /** @type {const} */ (["p2pk65addressindex"]); +const _i28 = /** @type {const} */ (["p2pkhaddressindex"]); +const _i29 = /** @type {const} */ (["p2shaddressindex"]); +const _i30 = /** @type {const} */ (["p2traddressindex"]); +const _i31 = /** @type {const} */ (["p2wpkhaddressindex"]); +const _i32 = /** @type {const} */ (["p2wshaddressindex"]); +const _i33 = /** @type {const} */ (["unknownoutputindex"]); +const _i34 = /** @type {const} */ (["fundedaddressindex"]); +const _i35 = /** @type {const} */ (["emptyaddressindex"]); /** * Generic metric pattern factory. @@ -1435,117 +1427,111 @@ function _mp(client, name, indexes) { }; } -/** @template T @typedef {{ name: string, by: { readonly minute1: DateMetricEndpointBuilder, readonly minute5: DateMetricEndpointBuilder, readonly minute10: DateMetricEndpointBuilder, readonly minute30: DateMetricEndpointBuilder, readonly hour1: DateMetricEndpointBuilder, readonly hour4: DateMetricEndpointBuilder, readonly hour12: DateMetricEndpointBuilder, readonly day1: DateMetricEndpointBuilder, readonly day3: DateMetricEndpointBuilder, readonly week1: DateMetricEndpointBuilder, readonly month1: DateMetricEndpointBuilder, readonly month3: DateMetricEndpointBuilder, readonly month6: DateMetricEndpointBuilder, readonly year1: DateMetricEndpointBuilder, readonly year10: DateMetricEndpointBuilder, readonly halvingepoch: MetricEndpointBuilder, readonly difficultyepoch: MetricEndpointBuilder, readonly height: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern1 */ +/** @template T @typedef {{ name: string, by: { readonly minute10: DateMetricEndpointBuilder, readonly minute30: DateMetricEndpointBuilder, readonly hour1: DateMetricEndpointBuilder, readonly hour4: DateMetricEndpointBuilder, readonly hour12: DateMetricEndpointBuilder, readonly day1: DateMetricEndpointBuilder, readonly day3: DateMetricEndpointBuilder, readonly week1: DateMetricEndpointBuilder, readonly month1: DateMetricEndpointBuilder, readonly month3: DateMetricEndpointBuilder, readonly month6: DateMetricEndpointBuilder, readonly year1: DateMetricEndpointBuilder, readonly year10: DateMetricEndpointBuilder, readonly halvingepoch: MetricEndpointBuilder, readonly difficultyepoch: MetricEndpointBuilder, readonly height: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern1 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern1} */ function createMetricPattern1(client, name) { return /** @type {MetricPattern1} */ (_mp(client, name, _i1)); } -/** @template T @typedef {{ name: string, by: { readonly minute1: DateMetricEndpointBuilder, readonly minute5: DateMetricEndpointBuilder, readonly minute10: DateMetricEndpointBuilder, readonly minute30: DateMetricEndpointBuilder, readonly hour1: DateMetricEndpointBuilder, readonly hour4: DateMetricEndpointBuilder, readonly hour12: DateMetricEndpointBuilder, readonly day1: DateMetricEndpointBuilder, readonly day3: DateMetricEndpointBuilder, readonly week1: DateMetricEndpointBuilder, readonly month1: DateMetricEndpointBuilder, readonly month3: DateMetricEndpointBuilder, readonly month6: DateMetricEndpointBuilder, readonly year1: DateMetricEndpointBuilder, readonly year10: DateMetricEndpointBuilder, readonly halvingepoch: MetricEndpointBuilder, readonly difficultyepoch: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern2 */ +/** @template T @typedef {{ name: string, by: { readonly minute10: DateMetricEndpointBuilder, readonly minute30: DateMetricEndpointBuilder, readonly hour1: DateMetricEndpointBuilder, readonly hour4: DateMetricEndpointBuilder, readonly hour12: DateMetricEndpointBuilder, readonly day1: DateMetricEndpointBuilder, readonly day3: DateMetricEndpointBuilder, readonly week1: DateMetricEndpointBuilder, readonly month1: DateMetricEndpointBuilder, readonly month3: DateMetricEndpointBuilder, readonly month6: DateMetricEndpointBuilder, readonly year1: DateMetricEndpointBuilder, readonly year10: DateMetricEndpointBuilder, readonly halvingepoch: MetricEndpointBuilder, readonly difficultyepoch: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern2 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern2} */ function createMetricPattern2(client, name) { return /** @type {MetricPattern2} */ (_mp(client, name, _i2)); } -/** @template T @typedef {{ name: string, by: { readonly minute1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern3 */ +/** @template T @typedef {{ name: string, by: { readonly minute10: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern3 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern3} */ function createMetricPattern3(client, name) { return /** @type {MetricPattern3} */ (_mp(client, name, _i3)); } -/** @template T @typedef {{ name: string, by: { readonly minute5: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern4 */ +/** @template T @typedef {{ name: string, by: { readonly minute30: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern4 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern4} */ function createMetricPattern4(client, name) { return /** @type {MetricPattern4} */ (_mp(client, name, _i4)); } -/** @template T @typedef {{ name: string, by: { readonly minute10: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern5 */ +/** @template T @typedef {{ name: string, by: { readonly hour1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern5 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern5} */ function createMetricPattern5(client, name) { return /** @type {MetricPattern5} */ (_mp(client, name, _i5)); } -/** @template T @typedef {{ name: string, by: { readonly minute30: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern6 */ +/** @template T @typedef {{ name: string, by: { readonly hour4: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern6 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern6} */ function createMetricPattern6(client, name) { return /** @type {MetricPattern6} */ (_mp(client, name, _i6)); } -/** @template T @typedef {{ name: string, by: { readonly hour1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern7 */ +/** @template T @typedef {{ name: string, by: { readonly hour12: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern7 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern7} */ function createMetricPattern7(client, name) { return /** @type {MetricPattern7} */ (_mp(client, name, _i7)); } -/** @template T @typedef {{ name: string, by: { readonly hour4: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern8 */ +/** @template T @typedef {{ name: string, by: { readonly day1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern8 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern8} */ function createMetricPattern8(client, name) { return /** @type {MetricPattern8} */ (_mp(client, name, _i8)); } -/** @template T @typedef {{ name: string, by: { readonly hour12: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern9 */ +/** @template T @typedef {{ name: string, by: { readonly day3: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern9 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern9} */ function createMetricPattern9(client, name) { return /** @type {MetricPattern9} */ (_mp(client, name, _i9)); } -/** @template T @typedef {{ name: string, by: { readonly day1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern10 */ +/** @template T @typedef {{ name: string, by: { readonly week1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern10 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern10} */ function createMetricPattern10(client, name) { return /** @type {MetricPattern10} */ (_mp(client, name, _i10)); } -/** @template T @typedef {{ name: string, by: { readonly day3: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern11 */ +/** @template T @typedef {{ name: string, by: { readonly month1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern11 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern11} */ function createMetricPattern11(client, name) { return /** @type {MetricPattern11} */ (_mp(client, name, _i11)); } -/** @template T @typedef {{ name: string, by: { readonly week1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern12 */ +/** @template T @typedef {{ name: string, by: { readonly month3: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern12 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern12} */ function createMetricPattern12(client, name) { return /** @type {MetricPattern12} */ (_mp(client, name, _i12)); } -/** @template T @typedef {{ name: string, by: { readonly month1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern13 */ +/** @template T @typedef {{ name: string, by: { readonly month6: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern13 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern13} */ function createMetricPattern13(client, name) { return /** @type {MetricPattern13} */ (_mp(client, name, _i13)); } -/** @template T @typedef {{ name: string, by: { readonly month3: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern14 */ +/** @template T @typedef {{ name: string, by: { readonly year1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern14 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern14} */ function createMetricPattern14(client, name) { return /** @type {MetricPattern14} */ (_mp(client, name, _i14)); } -/** @template T @typedef {{ name: string, by: { readonly month6: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern15 */ +/** @template T @typedef {{ name: string, by: { readonly year10: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern15 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern15} */ function createMetricPattern15(client, name) { return /** @type {MetricPattern15} */ (_mp(client, name, _i15)); } -/** @template T @typedef {{ name: string, by: { readonly year1: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern16 */ +/** @template T @typedef {{ name: string, by: { readonly halvingepoch: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern16 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern16} */ function createMetricPattern16(client, name) { return /** @type {MetricPattern16} */ (_mp(client, name, _i16)); } -/** @template T @typedef {{ name: string, by: { readonly year10: DateMetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern17 */ +/** @template T @typedef {{ name: string, by: { readonly difficultyepoch: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern17 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern17} */ function createMetricPattern17(client, name) { return /** @type {MetricPattern17} */ (_mp(client, name, _i17)); } -/** @template T @typedef {{ name: string, by: { readonly halvingepoch: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern18 */ +/** @template T @typedef {{ name: string, by: { readonly height: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern18 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern18} */ function createMetricPattern18(client, name) { return /** @type {MetricPattern18} */ (_mp(client, name, _i18)); } -/** @template T @typedef {{ name: string, by: { readonly difficultyepoch: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern19 */ +/** @template T @typedef {{ name: string, by: { readonly txindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern19 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern19} */ function createMetricPattern19(client, name) { return /** @type {MetricPattern19} */ (_mp(client, name, _i19)); } -/** @template T @typedef {{ name: string, by: { readonly height: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern20 */ +/** @template T @typedef {{ name: string, by: { readonly txinindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern20 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern20} */ function createMetricPattern20(client, name) { return /** @type {MetricPattern20} */ (_mp(client, name, _i20)); } -/** @template T @typedef {{ name: string, by: { readonly txindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern21 */ +/** @template T @typedef {{ name: string, by: { readonly txoutindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern21 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern21} */ function createMetricPattern21(client, name) { return /** @type {MetricPattern21} */ (_mp(client, name, _i21)); } -/** @template T @typedef {{ name: string, by: { readonly txinindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern22 */ +/** @template T @typedef {{ name: string, by: { readonly emptyoutputindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern22 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern22} */ function createMetricPattern22(client, name) { return /** @type {MetricPattern22} */ (_mp(client, name, _i22)); } -/** @template T @typedef {{ name: string, by: { readonly txoutindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern23 */ +/** @template T @typedef {{ name: string, by: { readonly opreturnindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern23 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern23} */ function createMetricPattern23(client, name) { return /** @type {MetricPattern23} */ (_mp(client, name, _i23)); } -/** @template T @typedef {{ name: string, by: { readonly emptyoutputindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern24 */ +/** @template T @typedef {{ name: string, by: { readonly p2aaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern24 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern24} */ function createMetricPattern24(client, name) { return /** @type {MetricPattern24} */ (_mp(client, name, _i24)); } -/** @template T @typedef {{ name: string, by: { readonly opreturnindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern25 */ +/** @template T @typedef {{ name: string, by: { readonly p2msoutputindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern25 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern25} */ function createMetricPattern25(client, name) { return /** @type {MetricPattern25} */ (_mp(client, name, _i25)); } -/** @template T @typedef {{ name: string, by: { readonly p2aaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern26 */ +/** @template T @typedef {{ name: string, by: { readonly p2pk33addressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern26 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern26} */ function createMetricPattern26(client, name) { return /** @type {MetricPattern26} */ (_mp(client, name, _i26)); } -/** @template T @typedef {{ name: string, by: { readonly p2msoutputindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern27 */ +/** @template T @typedef {{ name: string, by: { readonly p2pk65addressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern27 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern27} */ function createMetricPattern27(client, name) { return /** @type {MetricPattern27} */ (_mp(client, name, _i27)); } -/** @template T @typedef {{ name: string, by: { readonly p2pk33addressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern28 */ +/** @template T @typedef {{ name: string, by: { readonly p2pkhaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern28 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern28} */ function createMetricPattern28(client, name) { return /** @type {MetricPattern28} */ (_mp(client, name, _i28)); } -/** @template T @typedef {{ name: string, by: { readonly p2pk65addressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern29 */ +/** @template T @typedef {{ name: string, by: { readonly p2shaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern29 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern29} */ function createMetricPattern29(client, name) { return /** @type {MetricPattern29} */ (_mp(client, name, _i29)); } -/** @template T @typedef {{ name: string, by: { readonly p2pkhaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern30 */ +/** @template T @typedef {{ name: string, by: { readonly p2traddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern30 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern30} */ function createMetricPattern30(client, name) { return /** @type {MetricPattern30} */ (_mp(client, name, _i30)); } -/** @template T @typedef {{ name: string, by: { readonly p2shaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern31 */ +/** @template T @typedef {{ name: string, by: { readonly p2wpkhaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern31 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern31} */ function createMetricPattern31(client, name) { return /** @type {MetricPattern31} */ (_mp(client, name, _i31)); } -/** @template T @typedef {{ name: string, by: { readonly p2traddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern32 */ +/** @template T @typedef {{ name: string, by: { readonly p2wshaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern32 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern32} */ function createMetricPattern32(client, name) { return /** @type {MetricPattern32} */ (_mp(client, name, _i32)); } -/** @template T @typedef {{ name: string, by: { readonly p2wpkhaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern33 */ +/** @template T @typedef {{ name: string, by: { readonly unknownoutputindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern33 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern33} */ function createMetricPattern33(client, name) { return /** @type {MetricPattern33} */ (_mp(client, name, _i33)); } -/** @template T @typedef {{ name: string, by: { readonly p2wshaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern34 */ +/** @template T @typedef {{ name: string, by: { readonly fundedaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern34 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern34} */ function createMetricPattern34(client, name) { return /** @type {MetricPattern34} */ (_mp(client, name, _i34)); } -/** @template T @typedef {{ name: string, by: { readonly unknownoutputindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern35 */ +/** @template T @typedef {{ name: string, by: { readonly emptyaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern35 */ /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern35} */ function createMetricPattern35(client, name) { return /** @type {MetricPattern35} */ (_mp(client, name, _i35)); } -/** @template T @typedef {{ name: string, by: { readonly fundedaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern36 */ -/** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern36} */ -function createMetricPattern36(client, name) { return /** @type {MetricPattern36} */ (_mp(client, name, _i36)); } -/** @template T @typedef {{ name: string, by: { readonly emptyaddressindex: MetricEndpointBuilder }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder|undefined }} MetricPattern37 */ -/** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern37} */ -function createMetricPattern37(client, name) { return /** @type {MetricPattern37} */ (_mp(client, name, _i37)); } // Reusable structural pattern factories @@ -1570,9 +1556,9 @@ function createMetricPattern37(client, name) { return /** @type {MetricPattern37 * @property {MetricPattern1} adjustedValueDestroyed24h * @property {MetricPattern1} adjustedValueDestroyed30d * @property {MetricPattern1} adjustedValueDestroyed7d - * @property {MetricPattern20} capRaw + * @property {MetricPattern18} capRaw * @property {MetricPattern1} capitulationFlow - * @property {MetricPattern20} investorCapRaw + * @property {MetricPattern18} investorCapRaw * @property {SatsUsdPattern} investorPrice * @property {MetricPattern1} investorPriceCents * @property {RatioPattern2} investorPriceExtra @@ -1686,9 +1672,9 @@ function createAdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitReali adjustedValueDestroyed24h: createMetricPattern1(client, _m(acc, 'adjusted_value_destroyed_24h')), adjustedValueDestroyed30d: createMetricPattern1(client, _m(acc, 'adjusted_value_destroyed_30d')), adjustedValueDestroyed7d: createMetricPattern1(client, _m(acc, 'adjusted_value_destroyed_7d')), - capRaw: createMetricPattern20(client, _m(acc, 'cap_raw')), + capRaw: createMetricPattern18(client, _m(acc, 'cap_raw')), capitulationFlow: createMetricPattern1(client, _m(acc, 'capitulation_flow')), - investorCapRaw: createMetricPattern20(client, _m(acc, 'investor_cap_raw')), + investorCapRaw: createMetricPattern18(client, _m(acc, 'investor_cap_raw')), investorPrice: createSatsUsdPattern(client, _m(acc, 'investor_price')), investorPriceCents: createMetricPattern1(client, _m(acc, 'investor_price_cents')), investorPriceExtra: createRatioPattern2(client, _m(acc, 'investor_price_ratio')), @@ -1797,9 +1783,9 @@ function createAdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitReali * @property {MetricPattern1} adjustedValueDestroyed24h * @property {MetricPattern1} adjustedValueDestroyed30d * @property {MetricPattern1} adjustedValueDestroyed7d - * @property {MetricPattern20} capRaw + * @property {MetricPattern18} capRaw * @property {MetricPattern1} capitulationFlow - * @property {MetricPattern20} investorCapRaw + * @property {MetricPattern18} investorCapRaw * @property {SatsUsdPattern} investorPrice * @property {MetricPattern1} investorPriceCents * @property {RatioPattern2} investorPriceExtra @@ -1898,9 +1884,9 @@ function createAdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitReali adjustedValueDestroyed24h: createMetricPattern1(client, _m(acc, 'adjusted_value_destroyed_24h')), adjustedValueDestroyed30d: createMetricPattern1(client, _m(acc, 'adjusted_value_destroyed_30d')), adjustedValueDestroyed7d: createMetricPattern1(client, _m(acc, 'adjusted_value_destroyed_7d')), - capRaw: createMetricPattern20(client, _m(acc, 'cap_raw')), + capRaw: createMetricPattern18(client, _m(acc, 'cap_raw')), capitulationFlow: createMetricPattern1(client, _m(acc, 'capitulation_flow')), - investorCapRaw: createMetricPattern20(client, _m(acc, 'investor_cap_raw')), + investorCapRaw: createMetricPattern18(client, _m(acc, 'investor_cap_raw')), investorPrice: createSatsUsdPattern(client, _m(acc, 'investor_price')), investorPriceCents: createMetricPattern1(client, _m(acc, 'investor_price_cents')), investorPriceExtra: createRatioPattern2(client, _m(acc, 'investor_price_ratio')), @@ -1975,9 +1961,9 @@ function createAdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitReali /** * @typedef {Object} CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2 - * @property {MetricPattern20} capRaw + * @property {MetricPattern18} capRaw * @property {MetricPattern1} capitulationFlow - * @property {MetricPattern20} investorCapRaw + * @property {MetricPattern18} investorCapRaw * @property {SatsUsdPattern} investorPrice * @property {MetricPattern1} investorPriceCents * @property {RatioPattern2} investorPriceExtra @@ -2072,9 +2058,9 @@ function createAdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitReali */ function createCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern2(client, acc) { return { - capRaw: createMetricPattern20(client, _m(acc, 'cap_raw')), + capRaw: createMetricPattern18(client, _m(acc, 'cap_raw')), capitulationFlow: createMetricPattern1(client, _m(acc, 'capitulation_flow')), - investorCapRaw: createMetricPattern20(client, _m(acc, 'investor_cap_raw')), + investorCapRaw: createMetricPattern18(client, _m(acc, 'investor_cap_raw')), investorPrice: createSatsUsdPattern(client, _m(acc, 'investor_price')), investorPriceCents: createMetricPattern1(client, _m(acc, 'investor_price_cents')), investorPriceExtra: createRatioPattern2(client, _m(acc, 'investor_price_ratio')), @@ -2164,9 +2150,9 @@ function createCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellS /** * @typedef {Object} CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern - * @property {MetricPattern20} capRaw + * @property {MetricPattern18} capRaw * @property {MetricPattern1} capitulationFlow - * @property {MetricPattern20} investorCapRaw + * @property {MetricPattern18} investorCapRaw * @property {SatsUsdPattern} investorPrice * @property {MetricPattern1} investorPriceCents * @property {RatioPattern2} investorPriceExtra @@ -2246,9 +2232,9 @@ function createCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellS */ function createCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern(client, acc) { return { - capRaw: createMetricPattern20(client, _m(acc, 'cap_raw')), + capRaw: createMetricPattern18(client, _m(acc, 'cap_raw')), capitulationFlow: createMetricPattern1(client, _m(acc, 'capitulation_flow')), - investorCapRaw: createMetricPattern20(client, _m(acc, 'investor_cap_raw')), + investorCapRaw: createMetricPattern18(client, _m(acc, 'investor_cap_raw')), investorPrice: createSatsUsdPattern(client, _m(acc, 'investor_price')), investorPriceCents: createMetricPattern1(client, _m(acc, 'investor_price_cents')), investorPriceExtra: createRatioPattern2(client, _m(acc, 'investor_price_ratio')), @@ -2665,11 +2651,11 @@ function createRatioPattern3(client, acc) { * @typedef {Object} GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern * @property {MetricPattern1} greedIndex * @property {MetricPattern1} investedCapitalInLoss - * @property {MetricPattern20} investedCapitalInLossRaw + * @property {MetricPattern18} investedCapitalInLossRaw * @property {MetricPattern1} investedCapitalInProfit - * @property {MetricPattern20} investedCapitalInProfitRaw - * @property {MetricPattern20} investorCapInLossRaw - * @property {MetricPattern20} investorCapInProfitRaw + * @property {MetricPattern18} investedCapitalInProfitRaw + * @property {MetricPattern18} investorCapInLossRaw + * @property {MetricPattern18} investorCapInProfitRaw * @property {MetricPattern1} negUnrealizedLoss * @property {MetricPattern1} netSentiment * @property {MetricPattern1} netUnrealizedPnl @@ -2692,11 +2678,11 @@ function createGreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern(c return { greedIndex: createMetricPattern1(client, _m(acc, 'greed_index')), investedCapitalInLoss: createMetricPattern1(client, _m(acc, 'invested_capital_in_loss')), - investedCapitalInLossRaw: createMetricPattern20(client, _m(acc, 'invested_capital_in_loss_raw')), + investedCapitalInLossRaw: createMetricPattern18(client, _m(acc, 'invested_capital_in_loss_raw')), investedCapitalInProfit: createMetricPattern1(client, _m(acc, 'invested_capital_in_profit')), - investedCapitalInProfitRaw: createMetricPattern20(client, _m(acc, 'invested_capital_in_profit_raw')), - investorCapInLossRaw: createMetricPattern20(client, _m(acc, 'investor_cap_in_loss_raw')), - investorCapInProfitRaw: createMetricPattern20(client, _m(acc, 'investor_cap_in_profit_raw')), + investedCapitalInProfitRaw: createMetricPattern18(client, _m(acc, 'invested_capital_in_profit_raw')), + investorCapInLossRaw: createMetricPattern18(client, _m(acc, 'investor_cap_in_loss_raw')), + investorCapInProfitRaw: createMetricPattern18(client, _m(acc, 'investor_cap_in_profit_raw')), negUnrealizedLoss: createMetricPattern1(client, _m(acc, 'neg_unrealized_loss')), netSentiment: createMetricPattern1(client, _m(acc, 'net_sentiment')), netUnrealizedPnl: createMetricPattern1(client, _m(acc, 'net_unrealized_pnl')), @@ -2714,11 +2700,11 @@ function createGreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern(c * @typedef {Object} GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern * @property {MetricPattern1} greedIndex * @property {MetricPattern1} investedCapitalInLoss - * @property {MetricPattern20} investedCapitalInLossRaw + * @property {MetricPattern18} investedCapitalInLossRaw * @property {MetricPattern1} investedCapitalInProfit - * @property {MetricPattern20} investedCapitalInProfitRaw - * @property {MetricPattern20} investorCapInLossRaw - * @property {MetricPattern20} investorCapInProfitRaw + * @property {MetricPattern18} investedCapitalInProfitRaw + * @property {MetricPattern18} investorCapInLossRaw + * @property {MetricPattern18} investorCapInProfitRaw * @property {MetricPattern1} negUnrealizedLoss * @property {MetricPattern1} netSentiment * @property {MetricPattern1} netUnrealizedPnl @@ -2740,11 +2726,11 @@ function createGreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern(clien return { greedIndex: createMetricPattern1(client, _m(acc, 'greed_index')), investedCapitalInLoss: createMetricPattern1(client, _m(acc, 'invested_capital_in_loss')), - investedCapitalInLossRaw: createMetricPattern20(client, _m(acc, 'invested_capital_in_loss_raw')), + investedCapitalInLossRaw: createMetricPattern18(client, _m(acc, 'invested_capital_in_loss_raw')), investedCapitalInProfit: createMetricPattern1(client, _m(acc, 'invested_capital_in_profit')), - investedCapitalInProfitRaw: createMetricPattern20(client, _m(acc, 'invested_capital_in_profit_raw')), - investorCapInLossRaw: createMetricPattern20(client, _m(acc, 'investor_cap_in_loss_raw')), - investorCapInProfitRaw: createMetricPattern20(client, _m(acc, 'investor_cap_in_profit_raw')), + investedCapitalInProfitRaw: createMetricPattern18(client, _m(acc, 'invested_capital_in_profit_raw')), + investorCapInLossRaw: createMetricPattern18(client, _m(acc, 'investor_cap_in_loss_raw')), + investorCapInProfitRaw: createMetricPattern18(client, _m(acc, 'investor_cap_in_profit_raw')), negUnrealizedLoss: createMetricPattern1(client, _m(acc, 'neg_unrealized_loss')), netSentiment: createMetricPattern1(client, _m(acc, 'net_sentiment')), netUnrealizedPnl: createMetricPattern1(client, _m(acc, 'net_unrealized_pnl')), @@ -3005,17 +2991,17 @@ function create_201520162017201820192020202120222023202420252026Pattern2(client, /** * @typedef {Object} AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern - * @property {MetricPattern20} average - * @property {MetricPattern20} cumulative - * @property {MetricPattern20} max - * @property {MetricPattern20} median - * @property {MetricPattern20} min - * @property {MetricPattern20} pct10 - * @property {MetricPattern20} pct25 - * @property {MetricPattern20} pct75 - * @property {MetricPattern20} pct90 + * @property {MetricPattern18} average + * @property {MetricPattern18} cumulative + * @property {MetricPattern18} max + * @property {MetricPattern18} median + * @property {MetricPattern18} min + * @property {MetricPattern18} pct10 + * @property {MetricPattern18} pct25 + * @property {MetricPattern18} pct75 + * @property {MetricPattern18} pct90 * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern} rolling - * @property {MetricPattern20} sum + * @property {MetricPattern18} sum */ /** @@ -3026,17 +3012,17 @@ function create_201520162017201820192020202120222023202420252026Pattern2(client, */ function createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern(client, acc) { return { - average: createMetricPattern20(client, _m(acc, 'average')), - cumulative: createMetricPattern20(client, _m(acc, 'cumulative')), - max: createMetricPattern20(client, _m(acc, 'max')), - median: createMetricPattern20(client, _m(acc, 'median')), - min: createMetricPattern20(client, _m(acc, 'min')), - pct10: createMetricPattern20(client, _m(acc, 'pct10')), - pct25: createMetricPattern20(client, _m(acc, 'pct25')), - pct75: createMetricPattern20(client, _m(acc, 'pct75')), - pct90: createMetricPattern20(client, _m(acc, 'pct90')), + average: createMetricPattern18(client, _m(acc, 'average')), + cumulative: createMetricPattern18(client, _m(acc, 'cumulative')), + max: createMetricPattern18(client, _m(acc, 'max')), + median: createMetricPattern18(client, _m(acc, 'median')), + min: createMetricPattern18(client, _m(acc, 'min')), + pct10: createMetricPattern18(client, _m(acc, 'pct10')), + pct25: createMetricPattern18(client, _m(acc, 'pct25')), + pct75: createMetricPattern18(client, _m(acc, 'pct75')), + pct90: createMetricPattern18(client, _m(acc, 'pct90')), rolling: createAverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc), - sum: createMetricPattern20(client, _m(acc, 'sum')), + sum: createMetricPattern18(client, _m(acc, 'sum')), }; } @@ -3044,7 +3030,7 @@ function createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPatter * @typedef {Object} AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern * @property {_1y24h30d7dPattern} average * @property {MetricPattern1} cumulative - * @property {MetricPattern20} height + * @property {MetricPattern18} height * @property {_1y24h30d7dPattern} max * @property {_1y24h30d7dPattern} median * @property {_1y24h30d7dPattern} min @@ -3065,7 +3051,7 @@ function createAverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern return { average: create_1y24h30d7dPattern(client, _m(acc, 'average')), cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), - height: createMetricPattern20(client, acc), + height: createMetricPattern18(client, acc), max: create_1y24h30d7dPattern(client, _m(acc, 'max')), median: create_1y24h30d7dPattern(client, _m(acc, 'median')), min: create_1y24h30d7dPattern(client, _m(acc, 'min')), @@ -3248,7 +3234,7 @@ function createAverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) { * @template T * @typedef {Object} AverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern * @property {_1y24h30d7dPattern} average - * @property {MetricPattern20} height + * @property {MetricPattern18} height * @property {_1y24h30d7dPattern} max * @property {_1y24h30d7dPattern} median * @property {_1y24h30d7dPattern} min @@ -3268,7 +3254,7 @@ function createAverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) { function createAverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) { return { average: create_1y24h30d7dPattern(client, _m(acc, 'average')), - height: createMetricPattern20(client, acc), + height: createMetricPattern18(client, acc), max: create_1y24h30d7dPattern(client, _m(acc, 'max')), median: create_1y24h30d7dPattern(client, _m(acc, 'median')), min: create_1y24h30d7dPattern(client, _m(acc, 'min')), @@ -3282,14 +3268,14 @@ function createAverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) /** * @template T * @typedef {Object} AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern - * @property {MetricPattern20} average - * @property {MetricPattern20} max - * @property {MetricPattern20} median - * @property {MetricPattern20} min - * @property {MetricPattern20} pct10 - * @property {MetricPattern20} pct25 - * @property {MetricPattern20} pct75 - * @property {MetricPattern20} pct90 + * @property {MetricPattern18} average + * @property {MetricPattern18} max + * @property {MetricPattern18} median + * @property {MetricPattern18} min + * @property {MetricPattern18} pct10 + * @property {MetricPattern18} pct25 + * @property {MetricPattern18} pct75 + * @property {MetricPattern18} pct90 */ /** @@ -3301,14 +3287,14 @@ function createAverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) */ function createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) { return { - average: createMetricPattern20(client, _m(acc, 'average')), - max: createMetricPattern20(client, _m(acc, 'max')), - median: createMetricPattern20(client, _m(acc, 'median')), - min: createMetricPattern20(client, _m(acc, 'min')), - pct10: createMetricPattern20(client, _m(acc, 'pct10')), - pct25: createMetricPattern20(client, _m(acc, 'pct25')), - pct75: createMetricPattern20(client, _m(acc, 'pct75')), - pct90: createMetricPattern20(client, _m(acc, 'pct90')), + average: createMetricPattern18(client, _m(acc, 'average')), + max: createMetricPattern18(client, _m(acc, 'max')), + median: createMetricPattern18(client, _m(acc, 'median')), + min: createMetricPattern18(client, _m(acc, 'min')), + pct10: createMetricPattern18(client, _m(acc, 'pct10')), + pct25: createMetricPattern18(client, _m(acc, 'pct25')), + pct75: createMetricPattern18(client, _m(acc, 'pct75')), + pct90: createMetricPattern18(client, _m(acc, 'pct90')), }; } @@ -3347,9 +3333,9 @@ function create_10y2y3y4y5y6y8yPattern(client, acc) { * @property {BtcSatsUsdPattern} _24h * @property {BtcSatsUsdPattern} _30d * @property {BtcSatsUsdPattern} _7d - * @property {MetricPattern20} btc - * @property {MetricPattern20} sats - * @property {MetricPattern20} usd + * @property {MetricPattern18} btc + * @property {MetricPattern18} sats + * @property {MetricPattern18} usd */ /** @@ -3364,9 +3350,9 @@ function create_1y24h30d7dBtcSatsUsdPattern(client, acc) { _24h: createBtcSatsUsdPattern(client, _m(acc, '24h')), _30d: createBtcSatsUsdPattern(client, _m(acc, '30d')), _7d: createBtcSatsUsdPattern(client, _m(acc, '7d')), - btc: createMetricPattern20(client, _m(acc, 'btc')), - sats: createMetricPattern20(client, acc), - usd: createMetricPattern20(client, _m(acc, 'usd')), + btc: createMetricPattern18(client, _m(acc, 'btc')), + sats: createMetricPattern18(client, acc), + usd: createMetricPattern18(client, _m(acc, 'usd')), }; } @@ -3544,8 +3530,8 @@ function createBalanceBothReactivatedReceivingSendingPattern(client, acc) { * @typedef {Object} CoinblocksCoindaysSatblocksSatdaysSentPattern * @property {CumulativeHeightSumPattern} coinblocksDestroyed * @property {CumulativeHeightSumPattern} coindaysDestroyed - * @property {MetricPattern20} satblocksDestroyed - * @property {MetricPattern20} satdaysDestroyed + * @property {MetricPattern18} satblocksDestroyed + * @property {MetricPattern18} satdaysDestroyed * @property {BaseCumulativePattern} sent * @property {BtcSatsUsdPattern} sent14dEma */ @@ -3560,8 +3546,8 @@ function createCoinblocksCoindaysSatblocksSatdaysSentPattern(client, acc) { return { coinblocksDestroyed: createCumulativeHeightSumPattern(client, _m(acc, 'coinblocks_destroyed')), coindaysDestroyed: createCumulativeHeightSumPattern(client, _m(acc, 'coindays_destroyed')), - satblocksDestroyed: createMetricPattern20(client, _m(acc, 'satblocks_destroyed')), - satdaysDestroyed: createMetricPattern20(client, _m(acc, 'satdays_destroyed')), + satblocksDestroyed: createMetricPattern18(client, _m(acc, 'satblocks_destroyed')), + satdaysDestroyed: createMetricPattern18(client, _m(acc, 'satdays_destroyed')), sent: createBaseCumulativePattern(client, _m(acc, 'sent')), sent14dEma: createBtcSatsUsdPattern(client, _m(acc, 'sent_14d_ema')), }; @@ -3752,7 +3738,7 @@ function createHistogramLineSignalPattern(client, acc) { * @typedef {Object} _6bBlockTxindexPattern * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern} _6b * @property {AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern} block - * @property {MetricPattern21} txindex + * @property {MetricPattern19} txindex */ /** @@ -3766,7 +3752,7 @@ function create_6bBlockTxindexPattern(client, acc) { return { _6b: createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, _m(acc, '6b')), block: createAverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc), - txindex: createMetricPattern21(client, acc), + txindex: createMetricPattern19(client, acc), }; } @@ -3774,7 +3760,7 @@ function create_6bBlockTxindexPattern(client, acc) { * @template T * @typedef {Object} CumulativeHeightSumPattern * @property {MetricPattern1} cumulative - * @property {MetricPattern20} height + * @property {MetricPattern18} height * @property {_1y24h30d7dPattern} sum */ @@ -3788,7 +3774,7 @@ function create_6bBlockTxindexPattern(client, acc) { function createCumulativeHeightSumPattern(client, acc) { return { cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), - height: createMetricPattern20(client, acc), + height: createMetricPattern18(client, acc), sum: create_1y24h30d7dPattern(client, acc), }; } @@ -3834,7 +3820,7 @@ function createBaseCumulativePattern(client, acc) { /** * @typedef {Object} CumulativeHeightPattern * @property {MetricPattern1} cumulative - * @property {MetricPattern20} height + * @property {MetricPattern18} height */ /** @@ -3846,7 +3832,7 @@ function createBaseCumulativePattern(client, acc) { function createCumulativeHeightPattern(client, acc) { return { cumulative: createMetricPattern1(client, _m(acc, 'cumulative')), - height: createMetricPattern20(client, acc), + height: createMetricPattern18(client, acc), }; } @@ -3967,10 +3953,10 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Blocks - * @property {MetricPattern20} blockhash + * @property {MetricPattern18} blockhash * @property {MetricsTree_Blocks_Difficulty} difficulty * @property {MetricsTree_Blocks_Time} time - * @property {MetricPattern20} totalSize + * @property {MetricPattern18} totalSize * @property {MetricsTree_Blocks_Weight} weight * @property {MetricsTree_Blocks_Count} count * @property {AverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern} interval @@ -3993,13 +3979,13 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Blocks_Time * @property {MetricPattern1} timestamp - * @property {MetricPattern20} date - * @property {MetricPattern20} timestampMonotonic + * @property {MetricPattern18} date + * @property {MetricPattern18} timestampMonotonic */ /** * @typedef {Object} MetricsTree_Blocks_Weight - * @property {MetricPattern20} base + * @property {MetricPattern18} base * @property {MetricPattern1} cumulative * @property {_1y24h30d7dPattern} sum * @property {_1y24h30d7dPattern} average @@ -4017,37 +4003,37 @@ function createRatioPattern2(client, acc) { * @property {MetricPattern1} blockCountTarget * @property {CumulativeHeightSumPattern} blockCount * @property {_1y24h30d7dPattern} blockCountSum - * @property {MetricPattern20} height1hAgo - * @property {MetricPattern20} height24hAgo - * @property {MetricPattern20} height3dAgo - * @property {MetricPattern20} height1wAgo - * @property {MetricPattern20} height8dAgo - * @property {MetricPattern20} height9dAgo - * @property {MetricPattern20} height12dAgo - * @property {MetricPattern20} height13dAgo - * @property {MetricPattern20} height2wAgo - * @property {MetricPattern20} height21dAgo - * @property {MetricPattern20} height26dAgo - * @property {MetricPattern20} height1mAgo - * @property {MetricPattern20} height34dAgo - * @property {MetricPattern20} height55dAgo - * @property {MetricPattern20} height2mAgo - * @property {MetricPattern20} height89dAgo - * @property {MetricPattern20} height111dAgo - * @property {MetricPattern20} height144dAgo - * @property {MetricPattern20} height3mAgo - * @property {MetricPattern20} height6mAgo - * @property {MetricPattern20} height200dAgo - * @property {MetricPattern20} height350dAgo - * @property {MetricPattern20} height1yAgo - * @property {MetricPattern20} height2yAgo - * @property {MetricPattern20} height200wAgo - * @property {MetricPattern20} height3yAgo - * @property {MetricPattern20} height4yAgo - * @property {MetricPattern20} height5yAgo - * @property {MetricPattern20} height6yAgo - * @property {MetricPattern20} height8yAgo - * @property {MetricPattern20} height10yAgo + * @property {MetricPattern18} height1hAgo + * @property {MetricPattern18} height24hAgo + * @property {MetricPattern18} height3dAgo + * @property {MetricPattern18} height1wAgo + * @property {MetricPattern18} height8dAgo + * @property {MetricPattern18} height9dAgo + * @property {MetricPattern18} height12dAgo + * @property {MetricPattern18} height13dAgo + * @property {MetricPattern18} height2wAgo + * @property {MetricPattern18} height21dAgo + * @property {MetricPattern18} height26dAgo + * @property {MetricPattern18} height1mAgo + * @property {MetricPattern18} height34dAgo + * @property {MetricPattern18} height55dAgo + * @property {MetricPattern18} height2mAgo + * @property {MetricPattern18} height89dAgo + * @property {MetricPattern18} height111dAgo + * @property {MetricPattern18} height144dAgo + * @property {MetricPattern18} height3mAgo + * @property {MetricPattern18} height6mAgo + * @property {MetricPattern18} height200dAgo + * @property {MetricPattern18} height350dAgo + * @property {MetricPattern18} height1yAgo + * @property {MetricPattern18} height2yAgo + * @property {MetricPattern18} height200wAgo + * @property {MetricPattern18} height3yAgo + * @property {MetricPattern18} height4yAgo + * @property {MetricPattern18} height5yAgo + * @property {MetricPattern18} height6yAgo + * @property {MetricPattern18} height8yAgo + * @property {MetricPattern18} height10yAgo */ /** @@ -4073,16 +4059,16 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Transactions - * @property {MetricPattern20} firstTxindex - * @property {MetricPattern21} height - * @property {MetricPattern21} txid - * @property {MetricPattern21} txversion - * @property {MetricPattern21} rawlocktime - * @property {MetricPattern21} baseSize - * @property {MetricPattern21} totalSize - * @property {MetricPattern21} isExplicitlyRbf - * @property {MetricPattern21} firstTxinindex - * @property {MetricPattern21} firstTxoutindex + * @property {MetricPattern18} firstTxindex + * @property {MetricPattern19} height + * @property {MetricPattern19} txid + * @property {MetricPattern19} txversion + * @property {MetricPattern19} rawlocktime + * @property {MetricPattern19} baseSize + * @property {MetricPattern19} totalSize + * @property {MetricPattern19} isExplicitlyRbf + * @property {MetricPattern19} firstTxinindex + * @property {MetricPattern19} firstTxoutindex * @property {MetricsTree_Transactions_Count} count * @property {MetricsTree_Transactions_Size} size * @property {MetricsTree_Transactions_Fees} fees @@ -4093,7 +4079,7 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Transactions_Count * @property {AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern} txCount - * @property {MetricPattern21} isCoinbase + * @property {MetricPattern19} isCoinbase */ /** @@ -4104,8 +4090,8 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Transactions_Fees - * @property {MetricPattern21} inputValue - * @property {MetricPattern21} outputValue + * @property {MetricPattern19} inputValue + * @property {MetricPattern19} outputValue * @property {_6bBlockTxindexPattern} fee * @property {_6bBlockTxindexPattern} feeRate */ @@ -4129,35 +4115,35 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Inputs - * @property {MetricPattern20} firstTxinindex - * @property {MetricPattern22} outpoint - * @property {MetricPattern22} txindex - * @property {MetricPattern22} outputtype - * @property {MetricPattern22} typeindex + * @property {MetricPattern18} firstTxinindex + * @property {MetricPattern20} outpoint + * @property {MetricPattern20} txindex + * @property {MetricPattern20} outputtype + * @property {MetricPattern20} typeindex * @property {MetricsTree_Inputs_Spent} spent * @property {AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern} count */ /** * @typedef {Object} MetricsTree_Inputs_Spent - * @property {MetricPattern22} txoutindex - * @property {MetricPattern22} value + * @property {MetricPattern20} txoutindex + * @property {MetricPattern20} value */ /** * @typedef {Object} MetricsTree_Outputs - * @property {MetricPattern20} firstTxoutindex - * @property {MetricPattern23} value - * @property {MetricPattern23} outputtype - * @property {MetricPattern23} typeindex - * @property {MetricPattern23} txindex + * @property {MetricPattern18} firstTxoutindex + * @property {MetricPattern21} value + * @property {MetricPattern21} outputtype + * @property {MetricPattern21} typeindex + * @property {MetricPattern21} txindex * @property {MetricsTree_Outputs_Spent} spent * @property {MetricsTree_Outputs_Count} count */ /** * @typedef {Object} MetricsTree_Outputs_Spent - * @property {MetricPattern23} txinindex + * @property {MetricPattern21} txinindex */ /** @@ -4168,34 +4154,34 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Addresses - * @property {MetricPattern20} firstP2pk65addressindex - * @property {MetricPattern20} firstP2pk33addressindex - * @property {MetricPattern20} firstP2pkhaddressindex - * @property {MetricPattern20} firstP2shaddressindex - * @property {MetricPattern20} firstP2wpkhaddressindex - * @property {MetricPattern20} firstP2wshaddressindex - * @property {MetricPattern20} firstP2traddressindex - * @property {MetricPattern20} firstP2aaddressindex - * @property {MetricPattern29} p2pk65bytes - * @property {MetricPattern28} p2pk33bytes - * @property {MetricPattern30} p2pkhbytes - * @property {MetricPattern31} p2shbytes - * @property {MetricPattern33} p2wpkhbytes - * @property {MetricPattern34} p2wshbytes - * @property {MetricPattern32} p2trbytes - * @property {MetricPattern26} p2abytes + * @property {MetricPattern18} firstP2pk65addressindex + * @property {MetricPattern18} firstP2pk33addressindex + * @property {MetricPattern18} firstP2pkhaddressindex + * @property {MetricPattern18} firstP2shaddressindex + * @property {MetricPattern18} firstP2wpkhaddressindex + * @property {MetricPattern18} firstP2wshaddressindex + * @property {MetricPattern18} firstP2traddressindex + * @property {MetricPattern18} firstP2aaddressindex + * @property {MetricPattern27} p2pk65bytes + * @property {MetricPattern26} p2pk33bytes + * @property {MetricPattern28} p2pkhbytes + * @property {MetricPattern29} p2shbytes + * @property {MetricPattern31} p2wpkhbytes + * @property {MetricPattern32} p2wshbytes + * @property {MetricPattern30} p2trbytes + * @property {MetricPattern24} p2abytes */ /** * @typedef {Object} MetricsTree_Scripts - * @property {MetricPattern20} firstEmptyoutputindex - * @property {MetricPattern20} firstOpreturnindex - * @property {MetricPattern20} firstP2msoutputindex - * @property {MetricPattern20} firstUnknownoutputindex - * @property {MetricPattern24} emptyToTxindex - * @property {MetricPattern25} opreturnToTxindex - * @property {MetricPattern27} p2msToTxindex - * @property {MetricPattern35} unknownToTxindex + * @property {MetricPattern18} firstEmptyoutputindex + * @property {MetricPattern18} firstOpreturnindex + * @property {MetricPattern18} firstP2msoutputindex + * @property {MetricPattern18} firstUnknownoutputindex + * @property {MetricPattern22} emptyToTxindex + * @property {MetricPattern23} opreturnToTxindex + * @property {MetricPattern25} p2msToTxindex + * @property {MetricPattern33} unknownToTxindex * @property {MetricsTree_Scripts_Count} count * @property {MetricsTree_Scripts_Value} value * @property {MetricsTree_Scripts_Adoption} adoption @@ -4277,8 +4263,8 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Positions - * @property {MetricPattern20} blockPosition - * @property {MetricPattern21} txPosition + * @property {MetricPattern18} blockPosition + * @property {MetricPattern19} txPosition */ /** @@ -4345,8 +4331,8 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Cointime_ReserveRisk - * @property {MetricPattern20} vocdd365dMedian - * @property {MetricPattern20} hodlBank + * @property {MetricPattern18} vocdd365dMedian + * @property {MetricPattern18} hodlBank * @property {MetricPattern1} reserveRisk */ @@ -4378,8 +4364,6 @@ function createRatioPattern2(client, acc) { * @property {MetricsTree_Indexes_Height} height * @property {MetricsTree_Indexes_Difficultyepoch} difficultyepoch * @property {MetricsTree_Indexes_Halvingepoch} halvingepoch - * @property {MetricsTree_Indexes_Minute1} minute1 - * @property {MetricsTree_Indexes_Minute5} minute5 * @property {MetricsTree_Indexes_Minute10} minute10 * @property {MetricsTree_Indexes_Minute30} minute30 * @property {MetricsTree_Indexes_Hour1} hour1 @@ -4416,213 +4400,199 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Indexes_Address_P2pk33 - * @property {MetricPattern28} identity + * @property {MetricPattern26} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_P2pk65 - * @property {MetricPattern29} identity + * @property {MetricPattern27} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_P2pkh - * @property {MetricPattern30} identity + * @property {MetricPattern28} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_P2sh - * @property {MetricPattern31} identity + * @property {MetricPattern29} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_P2tr - * @property {MetricPattern32} identity + * @property {MetricPattern30} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_P2wpkh - * @property {MetricPattern33} identity + * @property {MetricPattern31} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_P2wsh - * @property {MetricPattern34} identity + * @property {MetricPattern32} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_P2a - * @property {MetricPattern26} identity + * @property {MetricPattern24} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_P2ms - * @property {MetricPattern27} identity + * @property {MetricPattern25} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_Empty - * @property {MetricPattern24} identity + * @property {MetricPattern22} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_Unknown - * @property {MetricPattern35} identity + * @property {MetricPattern33} identity */ /** * @typedef {Object} MetricsTree_Indexes_Address_Opreturn - * @property {MetricPattern25} identity + * @property {MetricPattern23} identity */ /** * @typedef {Object} MetricsTree_Indexes_Height - * @property {MetricPattern20} identity - * @property {MetricPattern20} minute1 - * @property {MetricPattern20} minute5 - * @property {MetricPattern20} minute10 - * @property {MetricPattern20} minute30 - * @property {MetricPattern20} hour1 - * @property {MetricPattern20} hour4 - * @property {MetricPattern20} hour12 - * @property {MetricPattern20} day1 - * @property {MetricPattern20} day3 - * @property {MetricPattern20} difficultyepoch - * @property {MetricPattern20} halvingepoch - * @property {MetricPattern20} week1 - * @property {MetricPattern20} month1 - * @property {MetricPattern20} month3 - * @property {MetricPattern20} month6 - * @property {MetricPattern20} year1 - * @property {MetricPattern20} year10 - * @property {MetricPattern20} txindexCount + * @property {MetricPattern18} identity + * @property {MetricPattern18} minute10 + * @property {MetricPattern18} minute30 + * @property {MetricPattern18} hour1 + * @property {MetricPattern18} hour4 + * @property {MetricPattern18} hour12 + * @property {MetricPattern18} day1 + * @property {MetricPattern18} day3 + * @property {MetricPattern18} difficultyepoch + * @property {MetricPattern18} halvingepoch + * @property {MetricPattern18} week1 + * @property {MetricPattern18} month1 + * @property {MetricPattern18} month3 + * @property {MetricPattern18} month6 + * @property {MetricPattern18} year1 + * @property {MetricPattern18} year10 + * @property {MetricPattern18} txindexCount */ /** * @typedef {Object} MetricsTree_Indexes_Difficultyepoch - * @property {MetricPattern19} identity - * @property {MetricPattern19} firstHeight - * @property {MetricPattern19} heightCount + * @property {MetricPattern17} identity + * @property {MetricPattern17} firstHeight + * @property {MetricPattern17} heightCount */ /** * @typedef {Object} MetricsTree_Indexes_Halvingepoch - * @property {MetricPattern18} identity - * @property {MetricPattern18} firstHeight - */ - -/** - * @typedef {Object} MetricsTree_Indexes_Minute1 - * @property {MetricPattern3} identity - * @property {MetricPattern3} firstHeight - */ - -/** - * @typedef {Object} MetricsTree_Indexes_Minute5 - * @property {MetricPattern4} identity - * @property {MetricPattern4} firstHeight + * @property {MetricPattern16} identity + * @property {MetricPattern16} firstHeight */ /** * @typedef {Object} MetricsTree_Indexes_Minute10 - * @property {MetricPattern5} identity - * @property {MetricPattern5} firstHeight + * @property {MetricPattern3} identity + * @property {MetricPattern3} firstHeight */ /** * @typedef {Object} MetricsTree_Indexes_Minute30 - * @property {MetricPattern6} identity - * @property {MetricPattern6} firstHeight + * @property {MetricPattern4} identity + * @property {MetricPattern4} firstHeight */ /** * @typedef {Object} MetricsTree_Indexes_Hour1 - * @property {MetricPattern7} identity - * @property {MetricPattern7} firstHeight + * @property {MetricPattern5} identity + * @property {MetricPattern5} firstHeight */ /** * @typedef {Object} MetricsTree_Indexes_Hour4 - * @property {MetricPattern8} identity - * @property {MetricPattern8} firstHeight + * @property {MetricPattern6} identity + * @property {MetricPattern6} firstHeight */ /** * @typedef {Object} MetricsTree_Indexes_Hour12 - * @property {MetricPattern9} identity - * @property {MetricPattern9} firstHeight + * @property {MetricPattern7} identity + * @property {MetricPattern7} firstHeight */ /** * @typedef {Object} MetricsTree_Indexes_Day1 - * @property {MetricPattern10} identity - * @property {MetricPattern10} date - * @property {MetricPattern10} firstHeight - * @property {MetricPattern10} heightCount + * @property {MetricPattern8} identity + * @property {MetricPattern8} date + * @property {MetricPattern8} firstHeight + * @property {MetricPattern8} heightCount */ /** * @typedef {Object} MetricsTree_Indexes_Day3 - * @property {MetricPattern11} identity - * @property {MetricPattern11} firstHeight + * @property {MetricPattern9} identity + * @property {MetricPattern9} firstHeight */ /** * @typedef {Object} MetricsTree_Indexes_Week1 - * @property {MetricPattern12} identity + * @property {MetricPattern10} identity + * @property {MetricPattern10} date + * @property {MetricPattern10} firstHeight + */ + +/** + * @typedef {Object} MetricsTree_Indexes_Month1 + * @property {MetricPattern11} identity + * @property {MetricPattern11} date + * @property {MetricPattern11} firstHeight + */ + +/** + * @typedef {Object} MetricsTree_Indexes_Month3 + * @property {MetricPattern12} identity * @property {MetricPattern12} date * @property {MetricPattern12} firstHeight */ /** - * @typedef {Object} MetricsTree_Indexes_Month1 - * @property {MetricPattern13} identity + * @typedef {Object} MetricsTree_Indexes_Month6 + * @property {MetricPattern13} identity * @property {MetricPattern13} date * @property {MetricPattern13} firstHeight */ /** - * @typedef {Object} MetricsTree_Indexes_Month3 - * @property {MetricPattern14} identity + * @typedef {Object} MetricsTree_Indexes_Year1 + * @property {MetricPattern14} identity * @property {MetricPattern14} date * @property {MetricPattern14} firstHeight */ /** - * @typedef {Object} MetricsTree_Indexes_Month6 - * @property {MetricPattern15} identity + * @typedef {Object} MetricsTree_Indexes_Year10 + * @property {MetricPattern15} identity * @property {MetricPattern15} date * @property {MetricPattern15} firstHeight */ -/** - * @typedef {Object} MetricsTree_Indexes_Year1 - * @property {MetricPattern16} identity - * @property {MetricPattern16} date - * @property {MetricPattern16} firstHeight - */ - -/** - * @typedef {Object} MetricsTree_Indexes_Year10 - * @property {MetricPattern17} identity - * @property {MetricPattern17} date - * @property {MetricPattern17} firstHeight - */ - /** * @typedef {Object} MetricsTree_Indexes_Txindex - * @property {MetricPattern21} identity - * @property {MetricPattern21} inputCount - * @property {MetricPattern21} outputCount + * @property {MetricPattern19} identity + * @property {MetricPattern19} inputCount + * @property {MetricPattern19} outputCount */ /** * @typedef {Object} MetricsTree_Indexes_Txinindex - * @property {MetricPattern22} identity + * @property {MetricPattern20} identity */ /** * @typedef {Object} MetricsTree_Indexes_Txoutindex - * @property {MetricPattern23} identity + * @property {MetricPattern21} identity */ /** @@ -4671,7 +4641,7 @@ function createRatioPattern2(client, acc) { * @property {SdSmaPattern} _1dReturns1wSd * @property {SdSmaPattern} _1dReturns1mSd * @property {SdSmaPattern} _1dReturns1ySd - * @property {MetricPattern20} downsideReturns + * @property {MetricPattern18} downsideReturns * @property {SdSmaPattern} downside1wSd * @property {SdSmaPattern} downside1mSd * @property {SdSmaPattern} downside1ySd @@ -4763,7 +4733,7 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Market_Dca - * @property {MetricPattern20} dcaSatsPerDay + * @property {MetricPattern18} dcaSatsPerDay * @property {_10y1m1w1y2y3m3y4y5y6m6y8yPattern3} periodStack * @property {MetricsTree_Market_Dca_PeriodAveragePrice} periodAveragePrice * @property {_10y1m1w1y2y3m3y4y5y6m6y8yPattern2} periodReturns @@ -4992,7 +4962,7 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Pools - * @property {MetricPattern20} heightToPool + * @property {MetricPattern18} heightToPool * @property {MetricsTree_Pools_Vecs} vecs */ @@ -5200,7 +5170,7 @@ function createRatioPattern2(client, acc) { /** * @typedef {Object} MetricsTree_Distribution - * @property {MetricPattern20} supplyState + * @property {MetricPattern18} supplyState * @property {MetricsTree_Distribution_AnyAddressIndexes} anyAddressIndexes * @property {MetricsTree_Distribution_AddressesData} addressesData * @property {MetricsTree_Distribution_UtxoCohorts} utxoCohorts @@ -5211,26 +5181,26 @@ function createRatioPattern2(client, acc) { * @property {MetricsTree_Distribution_TotalAddrCount} totalAddrCount * @property {MetricsTree_Distribution_NewAddrCount} newAddrCount * @property {MetricsTree_Distribution_GrowthRate} growthRate - * @property {MetricPattern36} fundedaddressindex - * @property {MetricPattern37} emptyaddressindex + * @property {MetricPattern34} fundedaddressindex + * @property {MetricPattern35} emptyaddressindex */ /** * @typedef {Object} MetricsTree_Distribution_AnyAddressIndexes - * @property {MetricPattern26} p2a - * @property {MetricPattern28} p2pk33 - * @property {MetricPattern29} p2pk65 - * @property {MetricPattern30} p2pkh - * @property {MetricPattern31} p2sh - * @property {MetricPattern32} p2tr - * @property {MetricPattern33} p2wpkh - * @property {MetricPattern34} p2wsh + * @property {MetricPattern24} p2a + * @property {MetricPattern26} p2pk33 + * @property {MetricPattern27} p2pk65 + * @property {MetricPattern28} p2pkh + * @property {MetricPattern29} p2sh + * @property {MetricPattern30} p2tr + * @property {MetricPattern31} p2wpkh + * @property {MetricPattern32} p2wsh */ /** * @typedef {Object} MetricsTree_Distribution_AddressesData - * @property {MetricPattern36} funded - * @property {MetricPattern37} empty + * @property {MetricPattern34} funded + * @property {MetricPattern35} empty */ /** @@ -5601,8 +5571,6 @@ class BrkClient extends BrkClientBase { VERSION = "v0.1.9"; INDEXES = /** @type {const} */ ([ - "minute1", - "minute5", "minute10", "minute30", "hour1", @@ -6542,7 +6510,7 @@ class BrkClient extends BrkClientBase { _buildTree(basePath) { return { blocks: { - blockhash: createMetricPattern20(this, 'blockhash'), + blockhash: createMetricPattern18(this, 'blockhash'), difficulty: { raw: createMetricPattern1(this, 'difficulty'), asHash: createMetricPattern1(this, 'difficulty_as_hash'), @@ -6553,12 +6521,12 @@ class BrkClient extends BrkClientBase { }, time: { timestamp: createMetricPattern1(this, 'timestamp'), - date: createMetricPattern20(this, 'date'), - timestampMonotonic: createMetricPattern20(this, 'timestamp_monotonic'), + date: createMetricPattern18(this, 'date'), + timestampMonotonic: createMetricPattern18(this, 'timestamp_monotonic'), }, - totalSize: createMetricPattern20(this, 'total_size'), + totalSize: createMetricPattern18(this, 'total_size'), weight: { - base: createMetricPattern20(this, 'block_weight'), + base: createMetricPattern18(this, 'block_weight'), cumulative: createMetricPattern1(this, 'block_weight_cumulative'), sum: create_1y24h30d7dPattern(this, 'block_weight_sum'), average: create_1y24h30d7dPattern(this, 'block_weight_average'), @@ -6574,37 +6542,37 @@ class BrkClient extends BrkClientBase { blockCountTarget: createMetricPattern1(this, 'block_count_target'), blockCount: createCumulativeHeightSumPattern(this, 'block_count'), blockCountSum: create_1y24h30d7dPattern(this, 'block_count_sum'), - height1hAgo: createMetricPattern20(this, 'height_1h_ago'), - height24hAgo: createMetricPattern20(this, 'height_24h_ago'), - height3dAgo: createMetricPattern20(this, 'height_3d_ago'), - height1wAgo: createMetricPattern20(this, 'height_1w_ago'), - height8dAgo: createMetricPattern20(this, 'height_8d_ago'), - height9dAgo: createMetricPattern20(this, 'height_9d_ago'), - height12dAgo: createMetricPattern20(this, 'height_12d_ago'), - height13dAgo: createMetricPattern20(this, 'height_13d_ago'), - height2wAgo: createMetricPattern20(this, 'height_2w_ago'), - height21dAgo: createMetricPattern20(this, 'height_21d_ago'), - height26dAgo: createMetricPattern20(this, 'height_26d_ago'), - height1mAgo: createMetricPattern20(this, 'height_1m_ago'), - height34dAgo: createMetricPattern20(this, 'height_34d_ago'), - height55dAgo: createMetricPattern20(this, 'height_55d_ago'), - height2mAgo: createMetricPattern20(this, 'height_2m_ago'), - height89dAgo: createMetricPattern20(this, 'height_89d_ago'), - height111dAgo: createMetricPattern20(this, 'height_111d_ago'), - height144dAgo: createMetricPattern20(this, 'height_144d_ago'), - height3mAgo: createMetricPattern20(this, 'height_3m_ago'), - height6mAgo: createMetricPattern20(this, 'height_6m_ago'), - height200dAgo: createMetricPattern20(this, 'height_200d_ago'), - height350dAgo: createMetricPattern20(this, 'height_350d_ago'), - height1yAgo: createMetricPattern20(this, 'height_1y_ago'), - height2yAgo: createMetricPattern20(this, 'height_2y_ago'), - height200wAgo: createMetricPattern20(this, 'height_200w_ago'), - height3yAgo: createMetricPattern20(this, 'height_3y_ago'), - height4yAgo: createMetricPattern20(this, 'height_4y_ago'), - height5yAgo: createMetricPattern20(this, 'height_5y_ago'), - height6yAgo: createMetricPattern20(this, 'height_6y_ago'), - height8yAgo: createMetricPattern20(this, 'height_8y_ago'), - height10yAgo: createMetricPattern20(this, 'height_10y_ago'), + height1hAgo: createMetricPattern18(this, 'height_1h_ago'), + height24hAgo: createMetricPattern18(this, 'height_24h_ago'), + height3dAgo: createMetricPattern18(this, 'height_3d_ago'), + height1wAgo: createMetricPattern18(this, 'height_1w_ago'), + height8dAgo: createMetricPattern18(this, 'height_8d_ago'), + height9dAgo: createMetricPattern18(this, 'height_9d_ago'), + height12dAgo: createMetricPattern18(this, 'height_12d_ago'), + height13dAgo: createMetricPattern18(this, 'height_13d_ago'), + height2wAgo: createMetricPattern18(this, 'height_2w_ago'), + height21dAgo: createMetricPattern18(this, 'height_21d_ago'), + height26dAgo: createMetricPattern18(this, 'height_26d_ago'), + height1mAgo: createMetricPattern18(this, 'height_1m_ago'), + height34dAgo: createMetricPattern18(this, 'height_34d_ago'), + height55dAgo: createMetricPattern18(this, 'height_55d_ago'), + height2mAgo: createMetricPattern18(this, 'height_2m_ago'), + height89dAgo: createMetricPattern18(this, 'height_89d_ago'), + height111dAgo: createMetricPattern18(this, 'height_111d_ago'), + height144dAgo: createMetricPattern18(this, 'height_144d_ago'), + height3mAgo: createMetricPattern18(this, 'height_3m_ago'), + height6mAgo: createMetricPattern18(this, 'height_6m_ago'), + height200dAgo: createMetricPattern18(this, 'height_200d_ago'), + height350dAgo: createMetricPattern18(this, 'height_350d_ago'), + height1yAgo: createMetricPattern18(this, 'height_1y_ago'), + height2yAgo: createMetricPattern18(this, 'height_2y_ago'), + height200wAgo: createMetricPattern18(this, 'height_200w_ago'), + height3yAgo: createMetricPattern18(this, 'height_3y_ago'), + height4yAgo: createMetricPattern18(this, 'height_4y_ago'), + height5yAgo: createMetricPattern18(this, 'height_5y_ago'), + height6yAgo: createMetricPattern18(this, 'height_6y_ago'), + height8yAgo: createMetricPattern18(this, 'height_8y_ago'), + height10yAgo: createMetricPattern18(this, 'height_10y_ago'), }, interval: createAverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern(this, 'block_interval'), halving: { @@ -6628,27 +6596,27 @@ class BrkClient extends BrkClientBase { fullness: createAverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern(this, 'block_fullness'), }, transactions: { - firstTxindex: createMetricPattern20(this, 'first_txindex'), - height: createMetricPattern21(this, 'height'), - txid: createMetricPattern21(this, 'txid'), - txversion: createMetricPattern21(this, 'txversion'), - rawlocktime: createMetricPattern21(this, 'rawlocktime'), - baseSize: createMetricPattern21(this, 'base_size'), - totalSize: createMetricPattern21(this, 'total_size'), - isExplicitlyRbf: createMetricPattern21(this, 'is_explicitly_rbf'), - firstTxinindex: createMetricPattern21(this, 'first_txinindex'), - firstTxoutindex: createMetricPattern21(this, 'first_txoutindex'), + firstTxindex: createMetricPattern18(this, 'first_txindex'), + height: createMetricPattern19(this, 'height'), + txid: createMetricPattern19(this, 'txid'), + txversion: createMetricPattern19(this, 'txversion'), + rawlocktime: createMetricPattern19(this, 'rawlocktime'), + baseSize: createMetricPattern19(this, 'base_size'), + totalSize: createMetricPattern19(this, 'total_size'), + isExplicitlyRbf: createMetricPattern19(this, 'is_explicitly_rbf'), + firstTxinindex: createMetricPattern19(this, 'first_txinindex'), + firstTxoutindex: createMetricPattern19(this, 'first_txoutindex'), count: { txCount: createAverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern(this, 'tx_count'), - isCoinbase: createMetricPattern21(this, 'is_coinbase'), + isCoinbase: createMetricPattern19(this, 'is_coinbase'), }, size: { vsize: create_6bBlockTxindexPattern(this, 'tx_vsize'), weight: create_6bBlockTxindexPattern(this, 'tx_weight'), }, fees: { - inputValue: createMetricPattern21(this, 'input_value'), - outputValue: createMetricPattern21(this, 'output_value'), + inputValue: createMetricPattern19(this, 'input_value'), + outputValue: createMetricPattern19(this, 'output_value'), fee: create_6bBlockTxindexPattern(this, 'fee'), feeRate: create_6bBlockTxindexPattern(this, 'fee_rate'), }, @@ -6667,25 +6635,25 @@ class BrkClient extends BrkClientBase { }, }, inputs: { - firstTxinindex: createMetricPattern20(this, 'first_txinindex'), - outpoint: createMetricPattern22(this, 'outpoint'), - txindex: createMetricPattern22(this, 'txindex'), - outputtype: createMetricPattern22(this, 'outputtype'), - typeindex: createMetricPattern22(this, 'typeindex'), + firstTxinindex: createMetricPattern18(this, 'first_txinindex'), + outpoint: createMetricPattern20(this, 'outpoint'), + txindex: createMetricPattern20(this, 'txindex'), + outputtype: createMetricPattern20(this, 'outputtype'), + typeindex: createMetricPattern20(this, 'typeindex'), spent: { - txoutindex: createMetricPattern22(this, 'txoutindex'), - value: createMetricPattern22(this, 'value'), + txoutindex: createMetricPattern20(this, 'txoutindex'), + value: createMetricPattern20(this, 'value'), }, count: createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern(this, 'input_count'), }, outputs: { - firstTxoutindex: createMetricPattern20(this, 'first_txoutindex'), - value: createMetricPattern23(this, 'value'), - outputtype: createMetricPattern23(this, 'outputtype'), - typeindex: createMetricPattern23(this, 'typeindex'), - txindex: createMetricPattern23(this, 'txindex'), + firstTxoutindex: createMetricPattern18(this, 'first_txoutindex'), + value: createMetricPattern21(this, 'value'), + outputtype: createMetricPattern21(this, 'outputtype'), + typeindex: createMetricPattern21(this, 'typeindex'), + txindex: createMetricPattern21(this, 'txindex'), spent: { - txinindex: createMetricPattern23(this, 'txinindex'), + txinindex: createMetricPattern21(this, 'txinindex'), }, count: { totalCount: createAverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern(this, 'output_count'), @@ -6693,32 +6661,32 @@ class BrkClient extends BrkClientBase { }, }, addresses: { - firstP2pk65addressindex: createMetricPattern20(this, 'first_p2pk65addressindex'), - firstP2pk33addressindex: createMetricPattern20(this, 'first_p2pk33addressindex'), - firstP2pkhaddressindex: createMetricPattern20(this, 'first_p2pkhaddressindex'), - firstP2shaddressindex: createMetricPattern20(this, 'first_p2shaddressindex'), - firstP2wpkhaddressindex: createMetricPattern20(this, 'first_p2wpkhaddressindex'), - firstP2wshaddressindex: createMetricPattern20(this, 'first_p2wshaddressindex'), - firstP2traddressindex: createMetricPattern20(this, 'first_p2traddressindex'), - firstP2aaddressindex: createMetricPattern20(this, 'first_p2aaddressindex'), - p2pk65bytes: createMetricPattern29(this, 'p2pk65bytes'), - p2pk33bytes: createMetricPattern28(this, 'p2pk33bytes'), - p2pkhbytes: createMetricPattern30(this, 'p2pkhbytes'), - p2shbytes: createMetricPattern31(this, 'p2shbytes'), - p2wpkhbytes: createMetricPattern33(this, 'p2wpkhbytes'), - p2wshbytes: createMetricPattern34(this, 'p2wshbytes'), - p2trbytes: createMetricPattern32(this, 'p2trbytes'), - p2abytes: createMetricPattern26(this, 'p2abytes'), + firstP2pk65addressindex: createMetricPattern18(this, 'first_p2pk65addressindex'), + firstP2pk33addressindex: createMetricPattern18(this, 'first_p2pk33addressindex'), + firstP2pkhaddressindex: createMetricPattern18(this, 'first_p2pkhaddressindex'), + firstP2shaddressindex: createMetricPattern18(this, 'first_p2shaddressindex'), + firstP2wpkhaddressindex: createMetricPattern18(this, 'first_p2wpkhaddressindex'), + firstP2wshaddressindex: createMetricPattern18(this, 'first_p2wshaddressindex'), + firstP2traddressindex: createMetricPattern18(this, 'first_p2traddressindex'), + firstP2aaddressindex: createMetricPattern18(this, 'first_p2aaddressindex'), + p2pk65bytes: createMetricPattern27(this, 'p2pk65bytes'), + p2pk33bytes: createMetricPattern26(this, 'p2pk33bytes'), + p2pkhbytes: createMetricPattern28(this, 'p2pkhbytes'), + p2shbytes: createMetricPattern29(this, 'p2shbytes'), + p2wpkhbytes: createMetricPattern31(this, 'p2wpkhbytes'), + p2wshbytes: createMetricPattern32(this, 'p2wshbytes'), + p2trbytes: createMetricPattern30(this, 'p2trbytes'), + p2abytes: createMetricPattern24(this, 'p2abytes'), }, scripts: { - firstEmptyoutputindex: createMetricPattern20(this, 'first_emptyoutputindex'), - firstOpreturnindex: createMetricPattern20(this, 'first_opreturnindex'), - firstP2msoutputindex: createMetricPattern20(this, 'first_p2msoutputindex'), - firstUnknownoutputindex: createMetricPattern20(this, 'first_unknownoutputindex'), - emptyToTxindex: createMetricPattern24(this, 'txindex'), - opreturnToTxindex: createMetricPattern25(this, 'txindex'), - p2msToTxindex: createMetricPattern27(this, 'txindex'), - unknownToTxindex: createMetricPattern35(this, 'txindex'), + firstEmptyoutputindex: createMetricPattern18(this, 'first_emptyoutputindex'), + firstOpreturnindex: createMetricPattern18(this, 'first_opreturnindex'), + firstP2msoutputindex: createMetricPattern18(this, 'first_p2msoutputindex'), + firstUnknownoutputindex: createMetricPattern18(this, 'first_unknownoutputindex'), + emptyToTxindex: createMetricPattern22(this, 'txindex'), + opreturnToTxindex: createMetricPattern23(this, 'txindex'), + p2msToTxindex: createMetricPattern25(this, 'txindex'), + unknownToTxindex: createMetricPattern33(this, 'txindex'), count: { p2a: createCumulativeHeightSumPattern(this, 'p2a_count'), p2ms: createCumulativeHeightSumPattern(this, 'p2ms_count'), @@ -6781,8 +6749,8 @@ class BrkClient extends BrkClientBase { }, }, positions: { - blockPosition: createMetricPattern20(this, 'position'), - txPosition: createMetricPattern21(this, 'position'), + blockPosition: createMetricPattern18(this, 'position'), + txPosition: createMetricPattern19(this, 'position'), }, cointime: { activity: { @@ -6825,8 +6793,8 @@ class BrkClient extends BrkClientBase { cointimeAdjTxUsdVelocity: createMetricPattern1(this, 'cointime_adj_tx_usd_velocity'), }, reserveRisk: { - vocdd365dMedian: createMetricPattern20(this, 'vocdd_365d_median'), - hodlBank: createMetricPattern20(this, 'hodl_bank'), + vocdd365dMedian: createMetricPattern18(this, 'vocdd_365d_median'), + hodlBank: createMetricPattern18(this, 'hodl_bank'), reserveRisk: createMetricPattern1(this, 'reserve_risk'), }, }, @@ -6853,150 +6821,140 @@ class BrkClient extends BrkClientBase { indexes: { address: { p2pk33: { - identity: createMetricPattern28(this, 'p2pk33addressindex'), + identity: createMetricPattern26(this, 'p2pk33addressindex'), }, p2pk65: { - identity: createMetricPattern29(this, 'p2pk65addressindex'), + identity: createMetricPattern27(this, 'p2pk65addressindex'), }, p2pkh: { - identity: createMetricPattern30(this, 'p2pkhaddressindex'), + identity: createMetricPattern28(this, 'p2pkhaddressindex'), }, p2sh: { - identity: createMetricPattern31(this, 'p2shaddressindex'), + identity: createMetricPattern29(this, 'p2shaddressindex'), }, p2tr: { - identity: createMetricPattern32(this, 'p2traddressindex'), + identity: createMetricPattern30(this, 'p2traddressindex'), }, p2wpkh: { - identity: createMetricPattern33(this, 'p2wpkhaddressindex'), + identity: createMetricPattern31(this, 'p2wpkhaddressindex'), }, p2wsh: { - identity: createMetricPattern34(this, 'p2wshaddressindex'), + identity: createMetricPattern32(this, 'p2wshaddressindex'), }, p2a: { - identity: createMetricPattern26(this, 'p2aaddressindex'), + identity: createMetricPattern24(this, 'p2aaddressindex'), }, p2ms: { - identity: createMetricPattern27(this, 'p2msoutputindex'), + identity: createMetricPattern25(this, 'p2msoutputindex'), }, empty: { - identity: createMetricPattern24(this, 'emptyoutputindex'), + identity: createMetricPattern22(this, 'emptyoutputindex'), }, unknown: { - identity: createMetricPattern35(this, 'unknownoutputindex'), + identity: createMetricPattern33(this, 'unknownoutputindex'), }, opreturn: { - identity: createMetricPattern25(this, 'opreturnindex'), + identity: createMetricPattern23(this, 'opreturnindex'), }, }, height: { - identity: createMetricPattern20(this, 'height'), - minute1: createMetricPattern20(this, 'minute1'), - minute5: createMetricPattern20(this, 'minute5'), - minute10: createMetricPattern20(this, 'minute10'), - minute30: createMetricPattern20(this, 'minute30'), - hour1: createMetricPattern20(this, 'hour1'), - hour4: createMetricPattern20(this, 'hour4'), - hour12: createMetricPattern20(this, 'hour12'), - day1: createMetricPattern20(this, 'day1'), - day3: createMetricPattern20(this, 'day3'), - difficultyepoch: createMetricPattern20(this, 'difficultyepoch'), - halvingepoch: createMetricPattern20(this, 'halvingepoch'), - week1: createMetricPattern20(this, 'week1'), - month1: createMetricPattern20(this, 'month1'), - month3: createMetricPattern20(this, 'month3'), - month6: createMetricPattern20(this, 'month6'), - year1: createMetricPattern20(this, 'year1'), - year10: createMetricPattern20(this, 'year10'), - txindexCount: createMetricPattern20(this, 'txindex_count'), + identity: createMetricPattern18(this, 'height'), + minute10: createMetricPattern18(this, 'minute10'), + minute30: createMetricPattern18(this, 'minute30'), + hour1: createMetricPattern18(this, 'hour1'), + hour4: createMetricPattern18(this, 'hour4'), + hour12: createMetricPattern18(this, 'hour12'), + day1: createMetricPattern18(this, 'day1'), + day3: createMetricPattern18(this, 'day3'), + difficultyepoch: createMetricPattern18(this, 'difficultyepoch'), + halvingepoch: createMetricPattern18(this, 'halvingepoch'), + week1: createMetricPattern18(this, 'week1'), + month1: createMetricPattern18(this, 'month1'), + month3: createMetricPattern18(this, 'month3'), + month6: createMetricPattern18(this, 'month6'), + year1: createMetricPattern18(this, 'year1'), + year10: createMetricPattern18(this, 'year10'), + txindexCount: createMetricPattern18(this, 'txindex_count'), }, difficultyepoch: { - identity: createMetricPattern19(this, 'difficultyepoch'), - firstHeight: createMetricPattern19(this, 'first_height'), - heightCount: createMetricPattern19(this, 'height_count'), + identity: createMetricPattern17(this, 'difficultyepoch'), + firstHeight: createMetricPattern17(this, 'first_height'), + heightCount: createMetricPattern17(this, 'height_count'), }, halvingepoch: { - identity: createMetricPattern18(this, 'halvingepoch'), - firstHeight: createMetricPattern18(this, 'first_height'), - }, - minute1: { - identity: createMetricPattern3(this, 'minute1'), - firstHeight: createMetricPattern3(this, 'minute1_first_height'), - }, - minute5: { - identity: createMetricPattern4(this, 'minute5'), - firstHeight: createMetricPattern4(this, 'minute5_first_height'), + identity: createMetricPattern16(this, 'halvingepoch'), + firstHeight: createMetricPattern16(this, 'first_height'), }, minute10: { - identity: createMetricPattern5(this, 'minute10'), - firstHeight: createMetricPattern5(this, 'minute10_first_height'), + identity: createMetricPattern3(this, 'minute10'), + firstHeight: createMetricPattern3(this, 'minute10_first_height'), }, minute30: { - identity: createMetricPattern6(this, 'minute30'), - firstHeight: createMetricPattern6(this, 'minute30_first_height'), + identity: createMetricPattern4(this, 'minute30'), + firstHeight: createMetricPattern4(this, 'minute30_first_height'), }, hour1: { - identity: createMetricPattern7(this, 'hour1'), - firstHeight: createMetricPattern7(this, 'hour1_first_height'), + identity: createMetricPattern5(this, 'hour1'), + firstHeight: createMetricPattern5(this, 'hour1_first_height'), }, hour4: { - identity: createMetricPattern8(this, 'hour4'), - firstHeight: createMetricPattern8(this, 'hour4_first_height'), + identity: createMetricPattern6(this, 'hour4'), + firstHeight: createMetricPattern6(this, 'hour4_first_height'), }, hour12: { - identity: createMetricPattern9(this, 'hour12'), - firstHeight: createMetricPattern9(this, 'hour12_first_height'), + identity: createMetricPattern7(this, 'hour12'), + firstHeight: createMetricPattern7(this, 'hour12_first_height'), }, day1: { - identity: createMetricPattern10(this, 'day1'), - date: createMetricPattern10(this, 'date'), - firstHeight: createMetricPattern10(this, 'first_height'), - heightCount: createMetricPattern10(this, 'height_count'), + identity: createMetricPattern8(this, 'day1'), + date: createMetricPattern8(this, 'date'), + firstHeight: createMetricPattern8(this, 'first_height'), + heightCount: createMetricPattern8(this, 'height_count'), }, day3: { - identity: createMetricPattern11(this, 'day3'), - firstHeight: createMetricPattern11(this, 'day3_first_height'), + identity: createMetricPattern9(this, 'day3'), + firstHeight: createMetricPattern9(this, 'day3_first_height'), }, week1: { - identity: createMetricPattern12(this, 'week1'), - date: createMetricPattern12(this, 'date'), - firstHeight: createMetricPattern12(this, 'week1_first_height'), + identity: createMetricPattern10(this, 'week1'), + date: createMetricPattern10(this, 'date'), + firstHeight: createMetricPattern10(this, 'week1_first_height'), }, month1: { - identity: createMetricPattern13(this, 'month1'), - date: createMetricPattern13(this, 'date'), - firstHeight: createMetricPattern13(this, 'month1_first_height'), + identity: createMetricPattern11(this, 'month1'), + date: createMetricPattern11(this, 'date'), + firstHeight: createMetricPattern11(this, 'month1_first_height'), }, month3: { - identity: createMetricPattern14(this, 'month3'), - date: createMetricPattern14(this, 'date'), - firstHeight: createMetricPattern14(this, 'month3_first_height'), + identity: createMetricPattern12(this, 'month3'), + date: createMetricPattern12(this, 'date'), + firstHeight: createMetricPattern12(this, 'month3_first_height'), }, month6: { - identity: createMetricPattern15(this, 'month6'), - date: createMetricPattern15(this, 'date'), - firstHeight: createMetricPattern15(this, 'month6_first_height'), + identity: createMetricPattern13(this, 'month6'), + date: createMetricPattern13(this, 'date'), + firstHeight: createMetricPattern13(this, 'month6_first_height'), }, year1: { - identity: createMetricPattern16(this, 'year1'), - date: createMetricPattern16(this, 'date'), - firstHeight: createMetricPattern16(this, 'year1_first_height'), + identity: createMetricPattern14(this, 'year1'), + date: createMetricPattern14(this, 'date'), + firstHeight: createMetricPattern14(this, 'year1_first_height'), }, year10: { - identity: createMetricPattern17(this, 'year10'), - date: createMetricPattern17(this, 'date'), - firstHeight: createMetricPattern17(this, 'year10_first_height'), + identity: createMetricPattern15(this, 'year10'), + date: createMetricPattern15(this, 'date'), + firstHeight: createMetricPattern15(this, 'year10_first_height'), }, txindex: { - identity: createMetricPattern21(this, 'txindex'), - inputCount: createMetricPattern21(this, 'input_count'), - outputCount: createMetricPattern21(this, 'output_count'), + identity: createMetricPattern19(this, 'txindex'), + inputCount: createMetricPattern19(this, 'input_count'), + outputCount: createMetricPattern19(this, 'output_count'), }, txinindex: { - identity: createMetricPattern22(this, 'txinindex'), + identity: createMetricPattern20(this, 'txinindex'), }, txoutindex: { - identity: createMetricPattern23(this, 'txoutindex'), + identity: createMetricPattern21(this, 'txoutindex'), }, }, market: { @@ -7043,7 +7001,7 @@ class BrkClient extends BrkClientBase { _1dReturns1wSd: createSdSmaPattern(this, '1d_returns_1w_sd'), _1dReturns1mSd: createSdSmaPattern(this, '1d_returns_1m_sd'), _1dReturns1ySd: createSdSmaPattern(this, '1d_returns_1y_sd'), - downsideReturns: createMetricPattern20(this, 'downside_returns'), + downsideReturns: createMetricPattern18(this, 'downside_returns'), downside1wSd: createSdSmaPattern(this, 'downside_1w_sd'), downside1mSd: createSdSmaPattern(this, 'downside_1m_sd'), downside1ySd: createSdSmaPattern(this, 'downside_1y_sd'), @@ -7110,7 +7068,7 @@ class BrkClient extends BrkClientBase { price350dSmaX2: createSatsUsdPattern(this, 'price_350d_sma_x2'), }, dca: { - dcaSatsPerDay: createMetricPattern20(this, 'dca_sats_per_day'), + dcaSatsPerDay: createMetricPattern18(this, 'dca_sats_per_day'), periodStack: create_10y1m1w1y2y3m3y4y5y6m6y8yPattern3(this, 'dca_stack'), periodAveragePrice: { _1w: createSatsUsdPattern(this, '1w_dca_average_price'), @@ -7291,7 +7249,7 @@ class BrkClient extends BrkClientBase { }, }, pools: { - heightToPool: createMetricPattern20(this, 'pool'), + heightToPool: createMetricPattern18(this, 'pool'), vecs: { unknown: createBlocksCoinbaseDaysDominanceFeeSubsidyPattern(this, 'unknown'), blockfills: createBlocksCoinbaseDaysDominanceFeeSubsidyPattern(this, 'blockfills'), @@ -7480,20 +7438,20 @@ class BrkClient extends BrkClientBase { }, }, distribution: { - supplyState: createMetricPattern20(this, 'supply_state'), + supplyState: createMetricPattern18(this, 'supply_state'), anyAddressIndexes: { - p2a: createMetricPattern26(this, 'anyaddressindex'), - p2pk33: createMetricPattern28(this, 'anyaddressindex'), - p2pk65: createMetricPattern29(this, 'anyaddressindex'), - p2pkh: createMetricPattern30(this, 'anyaddressindex'), - p2sh: createMetricPattern31(this, 'anyaddressindex'), - p2tr: createMetricPattern32(this, 'anyaddressindex'), - p2wpkh: createMetricPattern33(this, 'anyaddressindex'), - p2wsh: createMetricPattern34(this, 'anyaddressindex'), + p2a: createMetricPattern24(this, 'anyaddressindex'), + p2pk33: createMetricPattern26(this, 'anyaddressindex'), + p2pk65: createMetricPattern27(this, 'anyaddressindex'), + p2pkh: createMetricPattern28(this, 'anyaddressindex'), + p2sh: createMetricPattern29(this, 'anyaddressindex'), + p2tr: createMetricPattern30(this, 'anyaddressindex'), + p2wpkh: createMetricPattern31(this, 'anyaddressindex'), + p2wsh: createMetricPattern32(this, 'anyaddressindex'), }, addressesData: { - funded: createMetricPattern36(this, 'fundedaddressdata'), - empty: createMetricPattern37(this, 'emptyaddressdata'), + funded: createMetricPattern34(this, 'fundedaddressdata'), + empty: createMetricPattern35(this, 'emptyaddressdata'), }, utxoCohorts: { all: { @@ -7776,8 +7734,8 @@ class BrkClient extends BrkClientBase { p2tr: createAverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern(this, 'p2tr_growth_rate'), p2a: createAverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern(this, 'p2a_growth_rate'), }, - fundedaddressindex: createMetricPattern36(this, 'fundedaddressindex'), - emptyaddressindex: createMetricPattern37(this, 'emptyaddressindex'), + fundedaddressindex: createMetricPattern34(this, 'fundedaddressindex'), + emptyaddressindex: createMetricPattern35(this, 'emptyaddressindex'), }, supply: { circulating: createBtcSatsUsdPattern(this, 'circulating_supply'), diff --git a/packages/brk_client/brk_client/__init__.py b/packages/brk_client/brk_client/__init__.py index 48422af48..51326843d 100644 --- a/packages/brk_client/brk_client/__init__.py +++ b/packages/brk_client/brk_client/__init__.py @@ -99,10 +99,8 @@ Metric = str Version = int # Comma-separated list of metric names Metrics = str -Minute1 = int Minute10 = int Minute30 = int -Minute5 = int Month1 = int Month3 = int Month6 = int @@ -180,7 +178,7 @@ Year1 = int Year10 = int # Aggregation dimension for querying metrics. Includes time-based (date, week, month, year), # block-based (height, txindex), and address/output type indexes. -Index = Literal["minute1", "minute5", "minute10", "minute30", "hour1", "hour4", "hour12", "day1", "day3", "week1", "month1", "month3", "month6", "year1", "year10", "halvingepoch", "difficultyepoch", "height", "txindex", "txinindex", "txoutindex", "emptyoutputindex", "opreturnindex", "p2aaddressindex", "p2msoutputindex", "p2pk33addressindex", "p2pk65addressindex", "p2pkhaddressindex", "p2shaddressindex", "p2traddressindex", "p2wpkhaddressindex", "p2wshaddressindex", "unknownoutputindex", "fundedaddressindex", "emptyaddressindex", "pairoutputindex"] +Index = Literal["minute10", "minute30", "hour1", "hour4", "hour12", "day1", "day3", "week1", "month1", "month3", "month6", "year1", "year10", "halvingepoch", "difficultyepoch", "height", "txindex", "txinindex", "txoutindex", "emptyoutputindex", "opreturnindex", "p2aaddressindex", "p2msoutputindex", "p2pk33addressindex", "p2pk65addressindex", "p2pkhaddressindex", "p2shaddressindex", "p2traddressindex", "p2wpkhaddressindex", "p2wshaddressindex", "unknownoutputindex", "fundedaddressindex", "emptyaddressindex", "pairoutputindex"] # Hierarchical tree node for organizing metrics into categories TreeNode = Union[dict[str, "TreeNode"], "MetricLeafWithSchema"] class AddressChainStats(TypedDict): @@ -1114,7 +1112,7 @@ _GENESIS = date(2009, 1, 3) # day1 0, week1 0 _DAY_ONE = date(2009, 1, 9) # day1 1 (6 day gap after genesis) _EPOCH = datetime(2009, 1, 1, tzinfo=timezone.utc) _DATE_INDEXES = frozenset([ - 'minute1', 'minute5', 'minute10', 'minute30', + 'minute10', 'minute30', 'hour1', 'hour4', 'hour12', 'day1', 'day3', 'week1', 'month1', 'month3', 'month6', @@ -1123,11 +1121,7 @@ _DATE_INDEXES = frozenset([ def _index_to_date(index: str, i: int) -> Union[date, datetime]: """Convert an index value to a date/datetime for date-based indexes.""" - if index == 'minute1': - return _EPOCH + timedelta(minutes=i) - elif index == 'minute5': - return _EPOCH + timedelta(minutes=i * 5) - elif index == 'minute10': + if index == 'minute10': return _EPOCH + timedelta(minutes=i * 10) elif index == 'minute30': return _EPOCH + timedelta(minutes=i * 30) @@ -1165,13 +1159,13 @@ def _date_to_index(index: str, d: Union[date, datetime]) -> int: Returns the floor index (latest index whose date is <= the given date). For sub-day indexes (minute*, hour*), a plain date is treated as midnight UTC. """ - if index in ('minute1', 'minute5', 'minute10', 'minute30', 'hour1', 'hour4', 'hour12'): + if index in ('minute10', 'minute30', 'hour1', 'hour4', 'hour12'): if isinstance(d, datetime): dt = d if d.tzinfo else d.replace(tzinfo=timezone.utc) else: dt = datetime(d.year, d.month, d.day, tzinfo=timezone.utc) secs = int((dt - _EPOCH).total_seconds()) - div = {'minute1': 60, 'minute5': 300, 'minute10': 600, 'minute30': 1800, + div = {'minute10': 600, 'minute30': 1800, 'hour1': 3600, 'hour4': 14400, 'hour12': 43200} return secs // div[index] dd = d.date() if isinstance(d, datetime) else d @@ -1556,43 +1550,41 @@ class MetricPattern(Protocol[T]): # Static index tuples -_i1 = ('minute1', 'minute5', 'minute10', 'minute30', 'hour1', 'hour4', 'hour12', 'day1', 'day3', 'week1', 'month1', 'month3', 'month6', 'year1', 'year10', 'halvingepoch', 'difficultyepoch', 'height') -_i2 = ('minute1', 'minute5', 'minute10', 'minute30', 'hour1', 'hour4', 'hour12', 'day1', 'day3', 'week1', 'month1', 'month3', 'month6', 'year1', 'year10', 'halvingepoch', 'difficultyepoch') -_i3 = ('minute1',) -_i4 = ('minute5',) -_i5 = ('minute10',) -_i6 = ('minute30',) -_i7 = ('hour1',) -_i8 = ('hour4',) -_i9 = ('hour12',) -_i10 = ('day1',) -_i11 = ('day3',) -_i12 = ('week1',) -_i13 = ('month1',) -_i14 = ('month3',) -_i15 = ('month6',) -_i16 = ('year1',) -_i17 = ('year10',) -_i18 = ('halvingepoch',) -_i19 = ('difficultyepoch',) -_i20 = ('height',) -_i21 = ('txindex',) -_i22 = ('txinindex',) -_i23 = ('txoutindex',) -_i24 = ('emptyoutputindex',) -_i25 = ('opreturnindex',) -_i26 = ('p2aaddressindex',) -_i27 = ('p2msoutputindex',) -_i28 = ('p2pk33addressindex',) -_i29 = ('p2pk65addressindex',) -_i30 = ('p2pkhaddressindex',) -_i31 = ('p2shaddressindex',) -_i32 = ('p2traddressindex',) -_i33 = ('p2wpkhaddressindex',) -_i34 = ('p2wshaddressindex',) -_i35 = ('unknownoutputindex',) -_i36 = ('fundedaddressindex',) -_i37 = ('emptyaddressindex',) +_i1 = ('minute10', 'minute30', 'hour1', 'hour4', 'hour12', 'day1', 'day3', 'week1', 'month1', 'month3', 'month6', 'year1', 'year10', 'halvingepoch', 'difficultyepoch', 'height') +_i2 = ('minute10', 'minute30', 'hour1', 'hour4', 'hour12', 'day1', 'day3', 'week1', 'month1', 'month3', 'month6', 'year1', 'year10', 'halvingepoch', 'difficultyepoch') +_i3 = ('minute10',) +_i4 = ('minute30',) +_i5 = ('hour1',) +_i6 = ('hour4',) +_i7 = ('hour12',) +_i8 = ('day1',) +_i9 = ('day3',) +_i10 = ('week1',) +_i11 = ('month1',) +_i12 = ('month3',) +_i13 = ('month6',) +_i14 = ('year1',) +_i15 = ('year10',) +_i16 = ('halvingepoch',) +_i17 = ('difficultyepoch',) +_i18 = ('height',) +_i19 = ('txindex',) +_i20 = ('txinindex',) +_i21 = ('txoutindex',) +_i22 = ('emptyoutputindex',) +_i23 = ('opreturnindex',) +_i24 = ('p2aaddressindex',) +_i25 = ('p2msoutputindex',) +_i26 = ('p2pk33addressindex',) +_i27 = ('p2pk65addressindex',) +_i28 = ('p2pkhaddressindex',) +_i29 = ('p2shaddressindex',) +_i30 = ('p2traddressindex',) +_i31 = ('p2wpkhaddressindex',) +_i32 = ('p2wshaddressindex',) +_i33 = ('unknownoutputindex',) +_i34 = ('fundedaddressindex',) +_i35 = ('emptyaddressindex',) def _ep(c: BrkClientBase, n: str, i: Index) -> MetricEndpointBuilder[Any]: return MetricEndpointBuilder(c, n, i) @@ -1604,8 +1596,6 @@ def _dep(c: BrkClientBase, n: str, i: Index) -> DateMetricEndpointBuilder[Any]: class _MetricPattern1By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def minute1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute1') - def minute5(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute5') def minute10(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute10') def minute30(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute30') def hour1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'hour1') @@ -1633,8 +1623,6 @@ class MetricPattern1(Generic[T]): class _MetricPattern2By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def minute1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute1') - def minute5(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute5') def minute10(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute10') def minute30(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute30') def hour1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'hour1') @@ -1661,7 +1649,7 @@ class MetricPattern2(Generic[T]): class _MetricPattern3By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def minute1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute1') + def minute10(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute10') class MetricPattern3(Generic[T]): by: _MetricPattern3By[T] @@ -1673,7 +1661,7 @@ class MetricPattern3(Generic[T]): class _MetricPattern4By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def minute5(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute5') + def minute30(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute30') class MetricPattern4(Generic[T]): by: _MetricPattern4By[T] @@ -1685,7 +1673,7 @@ class MetricPattern4(Generic[T]): class _MetricPattern5By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def minute10(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute10') + def hour1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'hour1') class MetricPattern5(Generic[T]): by: _MetricPattern5By[T] @@ -1697,7 +1685,7 @@ class MetricPattern5(Generic[T]): class _MetricPattern6By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def minute30(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'minute30') + def hour4(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'hour4') class MetricPattern6(Generic[T]): by: _MetricPattern6By[T] @@ -1709,7 +1697,7 @@ class MetricPattern6(Generic[T]): class _MetricPattern7By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def hour1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'hour1') + def hour12(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'hour12') class MetricPattern7(Generic[T]): by: _MetricPattern7By[T] @@ -1721,7 +1709,7 @@ class MetricPattern7(Generic[T]): class _MetricPattern8By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def hour4(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'hour4') + def day1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'day1') class MetricPattern8(Generic[T]): by: _MetricPattern8By[T] @@ -1733,7 +1721,7 @@ class MetricPattern8(Generic[T]): class _MetricPattern9By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def hour12(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'hour12') + def day3(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'day3') class MetricPattern9(Generic[T]): by: _MetricPattern9By[T] @@ -1745,7 +1733,7 @@ class MetricPattern9(Generic[T]): class _MetricPattern10By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def day1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'day1') + def week1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'week1') class MetricPattern10(Generic[T]): by: _MetricPattern10By[T] @@ -1757,7 +1745,7 @@ class MetricPattern10(Generic[T]): class _MetricPattern11By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def day3(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'day3') + def month1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'month1') class MetricPattern11(Generic[T]): by: _MetricPattern11By[T] @@ -1769,7 +1757,7 @@ class MetricPattern11(Generic[T]): class _MetricPattern12By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def week1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'week1') + def month3(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'month3') class MetricPattern12(Generic[T]): by: _MetricPattern12By[T] @@ -1781,7 +1769,7 @@ class MetricPattern12(Generic[T]): class _MetricPattern13By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def month1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'month1') + def month6(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'month6') class MetricPattern13(Generic[T]): by: _MetricPattern13By[T] @@ -1793,7 +1781,7 @@ class MetricPattern13(Generic[T]): class _MetricPattern14By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def month3(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'month3') + def year1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'year1') class MetricPattern14(Generic[T]): by: _MetricPattern14By[T] @@ -1805,7 +1793,7 @@ class MetricPattern14(Generic[T]): class _MetricPattern15By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def month6(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'month6') + def year10(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'year10') class MetricPattern15(Generic[T]): by: _MetricPattern15By[T] @@ -1817,7 +1805,7 @@ class MetricPattern15(Generic[T]): class _MetricPattern16By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def year1(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'year1') + def halvingepoch(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'halvingepoch') class MetricPattern16(Generic[T]): by: _MetricPattern16By[T] @@ -1829,7 +1817,7 @@ class MetricPattern16(Generic[T]): class _MetricPattern17By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def year10(self) -> DateMetricEndpointBuilder[T]: return _dep(self._c, self._n, 'year10') + def difficultyepoch(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'difficultyepoch') class MetricPattern17(Generic[T]): by: _MetricPattern17By[T] @@ -1841,7 +1829,7 @@ class MetricPattern17(Generic[T]): class _MetricPattern18By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def halvingepoch(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'halvingepoch') + def height(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'height') class MetricPattern18(Generic[T]): by: _MetricPattern18By[T] @@ -1853,7 +1841,7 @@ class MetricPattern18(Generic[T]): class _MetricPattern19By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def difficultyepoch(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'difficultyepoch') + def txindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'txindex') class MetricPattern19(Generic[T]): by: _MetricPattern19By[T] @@ -1865,7 +1853,7 @@ class MetricPattern19(Generic[T]): class _MetricPattern20By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def height(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'height') + def txinindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'txinindex') class MetricPattern20(Generic[T]): by: _MetricPattern20By[T] @@ -1877,7 +1865,7 @@ class MetricPattern20(Generic[T]): class _MetricPattern21By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def txindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'txindex') + def txoutindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'txoutindex') class MetricPattern21(Generic[T]): by: _MetricPattern21By[T] @@ -1889,7 +1877,7 @@ class MetricPattern21(Generic[T]): class _MetricPattern22By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def txinindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'txinindex') + def emptyoutputindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'emptyoutputindex') class MetricPattern22(Generic[T]): by: _MetricPattern22By[T] @@ -1901,7 +1889,7 @@ class MetricPattern22(Generic[T]): class _MetricPattern23By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def txoutindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'txoutindex') + def opreturnindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'opreturnindex') class MetricPattern23(Generic[T]): by: _MetricPattern23By[T] @@ -1913,7 +1901,7 @@ class MetricPattern23(Generic[T]): class _MetricPattern24By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def emptyoutputindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'emptyoutputindex') + def p2aaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2aaddressindex') class MetricPattern24(Generic[T]): by: _MetricPattern24By[T] @@ -1925,7 +1913,7 @@ class MetricPattern24(Generic[T]): class _MetricPattern25By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def opreturnindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'opreturnindex') + def p2msoutputindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2msoutputindex') class MetricPattern25(Generic[T]): by: _MetricPattern25By[T] @@ -1937,7 +1925,7 @@ class MetricPattern25(Generic[T]): class _MetricPattern26By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def p2aaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2aaddressindex') + def p2pk33addressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2pk33addressindex') class MetricPattern26(Generic[T]): by: _MetricPattern26By[T] @@ -1949,7 +1937,7 @@ class MetricPattern26(Generic[T]): class _MetricPattern27By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def p2msoutputindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2msoutputindex') + def p2pk65addressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2pk65addressindex') class MetricPattern27(Generic[T]): by: _MetricPattern27By[T] @@ -1961,7 +1949,7 @@ class MetricPattern27(Generic[T]): class _MetricPattern28By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def p2pk33addressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2pk33addressindex') + def p2pkhaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2pkhaddressindex') class MetricPattern28(Generic[T]): by: _MetricPattern28By[T] @@ -1973,7 +1961,7 @@ class MetricPattern28(Generic[T]): class _MetricPattern29By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def p2pk65addressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2pk65addressindex') + def p2shaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2shaddressindex') class MetricPattern29(Generic[T]): by: _MetricPattern29By[T] @@ -1985,7 +1973,7 @@ class MetricPattern29(Generic[T]): class _MetricPattern30By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def p2pkhaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2pkhaddressindex') + def p2traddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2traddressindex') class MetricPattern30(Generic[T]): by: _MetricPattern30By[T] @@ -1997,7 +1985,7 @@ class MetricPattern30(Generic[T]): class _MetricPattern31By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def p2shaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2shaddressindex') + def p2wpkhaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2wpkhaddressindex') class MetricPattern31(Generic[T]): by: _MetricPattern31By[T] @@ -2009,7 +1997,7 @@ class MetricPattern31(Generic[T]): class _MetricPattern32By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def p2traddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2traddressindex') + def p2wshaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2wshaddressindex') class MetricPattern32(Generic[T]): by: _MetricPattern32By[T] @@ -2021,7 +2009,7 @@ class MetricPattern32(Generic[T]): class _MetricPattern33By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def p2wpkhaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2wpkhaddressindex') + def unknownoutputindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'unknownoutputindex') class MetricPattern33(Generic[T]): by: _MetricPattern33By[T] @@ -2033,7 +2021,7 @@ class MetricPattern33(Generic[T]): class _MetricPattern34By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def p2wshaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'p2wshaddressindex') + def fundedaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'fundedaddressindex') class MetricPattern34(Generic[T]): by: _MetricPattern34By[T] @@ -2045,7 +2033,7 @@ class MetricPattern34(Generic[T]): class _MetricPattern35By(Generic[T]): def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def unknownoutputindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'unknownoutputindex') + def emptyaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'emptyaddressindex') class MetricPattern35(Generic[T]): by: _MetricPattern35By[T] @@ -2055,30 +2043,6 @@ class MetricPattern35(Generic[T]): def indexes(self) -> List[str]: return list(_i35) def get(self, index: Index) -> Optional[MetricEndpointBuilder[T]]: return _ep(self.by._c, self._n, index) if index in _i35 else None -class _MetricPattern36By(Generic[T]): - def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def fundedaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'fundedaddressindex') - -class MetricPattern36(Generic[T]): - by: _MetricPattern36By[T] - def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern36By(c, n) - @property - def name(self) -> str: return self._n - def indexes(self) -> List[str]: return list(_i36) - def get(self, index: Index) -> Optional[MetricEndpointBuilder[T]]: return _ep(self.by._c, self._n, index) if index in _i36 else None - -class _MetricPattern37By(Generic[T]): - def __init__(self, c: BrkClientBase, n: str): self._c, self._n = c, n - def emptyaddressindex(self) -> MetricEndpointBuilder[T]: return _ep(self._c, self._n, 'emptyaddressindex') - -class MetricPattern37(Generic[T]): - by: _MetricPattern37By[T] - def __init__(self, c: BrkClientBase, n: str): self._n, self.by = n, _MetricPattern37By(c, n) - @property - def name(self) -> str: return self._n - def indexes(self) -> List[str]: return list(_i37) - def get(self, index: Index) -> Optional[MetricEndpointBuilder[T]]: return _ep(self.by._c, self._n, index) if index in _i37 else None - # Reusable structural pattern classes class AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTotalUpperValuePattern: @@ -2105,9 +2069,9 @@ class AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSe self.adjusted_value_destroyed_24h: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'adjusted_value_destroyed_24h')) self.adjusted_value_destroyed_30d: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'adjusted_value_destroyed_30d')) self.adjusted_value_destroyed_7d: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'adjusted_value_destroyed_7d')) - self.cap_raw: MetricPattern20[CentsSats] = MetricPattern20(client, _m(acc, 'cap_raw')) + self.cap_raw: MetricPattern18[CentsSats] = MetricPattern18(client, _m(acc, 'cap_raw')) self.capitulation_flow: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'capitulation_flow')) - self.investor_cap_raw: MetricPattern20[CentsSquaredSats] = MetricPattern20(client, _m(acc, 'investor_cap_raw')) + self.investor_cap_raw: MetricPattern18[CentsSquaredSats] = MetricPattern18(client, _m(acc, 'investor_cap_raw')) self.investor_price: SatsUsdPattern = SatsUsdPattern(client, _m(acc, 'investor_price')) self.investor_price_cents: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'investor_price_cents')) self.investor_price_extra: RatioPattern2 = RatioPattern2(client, _m(acc, 'investor_price_ratio')) @@ -2217,9 +2181,9 @@ class AdjustedCapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSe self.adjusted_value_destroyed_24h: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'adjusted_value_destroyed_24h')) self.adjusted_value_destroyed_30d: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'adjusted_value_destroyed_30d')) self.adjusted_value_destroyed_7d: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'adjusted_value_destroyed_7d')) - self.cap_raw: MetricPattern20[CentsSats] = MetricPattern20(client, _m(acc, 'cap_raw')) + self.cap_raw: MetricPattern18[CentsSats] = MetricPattern18(client, _m(acc, 'cap_raw')) self.capitulation_flow: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'capitulation_flow')) - self.investor_cap_raw: MetricPattern20[CentsSquaredSats] = MetricPattern20(client, _m(acc, 'investor_cap_raw')) + self.investor_cap_raw: MetricPattern18[CentsSquaredSats] = MetricPattern18(client, _m(acc, 'investor_cap_raw')) self.investor_price: SatsUsdPattern = SatsUsdPattern(client, _m(acc, 'investor_price')) self.investor_price_cents: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'investor_price_cents')) self.investor_price_extra: RatioPattern2 = RatioPattern2(client, _m(acc, 'investor_price_ratio')) @@ -2295,9 +2259,9 @@ class CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTo def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.cap_raw: MetricPattern20[CentsSats] = MetricPattern20(client, _m(acc, 'cap_raw')) + self.cap_raw: MetricPattern18[CentsSats] = MetricPattern18(client, _m(acc, 'cap_raw')) self.capitulation_flow: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'capitulation_flow')) - self.investor_cap_raw: MetricPattern20[CentsSquaredSats] = MetricPattern20(client, _m(acc, 'investor_cap_raw')) + self.investor_cap_raw: MetricPattern18[CentsSquaredSats] = MetricPattern18(client, _m(acc, 'investor_cap_raw')) self.investor_price: SatsUsdPattern = SatsUsdPattern(client, _m(acc, 'investor_price')) self.investor_price_cents: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'investor_price_cents')) self.investor_price_extra: RatioPattern2 = RatioPattern2(client, _m(acc, 'investor_price_ratio')) @@ -2388,9 +2352,9 @@ class CapCapitulationInvestorLossLowerMvrvNegNetPeakProfitRealizedSellSentSoprTo def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.cap_raw: MetricPattern20[CentsSats] = MetricPattern20(client, _m(acc, 'cap_raw')) + self.cap_raw: MetricPattern18[CentsSats] = MetricPattern18(client, _m(acc, 'cap_raw')) self.capitulation_flow: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'capitulation_flow')) - self.investor_cap_raw: MetricPattern20[CentsSquaredSats] = MetricPattern20(client, _m(acc, 'investor_cap_raw')) + self.investor_cap_raw: MetricPattern18[CentsSquaredSats] = MetricPattern18(client, _m(acc, 'investor_cap_raw')) self.investor_price: SatsUsdPattern = SatsUsdPattern(client, _m(acc, 'investor_price')) self.investor_price_cents: MetricPattern1[Cents] = MetricPattern1(client, _m(acc, 'investor_price_cents')) self.investor_price_extra: RatioPattern2 = RatioPattern2(client, _m(acc, 'investor_price_ratio')) @@ -2629,11 +2593,11 @@ class GreedInvestedInvestorNegNetPainPeakSupplyTotalUnrealizedPattern: """Create pattern node with accumulated metric name.""" self.greed_index: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'greed_index')) self.invested_capital_in_loss: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'invested_capital_in_loss')) - self.invested_capital_in_loss_raw: MetricPattern20[CentsSats] = MetricPattern20(client, _m(acc, 'invested_capital_in_loss_raw')) + self.invested_capital_in_loss_raw: MetricPattern18[CentsSats] = MetricPattern18(client, _m(acc, 'invested_capital_in_loss_raw')) self.invested_capital_in_profit: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'invested_capital_in_profit')) - self.invested_capital_in_profit_raw: MetricPattern20[CentsSats] = MetricPattern20(client, _m(acc, 'invested_capital_in_profit_raw')) - self.investor_cap_in_loss_raw: MetricPattern20[CentsSquaredSats] = MetricPattern20(client, _m(acc, 'investor_cap_in_loss_raw')) - self.investor_cap_in_profit_raw: MetricPattern20[CentsSquaredSats] = MetricPattern20(client, _m(acc, 'investor_cap_in_profit_raw')) + self.invested_capital_in_profit_raw: MetricPattern18[CentsSats] = MetricPattern18(client, _m(acc, 'invested_capital_in_profit_raw')) + self.investor_cap_in_loss_raw: MetricPattern18[CentsSquaredSats] = MetricPattern18(client, _m(acc, 'investor_cap_in_loss_raw')) + self.investor_cap_in_profit_raw: MetricPattern18[CentsSquaredSats] = MetricPattern18(client, _m(acc, 'investor_cap_in_profit_raw')) self.neg_unrealized_loss: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'neg_unrealized_loss')) self.net_sentiment: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'net_sentiment')) self.net_unrealized_pnl: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'net_unrealized_pnl')) @@ -2652,11 +2616,11 @@ class GreedInvestedInvestorNegNetPainSupplyTotalUnrealizedPattern: """Create pattern node with accumulated metric name.""" self.greed_index: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'greed_index')) self.invested_capital_in_loss: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'invested_capital_in_loss')) - self.invested_capital_in_loss_raw: MetricPattern20[CentsSats] = MetricPattern20(client, _m(acc, 'invested_capital_in_loss_raw')) + self.invested_capital_in_loss_raw: MetricPattern18[CentsSats] = MetricPattern18(client, _m(acc, 'invested_capital_in_loss_raw')) self.invested_capital_in_profit: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'invested_capital_in_profit')) - self.invested_capital_in_profit_raw: MetricPattern20[CentsSats] = MetricPattern20(client, _m(acc, 'invested_capital_in_profit_raw')) - self.investor_cap_in_loss_raw: MetricPattern20[CentsSquaredSats] = MetricPattern20(client, _m(acc, 'investor_cap_in_loss_raw')) - self.investor_cap_in_profit_raw: MetricPattern20[CentsSquaredSats] = MetricPattern20(client, _m(acc, 'investor_cap_in_profit_raw')) + self.invested_capital_in_profit_raw: MetricPattern18[CentsSats] = MetricPattern18(client, _m(acc, 'invested_capital_in_profit_raw')) + self.investor_cap_in_loss_raw: MetricPattern18[CentsSquaredSats] = MetricPattern18(client, _m(acc, 'investor_cap_in_loss_raw')) + self.investor_cap_in_profit_raw: MetricPattern18[CentsSquaredSats] = MetricPattern18(client, _m(acc, 'investor_cap_in_profit_raw')) self.neg_unrealized_loss: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'neg_unrealized_loss')) self.net_sentiment: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'net_sentiment')) self.net_unrealized_pnl: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'net_unrealized_pnl')) @@ -2784,17 +2748,17 @@ class AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.average: MetricPattern20[StoredU64] = MetricPattern20(client, _m(acc, 'average')) - self.cumulative: MetricPattern20[StoredU64] = MetricPattern20(client, _m(acc, 'cumulative')) - self.max: MetricPattern20[StoredU64] = MetricPattern20(client, _m(acc, 'max')) - self.median: MetricPattern20[StoredU64] = MetricPattern20(client, _m(acc, 'median')) - self.min: MetricPattern20[StoredU64] = MetricPattern20(client, _m(acc, 'min')) - self.pct10: MetricPattern20[StoredU64] = MetricPattern20(client, _m(acc, 'pct10')) - self.pct25: MetricPattern20[StoredU64] = MetricPattern20(client, _m(acc, 'pct25')) - self.pct75: MetricPattern20[StoredU64] = MetricPattern20(client, _m(acc, 'pct75')) - self.pct90: MetricPattern20[StoredU64] = MetricPattern20(client, _m(acc, 'pct90')) + self.average: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'average')) + self.cumulative: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'cumulative')) + self.max: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'max')) + self.median: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'median')) + self.min: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'min')) + self.pct10: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'pct10')) + self.pct25: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'pct25')) + self.pct75: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'pct75')) + self.pct90: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'pct90')) self.rolling: AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern = AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) - self.sum: MetricPattern20[StoredU64] = MetricPattern20(client, _m(acc, 'sum')) + self.sum: MetricPattern18[StoredU64] = MetricPattern18(client, _m(acc, 'sum')) class AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern: """Pattern struct for repeated tree structure.""" @@ -2803,7 +2767,7 @@ class AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern: """Create pattern node with accumulated metric name.""" self.average: _1y24h30d7dPattern[StoredU64] = _1y24h30d7dPattern(client, _m(acc, 'average')) self.cumulative: MetricPattern1[StoredU64] = MetricPattern1(client, _m(acc, 'cumulative')) - self.height: MetricPattern20[StoredU64] = MetricPattern20(client, acc) + self.height: MetricPattern18[StoredU64] = MetricPattern18(client, acc) self.max: _1y24h30d7dPattern[StoredU64] = _1y24h30d7dPattern(client, _m(acc, 'max')) self.median: _1y24h30d7dPattern[StoredU64] = _1y24h30d7dPattern(client, _m(acc, 'median')) self.min: _1y24h30d7dPattern[StoredU64] = _1y24h30d7dPattern(client, _m(acc, 'min')) @@ -2895,7 +2859,7 @@ class AverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern(Generic[T]): def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" self.average: _1y24h30d7dPattern[T] = _1y24h30d7dPattern(client, _m(acc, 'average')) - self.height: MetricPattern20[T] = MetricPattern20(client, acc) + self.height: MetricPattern18[T] = MetricPattern18(client, acc) self.max: _1y24h30d7dPattern[T] = _1y24h30d7dPattern(client, _m(acc, 'max')) self.median: _1y24h30d7dPattern[T] = _1y24h30d7dPattern(client, _m(acc, 'median')) self.min: _1y24h30d7dPattern[T] = _1y24h30d7dPattern(client, _m(acc, 'min')) @@ -2909,14 +2873,14 @@ class AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(Generic[T]): def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" - self.average: MetricPattern20[T] = MetricPattern20(client, _m(acc, 'average')) - self.max: MetricPattern20[T] = MetricPattern20(client, _m(acc, 'max')) - self.median: MetricPattern20[T] = MetricPattern20(client, _m(acc, 'median')) - self.min: MetricPattern20[T] = MetricPattern20(client, _m(acc, 'min')) - self.pct10: MetricPattern20[T] = MetricPattern20(client, _m(acc, 'pct10')) - self.pct25: MetricPattern20[T] = MetricPattern20(client, _m(acc, 'pct25')) - self.pct75: MetricPattern20[T] = MetricPattern20(client, _m(acc, 'pct75')) - self.pct90: MetricPattern20[T] = MetricPattern20(client, _m(acc, 'pct90')) + self.average: MetricPattern18[T] = MetricPattern18(client, _m(acc, 'average')) + self.max: MetricPattern18[T] = MetricPattern18(client, _m(acc, 'max')) + self.median: MetricPattern18[T] = MetricPattern18(client, _m(acc, 'median')) + self.min: MetricPattern18[T] = MetricPattern18(client, _m(acc, 'min')) + self.pct10: MetricPattern18[T] = MetricPattern18(client, _m(acc, 'pct10')) + self.pct25: MetricPattern18[T] = MetricPattern18(client, _m(acc, 'pct25')) + self.pct75: MetricPattern18[T] = MetricPattern18(client, _m(acc, 'pct75')) + self.pct90: MetricPattern18[T] = MetricPattern18(client, _m(acc, 'pct90')) class _10y2y3y4y5y6y8yPattern: """Pattern struct for repeated tree structure.""" @@ -2940,9 +2904,9 @@ class _1y24h30d7dBtcSatsUsdPattern: self._24h: BtcSatsUsdPattern = BtcSatsUsdPattern(client, _m(acc, '24h')) self._30d: BtcSatsUsdPattern = BtcSatsUsdPattern(client, _m(acc, '30d')) self._7d: BtcSatsUsdPattern = BtcSatsUsdPattern(client, _m(acc, '7d')) - self.btc: MetricPattern20[Bitcoin] = MetricPattern20(client, _m(acc, 'btc')) - self.sats: MetricPattern20[Sats] = MetricPattern20(client, acc) - self.usd: MetricPattern20[Dollars] = MetricPattern20(client, _m(acc, 'usd')) + self.btc: MetricPattern18[Bitcoin] = MetricPattern18(client, _m(acc, 'btc')) + self.sats: MetricPattern18[Sats] = MetricPattern18(client, acc) + self.usd: MetricPattern18[Dollars] = MetricPattern18(client, _m(acc, 'usd')) class ActivityCostOutputsRealizedRelativeSupplyUnrealizedPattern: """Pattern struct for repeated tree structure.""" @@ -3027,8 +2991,8 @@ class CoinblocksCoindaysSatblocksSatdaysSentPattern: """Create pattern node with accumulated metric name.""" self.coinblocks_destroyed: CumulativeHeightSumPattern[StoredF64] = CumulativeHeightSumPattern(client, _m(acc, 'coinblocks_destroyed')) self.coindays_destroyed: CumulativeHeightSumPattern[StoredF64] = CumulativeHeightSumPattern(client, _m(acc, 'coindays_destroyed')) - self.satblocks_destroyed: MetricPattern20[Sats] = MetricPattern20(client, _m(acc, 'satblocks_destroyed')) - self.satdays_destroyed: MetricPattern20[Sats] = MetricPattern20(client, _m(acc, 'satdays_destroyed')) + self.satblocks_destroyed: MetricPattern18[Sats] = MetricPattern18(client, _m(acc, 'satblocks_destroyed')) + self.satdays_destroyed: MetricPattern18[Sats] = MetricPattern18(client, _m(acc, 'satdays_destroyed')) self.sent: BaseCumulativePattern = BaseCumulativePattern(client, _m(acc, 'sent')) self.sent_14d_ema: BtcSatsUsdPattern = BtcSatsUsdPattern(client, _m(acc, 'sent_14d_ema')) @@ -3116,7 +3080,7 @@ class _6bBlockTxindexPattern(Generic[T]): """Create pattern node with accumulated metric name.""" self._6b: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern[T] = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, _m(acc, '6b')) self.block: AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern[T] = AverageMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, acc) - self.txindex: MetricPattern21[T] = MetricPattern21(client, acc) + self.txindex: MetricPattern19[T] = MetricPattern19(client, acc) class CumulativeHeightSumPattern(Generic[T]): """Pattern struct for repeated tree structure.""" @@ -3124,7 +3088,7 @@ class CumulativeHeightSumPattern(Generic[T]): def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" self.cumulative: MetricPattern1[T] = MetricPattern1(client, _m(acc, 'cumulative')) - self.height: MetricPattern20[T] = MetricPattern20(client, acc) + self.height: MetricPattern18[T] = MetricPattern18(client, acc) self.sum: _1y24h30d7dPattern[T] = _1y24h30d7dPattern(client, acc) class _30dCountPattern: @@ -3149,7 +3113,7 @@ class CumulativeHeightPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated metric name.""" self.cumulative: MetricPattern1[Dollars] = MetricPattern1(client, _m(acc, 'cumulative')) - self.height: MetricPattern20[Dollars] = MetricPattern20(client, acc) + self.height: MetricPattern18[Dollars] = MetricPattern18(client, acc) class MaxMinPattern: """Pattern struct for repeated tree structure.""" @@ -3208,14 +3172,14 @@ class MetricsTree_Blocks_Time: def __init__(self, client: BrkClientBase, base_path: str = ''): self.timestamp: MetricPattern1[Timestamp] = MetricPattern1(client, 'timestamp') - self.date: MetricPattern20[Date] = MetricPattern20(client, 'date') - self.timestamp_monotonic: MetricPattern20[Timestamp] = MetricPattern20(client, 'timestamp_monotonic') + self.date: MetricPattern18[Date] = MetricPattern18(client, 'date') + self.timestamp_monotonic: MetricPattern18[Timestamp] = MetricPattern18(client, 'timestamp_monotonic') class MetricsTree_Blocks_Weight: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.base: MetricPattern20[Weight] = MetricPattern20(client, 'block_weight') + self.base: MetricPattern18[Weight] = MetricPattern18(client, 'block_weight') self.cumulative: MetricPattern1[Weight] = MetricPattern1(client, 'block_weight_cumulative') self.sum: _1y24h30d7dPattern[Weight] = _1y24h30d7dPattern(client, 'block_weight_sum') self.average: _1y24h30d7dPattern[Weight] = _1y24h30d7dPattern(client, 'block_weight_average') @@ -3234,37 +3198,37 @@ class MetricsTree_Blocks_Count: self.block_count_target: MetricPattern1[StoredU64] = MetricPattern1(client, 'block_count_target') self.block_count: CumulativeHeightSumPattern[StoredU32] = CumulativeHeightSumPattern(client, 'block_count') self.block_count_sum: _1y24h30d7dPattern[StoredU32] = _1y24h30d7dPattern(client, 'block_count_sum') - self.height_1h_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_1h_ago') - self.height_24h_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_24h_ago') - self.height_3d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_3d_ago') - self.height_1w_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_1w_ago') - self.height_8d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_8d_ago') - self.height_9d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_9d_ago') - self.height_12d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_12d_ago') - self.height_13d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_13d_ago') - self.height_2w_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_2w_ago') - self.height_21d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_21d_ago') - self.height_26d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_26d_ago') - self.height_1m_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_1m_ago') - self.height_34d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_34d_ago') - self.height_55d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_55d_ago') - self.height_2m_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_2m_ago') - self.height_89d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_89d_ago') - self.height_111d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_111d_ago') - self.height_144d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_144d_ago') - self.height_3m_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_3m_ago') - self.height_6m_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_6m_ago') - self.height_200d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_200d_ago') - self.height_350d_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_350d_ago') - self.height_1y_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_1y_ago') - self.height_2y_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_2y_ago') - self.height_200w_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_200w_ago') - self.height_3y_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_3y_ago') - self.height_4y_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_4y_ago') - self.height_5y_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_5y_ago') - self.height_6y_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_6y_ago') - self.height_8y_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_8y_ago') - self.height_10y_ago: MetricPattern20[Height] = MetricPattern20(client, 'height_10y_ago') + self.height_1h_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_1h_ago') + self.height_24h_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_24h_ago') + self.height_3d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_3d_ago') + self.height_1w_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_1w_ago') + self.height_8d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_8d_ago') + self.height_9d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_9d_ago') + self.height_12d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_12d_ago') + self.height_13d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_13d_ago') + self.height_2w_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_2w_ago') + self.height_21d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_21d_ago') + self.height_26d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_26d_ago') + self.height_1m_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_1m_ago') + self.height_34d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_34d_ago') + self.height_55d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_55d_ago') + self.height_2m_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_2m_ago') + self.height_89d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_89d_ago') + self.height_111d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_111d_ago') + self.height_144d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_144d_ago') + self.height_3m_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_3m_ago') + self.height_6m_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_6m_ago') + self.height_200d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_200d_ago') + self.height_350d_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_350d_ago') + self.height_1y_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_1y_ago') + self.height_2y_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_2y_ago') + self.height_200w_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_200w_ago') + self.height_3y_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_3y_ago') + self.height_4y_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_4y_ago') + self.height_5y_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_5y_ago') + self.height_6y_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_6y_ago') + self.height_8y_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_8y_ago') + self.height_10y_ago: MetricPattern18[Height] = MetricPattern18(client, 'height_10y_ago') class MetricsTree_Blocks_Halving: """Metrics tree node.""" @@ -3293,10 +3257,10 @@ class MetricsTree_Blocks: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.blockhash: MetricPattern20[BlockHash] = MetricPattern20(client, 'blockhash') + self.blockhash: MetricPattern18[BlockHash] = MetricPattern18(client, 'blockhash') self.difficulty: MetricsTree_Blocks_Difficulty = MetricsTree_Blocks_Difficulty(client) self.time: MetricsTree_Blocks_Time = MetricsTree_Blocks_Time(client) - self.total_size: MetricPattern20[StoredU64] = MetricPattern20(client, 'total_size') + self.total_size: MetricPattern18[StoredU64] = MetricPattern18(client, 'total_size') self.weight: MetricsTree_Blocks_Weight = MetricsTree_Blocks_Weight(client) self.count: MetricsTree_Blocks_Count = MetricsTree_Blocks_Count(client) self.interval: AverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern[Timestamp] = AverageHeightMaxMedianMinPct10Pct25Pct75Pct90Pattern(client, 'block_interval') @@ -3310,7 +3274,7 @@ class MetricsTree_Transactions_Count: def __init__(self, client: BrkClientBase, base_path: str = ''): self.tx_count: AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern = AverageCumulativeHeightMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, 'tx_count') - self.is_coinbase: MetricPattern21[StoredBool] = MetricPattern21(client, 'is_coinbase') + self.is_coinbase: MetricPattern19[StoredBool] = MetricPattern19(client, 'is_coinbase') class MetricsTree_Transactions_Size: """Metrics tree node.""" @@ -3323,8 +3287,8 @@ class MetricsTree_Transactions_Fees: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.input_value: MetricPattern21[Sats] = MetricPattern21(client, 'input_value') - self.output_value: MetricPattern21[Sats] = MetricPattern21(client, 'output_value') + self.input_value: MetricPattern19[Sats] = MetricPattern19(client, 'input_value') + self.output_value: MetricPattern19[Sats] = MetricPattern19(client, 'output_value') self.fee: _6bBlockTxindexPattern[Sats] = _6bBlockTxindexPattern(client, 'fee') self.fee_rate: _6bBlockTxindexPattern[FeeRate] = _6bBlockTxindexPattern(client, 'fee_rate') @@ -3351,16 +3315,16 @@ class MetricsTree_Transactions: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.first_txindex: MetricPattern20[TxIndex] = MetricPattern20(client, 'first_txindex') - self.height: MetricPattern21[Height] = MetricPattern21(client, 'height') - self.txid: MetricPattern21[Txid] = MetricPattern21(client, 'txid') - self.txversion: MetricPattern21[TxVersion] = MetricPattern21(client, 'txversion') - self.rawlocktime: MetricPattern21[RawLockTime] = MetricPattern21(client, 'rawlocktime') - self.base_size: MetricPattern21[StoredU32] = MetricPattern21(client, 'base_size') - self.total_size: MetricPattern21[StoredU32] = MetricPattern21(client, 'total_size') - self.is_explicitly_rbf: MetricPattern21[StoredBool] = MetricPattern21(client, 'is_explicitly_rbf') - self.first_txinindex: MetricPattern21[TxInIndex] = MetricPattern21(client, 'first_txinindex') - self.first_txoutindex: MetricPattern21[TxOutIndex] = MetricPattern21(client, 'first_txoutindex') + self.first_txindex: MetricPattern18[TxIndex] = MetricPattern18(client, 'first_txindex') + self.height: MetricPattern19[Height] = MetricPattern19(client, 'height') + self.txid: MetricPattern19[Txid] = MetricPattern19(client, 'txid') + self.txversion: MetricPattern19[TxVersion] = MetricPattern19(client, 'txversion') + self.rawlocktime: MetricPattern19[RawLockTime] = MetricPattern19(client, 'rawlocktime') + self.base_size: MetricPattern19[StoredU32] = MetricPattern19(client, 'base_size') + self.total_size: MetricPattern19[StoredU32] = MetricPattern19(client, 'total_size') + self.is_explicitly_rbf: MetricPattern19[StoredBool] = MetricPattern19(client, 'is_explicitly_rbf') + self.first_txinindex: MetricPattern19[TxInIndex] = MetricPattern19(client, 'first_txinindex') + self.first_txoutindex: MetricPattern19[TxOutIndex] = MetricPattern19(client, 'first_txoutindex') self.count: MetricsTree_Transactions_Count = MetricsTree_Transactions_Count(client) self.size: MetricsTree_Transactions_Size = MetricsTree_Transactions_Size(client) self.fees: MetricsTree_Transactions_Fees = MetricsTree_Transactions_Fees(client) @@ -3371,18 +3335,18 @@ class MetricsTree_Inputs_Spent: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.txoutindex: MetricPattern22[TxOutIndex] = MetricPattern22(client, 'txoutindex') - self.value: MetricPattern22[Sats] = MetricPattern22(client, 'value') + self.txoutindex: MetricPattern20[TxOutIndex] = MetricPattern20(client, 'txoutindex') + self.value: MetricPattern20[Sats] = MetricPattern20(client, 'value') class MetricsTree_Inputs: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.first_txinindex: MetricPattern20[TxInIndex] = MetricPattern20(client, 'first_txinindex') - self.outpoint: MetricPattern22[OutPoint] = MetricPattern22(client, 'outpoint') - self.txindex: MetricPattern22[TxIndex] = MetricPattern22(client, 'txindex') - self.outputtype: MetricPattern22[OutputType] = MetricPattern22(client, 'outputtype') - self.typeindex: MetricPattern22[TypeIndex] = MetricPattern22(client, 'typeindex') + self.first_txinindex: MetricPattern18[TxInIndex] = MetricPattern18(client, 'first_txinindex') + self.outpoint: MetricPattern20[OutPoint] = MetricPattern20(client, 'outpoint') + self.txindex: MetricPattern20[TxIndex] = MetricPattern20(client, 'txindex') + self.outputtype: MetricPattern20[OutputType] = MetricPattern20(client, 'outputtype') + self.typeindex: MetricPattern20[TypeIndex] = MetricPattern20(client, 'typeindex') self.spent: MetricsTree_Inputs_Spent = MetricsTree_Inputs_Spent(client) self.count: AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern = AverageCumulativeMaxMedianMinPct10Pct25Pct75Pct90RollingSumPattern(client, 'input_count') @@ -3390,7 +3354,7 @@ class MetricsTree_Outputs_Spent: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.txinindex: MetricPattern23[TxInIndex] = MetricPattern23(client, 'txinindex') + self.txinindex: MetricPattern21[TxInIndex] = MetricPattern21(client, 'txinindex') class MetricsTree_Outputs_Count: """Metrics tree node.""" @@ -3403,11 +3367,11 @@ class MetricsTree_Outputs: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.first_txoutindex: MetricPattern20[TxOutIndex] = MetricPattern20(client, 'first_txoutindex') - self.value: MetricPattern23[Sats] = MetricPattern23(client, 'value') - self.outputtype: MetricPattern23[OutputType] = MetricPattern23(client, 'outputtype') - self.typeindex: MetricPattern23[TypeIndex] = MetricPattern23(client, 'typeindex') - self.txindex: MetricPattern23[TxIndex] = MetricPattern23(client, 'txindex') + self.first_txoutindex: MetricPattern18[TxOutIndex] = MetricPattern18(client, 'first_txoutindex') + self.value: MetricPattern21[Sats] = MetricPattern21(client, 'value') + self.outputtype: MetricPattern21[OutputType] = MetricPattern21(client, 'outputtype') + self.typeindex: MetricPattern21[TypeIndex] = MetricPattern21(client, 'typeindex') + self.txindex: MetricPattern21[TxIndex] = MetricPattern21(client, 'txindex') self.spent: MetricsTree_Outputs_Spent = MetricsTree_Outputs_Spent(client) self.count: MetricsTree_Outputs_Count = MetricsTree_Outputs_Count(client) @@ -3415,22 +3379,22 @@ class MetricsTree_Addresses: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.first_p2pk65addressindex: MetricPattern20[P2PK65AddressIndex] = MetricPattern20(client, 'first_p2pk65addressindex') - self.first_p2pk33addressindex: MetricPattern20[P2PK33AddressIndex] = MetricPattern20(client, 'first_p2pk33addressindex') - self.first_p2pkhaddressindex: MetricPattern20[P2PKHAddressIndex] = MetricPattern20(client, 'first_p2pkhaddressindex') - self.first_p2shaddressindex: MetricPattern20[P2SHAddressIndex] = MetricPattern20(client, 'first_p2shaddressindex') - self.first_p2wpkhaddressindex: MetricPattern20[P2WPKHAddressIndex] = MetricPattern20(client, 'first_p2wpkhaddressindex') - self.first_p2wshaddressindex: MetricPattern20[P2WSHAddressIndex] = MetricPattern20(client, 'first_p2wshaddressindex') - self.first_p2traddressindex: MetricPattern20[P2TRAddressIndex] = MetricPattern20(client, 'first_p2traddressindex') - self.first_p2aaddressindex: MetricPattern20[P2AAddressIndex] = MetricPattern20(client, 'first_p2aaddressindex') - self.p2pk65bytes: MetricPattern29[P2PK65Bytes] = MetricPattern29(client, 'p2pk65bytes') - self.p2pk33bytes: MetricPattern28[P2PK33Bytes] = MetricPattern28(client, 'p2pk33bytes') - self.p2pkhbytes: MetricPattern30[P2PKHBytes] = MetricPattern30(client, 'p2pkhbytes') - self.p2shbytes: MetricPattern31[P2SHBytes] = MetricPattern31(client, 'p2shbytes') - self.p2wpkhbytes: MetricPattern33[P2WPKHBytes] = MetricPattern33(client, 'p2wpkhbytes') - self.p2wshbytes: MetricPattern34[P2WSHBytes] = MetricPattern34(client, 'p2wshbytes') - self.p2trbytes: MetricPattern32[P2TRBytes] = MetricPattern32(client, 'p2trbytes') - self.p2abytes: MetricPattern26[P2ABytes] = MetricPattern26(client, 'p2abytes') + self.first_p2pk65addressindex: MetricPattern18[P2PK65AddressIndex] = MetricPattern18(client, 'first_p2pk65addressindex') + self.first_p2pk33addressindex: MetricPattern18[P2PK33AddressIndex] = MetricPattern18(client, 'first_p2pk33addressindex') + self.first_p2pkhaddressindex: MetricPattern18[P2PKHAddressIndex] = MetricPattern18(client, 'first_p2pkhaddressindex') + self.first_p2shaddressindex: MetricPattern18[P2SHAddressIndex] = MetricPattern18(client, 'first_p2shaddressindex') + self.first_p2wpkhaddressindex: MetricPattern18[P2WPKHAddressIndex] = MetricPattern18(client, 'first_p2wpkhaddressindex') + self.first_p2wshaddressindex: MetricPattern18[P2WSHAddressIndex] = MetricPattern18(client, 'first_p2wshaddressindex') + self.first_p2traddressindex: MetricPattern18[P2TRAddressIndex] = MetricPattern18(client, 'first_p2traddressindex') + self.first_p2aaddressindex: MetricPattern18[P2AAddressIndex] = MetricPattern18(client, 'first_p2aaddressindex') + self.p2pk65bytes: MetricPattern27[P2PK65Bytes] = MetricPattern27(client, 'p2pk65bytes') + self.p2pk33bytes: MetricPattern26[P2PK33Bytes] = MetricPattern26(client, 'p2pk33bytes') + self.p2pkhbytes: MetricPattern28[P2PKHBytes] = MetricPattern28(client, 'p2pkhbytes') + self.p2shbytes: MetricPattern29[P2SHBytes] = MetricPattern29(client, 'p2shbytes') + self.p2wpkhbytes: MetricPattern31[P2WPKHBytes] = MetricPattern31(client, 'p2wpkhbytes') + self.p2wshbytes: MetricPattern32[P2WSHBytes] = MetricPattern32(client, 'p2wshbytes') + self.p2trbytes: MetricPattern30[P2TRBytes] = MetricPattern30(client, 'p2trbytes') + self.p2abytes: MetricPattern24[P2ABytes] = MetricPattern24(client, 'p2abytes') class MetricsTree_Scripts_Count: """Metrics tree node.""" @@ -3467,14 +3431,14 @@ class MetricsTree_Scripts: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.first_emptyoutputindex: MetricPattern20[EmptyOutputIndex] = MetricPattern20(client, 'first_emptyoutputindex') - self.first_opreturnindex: MetricPattern20[OpReturnIndex] = MetricPattern20(client, 'first_opreturnindex') - self.first_p2msoutputindex: MetricPattern20[P2MSOutputIndex] = MetricPattern20(client, 'first_p2msoutputindex') - self.first_unknownoutputindex: MetricPattern20[UnknownOutputIndex] = MetricPattern20(client, 'first_unknownoutputindex') - self.empty_to_txindex: MetricPattern24[TxIndex] = MetricPattern24(client, 'txindex') - self.opreturn_to_txindex: MetricPattern25[TxIndex] = MetricPattern25(client, 'txindex') - self.p2ms_to_txindex: MetricPattern27[TxIndex] = MetricPattern27(client, 'txindex') - self.unknown_to_txindex: MetricPattern35[TxIndex] = MetricPattern35(client, 'txindex') + self.first_emptyoutputindex: MetricPattern18[EmptyOutputIndex] = MetricPattern18(client, 'first_emptyoutputindex') + self.first_opreturnindex: MetricPattern18[OpReturnIndex] = MetricPattern18(client, 'first_opreturnindex') + self.first_p2msoutputindex: MetricPattern18[P2MSOutputIndex] = MetricPattern18(client, 'first_p2msoutputindex') + self.first_unknownoutputindex: MetricPattern18[UnknownOutputIndex] = MetricPattern18(client, 'first_unknownoutputindex') + self.empty_to_txindex: MetricPattern22[TxIndex] = MetricPattern22(client, 'txindex') + self.opreturn_to_txindex: MetricPattern23[TxIndex] = MetricPattern23(client, 'txindex') + self.p2ms_to_txindex: MetricPattern25[TxIndex] = MetricPattern25(client, 'txindex') + self.unknown_to_txindex: MetricPattern33[TxIndex] = MetricPattern33(client, 'txindex') self.count: MetricsTree_Scripts_Count = MetricsTree_Scripts_Count(client) self.value: MetricsTree_Scripts_Value = MetricsTree_Scripts_Value(client) self.adoption: MetricsTree_Scripts_Adoption = MetricsTree_Scripts_Adoption(client) @@ -3532,8 +3496,8 @@ class MetricsTree_Positions: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.block_position: MetricPattern20[BlkPosition] = MetricPattern20(client, 'position') - self.tx_position: MetricPattern21[BlkPosition] = MetricPattern21(client, 'position') + self.block_position: MetricPattern18[BlkPosition] = MetricPattern18(client, 'position') + self.tx_position: MetricPattern19[BlkPosition] = MetricPattern19(client, 'position') class MetricsTree_Cointime_Activity: """Metrics tree node.""" @@ -3596,8 +3560,8 @@ class MetricsTree_Cointime_ReserveRisk: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.vocdd_365d_median: MetricPattern20[StoredF64] = MetricPattern20(client, 'vocdd_365d_median') - self.hodl_bank: MetricPattern20[StoredF64] = MetricPattern20(client, 'hodl_bank') + self.vocdd_365d_median: MetricPattern18[StoredF64] = MetricPattern18(client, 'vocdd_365d_median') + self.hodl_bank: MetricPattern18[StoredF64] = MetricPattern18(client, 'hodl_bank') self.reserve_risk: MetricPattern1[StoredF64] = MetricPattern1(client, 'reserve_risk') class MetricsTree_Cointime: @@ -3639,73 +3603,73 @@ class MetricsTree_Indexes_Address_P2pk33: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern28[P2PK33AddressIndex] = MetricPattern28(client, 'p2pk33addressindex') + self.identity: MetricPattern26[P2PK33AddressIndex] = MetricPattern26(client, 'p2pk33addressindex') class MetricsTree_Indexes_Address_P2pk65: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern29[P2PK65AddressIndex] = MetricPattern29(client, 'p2pk65addressindex') + self.identity: MetricPattern27[P2PK65AddressIndex] = MetricPattern27(client, 'p2pk65addressindex') class MetricsTree_Indexes_Address_P2pkh: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern30[P2PKHAddressIndex] = MetricPattern30(client, 'p2pkhaddressindex') + self.identity: MetricPattern28[P2PKHAddressIndex] = MetricPattern28(client, 'p2pkhaddressindex') class MetricsTree_Indexes_Address_P2sh: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern31[P2SHAddressIndex] = MetricPattern31(client, 'p2shaddressindex') + self.identity: MetricPattern29[P2SHAddressIndex] = MetricPattern29(client, 'p2shaddressindex') class MetricsTree_Indexes_Address_P2tr: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern32[P2TRAddressIndex] = MetricPattern32(client, 'p2traddressindex') + self.identity: MetricPattern30[P2TRAddressIndex] = MetricPattern30(client, 'p2traddressindex') class MetricsTree_Indexes_Address_P2wpkh: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern33[P2WPKHAddressIndex] = MetricPattern33(client, 'p2wpkhaddressindex') + self.identity: MetricPattern31[P2WPKHAddressIndex] = MetricPattern31(client, 'p2wpkhaddressindex') class MetricsTree_Indexes_Address_P2wsh: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern34[P2WSHAddressIndex] = MetricPattern34(client, 'p2wshaddressindex') + self.identity: MetricPattern32[P2WSHAddressIndex] = MetricPattern32(client, 'p2wshaddressindex') class MetricsTree_Indexes_Address_P2a: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern26[P2AAddressIndex] = MetricPattern26(client, 'p2aaddressindex') + self.identity: MetricPattern24[P2AAddressIndex] = MetricPattern24(client, 'p2aaddressindex') class MetricsTree_Indexes_Address_P2ms: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern27[P2MSOutputIndex] = MetricPattern27(client, 'p2msoutputindex') + self.identity: MetricPattern25[P2MSOutputIndex] = MetricPattern25(client, 'p2msoutputindex') class MetricsTree_Indexes_Address_Empty: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern24[EmptyOutputIndex] = MetricPattern24(client, 'emptyoutputindex') + self.identity: MetricPattern22[EmptyOutputIndex] = MetricPattern22(client, 'emptyoutputindex') class MetricsTree_Indexes_Address_Unknown: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern35[UnknownOutputIndex] = MetricPattern35(client, 'unknownoutputindex') + self.identity: MetricPattern33[UnknownOutputIndex] = MetricPattern33(client, 'unknownoutputindex') class MetricsTree_Indexes_Address_Opreturn: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern25[OpReturnIndex] = MetricPattern25(client, 'opreturnindex') + self.identity: MetricPattern23[OpReturnIndex] = MetricPattern23(client, 'opreturnindex') class MetricsTree_Indexes_Address: """Metrics tree node.""" @@ -3728,173 +3692,157 @@ class MetricsTree_Indexes_Height: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern20[Height] = MetricPattern20(client, 'height') - self.minute1: MetricPattern20[Minute1] = MetricPattern20(client, 'minute1') - self.minute5: MetricPattern20[Minute5] = MetricPattern20(client, 'minute5') - self.minute10: MetricPattern20[Minute10] = MetricPattern20(client, 'minute10') - self.minute30: MetricPattern20[Minute30] = MetricPattern20(client, 'minute30') - self.hour1: MetricPattern20[Hour1] = MetricPattern20(client, 'hour1') - self.hour4: MetricPattern20[Hour4] = MetricPattern20(client, 'hour4') - self.hour12: MetricPattern20[Hour12] = MetricPattern20(client, 'hour12') - self.day1: MetricPattern20[Day1] = MetricPattern20(client, 'day1') - self.day3: MetricPattern20[Day3] = MetricPattern20(client, 'day3') - self.difficultyepoch: MetricPattern20[DifficultyEpoch] = MetricPattern20(client, 'difficultyepoch') - self.halvingepoch: MetricPattern20[HalvingEpoch] = MetricPattern20(client, 'halvingepoch') - self.week1: MetricPattern20[Week1] = MetricPattern20(client, 'week1') - self.month1: MetricPattern20[Month1] = MetricPattern20(client, 'month1') - self.month3: MetricPattern20[Month3] = MetricPattern20(client, 'month3') - self.month6: MetricPattern20[Month6] = MetricPattern20(client, 'month6') - self.year1: MetricPattern20[Year1] = MetricPattern20(client, 'year1') - self.year10: MetricPattern20[Year10] = MetricPattern20(client, 'year10') - self.txindex_count: MetricPattern20[StoredU64] = MetricPattern20(client, 'txindex_count') + self.identity: MetricPattern18[Height] = MetricPattern18(client, 'height') + self.minute10: MetricPattern18[Minute10] = MetricPattern18(client, 'minute10') + self.minute30: MetricPattern18[Minute30] = MetricPattern18(client, 'minute30') + self.hour1: MetricPattern18[Hour1] = MetricPattern18(client, 'hour1') + self.hour4: MetricPattern18[Hour4] = MetricPattern18(client, 'hour4') + self.hour12: MetricPattern18[Hour12] = MetricPattern18(client, 'hour12') + self.day1: MetricPattern18[Day1] = MetricPattern18(client, 'day1') + self.day3: MetricPattern18[Day3] = MetricPattern18(client, 'day3') + self.difficultyepoch: MetricPattern18[DifficultyEpoch] = MetricPattern18(client, 'difficultyepoch') + self.halvingepoch: MetricPattern18[HalvingEpoch] = MetricPattern18(client, 'halvingepoch') + self.week1: MetricPattern18[Week1] = MetricPattern18(client, 'week1') + self.month1: MetricPattern18[Month1] = MetricPattern18(client, 'month1') + self.month3: MetricPattern18[Month3] = MetricPattern18(client, 'month3') + self.month6: MetricPattern18[Month6] = MetricPattern18(client, 'month6') + self.year1: MetricPattern18[Year1] = MetricPattern18(client, 'year1') + self.year10: MetricPattern18[Year10] = MetricPattern18(client, 'year10') + self.txindex_count: MetricPattern18[StoredU64] = MetricPattern18(client, 'txindex_count') class MetricsTree_Indexes_Difficultyepoch: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern19[DifficultyEpoch] = MetricPattern19(client, 'difficultyepoch') - self.first_height: MetricPattern19[Height] = MetricPattern19(client, 'first_height') - self.height_count: MetricPattern19[StoredU64] = MetricPattern19(client, 'height_count') + self.identity: MetricPattern17[DifficultyEpoch] = MetricPattern17(client, 'difficultyepoch') + self.first_height: MetricPattern17[Height] = MetricPattern17(client, 'first_height') + self.height_count: MetricPattern17[StoredU64] = MetricPattern17(client, 'height_count') class MetricsTree_Indexes_Halvingepoch: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern18[HalvingEpoch] = MetricPattern18(client, 'halvingepoch') - self.first_height: MetricPattern18[Height] = MetricPattern18(client, 'first_height') - -class MetricsTree_Indexes_Minute1: - """Metrics tree node.""" - - def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern3[Minute1] = MetricPattern3(client, 'minute1') - self.first_height: MetricPattern3[Height] = MetricPattern3(client, 'minute1_first_height') - -class MetricsTree_Indexes_Minute5: - """Metrics tree node.""" - - def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern4[Minute5] = MetricPattern4(client, 'minute5') - self.first_height: MetricPattern4[Height] = MetricPattern4(client, 'minute5_first_height') + self.identity: MetricPattern16[HalvingEpoch] = MetricPattern16(client, 'halvingepoch') + self.first_height: MetricPattern16[Height] = MetricPattern16(client, 'first_height') class MetricsTree_Indexes_Minute10: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern5[Minute10] = MetricPattern5(client, 'minute10') - self.first_height: MetricPattern5[Height] = MetricPattern5(client, 'minute10_first_height') + self.identity: MetricPattern3[Minute10] = MetricPattern3(client, 'minute10') + self.first_height: MetricPattern3[Height] = MetricPattern3(client, 'minute10_first_height') class MetricsTree_Indexes_Minute30: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern6[Minute30] = MetricPattern6(client, 'minute30') - self.first_height: MetricPattern6[Height] = MetricPattern6(client, 'minute30_first_height') + self.identity: MetricPattern4[Minute30] = MetricPattern4(client, 'minute30') + self.first_height: MetricPattern4[Height] = MetricPattern4(client, 'minute30_first_height') class MetricsTree_Indexes_Hour1: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern7[Hour1] = MetricPattern7(client, 'hour1') - self.first_height: MetricPattern7[Height] = MetricPattern7(client, 'hour1_first_height') + self.identity: MetricPattern5[Hour1] = MetricPattern5(client, 'hour1') + self.first_height: MetricPattern5[Height] = MetricPattern5(client, 'hour1_first_height') class MetricsTree_Indexes_Hour4: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern8[Hour4] = MetricPattern8(client, 'hour4') - self.first_height: MetricPattern8[Height] = MetricPattern8(client, 'hour4_first_height') + self.identity: MetricPattern6[Hour4] = MetricPattern6(client, 'hour4') + self.first_height: MetricPattern6[Height] = MetricPattern6(client, 'hour4_first_height') class MetricsTree_Indexes_Hour12: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern9[Hour12] = MetricPattern9(client, 'hour12') - self.first_height: MetricPattern9[Height] = MetricPattern9(client, 'hour12_first_height') + self.identity: MetricPattern7[Hour12] = MetricPattern7(client, 'hour12') + self.first_height: MetricPattern7[Height] = MetricPattern7(client, 'hour12_first_height') class MetricsTree_Indexes_Day1: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern10[Day1] = MetricPattern10(client, 'day1') - self.date: MetricPattern10[Date] = MetricPattern10(client, 'date') - self.first_height: MetricPattern10[Height] = MetricPattern10(client, 'first_height') - self.height_count: MetricPattern10[StoredU64] = MetricPattern10(client, 'height_count') + self.identity: MetricPattern8[Day1] = MetricPattern8(client, 'day1') + self.date: MetricPattern8[Date] = MetricPattern8(client, 'date') + self.first_height: MetricPattern8[Height] = MetricPattern8(client, 'first_height') + self.height_count: MetricPattern8[StoredU64] = MetricPattern8(client, 'height_count') class MetricsTree_Indexes_Day3: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern11[Day3] = MetricPattern11(client, 'day3') - self.first_height: MetricPattern11[Height] = MetricPattern11(client, 'day3_first_height') + self.identity: MetricPattern9[Day3] = MetricPattern9(client, 'day3') + self.first_height: MetricPattern9[Height] = MetricPattern9(client, 'day3_first_height') class MetricsTree_Indexes_Week1: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern12[Week1] = MetricPattern12(client, 'week1') - self.date: MetricPattern12[Date] = MetricPattern12(client, 'date') - self.first_height: MetricPattern12[Height] = MetricPattern12(client, 'week1_first_height') + self.identity: MetricPattern10[Week1] = MetricPattern10(client, 'week1') + self.date: MetricPattern10[Date] = MetricPattern10(client, 'date') + self.first_height: MetricPattern10[Height] = MetricPattern10(client, 'week1_first_height') class MetricsTree_Indexes_Month1: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern13[Month1] = MetricPattern13(client, 'month1') - self.date: MetricPattern13[Date] = MetricPattern13(client, 'date') - self.first_height: MetricPattern13[Height] = MetricPattern13(client, 'month1_first_height') + self.identity: MetricPattern11[Month1] = MetricPattern11(client, 'month1') + self.date: MetricPattern11[Date] = MetricPattern11(client, 'date') + self.first_height: MetricPattern11[Height] = MetricPattern11(client, 'month1_first_height') class MetricsTree_Indexes_Month3: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern14[Month3] = MetricPattern14(client, 'month3') - self.date: MetricPattern14[Date] = MetricPattern14(client, 'date') - self.first_height: MetricPattern14[Height] = MetricPattern14(client, 'month3_first_height') + self.identity: MetricPattern12[Month3] = MetricPattern12(client, 'month3') + self.date: MetricPattern12[Date] = MetricPattern12(client, 'date') + self.first_height: MetricPattern12[Height] = MetricPattern12(client, 'month3_first_height') class MetricsTree_Indexes_Month6: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern15[Month6] = MetricPattern15(client, 'month6') - self.date: MetricPattern15[Date] = MetricPattern15(client, 'date') - self.first_height: MetricPattern15[Height] = MetricPattern15(client, 'month6_first_height') + self.identity: MetricPattern13[Month6] = MetricPattern13(client, 'month6') + self.date: MetricPattern13[Date] = MetricPattern13(client, 'date') + self.first_height: MetricPattern13[Height] = MetricPattern13(client, 'month6_first_height') class MetricsTree_Indexes_Year1: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern16[Year1] = MetricPattern16(client, 'year1') - self.date: MetricPattern16[Date] = MetricPattern16(client, 'date') - self.first_height: MetricPattern16[Height] = MetricPattern16(client, 'year1_first_height') + self.identity: MetricPattern14[Year1] = MetricPattern14(client, 'year1') + self.date: MetricPattern14[Date] = MetricPattern14(client, 'date') + self.first_height: MetricPattern14[Height] = MetricPattern14(client, 'year1_first_height') class MetricsTree_Indexes_Year10: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern17[Year10] = MetricPattern17(client, 'year10') - self.date: MetricPattern17[Date] = MetricPattern17(client, 'date') - self.first_height: MetricPattern17[Height] = MetricPattern17(client, 'year10_first_height') + self.identity: MetricPattern15[Year10] = MetricPattern15(client, 'year10') + self.date: MetricPattern15[Date] = MetricPattern15(client, 'date') + self.first_height: MetricPattern15[Height] = MetricPattern15(client, 'year10_first_height') class MetricsTree_Indexes_Txindex: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern21[TxIndex] = MetricPattern21(client, 'txindex') - self.input_count: MetricPattern21[StoredU64] = MetricPattern21(client, 'input_count') - self.output_count: MetricPattern21[StoredU64] = MetricPattern21(client, 'output_count') + self.identity: MetricPattern19[TxIndex] = MetricPattern19(client, 'txindex') + self.input_count: MetricPattern19[StoredU64] = MetricPattern19(client, 'input_count') + self.output_count: MetricPattern19[StoredU64] = MetricPattern19(client, 'output_count') class MetricsTree_Indexes_Txinindex: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern22[TxInIndex] = MetricPattern22(client, 'txinindex') + self.identity: MetricPattern20[TxInIndex] = MetricPattern20(client, 'txinindex') class MetricsTree_Indexes_Txoutindex: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.identity: MetricPattern23[TxOutIndex] = MetricPattern23(client, 'txoutindex') + self.identity: MetricPattern21[TxOutIndex] = MetricPattern21(client, 'txoutindex') class MetricsTree_Indexes: """Metrics tree node.""" @@ -3904,8 +3852,6 @@ class MetricsTree_Indexes: self.height: MetricsTree_Indexes_Height = MetricsTree_Indexes_Height(client) self.difficultyepoch: MetricsTree_Indexes_Difficultyepoch = MetricsTree_Indexes_Difficultyepoch(client) self.halvingepoch: MetricsTree_Indexes_Halvingepoch = MetricsTree_Indexes_Halvingepoch(client) - self.minute1: MetricsTree_Indexes_Minute1 = MetricsTree_Indexes_Minute1(client) - self.minute5: MetricsTree_Indexes_Minute5 = MetricsTree_Indexes_Minute5(client) self.minute10: MetricsTree_Indexes_Minute10 = MetricsTree_Indexes_Minute10(client) self.minute30: MetricsTree_Indexes_Minute30 = MetricsTree_Indexes_Minute30(client) self.hour1: MetricsTree_Indexes_Hour1 = MetricsTree_Indexes_Hour1(client) @@ -3979,7 +3925,7 @@ class MetricsTree_Market_Returns: self._1d_returns_1w_sd: SdSmaPattern = SdSmaPattern(client, '1d_returns_1w_sd') self._1d_returns_1m_sd: SdSmaPattern = SdSmaPattern(client, '1d_returns_1m_sd') self._1d_returns_1y_sd: SdSmaPattern = SdSmaPattern(client, '1d_returns_1y_sd') - self.downside_returns: MetricPattern20[StoredF32] = MetricPattern20(client, 'downside_returns') + self.downside_returns: MetricPattern18[StoredF32] = MetricPattern18(client, 'downside_returns') self.downside_1w_sd: SdSmaPattern = SdSmaPattern(client, 'downside_1w_sd') self.downside_1m_sd: SdSmaPattern = SdSmaPattern(client, 'downside_1m_sd') self.downside_1y_sd: SdSmaPattern = SdSmaPattern(client, 'downside_1y_sd') @@ -4177,7 +4123,7 @@ class MetricsTree_Market_Dca: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.dca_sats_per_day: MetricPattern20[Sats] = MetricPattern20(client, 'dca_sats_per_day') + self.dca_sats_per_day: MetricPattern18[Sats] = MetricPattern18(client, 'dca_sats_per_day') self.period_stack: _10y1m1w1y2y3m3y4y5y6m6y8yPattern3 = _10y1m1w1y2y3m3y4y5y6m6y8yPattern3(client, 'dca_stack') self.period_average_price: MetricsTree_Market_Dca_PeriodAveragePrice = MetricsTree_Market_Dca_PeriodAveragePrice(client) self.period_returns: _10y1m1w1y2y3m3y4y5y6m6y8yPattern2[StoredF32] = _10y1m1w1y2y3m3y4y5y6m6y8yPattern2(client, 'dca_returns') @@ -4484,7 +4430,7 @@ class MetricsTree_Pools: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.height_to_pool: MetricPattern20[PoolSlug] = MetricPattern20(client, 'pool') + self.height_to_pool: MetricPattern18[PoolSlug] = MetricPattern18(client, 'pool') self.vecs: MetricsTree_Pools_Vecs = MetricsTree_Pools_Vecs(client) class MetricsTree_Prices_Split_Close: @@ -4532,21 +4478,21 @@ class MetricsTree_Distribution_AnyAddressIndexes: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.p2a: MetricPattern26[AnyAddressIndex] = MetricPattern26(client, 'anyaddressindex') - self.p2pk33: MetricPattern28[AnyAddressIndex] = MetricPattern28(client, 'anyaddressindex') - self.p2pk65: MetricPattern29[AnyAddressIndex] = MetricPattern29(client, 'anyaddressindex') - self.p2pkh: MetricPattern30[AnyAddressIndex] = MetricPattern30(client, 'anyaddressindex') - self.p2sh: MetricPattern31[AnyAddressIndex] = MetricPattern31(client, 'anyaddressindex') - self.p2tr: MetricPattern32[AnyAddressIndex] = MetricPattern32(client, 'anyaddressindex') - self.p2wpkh: MetricPattern33[AnyAddressIndex] = MetricPattern33(client, 'anyaddressindex') - self.p2wsh: MetricPattern34[AnyAddressIndex] = MetricPattern34(client, 'anyaddressindex') + self.p2a: MetricPattern24[AnyAddressIndex] = MetricPattern24(client, 'anyaddressindex') + self.p2pk33: MetricPattern26[AnyAddressIndex] = MetricPattern26(client, 'anyaddressindex') + self.p2pk65: MetricPattern27[AnyAddressIndex] = MetricPattern27(client, 'anyaddressindex') + self.p2pkh: MetricPattern28[AnyAddressIndex] = MetricPattern28(client, 'anyaddressindex') + self.p2sh: MetricPattern29[AnyAddressIndex] = MetricPattern29(client, 'anyaddressindex') + self.p2tr: MetricPattern30[AnyAddressIndex] = MetricPattern30(client, 'anyaddressindex') + self.p2wpkh: MetricPattern31[AnyAddressIndex] = MetricPattern31(client, 'anyaddressindex') + self.p2wsh: MetricPattern32[AnyAddressIndex] = MetricPattern32(client, 'anyaddressindex') class MetricsTree_Distribution_AddressesData: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.funded: MetricPattern36[FundedAddressData] = MetricPattern36(client, 'fundedaddressdata') - self.empty: MetricPattern37[EmptyAddressData] = MetricPattern37(client, 'emptyaddressdata') + self.funded: MetricPattern34[FundedAddressData] = MetricPattern34(client, 'fundedaddressdata') + self.empty: MetricPattern35[EmptyAddressData] = MetricPattern35(client, 'emptyaddressdata') class MetricsTree_Distribution_UtxoCohorts_All_Relative: """Metrics tree node.""" @@ -4909,7 +4855,7 @@ class MetricsTree_Distribution: """Metrics tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.supply_state: MetricPattern20[SupplyState] = MetricPattern20(client, 'supply_state') + self.supply_state: MetricPattern18[SupplyState] = MetricPattern18(client, 'supply_state') self.any_address_indexes: MetricsTree_Distribution_AnyAddressIndexes = MetricsTree_Distribution_AnyAddressIndexes(client) self.addresses_data: MetricsTree_Distribution_AddressesData = MetricsTree_Distribution_AddressesData(client) self.utxo_cohorts: MetricsTree_Distribution_UtxoCohorts = MetricsTree_Distribution_UtxoCohorts(client) @@ -4920,8 +4866,8 @@ class MetricsTree_Distribution: self.total_addr_count: MetricsTree_Distribution_TotalAddrCount = MetricsTree_Distribution_TotalAddrCount(client) self.new_addr_count: MetricsTree_Distribution_NewAddrCount = MetricsTree_Distribution_NewAddrCount(client) self.growth_rate: MetricsTree_Distribution_GrowthRate = MetricsTree_Distribution_GrowthRate(client) - self.fundedaddressindex: MetricPattern36[FundedAddressIndex] = MetricPattern36(client, 'fundedaddressindex') - self.emptyaddressindex: MetricPattern37[EmptyAddressIndex] = MetricPattern37(client, 'emptyaddressindex') + self.fundedaddressindex: MetricPattern34[FundedAddressIndex] = MetricPattern34(client, 'fundedaddressindex') + self.emptyaddressindex: MetricPattern35[EmptyAddressIndex] = MetricPattern35(client, 'emptyaddressindex') class MetricsTree_Supply_Burned: """Metrics tree node.""" @@ -4977,8 +4923,6 @@ class BrkClient(BrkClientBase): VERSION = "v0.1.9" INDEXES = [ - "minute1", - "minute5", "minute10", "minute30", "hour1", diff --git a/packages/brk_client/tests/test_metric_data.py b/packages/brk_client/tests/test_metric_data.py index 7b0b09c12..ba1f4e75c 100644 --- a/packages/brk_client/tests/test_metric_data.py +++ b/packages/brk_client/tests/test_metric_data.py @@ -67,20 +67,6 @@ def hour1_metric(): ) -@pytest.fixture -def minute5_metric(): - """DateMetricData with minute5 (sub-daily).""" - return DateMetricData( - version=1, - index="minute5", - total=500000, - start=0, - end=3, - stamp="2024-01-01T00:00:00Z", - data=[1, 2, 3], - ) - - @pytest.fixture def week1_metric(): """DateMetricData with week1.""" @@ -150,9 +136,6 @@ class TestIsDateBased: def test_hour1(self, hour1_metric): assert hour1_metric.is_date_based is True - def test_minute5(self, minute5_metric): - assert minute5_metric.is_date_based is True - def test_week1(self, week1_metric): assert week1_metric.is_date_based is True @@ -304,13 +287,6 @@ class TestIndexToDate: assert dates[1] == datetime(2009, 1, 1, 1, 0, 0, tzinfo=timezone.utc) assert dates[2] == datetime(2009, 1, 1, 2, 0, 0, tzinfo=timezone.utc) - def test_minute5_returns_datetime(self, minute5_metric): - dates = minute5_metric.dates() - assert isinstance(dates[0], datetime) - assert dates[0] == datetime(2009, 1, 1, 0, 0, 0, tzinfo=timezone.utc) - assert dates[1] == datetime(2009, 1, 1, 0, 5, 0, tzinfo=timezone.utc) - assert dates[2] == datetime(2009, 1, 1, 0, 10, 0, tzinfo=timezone.utc) - # ============ _date_to_index conversions ============ @@ -359,13 +335,6 @@ class TestDateToIndex: assert _date_to_index("hour1", epoch + timedelta(hours=1)) == 1 assert _date_to_index("hour1", epoch + timedelta(hours=24)) == 24 - def test_minute5_with_datetime(self): - from brk_client import _date_to_index - epoch = datetime(2009, 1, 1, tzinfo=timezone.utc) - assert _date_to_index("minute5", epoch) == 0 - assert _date_to_index("minute5", epoch + timedelta(minutes=5)) == 1 - assert _date_to_index("minute5", epoch + timedelta(minutes=12)) == 2 # floor - def test_hour1_with_plain_date(self): """Plain date is treated as midnight UTC for sub-daily.""" from brk_client import _date_to_index diff --git a/website/scripts/panes/chart.js b/website/scripts/panes/chart.js index 7a3ba876c..59ca1b933 100644 --- a/website/scripts/panes/chart.js +++ b/website/scripts/panes/chart.js @@ -118,7 +118,7 @@ const ALL_GROUPS = [ { label: "Time", items: [ - "1mn", "5mn", "10mn", "30mn", + "10mn", "30mn", "1h", "4h", "12h", "1d", "3d", "1w", "1m", "3m", "6m", diff --git a/website/scripts/utils/serde.js b/website/scripts/utils/serde.js index 43962e571..96972a88c 100644 --- a/website/scripts/utils/serde.js +++ b/website/scripts/utils/serde.js @@ -21,7 +21,7 @@ export const serdeBool = { export const INDEX_LABEL = /** @type {const} */ ({ height: "blk", - minute1: "1mn", minute5: "5mn", minute10: "10mn", minute30: "30mn", + minute10: "10mn", minute30: "30mn", hour1: "1h", hour4: "4h", hour12: "12h", day1: "1d", day3: "3d", week1: "1w", month1: "1m", month3: "3m", month6: "6m",