From 30ebe4e1ff23c47efb411f1da132f2c79575f617 Mon Sep 17 00:00:00 2001 From: nym21 Date: Tue, 11 Aug 2026 18:15:29 +0200 Subject: [PATCH] global: massive columnar rework part 3 --- crates/brk_client/src/lib.rs | 23776 +++++++++++++--- crates/brk_cohort/src/cohort_context.rs | 9 + .../activity/vecs/coindays_destroyed.rs | 6 +- .../metrics/activity/vecs/collection.rs | 30 +- .../activity/vecs/core_cumulative_value.rs | 8 +- .../metrics/activity/vecs/cumulative_value.rs | 6 +- .../metrics/additive/aggregate/fiat.rs | 7 +- .../src/distribution/metrics/additive/mod.rs | 2 - .../metrics/aggregate/cumulative_fiat.rs | 7 +- .../distribution/metrics/aggregate/fiat.rs | 8 +- .../src/distribution/metrics/aggregate/mod.rs | 2 - .../distribution/metrics/aggregate/percent.rs | 8 +- .../distribution/metrics/aggregate/price.rs | 8 +- .../distribution/metrics/columnar/amount.rs | 3 +- .../metrics/columnar/amount_value.rs | 17 +- .../cumulative/value_with_amount_and_type.rs | 7 +- .../src/distribution/metrics/columnar/mod.rs | 11 - .../metrics/cost_basis/block_data.rs | 17 + .../distribution/metrics/cost_basis/vecs.rs | 8 +- .../src/distribution/metrics/mod.rs | 2 +- .../metrics/outputs/vecs/spent.rs | 6 +- .../metrics/outputs/vecs/unspent.rs | 4 +- .../src/distribution/metrics/percentiles.rs | 24 +- .../metrics/profitability/compute.rs | 134 - .../distribution/metrics/profitability/mod.rs | 1 - .../metrics/profitability/vecs.rs | 151 +- .../distribution/metrics/realized/adjusted.rs | 15 +- .../metrics/realized/sopr_vecs.rs | 9 +- .../distribution/metrics/realized/vecs/cap.rs | 6 +- .../metrics/realized/vecs/collection.rs | 12 +- .../metrics/realized/vecs/cumulative.rs | 6 +- .../metrics/realized/vecs/cumulative_net.rs | 6 +- .../metrics/realized/vecs/price.rs | 8 +- .../metrics/realized/vecs/value_destroyed.rs | 6 +- .../metrics/relative/gross_pnl_composition.rs | 7 +- .../relative/supply_profitability_shares.rs | 7 +- .../src/distribution/metrics/relative/vecs.rs | 18 +- .../distribution/metrics/supply/by_cohort.rs | 6 +- .../src/distribution/metrics/supply/total.rs | 4 +- .../metrics/unrealized/vecs/by_cohort.rs | 6 +- .../metrics/unrealized/vecs/collection.rs | 7 +- .../metrics/unrealized/vecs/net_by_cohort.rs | 7 +- .../src/distribution/state/utxo/fenwick.rs | 2 +- .../src/frameworks/coinflow/age_band.rs | 68 + .../src/frameworks/coinflow/compute.rs | 54 +- .../src/frameworks/coinflow/import.rs | 6 +- .../src/frameworks/coinflow/mod.rs | 68 +- .../frameworks/cointime/activity/compute.rs | 4 +- .../frameworks/cointime/aggregate/import.rs | 4 +- .../src/frameworks/cointime/prices/import.rs | 4 +- crates/brk_computer/src/indexes/height.rs | 6 +- crates/brk_computer/src/indexes/tx_index.rs | 6 +- .../internal/containers/distribution_stats.rs | 12 +- .../per_block/computed/distribution.rs | 23 +- .../src/internal/per_block/percent/base.rs | 5 +- .../src/internal/per_block/percent/lazy.rs | 4 +- .../src/internal/per_block/price.rs | 10 +- .../src/internal/per_block/rolling/windows.rs | 126 - .../per_block/rolling/windows/columnar.rs | 48 + .../rolling/windows/columnar_from_1w.rs | 48 + .../internal/per_block/rolling/windows/mod.rs | 10 + .../per_block/rolling/windows/rolling.rs | 33 + .../per_block/rolling/windows/starts.rs | 6 + .../value/columnar_cumulative_rolling.rs | 11 +- .../src/internal/transform/currency.rs | 154 - .../transform/currency/avg_cents_to_usd.rs | 11 + .../transform/currency/avg_sats_to_btc.rs | 11 + .../currency/cents_signed_to_dollars.rs | 11 + .../transform/currency/cents_times_tenths.rs | 15 + .../currency/cents_unsigned_to_dollars.rs | 11 + .../currency/cents_unsigned_to_sats.rs | 19 + .../currency/dollars_to_sats_fract.rs | 11 + .../src/internal/transform/currency/mod.rs | 47 + .../currency/neg_cents_unsigned_to_dollars.rs | 11 + .../currency/sats_signed_to_bitcoin.rs | 11 + .../transform/currency/sats_to_bitcoin.rs | 11 + .../transform/currency/sats_to_cents.rs | 15 + .../transform/currency/stored_u64_to_cents.rs | 11 + .../transform/currency/stored_u64_to_sats.rs | 11 + .../src/models/bedrock/calibration.rs | 168 + .../src/models/bedrock/compute.rs | 929 +- .../src/models/bedrock/day_result.rs | 182 + .../src/models/bedrock/day_urpds.rs | 301 + .../brk_computer/src/models/bedrock/import.rs | 5 +- .../src/models/bedrock/level_id.rs | 57 + .../brk_computer/src/models/bedrock/levels.rs | 47 + .../src/models/bedrock/loss_percentile_id.rs | 120 + crates/brk_computer/src/models/bedrock/mod.rs | 87 +- .../src/models/bedrock/mode_id.rs | 108 + .../src/models/bedrock/mode_result.rs | 8 + .../src/models/bedrock/mode_vecs.rs | 6 +- .../brk_computer/src/models/bedrock/modes.rs | 44 +- .../src/models/bedrock/percentiles.rs | 46 + .../src/models/bedrock/price_band_id.rs | 180 + .../src/models/bedrock/price_bands.rs | 29 +- .../brk_computer/src/models/bedrock/vecs.rs | 844 +- .../src/models/bedrock/weighted/mod.rs | 2 + .../src/models/bedrock/weighted/mode_id.rs | 54 + .../src/models/bedrock/weighted/modes.rs | 92 + .../src/models/bedrock/weighted_pair.rs | 20 + .../src/models/rarity_meter/band.rs | 11 + .../rarity_meter/block_decay_percentiles.rs | 157 + .../src/models/rarity_meter/component.rs | 144 + .../src/models/rarity_meter/components.rs | 154 +- .../src/models/rarity_meter/extreme.rs | 686 + .../src/models/rarity_meter/extremes.rs | 749 +- .../src/models/rarity_meter/inner.rs | 99 +- .../src/models/rarity_meter/mod.rs | 12 +- .../src/models/rarity_meter/percentiles.rs | 277 +- .../src/models/rarity_meter/threshold_vecs.rs | 95 + .../src/op_return/breakdown/block_metrics.rs | 10 + .../op_return/breakdown/data_bytes_series.rs | 53 + .../src/op_return/breakdown/fees_series.rs | 47 + .../src/op_return/breakdown/mod.rs | 53 + .../{breakdown.rs => breakdown/vecs.rs} | 139 +- crates/brk_computer/src/op_return/compute.rs | 22 +- crates/brk_computer/src/price/mod.rs | 5 +- crates/brk_types/src/percentile.rs | 69 + crates/vecdb/src/variants/columnar/lazy.rs | 6 +- 119 files changed, 22924 insertions(+), 8503 deletions(-) delete mode 100644 crates/brk_computer/src/distribution/metrics/profitability/compute.rs create mode 100644 crates/brk_computer/src/frameworks/coinflow/age_band.rs delete mode 100644 crates/brk_computer/src/internal/per_block/rolling/windows.rs create mode 100644 crates/brk_computer/src/internal/per_block/rolling/windows/columnar.rs create mode 100644 crates/brk_computer/src/internal/per_block/rolling/windows/columnar_from_1w.rs create mode 100644 crates/brk_computer/src/internal/per_block/rolling/windows/mod.rs create mode 100644 crates/brk_computer/src/internal/per_block/rolling/windows/rolling.rs create mode 100644 crates/brk_computer/src/internal/per_block/rolling/windows/starts.rs delete mode 100644 crates/brk_computer/src/internal/transform/currency.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/avg_cents_to_usd.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/avg_sats_to_btc.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/cents_signed_to_dollars.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/cents_times_tenths.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/cents_unsigned_to_dollars.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/cents_unsigned_to_sats.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/dollars_to_sats_fract.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/mod.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/neg_cents_unsigned_to_dollars.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/sats_signed_to_bitcoin.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/sats_to_bitcoin.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/sats_to_cents.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/stored_u64_to_cents.rs create mode 100644 crates/brk_computer/src/internal/transform/currency/stored_u64_to_sats.rs create mode 100644 crates/brk_computer/src/models/bedrock/calibration.rs create mode 100644 crates/brk_computer/src/models/bedrock/day_result.rs create mode 100644 crates/brk_computer/src/models/bedrock/day_urpds.rs create mode 100644 crates/brk_computer/src/models/bedrock/level_id.rs create mode 100644 crates/brk_computer/src/models/bedrock/loss_percentile_id.rs create mode 100644 crates/brk_computer/src/models/bedrock/mode_id.rs create mode 100644 crates/brk_computer/src/models/bedrock/mode_result.rs create mode 100644 crates/brk_computer/src/models/bedrock/price_band_id.rs create mode 100644 crates/brk_computer/src/models/bedrock/weighted/mode_id.rs create mode 100644 crates/brk_computer/src/models/bedrock/weighted_pair.rs create mode 100644 crates/brk_computer/src/models/rarity_meter/band.rs create mode 100644 crates/brk_computer/src/models/rarity_meter/block_decay_percentiles.rs create mode 100644 crates/brk_computer/src/models/rarity_meter/component.rs create mode 100644 crates/brk_computer/src/models/rarity_meter/extreme.rs create mode 100644 crates/brk_computer/src/models/rarity_meter/threshold_vecs.rs create mode 100644 crates/brk_computer/src/op_return/breakdown/block_metrics.rs create mode 100644 crates/brk_computer/src/op_return/breakdown/data_bytes_series.rs create mode 100644 crates/brk_computer/src/op_return/breakdown/fees_series.rs create mode 100644 crates/brk_computer/src/op_return/breakdown/mod.rs rename crates/brk_computer/src/op_return/{breakdown.rs => breakdown/vecs.rs} (64%) diff --git a/crates/brk_client/src/lib.rs b/crates/brk_client/src/lib.rs index 3da8fa6de..5447b7ff6 100644 --- a/crates/brk_client/src/lib.rs +++ b/crates/brk_client/src/lib.rs @@ -8,13 +8,12 @@ #![allow(clippy::useless_format)] #![allow(clippy::unnecessary_to_owned)] -use std::str::FromStr; -use std::sync::Arc; -use std::ops::{Bound, RangeBounds}; -use serde::de::DeserializeOwned; pub use brk_cohort::*; pub use brk_types::*; - +use serde::de::DeserializeOwned; +use std::ops::{Bound, RangeBounds}; +use std::str::FromStr; +use std::sync::Arc; /// Error type for BRK client operations. #[derive(Debug)] @@ -50,13 +49,19 @@ pub struct AddressHashPrefix { /// Compute the RapidHash v3 hash-prefix used by `/api/address/hash-prefix/{addr_type}/{prefix}`. pub fn address_payload_hash_prefix(payload: &[u8], nibbles: usize) -> Result { if payload.is_empty() { - return Err(BrkError { message: "Expected a non-empty address payload".to_string() }); + return Err(BrkError { + message: "Expected a non-empty address payload".to_string(), + }); } if payload.len() > 65 { - return Err(BrkError { message: "Expected at most 65 address payload bytes".to_string() }); + return Err(BrkError { + message: "Expected at most 65 address payload bytes".to_string(), + }); } if !(1..=16).contains(&nibbles) { - return Err(BrkError { message: "Expected hash-prefix length from 1 to 16 hex nibbles".to_string() }); + return Err(BrkError { + message: "Expected hash-prefix length from 1 to 16 hex nibbles".to_string(), + }); } Ok(format!("{:016x}", rapidhash::v3::rapidhash_v3(payload))[..nibbles].to_string()) } @@ -69,8 +74,12 @@ fn validate_address_payload_for_type(addr_type: OutputType, payload: &[u8]) -> R OutputType::P2PKH | OutputType::P2SH | OutputType::P2WPKH => &[20], OutputType::P2WSH | OutputType::P2TR => &[32], OutputType::P2MS | OutputType::OpReturn | OutputType::Empty | OutputType::Unknown => { - return Err(BrkError { message: format!("Unsupported address type for address payload hash-prefix: {addr_type:?}") }); - }, + return Err(BrkError { + message: format!( + "Unsupported address type for address payload hash-prefix: {addr_type:?}" + ), + }); + } }; if !expected.contains(&payload.len()) { @@ -79,7 +88,9 @@ fn validate_address_payload_for_type(addr_type: OutputType, payload: &[u8]) -> R .map(ToString::to_string) .collect::>() .join(" or "); - return Err(BrkError { message: format!("Expected {addr_type} address payload length {joined} bytes") }); + return Err(BrkError { + message: format!("Expected {addr_type} address payload length {joined} bytes"), + }); } Ok(()) @@ -101,9 +112,13 @@ mod address_payload_tests { /// Decode a mainnet Bitcoin address into the BRK address type and raw payload bytes. pub fn decode_address_payload(address: &str) -> Result { if address.is_empty() { - return Err(BrkError { message: "Expected an address string".to_string() }); + return Err(BrkError { + message: "Expected an address string".to_string(), + }); } - let addr_bytes = AddrBytes::from_str(address).map_err(|e| BrkError { message: e.to_string() })?; + let addr_bytes = AddrBytes::from_str(address).map_err(|e| BrkError { + message: e.to_string(), + })?; let addr_type = OutputType::from(&addr_bytes); Ok(AddressPayload { @@ -147,7 +162,10 @@ pub struct BrkClientBase { impl BrkClientBase { /// Create a new client with the given base URL. pub fn new(base_url: impl Into) -> Self { - Self::with_options(BrkClientOptions { base_url: base_url.into(), ..Default::default() }) + Self::with_options(BrkClientOptions { + base_url: base_url.into(), + ..Default::default() + }) } /// Create a new client with options. @@ -168,68 +186,93 @@ impl BrkClientBase { /// Make a GET request and deserialize JSON response. pub fn get_json(&self, path: &str) -> Result { - self.agent.get(&self.url(path)) + self.agent + .get(&self.url(path)) .call() .and_then(|mut r| r.body_mut().read_json()) - .map_err(|e| BrkError { message: e.to_string() }) + .map_err(|e| BrkError { + message: e.to_string(), + }) } /// Make a GET request and return raw text response. pub fn get_text(&self, path: &str) -> Result { - self.agent.get(&self.url(path)) + self.agent + .get(&self.url(path)) .call() .and_then(|mut r| r.body_mut().read_to_string()) - .map_err(|e| BrkError { message: e.to_string() }) + .map_err(|e| BrkError { + message: e.to_string(), + }) } /// Make a GET request and return raw bytes response. pub fn get_bytes(&self, path: &str) -> Result> { - self.agent.get(&self.url(path)) + self.agent + .get(&self.url(path)) .call() .and_then(|mut r| r.body_mut().read_to_vec()) - .map_err(|e| BrkError { message: e.to_string() }) + .map_err(|e| BrkError { + message: e.to_string(), + }) } /// Make a POST request and deserialize JSON response. pub fn post_json(&self, path: &str, body: &str) -> Result { - self.agent.post(&self.url(path)) + self.agent + .post(&self.url(path)) .send(body) .and_then(|mut r| r.body_mut().read_json()) - .map_err(|e| BrkError { message: e.to_string() }) + .map_err(|e| BrkError { + message: e.to_string(), + }) } /// Make a POST request and return raw text response. pub fn post_text(&self, path: &str, body: &str) -> Result { - self.agent.post(&self.url(path)) + self.agent + .post(&self.url(path)) .send(body) .and_then(|mut r| r.body_mut().read_to_string()) - .map_err(|e| BrkError { message: e.to_string() }) + .map_err(|e| BrkError { + message: e.to_string(), + }) } /// Make a POST request and return raw bytes response. pub fn post_bytes(&self, path: &str, body: &str) -> Result> { - self.agent.post(&self.url(path)) + self.agent + .post(&self.url(path)) .send(body) .and_then(|mut r| r.body_mut().read_to_vec()) - .map_err(|e| BrkError { message: e.to_string() }) + .map_err(|e| BrkError { + message: e.to_string(), + }) } } /// Build series name with suffix. #[inline] fn _m(acc: &str, s: &str) -> String { - if s.is_empty() { acc.to_string() } - else if acc.is_empty() { s.to_string() } - else { format!("{acc}_{s}") } + if s.is_empty() { + acc.to_string() + } else if acc.is_empty() { + s.to_string() + } else { + format!("{acc}_{s}") + } } /// Build series name with prefix. #[inline] fn _p(prefix: &str, acc: &str) -> String { - if acc.is_empty() { prefix.to_string() } else { format!("{prefix}_{acc}") } + if acc.is_empty() { + prefix.to_string() + } else { + format!("{prefix}_{acc}") + } } - /// Non-generic trait for series patterns (usable in collections). pub trait AnySeriesPattern { /// Get the series name. @@ -245,7 +288,6 @@ pub trait SeriesPattern: AnySeriesPattern { fn get(&self, index: Index) -> Option>; } - /// Shared endpoint configuration. #[derive(Clone)] struct EndpointConfig { @@ -258,7 +300,13 @@ struct EndpointConfig { impl EndpointConfig { fn new(client: Arc, name: Arc, index: Index) -> Self { - Self { client, name, index, start: None, end: None } + Self { + client, + name, + index, + start: None, + end: None, + } } fn path(&self) -> String { @@ -267,11 +315,21 @@ impl EndpointConfig { fn build_path(&self, format: Option<&str>) -> String { let mut params = Vec::new(); - if let Some(s) = self.start { params.push(format!("start={}", s)); } - if let Some(e) = self.end { params.push(format!("end={}", e)); } - if let Some(fmt) = format { params.push(format!("format={}", fmt)); } + if let Some(s) = self.start { + params.push(format!("start={}", s)); + } + if let Some(e) = self.end { + params.push(format!("end={}", e)); + } + if let Some(fmt) = format { + params.push(format!("format={}", fmt)); + } let p = self.path(); - if params.is_empty() { p } else { format!("{}?{}", p, params.join("&")) } + if params.is_empty() { + p + } else { + format!("{}?{}", p, params.join("&")) + } } fn get_json(&self, format: Option<&str>) -> Result { @@ -283,11 +341,19 @@ impl EndpointConfig { } fn get_len(&self) -> Result { - self.client.get_json(&format!("/api/series/{}/{}/len", self.name, self.index.name())) + self.client.get_json(&format!( + "/api/series/{}/{}/len", + self.name, + self.index.name() + )) } fn get_version(&self) -> Result { - self.client.get_json(&format!("/api/series/{}/{}/version", self.name, self.index.name())) + self.client.get_json(&format!( + "/api/series/{}/{}/version", + self.name, + self.index.name() + )) } } @@ -319,14 +385,20 @@ pub type DateSeriesEndpoint = SeriesEndpoint>; impl SeriesEndpoint { pub fn new(client: Arc, name: Arc, index: Index) -> Self { - Self { config: EndpointConfig::new(client, name, index), _marker: std::marker::PhantomData } + Self { + config: EndpointConfig::new(client, name, index), + _marker: std::marker::PhantomData, + } } /// Select a specific index position. pub fn get(mut self, index: usize) -> SingleItemBuilder { self.config.start = Some(index as i64); self.config.end = Some(index as i64 + 1); - SingleItemBuilder { config: self.config, _marker: std::marker::PhantomData } + SingleItemBuilder { + config: self.config, + _marker: std::marker::PhantomData, + } } /// Select a range using Rust range syntax. @@ -348,7 +420,10 @@ impl SeriesEndpoint { Bound::Excluded(&n) => Some(n as i64), Bound::Unbounded => None, }; - RangeBuilder { config: self.config, _marker: std::marker::PhantomData } + RangeBuilder { + config: self.config, + _marker: std::marker::PhantomData, + } } /// Take the first n items. @@ -363,13 +438,19 @@ impl SeriesEndpoint { } else { self.config.start = Some(-(n as i64)); } - RangeBuilder { config: self.config, _marker: std::marker::PhantomData } + RangeBuilder { + config: self.config, + _marker: std::marker::PhantomData, + } } /// Skip the first n items. Chain with `take(n)` to get a range. pub fn skip(mut self, n: usize) -> SkippedBuilder { self.config.start = Some(n as i64); - SkippedBuilder { config: self.config, _marker: std::marker::PhantomData } + SkippedBuilder { + config: self.config, + _marker: std::marker::PhantomData, + } } /// Fetch all data as parsed JSON. @@ -421,7 +502,11 @@ impl SeriesEndpoint> { } /// Select a timestamp range (works for all date-based indexes including sub-daily). - pub fn timestamp_range(self, start: Timestamp, end: Timestamp) -> RangeBuilder> { + pub fn timestamp_range( + self, + start: Timestamp, + end: Timestamp, + ) -> RangeBuilder> { let s = self.config.index.timestamp_to_index(start).unwrap_or(0); let e = self.config.index.timestamp_to_index(end).unwrap_or(0); self.range(s..e) @@ -463,7 +548,10 @@ impl SkippedBuilder { pub fn take(mut self, n: usize) -> RangeBuilder { let start = self.config.start.unwrap_or(0); self.config.end = Some(start + n as i64); - RangeBuilder { config: self.config, _marker: std::marker::PhantomData } + RangeBuilder { + config: self.config, + _marker: std::marker::PhantomData, + } } /// Fetch from the skipped position to the end. @@ -498,10 +586,42 @@ impl RangeBuilder { } } - // Static index arrays -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::Halving, Index::Epoch, 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::Halving, Index::Epoch]; +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::Halving, + Index::Epoch, + 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::Halving, + Index::Epoch, +]; const _I3: &[Index] = &[Index::Minute10]; const _I4: &[Index] = &[Index::Minute30]; const _I5: &[Index] = &[Index::Hour1]; @@ -542,530 +662,1747 @@ fn _ep(c: &Arc, n: &Arc, i: Index) -> S } #[inline] -fn _dep(c: &Arc, n: &Arc, i: Index) -> DateSeriesEndpoint { +fn _dep( + c: &Arc, + n: &Arc, + i: Index, +) -> DateSeriesEndpoint { DateSeriesEndpoint::new(c.clone(), n.clone(), i) } // Index accessor structs -pub struct SeriesPattern1By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern1By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern1By { - pub fn minute10(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Minute10) } - pub fn minute30(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Minute30) } - pub fn hour1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Hour1) } - pub fn hour4(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Hour4) } - pub fn hour12(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Hour12) } - pub fn day1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Day1) } - pub fn day3(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Day3) } - pub fn week1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Week1) } - pub fn month1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Month1) } - pub fn month3(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Month3) } - pub fn month6(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Month6) } - pub fn year1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Year1) } - pub fn year10(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Year10) } - pub fn halving(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::Halving) } - pub fn epoch(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::Epoch) } - pub fn height(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::Height) } + pub fn minute10(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Minute10) + } + pub fn minute30(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Minute30) + } + pub fn hour1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Hour1) + } + pub fn hour4(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Hour4) + } + pub fn hour12(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Hour12) + } + pub fn day1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Day1) + } + pub fn day3(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Day3) + } + pub fn week1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Week1) + } + pub fn month1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Month1) + } + pub fn month3(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Month3) + } + pub fn month6(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Month6) + } + pub fn year1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Year1) + } + pub fn year10(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Year10) + } + pub fn halving(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::Halving) + } + pub fn epoch(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::Epoch) + } + pub fn height(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::Height) + } } -pub struct SeriesPattern1 { name: Arc, pub by: SeriesPattern1By } +pub struct SeriesPattern1 { + name: Arc, + pub by: SeriesPattern1By, +} impl SeriesPattern1 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern1By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern1By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern1 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I1 } } -impl SeriesPattern for SeriesPattern1 { fn get(&self, index: Index) -> Option> { _I1.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern1 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I1 + } +} +impl SeriesPattern for SeriesPattern1 { + fn get(&self, index: Index) -> Option> { + _I1.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern2By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern2By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern2By { - pub fn minute10(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Minute10) } - pub fn minute30(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Minute30) } - pub fn hour1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Hour1) } - pub fn hour4(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Hour4) } - pub fn hour12(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Hour12) } - pub fn day1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Day1) } - pub fn day3(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Day3) } - pub fn week1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Week1) } - pub fn month1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Month1) } - pub fn month3(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Month3) } - pub fn month6(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Month6) } - pub fn year1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Year1) } - pub fn year10(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Year10) } - pub fn halving(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::Halving) } - pub fn epoch(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::Epoch) } + pub fn minute10(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Minute10) + } + pub fn minute30(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Minute30) + } + pub fn hour1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Hour1) + } + pub fn hour4(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Hour4) + } + pub fn hour12(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Hour12) + } + pub fn day1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Day1) + } + pub fn day3(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Day3) + } + pub fn week1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Week1) + } + pub fn month1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Month1) + } + pub fn month3(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Month3) + } + pub fn month6(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Month6) + } + pub fn year1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Year1) + } + pub fn year10(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Year10) + } + pub fn halving(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::Halving) + } + pub fn epoch(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::Epoch) + } } -pub struct SeriesPattern2 { name: Arc, pub by: SeriesPattern2By } +pub struct SeriesPattern2 { + name: Arc, + pub by: SeriesPattern2By, +} impl SeriesPattern2 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern2By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern2By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern2 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I2 } } -impl SeriesPattern for SeriesPattern2 { fn get(&self, index: Index) -> Option> { _I2.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern2 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I2 + } +} +impl SeriesPattern for SeriesPattern2 { + fn get(&self, index: Index) -> Option> { + _I2.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern3By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern3By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern3By { - pub fn minute10(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Minute10) } + pub fn minute10(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Minute10) + } } -pub struct SeriesPattern3 { name: Arc, pub by: SeriesPattern3By } +pub struct SeriesPattern3 { + name: Arc, + pub by: SeriesPattern3By, +} impl SeriesPattern3 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern3By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern3By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern3 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I3 } } -impl SeriesPattern for SeriesPattern3 { fn get(&self, index: Index) -> Option> { _I3.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern3 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I3 + } +} +impl SeriesPattern for SeriesPattern3 { + fn get(&self, index: Index) -> Option> { + _I3.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern4By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern4By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern4By { - pub fn minute30(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Minute30) } + pub fn minute30(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Minute30) + } } -pub struct SeriesPattern4 { name: Arc, pub by: SeriesPattern4By } +pub struct SeriesPattern4 { + name: Arc, + pub by: SeriesPattern4By, +} impl SeriesPattern4 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern4By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern4By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern4 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I4 } } -impl SeriesPattern for SeriesPattern4 { fn get(&self, index: Index) -> Option> { _I4.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern4 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I4 + } +} +impl SeriesPattern for SeriesPattern4 { + fn get(&self, index: Index) -> Option> { + _I4.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern5By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern5By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern5By { - pub fn hour1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Hour1) } + pub fn hour1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Hour1) + } } -pub struct SeriesPattern5 { name: Arc, pub by: SeriesPattern5By } +pub struct SeriesPattern5 { + name: Arc, + pub by: SeriesPattern5By, +} impl SeriesPattern5 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern5By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern5By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern5 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I5 } } -impl SeriesPattern for SeriesPattern5 { fn get(&self, index: Index) -> Option> { _I5.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern5 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I5 + } +} +impl SeriesPattern for SeriesPattern5 { + fn get(&self, index: Index) -> Option> { + _I5.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern6By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern6By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern6By { - pub fn hour4(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Hour4) } + pub fn hour4(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Hour4) + } } -pub struct SeriesPattern6 { name: Arc, pub by: SeriesPattern6By } +pub struct SeriesPattern6 { + name: Arc, + pub by: SeriesPattern6By, +} impl SeriesPattern6 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern6By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern6By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern6 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I6 } } -impl SeriesPattern for SeriesPattern6 { fn get(&self, index: Index) -> Option> { _I6.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern6 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I6 + } +} +impl SeriesPattern for SeriesPattern6 { + fn get(&self, index: Index) -> Option> { + _I6.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern7By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern7By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern7By { - pub fn hour12(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Hour12) } + pub fn hour12(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Hour12) + } } -pub struct SeriesPattern7 { name: Arc, pub by: SeriesPattern7By } +pub struct SeriesPattern7 { + name: Arc, + pub by: SeriesPattern7By, +} impl SeriesPattern7 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern7By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern7By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern7 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I7 } } -impl SeriesPattern for SeriesPattern7 { fn get(&self, index: Index) -> Option> { _I7.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern7 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I7 + } +} +impl SeriesPattern for SeriesPattern7 { + fn get(&self, index: Index) -> Option> { + _I7.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern8By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern8By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern8By { - pub fn day1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Day1) } + pub fn day1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Day1) + } } -pub struct SeriesPattern8 { name: Arc, pub by: SeriesPattern8By } +pub struct SeriesPattern8 { + name: Arc, + pub by: SeriesPattern8By, +} impl SeriesPattern8 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern8By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern8By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern8 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I8 } } -impl SeriesPattern for SeriesPattern8 { fn get(&self, index: Index) -> Option> { _I8.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern8 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I8 + } +} +impl SeriesPattern for SeriesPattern8 { + fn get(&self, index: Index) -> Option> { + _I8.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern9By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern9By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern9By { - pub fn day3(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Day3) } + pub fn day3(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Day3) + } } -pub struct SeriesPattern9 { name: Arc, pub by: SeriesPattern9By } +pub struct SeriesPattern9 { + name: Arc, + pub by: SeriesPattern9By, +} impl SeriesPattern9 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern9By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern9By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern9 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I9 } } -impl SeriesPattern for SeriesPattern9 { fn get(&self, index: Index) -> Option> { _I9.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern9 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I9 + } +} +impl SeriesPattern for SeriesPattern9 { + fn get(&self, index: Index) -> Option> { + _I9.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern10By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern10By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern10By { - pub fn week1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Week1) } + pub fn week1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Week1) + } } -pub struct SeriesPattern10 { name: Arc, pub by: SeriesPattern10By } +pub struct SeriesPattern10 { + name: Arc, + pub by: SeriesPattern10By, +} impl SeriesPattern10 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern10By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern10By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern10 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I10 } } -impl SeriesPattern for SeriesPattern10 { fn get(&self, index: Index) -> Option> { _I10.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern10 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I10 + } +} +impl SeriesPattern for SeriesPattern10 { + fn get(&self, index: Index) -> Option> { + _I10.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern11By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern11By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern11By { - pub fn month1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Month1) } + pub fn month1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Month1) + } } -pub struct SeriesPattern11 { name: Arc, pub by: SeriesPattern11By } +pub struct SeriesPattern11 { + name: Arc, + pub by: SeriesPattern11By, +} impl SeriesPattern11 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern11By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern11By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern11 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I11 } } -impl SeriesPattern for SeriesPattern11 { fn get(&self, index: Index) -> Option> { _I11.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern11 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I11 + } +} +impl SeriesPattern for SeriesPattern11 { + fn get(&self, index: Index) -> Option> { + _I11.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern12By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern12By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern12By { - pub fn month3(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Month3) } + pub fn month3(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Month3) + } } -pub struct SeriesPattern12 { name: Arc, pub by: SeriesPattern12By } +pub struct SeriesPattern12 { + name: Arc, + pub by: SeriesPattern12By, +} impl SeriesPattern12 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern12By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern12By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern12 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I12 } } -impl SeriesPattern for SeriesPattern12 { fn get(&self, index: Index) -> Option> { _I12.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern12 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I12 + } +} +impl SeriesPattern for SeriesPattern12 { + fn get(&self, index: Index) -> Option> { + _I12.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern13By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern13By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern13By { - pub fn month6(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Month6) } + pub fn month6(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Month6) + } } -pub struct SeriesPattern13 { name: Arc, pub by: SeriesPattern13By } +pub struct SeriesPattern13 { + name: Arc, + pub by: SeriesPattern13By, +} impl SeriesPattern13 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern13By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern13By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern13 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I13 } } -impl SeriesPattern for SeriesPattern13 { fn get(&self, index: Index) -> Option> { _I13.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern13 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I13 + } +} +impl SeriesPattern for SeriesPattern13 { + fn get(&self, index: Index) -> Option> { + _I13.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern14By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern14By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern14By { - pub fn year1(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Year1) } + pub fn year1(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Year1) + } } -pub struct SeriesPattern14 { name: Arc, pub by: SeriesPattern14By } +pub struct SeriesPattern14 { + name: Arc, + pub by: SeriesPattern14By, +} impl SeriesPattern14 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern14By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern14By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern14 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I14 } } -impl SeriesPattern for SeriesPattern14 { fn get(&self, index: Index) -> Option> { _I14.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern14 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I14 + } +} +impl SeriesPattern for SeriesPattern14 { + fn get(&self, index: Index) -> Option> { + _I14.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern15By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern15By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern15By { - pub fn year10(&self) -> DateSeriesEndpoint { _dep(&self.client, &self.name, Index::Year10) } + pub fn year10(&self) -> DateSeriesEndpoint { + _dep(&self.client, &self.name, Index::Year10) + } } -pub struct SeriesPattern15 { name: Arc, pub by: SeriesPattern15By } +pub struct SeriesPattern15 { + name: Arc, + pub by: SeriesPattern15By, +} impl SeriesPattern15 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern15By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern15By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern15 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I15 } } -impl SeriesPattern for SeriesPattern15 { fn get(&self, index: Index) -> Option> { _I15.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern15 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I15 + } +} +impl SeriesPattern for SeriesPattern15 { + fn get(&self, index: Index) -> Option> { + _I15.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern16By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern16By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern16By { - pub fn halving(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::Halving) } + pub fn halving(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::Halving) + } } -pub struct SeriesPattern16 { name: Arc, pub by: SeriesPattern16By } +pub struct SeriesPattern16 { + name: Arc, + pub by: SeriesPattern16By, +} impl SeriesPattern16 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern16By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern16By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern16 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I16 } } -impl SeriesPattern for SeriesPattern16 { fn get(&self, index: Index) -> Option> { _I16.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern16 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I16 + } +} +impl SeriesPattern for SeriesPattern16 { + fn get(&self, index: Index) -> Option> { + _I16.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern17By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern17By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern17By { - pub fn epoch(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::Epoch) } + pub fn epoch(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::Epoch) + } } -pub struct SeriesPattern17 { name: Arc, pub by: SeriesPattern17By } +pub struct SeriesPattern17 { + name: Arc, + pub by: SeriesPattern17By, +} impl SeriesPattern17 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern17By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern17By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern17 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I17 } } -impl SeriesPattern for SeriesPattern17 { fn get(&self, index: Index) -> Option> { _I17.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern17 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I17 + } +} +impl SeriesPattern for SeriesPattern17 { + fn get(&self, index: Index) -> Option> { + _I17.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern18By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern18By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern18By { - pub fn height(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::Height) } + pub fn height(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::Height) + } } -pub struct SeriesPattern18 { name: Arc, pub by: SeriesPattern18By } +pub struct SeriesPattern18 { + name: Arc, + pub by: SeriesPattern18By, +} impl SeriesPattern18 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern18By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern18By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern18 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I18 } } -impl SeriesPattern for SeriesPattern18 { fn get(&self, index: Index) -> Option> { _I18.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern18 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I18 + } +} +impl SeriesPattern for SeriesPattern18 { + fn get(&self, index: Index) -> Option> { + _I18.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern19By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern19By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern19By { - pub fn tx_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::TxIndex) } + pub fn tx_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::TxIndex) + } } -pub struct SeriesPattern19 { name: Arc, pub by: SeriesPattern19By } +pub struct SeriesPattern19 { + name: Arc, + pub by: SeriesPattern19By, +} impl SeriesPattern19 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern19By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern19By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern19 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I19 } } -impl SeriesPattern for SeriesPattern19 { fn get(&self, index: Index) -> Option> { _I19.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern19 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I19 + } +} +impl SeriesPattern for SeriesPattern19 { + fn get(&self, index: Index) -> Option> { + _I19.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern20By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern20By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern20By { - pub fn txin_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::TxInIndex) } + pub fn txin_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::TxInIndex) + } } -pub struct SeriesPattern20 { name: Arc, pub by: SeriesPattern20By } +pub struct SeriesPattern20 { + name: Arc, + pub by: SeriesPattern20By, +} impl SeriesPattern20 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern20By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern20By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern20 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I20 } } -impl SeriesPattern for SeriesPattern20 { fn get(&self, index: Index) -> Option> { _I20.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern20 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I20 + } +} +impl SeriesPattern for SeriesPattern20 { + fn get(&self, index: Index) -> Option> { + _I20.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern21By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern21By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern21By { - pub fn txout_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::TxOutIndex) } + pub fn txout_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::TxOutIndex) + } } -pub struct SeriesPattern21 { name: Arc, pub by: SeriesPattern21By } +pub struct SeriesPattern21 { + name: Arc, + pub by: SeriesPattern21By, +} impl SeriesPattern21 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern21By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern21By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern21 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I21 } } -impl SeriesPattern for SeriesPattern21 { fn get(&self, index: Index) -> Option> { _I21.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern21 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I21 + } +} +impl SeriesPattern for SeriesPattern21 { + fn get(&self, index: Index) -> Option> { + _I21.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern22By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern22By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern22By { - pub fn empty_output_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::EmptyOutputIndex) } + pub fn empty_output_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::EmptyOutputIndex) + } } -pub struct SeriesPattern22 { name: Arc, pub by: SeriesPattern22By } +pub struct SeriesPattern22 { + name: Arc, + pub by: SeriesPattern22By, +} impl SeriesPattern22 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern22By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern22By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern22 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I22 } } -impl SeriesPattern for SeriesPattern22 { fn get(&self, index: Index) -> Option> { _I22.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern22 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I22 + } +} +impl SeriesPattern for SeriesPattern22 { + fn get(&self, index: Index) -> Option> { + _I22.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern23By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern23By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern23By { - pub fn op_return_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::OpReturnIndex) } + pub fn op_return_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::OpReturnIndex) + } } -pub struct SeriesPattern23 { name: Arc, pub by: SeriesPattern23By } +pub struct SeriesPattern23 { + name: Arc, + pub by: SeriesPattern23By, +} impl SeriesPattern23 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern23By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern23By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern23 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I23 } } -impl SeriesPattern for SeriesPattern23 { fn get(&self, index: Index) -> Option> { _I23.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern23 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I23 + } +} +impl SeriesPattern for SeriesPattern23 { + fn get(&self, index: Index) -> Option> { + _I23.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern24By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern24By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern24By { - pub fn p2a_addr_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::P2AAddrIndex) } + pub fn p2a_addr_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::P2AAddrIndex) + } } -pub struct SeriesPattern24 { name: Arc, pub by: SeriesPattern24By } +pub struct SeriesPattern24 { + name: Arc, + pub by: SeriesPattern24By, +} impl SeriesPattern24 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern24By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern24By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern24 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I24 } } -impl SeriesPattern for SeriesPattern24 { fn get(&self, index: Index) -> Option> { _I24.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern24 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I24 + } +} +impl SeriesPattern for SeriesPattern24 { + fn get(&self, index: Index) -> Option> { + _I24.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern25By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern25By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern25By { - pub fn p2ms_output_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::P2MSOutputIndex) } + pub fn p2ms_output_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::P2MSOutputIndex) + } } -pub struct SeriesPattern25 { name: Arc, pub by: SeriesPattern25By } +pub struct SeriesPattern25 { + name: Arc, + pub by: SeriesPattern25By, +} impl SeriesPattern25 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern25By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern25By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern25 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I25 } } -impl SeriesPattern for SeriesPattern25 { fn get(&self, index: Index) -> Option> { _I25.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern25 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I25 + } +} +impl SeriesPattern for SeriesPattern25 { + fn get(&self, index: Index) -> Option> { + _I25.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern26By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern26By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern26By { - pub fn p2pk33_addr_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::P2PK33AddrIndex) } + pub fn p2pk33_addr_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::P2PK33AddrIndex) + } } -pub struct SeriesPattern26 { name: Arc, pub by: SeriesPattern26By } +pub struct SeriesPattern26 { + name: Arc, + pub by: SeriesPattern26By, +} impl SeriesPattern26 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern26By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern26By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern26 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I26 } } -impl SeriesPattern for SeriesPattern26 { fn get(&self, index: Index) -> Option> { _I26.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern26 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I26 + } +} +impl SeriesPattern for SeriesPattern26 { + fn get(&self, index: Index) -> Option> { + _I26.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern27By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern27By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern27By { - pub fn p2pk65_addr_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::P2PK65AddrIndex) } + pub fn p2pk65_addr_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::P2PK65AddrIndex) + } } -pub struct SeriesPattern27 { name: Arc, pub by: SeriesPattern27By } +pub struct SeriesPattern27 { + name: Arc, + pub by: SeriesPattern27By, +} impl SeriesPattern27 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern27By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern27By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern27 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I27 } } -impl SeriesPattern for SeriesPattern27 { fn get(&self, index: Index) -> Option> { _I27.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern27 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I27 + } +} +impl SeriesPattern for SeriesPattern27 { + fn get(&self, index: Index) -> Option> { + _I27.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern28By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern28By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern28By { - pub fn p2pkh_addr_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::P2PKHAddrIndex) } + pub fn p2pkh_addr_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::P2PKHAddrIndex) + } } -pub struct SeriesPattern28 { name: Arc, pub by: SeriesPattern28By } +pub struct SeriesPattern28 { + name: Arc, + pub by: SeriesPattern28By, +} impl SeriesPattern28 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern28By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern28By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern28 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I28 } } -impl SeriesPattern for SeriesPattern28 { fn get(&self, index: Index) -> Option> { _I28.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern28 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I28 + } +} +impl SeriesPattern for SeriesPattern28 { + fn get(&self, index: Index) -> Option> { + _I28.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern29By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern29By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern29By { - pub fn p2sh_addr_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::P2SHAddrIndex) } + pub fn p2sh_addr_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::P2SHAddrIndex) + } } -pub struct SeriesPattern29 { name: Arc, pub by: SeriesPattern29By } +pub struct SeriesPattern29 { + name: Arc, + pub by: SeriesPattern29By, +} impl SeriesPattern29 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern29By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern29By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern29 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I29 } } -impl SeriesPattern for SeriesPattern29 { fn get(&self, index: Index) -> Option> { _I29.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern29 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I29 + } +} +impl SeriesPattern for SeriesPattern29 { + fn get(&self, index: Index) -> Option> { + _I29.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern30By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern30By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern30By { - pub fn p2tr_addr_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::P2TRAddrIndex) } + pub fn p2tr_addr_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::P2TRAddrIndex) + } } -pub struct SeriesPattern30 { name: Arc, pub by: SeriesPattern30By } +pub struct SeriesPattern30 { + name: Arc, + pub by: SeriesPattern30By, +} impl SeriesPattern30 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern30By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern30By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern30 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I30 } } -impl SeriesPattern for SeriesPattern30 { fn get(&self, index: Index) -> Option> { _I30.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern30 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I30 + } +} +impl SeriesPattern for SeriesPattern30 { + fn get(&self, index: Index) -> Option> { + _I30.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern31By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern31By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern31By { - pub fn p2wpkh_addr_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::P2WPKHAddrIndex) } + pub fn p2wpkh_addr_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::P2WPKHAddrIndex) + } } -pub struct SeriesPattern31 { name: Arc, pub by: SeriesPattern31By } +pub struct SeriesPattern31 { + name: Arc, + pub by: SeriesPattern31By, +} impl SeriesPattern31 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern31By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern31By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern31 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I31 } } -impl SeriesPattern for SeriesPattern31 { fn get(&self, index: Index) -> Option> { _I31.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern31 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I31 + } +} +impl SeriesPattern for SeriesPattern31 { + fn get(&self, index: Index) -> Option> { + _I31.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern32By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern32By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern32By { - pub fn p2wsh_addr_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::P2WSHAddrIndex) } + pub fn p2wsh_addr_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::P2WSHAddrIndex) + } } -pub struct SeriesPattern32 { name: Arc, pub by: SeriesPattern32By } +pub struct SeriesPattern32 { + name: Arc, + pub by: SeriesPattern32By, +} impl SeriesPattern32 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern32By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern32By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern32 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I32 } } -impl SeriesPattern for SeriesPattern32 { fn get(&self, index: Index) -> Option> { _I32.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern32 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I32 + } +} +impl SeriesPattern for SeriesPattern32 { + fn get(&self, index: Index) -> Option> { + _I32.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern33By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern33By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern33By { - pub fn unknown_output_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::UnknownOutputIndex) } + pub fn unknown_output_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::UnknownOutputIndex) + } } -pub struct SeriesPattern33 { name: Arc, pub by: SeriesPattern33By } +pub struct SeriesPattern33 { + name: Arc, + pub by: SeriesPattern33By, +} impl SeriesPattern33 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern33By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern33By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern33 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I33 } } -impl SeriesPattern for SeriesPattern33 { fn get(&self, index: Index) -> Option> { _I33.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern33 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I33 + } +} +impl SeriesPattern for SeriesPattern33 { + fn get(&self, index: Index) -> Option> { + _I33.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern34By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern34By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern34By { - pub fn funded_addr_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::FundedAddrIndex) } + pub fn funded_addr_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::FundedAddrIndex) + } } -pub struct SeriesPattern34 { name: Arc, pub by: SeriesPattern34By } +pub struct SeriesPattern34 { + name: Arc, + pub by: SeriesPattern34By, +} impl SeriesPattern34 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern34By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern34By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern34 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I34 } } -impl SeriesPattern for SeriesPattern34 { fn get(&self, index: Index) -> Option> { _I34.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern34 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I34 + } +} +impl SeriesPattern for SeriesPattern34 { + fn get(&self, index: Index) -> Option> { + _I34.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} -pub struct SeriesPattern35By { client: Arc, name: Arc, _marker: std::marker::PhantomData } +pub struct SeriesPattern35By { + client: Arc, + name: Arc, + _marker: std::marker::PhantomData, +} impl SeriesPattern35By { - pub fn empty_addr_index(&self) -> SeriesEndpoint { _ep(&self.client, &self.name, Index::EmptyAddrIndex) } + pub fn empty_addr_index(&self) -> SeriesEndpoint { + _ep(&self.client, &self.name, Index::EmptyAddrIndex) + } } -pub struct SeriesPattern35 { name: Arc, pub by: SeriesPattern35By } +pub struct SeriesPattern35 { + name: Arc, + pub by: SeriesPattern35By, +} impl SeriesPattern35 { - pub fn new(client: Arc, name: String) -> Self { let name: Arc = name.into(); Self { name: name.clone(), by: SeriesPattern35By { client, name, _marker: std::marker::PhantomData } } } - pub fn name(&self) -> &str { &self.name } + pub fn new(client: Arc, name: String) -> Self { + let name: Arc = name.into(); + Self { + name: name.clone(), + by: SeriesPattern35By { + client, + name, + _marker: std::marker::PhantomData, + }, + } + } + pub fn name(&self) -> &str { + &self.name + } } -impl AnySeriesPattern for SeriesPattern35 { fn name(&self) -> &str { &self.name } fn indexes(&self) -> &'static [Index] { _I35 } } -impl SeriesPattern for SeriesPattern35 { fn get(&self, index: Index) -> Option> { _I35.contains(&index).then(|| _ep(&self.by.client, &self.by.name, index)) } } +impl AnySeriesPattern for SeriesPattern35 { + fn name(&self) -> &str { + &self.name + } + fn indexes(&self) -> &'static [Index] { + _I35 + } +} +impl SeriesPattern for SeriesPattern35 { + fn get(&self, index: Index) -> Option> { + _I35.contains(&index) + .then(|| _ep(&self.by.client, &self.by.name, index)) + } +} // Reusable pattern structs @@ -1183,7 +2520,9 @@ pub struct _10y12y18m1d1h1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mHeightOverUnderPattern } /// Pattern struct for repeated tree structure. -pub struct AscribeBareBitproofBlockstackCoinColuCumulativeDocproofEmptyEpobcEternityFactomKomodoMemoOmniOpenPoetRunesStacksStamperyTextUnknownVeriPattern3 { +pub struct AscribeBareBitproofBlockstackCoinColuCumulativeDocproofEmptyEpobcEternityFactomKomodoMemoOmniOpenPoetRunesStacksStamperyTextUnknownVeriPattern3< + T, +> { pub ascribe: AverageBlockCumulativeSumPattern, pub bare_hash: AverageBlockCumulativeSumPattern, pub bitproof: AverageBlockCumulativeSumPattern, @@ -1268,29 +2607,167 @@ impl _10y12y18m1d1h1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mOverUnderPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String, disc: String) -> Self { Self { - _10y_to_12y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("10y_to_12y_old_transfer_volume{disc}", disc=disc))), - _12y_to_15y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("12y_to_15y_old_transfer_volume{disc}", disc=disc))), - _18m_to_2y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("18m_to_2y_old_transfer_volume{disc}", disc=disc))), - _1d_to_1w: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1d_to_1w_old_transfer_volume{disc}", disc=disc))), - _1h_to_1d: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1h_to_1d_old_transfer_volume{disc}", disc=disc))), - _1m_to_2m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1m_to_2m_old_transfer_volume{disc}", disc=disc))), - _1w_to_1m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1w_to_1m_old_transfer_volume{disc}", disc=disc))), - _1y_to_18m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1y_to_18m_old_transfer_volume{disc}", disc=disc))), - _2m_to_3m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2m_to_3m_old_transfer_volume{disc}", disc=disc))), - _2y_to_3y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2y_to_3y_old_transfer_volume{disc}", disc=disc))), - _3m_to_4m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("3m_to_4m_old_transfer_volume{disc}", disc=disc))), - _3y_to_4y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("3y_to_4y_old_transfer_volume{disc}", disc=disc))), - _4m_to_5m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("4m_to_5m_old_transfer_volume{disc}", disc=disc))), - _4y_to_5y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("4y_to_5y_old_transfer_volume{disc}", disc=disc))), - _5m_to_6m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("5m_to_6m_old_transfer_volume{disc}", disc=disc))), - _5y_to_6y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("5y_to_6y_old_transfer_volume{disc}", disc=disc))), - _6m_to_9m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("6m_to_9m_old_transfer_volume{disc}", disc=disc))), - _6y_to_7y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("6y_to_7y_old_transfer_volume{disc}", disc=disc))), - _7y_to_8y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("7y_to_8y_old_transfer_volume{disc}", disc=disc))), - _8y_to_10y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("8y_to_10y_old_transfer_volume{disc}", disc=disc))), - _9m_to_1y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("9m_to_1y_old_transfer_volume{disc}", disc=disc))), - over_15y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("over_15y_old_transfer_volume{disc}", disc=disc))), - under_1h: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("under_1h_old_transfer_volume{disc}", disc=disc))), + _10y_to_12y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("10y_to_12y_old_transfer_volume{disc}", disc = disc), + ), + ), + _12y_to_15y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("12y_to_15y_old_transfer_volume{disc}", disc = disc), + ), + ), + _18m_to_2y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("18m_to_2y_old_transfer_volume{disc}", disc = disc), + ), + ), + _1d_to_1w: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("1d_to_1w_old_transfer_volume{disc}", disc = disc), + ), + ), + _1h_to_1d: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("1h_to_1d_old_transfer_volume{disc}", disc = disc), + ), + ), + _1m_to_2m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("1m_to_2m_old_transfer_volume{disc}", disc = disc), + ), + ), + _1w_to_1m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("1w_to_1m_old_transfer_volume{disc}", disc = disc), + ), + ), + _1y_to_18m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("1y_to_18m_old_transfer_volume{disc}", disc = disc), + ), + ), + _2m_to_3m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("2m_to_3m_old_transfer_volume{disc}", disc = disc), + ), + ), + _2y_to_3y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("2y_to_3y_old_transfer_volume{disc}", disc = disc), + ), + ), + _3m_to_4m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("3m_to_4m_old_transfer_volume{disc}", disc = disc), + ), + ), + _3y_to_4y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("3y_to_4y_old_transfer_volume{disc}", disc = disc), + ), + ), + _4m_to_5m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("4m_to_5m_old_transfer_volume{disc}", disc = disc), + ), + ), + _4y_to_5y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("4y_to_5y_old_transfer_volume{disc}", disc = disc), + ), + ), + _5m_to_6m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("5m_to_6m_old_transfer_volume{disc}", disc = disc), + ), + ), + _5y_to_6y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("5y_to_6y_old_transfer_volume{disc}", disc = disc), + ), + ), + _6m_to_9m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("6m_to_9m_old_transfer_volume{disc}", disc = disc), + ), + ), + _6y_to_7y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("6y_to_7y_old_transfer_volume{disc}", disc = disc), + ), + ), + _7y_to_8y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("7y_to_8y_old_transfer_volume{disc}", disc = disc), + ), + ), + _8y_to_10y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("8y_to_10y_old_transfer_volume{disc}", disc = disc), + ), + ), + _9m_to_1y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("9m_to_1y_old_transfer_volume{disc}", disc = disc), + ), + ), + over_15y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("over_15y_old_transfer_volume{disc}", disc = disc), + ), + ), + under_1h: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m( + &acc, + &format!("under_1h_old_transfer_volume{disc}", disc = disc), + ), + ), } } } @@ -1404,7 +2881,8 @@ pub struct _10y12y18m1d1h1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mOverUnderPattern7 { } /// Pattern struct for repeated tree structure. -pub struct HeightIndexPct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99ScorePattern { +pub struct HeightIndexPct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99ScorePattern +{ pub height: SeriesPattern18<[Cents; 19]>, pub index: SeriesPattern1, pub pct0_1: CentsSatsUsdPattern, @@ -1535,26 +3013,86 @@ impl _10y12y15y18m1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String, disc: String) -> Self { Self { - _10y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("10y_old_transfer_volume{disc}", disc=disc))), - _12y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("12y_old_transfer_volume{disc}", disc=disc))), - _15y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("15y_old_transfer_volume{disc}", disc=disc))), - _18m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("18m_old_transfer_volume{disc}", disc=disc))), - _1m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1m_old_transfer_volume{disc}", disc=disc))), - _1w: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1w_old_transfer_volume{disc}", disc=disc))), - _1y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1y_old_transfer_volume{disc}", disc=disc))), - _2m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2m_old_transfer_volume{disc}", disc=disc))), - _2y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2y_old_transfer_volume{disc}", disc=disc))), - _3m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("3m_old_transfer_volume{disc}", disc=disc))), - _3y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("3y_old_transfer_volume{disc}", disc=disc))), - _4m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("4m_old_transfer_volume{disc}", disc=disc))), - _4y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("4y_old_transfer_volume{disc}", disc=disc))), - _5m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("5m_old_transfer_volume{disc}", disc=disc))), - _5y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("5y_old_transfer_volume{disc}", disc=disc))), - _6m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("6m_old_transfer_volume{disc}", disc=disc))), - _6y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("6y_old_transfer_volume{disc}", disc=disc))), - _7y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("7y_old_transfer_volume{disc}", disc=disc))), - _8y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("8y_old_transfer_volume{disc}", disc=disc))), - _9m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("9m_old_transfer_volume{disc}", disc=disc))), + _10y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("10y_old_transfer_volume{disc}", disc = disc)), + ), + _12y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("12y_old_transfer_volume{disc}", disc = disc)), + ), + _15y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("15y_old_transfer_volume{disc}", disc = disc)), + ), + _18m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("18m_old_transfer_volume{disc}", disc = disc)), + ), + _1m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("1m_old_transfer_volume{disc}", disc = disc)), + ), + _1w: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("1w_old_transfer_volume{disc}", disc = disc)), + ), + _1y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("1y_old_transfer_volume{disc}", disc = disc)), + ), + _2m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2m_old_transfer_volume{disc}", disc = disc)), + ), + _2y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2y_old_transfer_volume{disc}", disc = disc)), + ), + _3m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("3m_old_transfer_volume{disc}", disc = disc)), + ), + _3y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("3y_old_transfer_volume{disc}", disc = disc)), + ), + _4m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("4m_old_transfer_volume{disc}", disc = disc)), + ), + _4y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("4y_old_transfer_volume{disc}", disc = disc)), + ), + _5m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("5m_old_transfer_volume{disc}", disc = disc)), + ), + _5y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("5y_old_transfer_volume{disc}", disc = disc)), + ), + _6m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("6m_old_transfer_volume{disc}", disc = disc)), + ), + _6y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("6y_old_transfer_volume{disc}", disc = disc)), + ), + _7y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("7y_old_transfer_volume{disc}", disc = disc)), + ), + _8y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("8y_old_transfer_volume{disc}", disc = disc)), + ), + _9m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("9m_old_transfer_volume{disc}", disc = disc)), + ), } } } @@ -1587,26 +3125,86 @@ impl _10y12y18m1d1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String, disc: String) -> Self { Self { - _10y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("10y_old_transfer_volume{disc}", disc=disc))), - _12y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("12y_old_transfer_volume{disc}", disc=disc))), - _18m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("18m_old_transfer_volume{disc}", disc=disc))), - _1d: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1d_old_transfer_volume{disc}", disc=disc))), - _1m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1m_old_transfer_volume{disc}", disc=disc))), - _1w: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1w_old_transfer_volume{disc}", disc=disc))), - _1y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1y_old_transfer_volume{disc}", disc=disc))), - _2m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2m_old_transfer_volume{disc}", disc=disc))), - _2y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2y_old_transfer_volume{disc}", disc=disc))), - _3m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("3m_old_transfer_volume{disc}", disc=disc))), - _3y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("3y_old_transfer_volume{disc}", disc=disc))), - _4m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("4m_old_transfer_volume{disc}", disc=disc))), - _4y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("4y_old_transfer_volume{disc}", disc=disc))), - _5m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("5m_old_transfer_volume{disc}", disc=disc))), - _5y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("5y_old_transfer_volume{disc}", disc=disc))), - _6m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("6m_old_transfer_volume{disc}", disc=disc))), - _6y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("6y_old_transfer_volume{disc}", disc=disc))), - _7y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("7y_old_transfer_volume{disc}", disc=disc))), - _8y: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("8y_old_transfer_volume{disc}", disc=disc))), - _9m: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("9m_old_transfer_volume{disc}", disc=disc))), + _10y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("10y_old_transfer_volume{disc}", disc = disc)), + ), + _12y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("12y_old_transfer_volume{disc}", disc = disc)), + ), + _18m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("18m_old_transfer_volume{disc}", disc = disc)), + ), + _1d: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("1d_old_transfer_volume{disc}", disc = disc)), + ), + _1m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("1m_old_transfer_volume{disc}", disc = disc)), + ), + _1w: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("1w_old_transfer_volume{disc}", disc = disc)), + ), + _1y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("1y_old_transfer_volume{disc}", disc = disc)), + ), + _2m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2m_old_transfer_volume{disc}", disc = disc)), + ), + _2y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2y_old_transfer_volume{disc}", disc = disc)), + ), + _3m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("3m_old_transfer_volume{disc}", disc = disc)), + ), + _3y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("3y_old_transfer_volume{disc}", disc = disc)), + ), + _4m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("4m_old_transfer_volume{disc}", disc = disc)), + ), + _4y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("4y_old_transfer_volume{disc}", disc = disc)), + ), + _5m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("5m_old_transfer_volume{disc}", disc = disc)), + ), + _5y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("5y_old_transfer_volume{disc}", disc = disc)), + ), + _6m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("6m_old_transfer_volume{disc}", disc = disc)), + ), + _6y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("6y_old_transfer_volume{disc}", disc = disc)), + ), + _7y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("7y_old_transfer_volume{disc}", disc = disc)), + ), + _8y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("8y_old_transfer_volume{disc}", disc = disc)), + ), + _9m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("9m_old_transfer_volume{disc}", disc = disc)), + ), } } } @@ -1756,7 +3354,8 @@ pub struct _10y12y18m1d1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mPattern13 { } /// Pattern struct for repeated tree structure. -pub struct Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern { +pub struct Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern +{ pub pct0_1: PpmPriceRatioPattern, pub pct0_5: PpmPriceRatioPattern, pub pct1: PpmPriceRatioPattern, @@ -1856,7 +3455,8 @@ pub struct _10y12y18m1d1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mPattern7 { } /// Pattern struct for repeated tree structure. -pub struct Pct05Pct10Pct15Pct20Pct25Pct30Pct35Pct40Pct45Pct50Pct55Pct60Pct65Pct70Pct75Pct80Pct85Pct90Pct95Pattern { +pub struct Pct05Pct10Pct15Pct20Pct25Pct30Pct35Pct40Pct45Pct50Pct55Pct60Pct65Pct70Pct75Pct80Pct85Pct90Pct95Pattern +{ pub pct05: CentsSatsUsdPattern, pub pct10: CentsSatsUsdPattern, pub pct15: CentsSatsUsdPattern, @@ -1953,24 +3553,78 @@ impl _200920102011201220132014201520162017201820192020202120222023202420252026Pa /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String, disc: String) -> Self { Self { - _2009: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2009_transfer_volume{disc}", disc=disc))), - _2010: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2010_transfer_volume{disc}", disc=disc))), - _2011: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2011_transfer_volume{disc}", disc=disc))), - _2012: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2012_transfer_volume{disc}", disc=disc))), - _2013: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2013_transfer_volume{disc}", disc=disc))), - _2014: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2014_transfer_volume{disc}", disc=disc))), - _2015: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2015_transfer_volume{disc}", disc=disc))), - _2016: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2016_transfer_volume{disc}", disc=disc))), - _2017: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2017_transfer_volume{disc}", disc=disc))), - _2018: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2018_transfer_volume{disc}", disc=disc))), - _2019: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2019_transfer_volume{disc}", disc=disc))), - _2020: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2020_transfer_volume{disc}", disc=disc))), - _2021: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2021_transfer_volume{disc}", disc=disc))), - _2022: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2022_transfer_volume{disc}", disc=disc))), - _2023: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2023_transfer_volume{disc}", disc=disc))), - _2024: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2024_transfer_volume{disc}", disc=disc))), - _2025: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2025_transfer_volume{disc}", disc=disc))), - _2026: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2026_transfer_volume{disc}", disc=disc))), + _2009: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2009_transfer_volume{disc}", disc = disc)), + ), + _2010: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2010_transfer_volume{disc}", disc = disc)), + ), + _2011: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2011_transfer_volume{disc}", disc = disc)), + ), + _2012: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2012_transfer_volume{disc}", disc = disc)), + ), + _2013: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2013_transfer_volume{disc}", disc = disc)), + ), + _2014: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2014_transfer_volume{disc}", disc = disc)), + ), + _2015: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2015_transfer_volume{disc}", disc = disc)), + ), + _2016: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2016_transfer_volume{disc}", disc = disc)), + ), + _2017: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2017_transfer_volume{disc}", disc = disc)), + ), + _2018: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2018_transfer_volume{disc}", disc = disc)), + ), + _2019: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2019_transfer_volume{disc}", disc = disc)), + ), + _2020: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2020_transfer_volume{disc}", disc = disc)), + ), + _2021: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2021_transfer_volume{disc}", disc = disc)), + ), + _2022: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2022_transfer_volume{disc}", disc = disc)), + ), + _2023: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2023_transfer_volume{disc}", disc = disc)), + ), + _2024: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2024_transfer_volume{disc}", disc = disc)), + ), + _2025: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2025_transfer_volume{disc}", disc = disc)), + ), + _2026: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2026_transfer_volume{disc}", disc = disc)), + ), } } } @@ -2087,20 +3741,62 @@ impl _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern8 { pub fn new(client: Arc, acc: String) -> Self { Self { _0sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "0sats_supply_delta")), - _100btc_to_1k_btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "100btc_to_1k_btc_supply_delta")), - _100k_sats_to_1m_sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "100k_sats_to_1m_sats_supply_delta")), - _100sats_to_1k_sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "100sats_to_1k_sats_supply_delta")), - _10btc_to_100btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "10btc_to_100btc_supply_delta")), - _10k_btc_to_100k_btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "10k_btc_to_100k_btc_supply_delta")), - _10k_sats_to_100k_sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "10k_sats_to_100k_sats_supply_delta")), - _10m_sats_to_1btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "10m_sats_to_1btc_supply_delta")), - _10sats_to_100sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "10sats_to_100sats_supply_delta")), - _1btc_to_10btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "1btc_to_10btc_supply_delta")), - _1k_btc_to_10k_btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "1k_btc_to_10k_btc_supply_delta")), - _1k_sats_to_10k_sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "1k_sats_to_10k_sats_supply_delta")), - _1m_sats_to_10m_sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "1m_sats_to_10m_sats_supply_delta")), - _1sat_to_10sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "1sat_to_10sats_supply_delta")), - over_100k_btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "over_100k_btc_supply_delta")), + _100btc_to_1k_btc: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "100btc_to_1k_btc_supply_delta"), + ), + _100k_sats_to_1m_sats: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "100k_sats_to_1m_sats_supply_delta"), + ), + _100sats_to_1k_sats: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "100sats_to_1k_sats_supply_delta"), + ), + _10btc_to_100btc: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "10btc_to_100btc_supply_delta"), + ), + _10k_btc_to_100k_btc: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "10k_btc_to_100k_btc_supply_delta"), + ), + _10k_sats_to_100k_sats: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "10k_sats_to_100k_sats_supply_delta"), + ), + _10m_sats_to_1btc: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "10m_sats_to_1btc_supply_delta"), + ), + _10sats_to_100sats: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "10sats_to_100sats_supply_delta"), + ), + _1btc_to_10btc: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "1btc_to_10btc_supply_delta"), + ), + _1k_btc_to_10k_btc: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "1k_btc_to_10k_btc_supply_delta"), + ), + _1k_sats_to_10k_sats: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "1k_sats_to_10k_sats_supply_delta"), + ), + _1m_sats_to_10m_sats: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "1m_sats_to_10m_sats_supply_delta"), + ), + _1sat_to_10sats: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "1sat_to_10sats_supply_delta"), + ), + over_100k_btc: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "over_100k_btc_supply_delta"), + ), } } } @@ -2128,21 +3824,66 @@ impl _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - _0sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "0sats_transfer_volume")), - _100btc_to_1k_btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "100btc_to_1k_btc_transfer_volume")), - _100k_sats_to_1m_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "100k_sats_to_1m_sats_transfer_volume")), - _100sats_to_1k_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "100sats_to_1k_sats_transfer_volume")), - _10btc_to_100btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10btc_to_100btc_transfer_volume")), - _10k_btc_to_100k_btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10k_btc_to_100k_btc_transfer_volume")), - _10k_sats_to_100k_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10k_sats_to_100k_sats_transfer_volume")), - _10m_sats_to_1btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10m_sats_to_1btc_transfer_volume")), - _10sats_to_100sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10sats_to_100sats_transfer_volume")), - _1btc_to_10btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1btc_to_10btc_transfer_volume")), - _1k_btc_to_10k_btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1k_btc_to_10k_btc_transfer_volume")), - _1k_sats_to_10k_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1k_sats_to_10k_sats_transfer_volume")), - _1m_sats_to_10m_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1m_sats_to_10m_sats_transfer_volume")), - _1sat_to_10sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1sat_to_10sats_transfer_volume")), - over_100k_btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "over_100k_btc_transfer_volume")), + _0sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "0sats_transfer_volume"), + ), + _100btc_to_1k_btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "100btc_to_1k_btc_transfer_volume"), + ), + _100k_sats_to_1m_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "100k_sats_to_1m_sats_transfer_volume"), + ), + _100sats_to_1k_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "100sats_to_1k_sats_transfer_volume"), + ), + _10btc_to_100btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10btc_to_100btc_transfer_volume"), + ), + _10k_btc_to_100k_btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10k_btc_to_100k_btc_transfer_volume"), + ), + _10k_sats_to_100k_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10k_sats_to_100k_sats_transfer_volume"), + ), + _10m_sats_to_1btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10m_sats_to_1btc_transfer_volume"), + ), + _10sats_to_100sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10sats_to_100sats_transfer_volume"), + ), + _1btc_to_10btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1btc_to_10btc_transfer_volume"), + ), + _1k_btc_to_10k_btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1k_btc_to_10k_btc_transfer_volume"), + ), + _1k_sats_to_10k_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1k_sats_to_10k_sats_transfer_volume"), + ), + _1m_sats_to_10m_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1m_sats_to_10m_sats_transfer_volume"), + ), + _1sat_to_10sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1sat_to_10sats_transfer_volume"), + ), + over_100k_btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "over_100k_btc_transfer_volume"), + ), } } } @@ -2209,20 +3950,62 @@ impl _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern10 { pub fn new(client: Arc, acc: String) -> Self { Self { _0sats: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "0sats_supply")), - _100btc_to_1k_btc: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "100btc_to_1k_btc_supply")), - _100k_sats_to_1m_sats: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "100k_sats_to_1m_sats_supply")), - _100sats_to_1k_sats: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "100sats_to_1k_sats_supply")), - _10btc_to_100btc: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "10btc_to_100btc_supply")), - _10k_btc_to_100k_btc: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "10k_btc_to_100k_btc_supply")), - _10k_sats_to_100k_sats: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "10k_sats_to_100k_sats_supply")), - _10m_sats_to_1btc: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "10m_sats_to_1btc_supply")), - _10sats_to_100sats: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "10sats_to_100sats_supply")), - _1btc_to_10btc: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "1btc_to_10btc_supply")), - _1k_btc_to_10k_btc: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "1k_btc_to_10k_btc_supply")), - _1k_sats_to_10k_sats: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "1k_sats_to_10k_sats_supply")), - _1m_sats_to_10m_sats: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "1m_sats_to_10m_sats_supply")), - _1sat_to_10sats: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "1sat_to_10sats_supply")), - over_100k_btc: BtcCentsSatsUsdPattern::new(client.clone(), _m(&acc, "over_100k_btc_supply")), + _100btc_to_1k_btc: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "100btc_to_1k_btc_supply"), + ), + _100k_sats_to_1m_sats: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "100k_sats_to_1m_sats_supply"), + ), + _100sats_to_1k_sats: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "100sats_to_1k_sats_supply"), + ), + _10btc_to_100btc: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "10btc_to_100btc_supply"), + ), + _10k_btc_to_100k_btc: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "10k_btc_to_100k_btc_supply"), + ), + _10k_sats_to_100k_sats: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "10k_sats_to_100k_sats_supply"), + ), + _10m_sats_to_1btc: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "10m_sats_to_1btc_supply"), + ), + _10sats_to_100sats: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "10sats_to_100sats_supply"), + ), + _1btc_to_10btc: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "1btc_to_10btc_supply"), + ), + _1k_btc_to_10k_btc: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "1k_btc_to_10k_btc_supply"), + ), + _1k_sats_to_10k_sats: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "1k_sats_to_10k_sats_supply"), + ), + _1m_sats_to_10m_sats: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "1m_sats_to_10m_sats_supply"), + ), + _1sat_to_10sats: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "1sat_to_10sats_supply"), + ), + over_100k_btc: BtcCentsSatsUsdPattern::new( + client.clone(), + _m(&acc, "over_100k_btc_supply"), + ), } } } @@ -2251,20 +4034,62 @@ impl _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern4 { pub fn new(client: Arc, acc: String) -> Self { Self { _0sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "0sats_realized_cap")), - _100btc_to_1k_btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "100btc_to_1k_btc_realized_cap")), - _100k_sats_to_1m_sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "100k_sats_to_1m_sats_realized_cap")), - _100sats_to_1k_sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "100sats_to_1k_sats_realized_cap")), - _10btc_to_100btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "10btc_to_100btc_realized_cap")), - _10k_btc_to_100k_btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "10k_btc_to_100k_btc_realized_cap")), - _10k_sats_to_100k_sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "10k_sats_to_100k_sats_realized_cap")), - _10m_sats_to_1btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "10m_sats_to_1btc_realized_cap")), - _10sats_to_100sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "10sats_to_100sats_realized_cap")), - _1btc_to_10btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "1btc_to_10btc_realized_cap")), - _1k_btc_to_10k_btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "1k_btc_to_10k_btc_realized_cap")), - _1k_sats_to_10k_sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "1k_sats_to_10k_sats_realized_cap")), - _1m_sats_to_10m_sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "1m_sats_to_10m_sats_realized_cap")), - _1sat_to_10sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "1sat_to_10sats_realized_cap")), - over_100k_btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "over_100k_btc_realized_cap")), + _100btc_to_1k_btc: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "100btc_to_1k_btc_realized_cap"), + ), + _100k_sats_to_1m_sats: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "100k_sats_to_1m_sats_realized_cap"), + ), + _100sats_to_1k_sats: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "100sats_to_1k_sats_realized_cap"), + ), + _10btc_to_100btc: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "10btc_to_100btc_realized_cap"), + ), + _10k_btc_to_100k_btc: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "10k_btc_to_100k_btc_realized_cap"), + ), + _10k_sats_to_100k_sats: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "10k_sats_to_100k_sats_realized_cap"), + ), + _10m_sats_to_1btc: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "10m_sats_to_1btc_realized_cap"), + ), + _10sats_to_100sats: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "10sats_to_100sats_realized_cap"), + ), + _1btc_to_10btc: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "1btc_to_10btc_realized_cap"), + ), + _1k_btc_to_10k_btc: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "1k_btc_to_10k_btc_realized_cap"), + ), + _1k_sats_to_10k_sats: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "1k_sats_to_10k_sats_realized_cap"), + ), + _1m_sats_to_10m_sats: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "1m_sats_to_10m_sats_realized_cap"), + ), + _1sat_to_10sats: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "1sat_to_10sats_realized_cap"), + ), + over_100k_btc: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "over_100k_btc_realized_cap"), + ), } } } @@ -2292,21 +4117,66 @@ impl _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern9 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - _0sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "0sats_supply_dominance")), - _100btc_to_1k_btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "100btc_to_1k_btc_supply_dominance")), - _100k_sats_to_1m_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "100k_sats_to_1m_sats_supply_dominance")), - _100sats_to_1k_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "100sats_to_1k_sats_supply_dominance")), - _10btc_to_100btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10btc_to_100btc_supply_dominance")), - _10k_btc_to_100k_btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10k_btc_to_100k_btc_supply_dominance")), - _10k_sats_to_100k_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10k_sats_to_100k_sats_supply_dominance")), - _10m_sats_to_1btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10m_sats_to_1btc_supply_dominance")), - _10sats_to_100sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10sats_to_100sats_supply_dominance")), - _1btc_to_10btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1btc_to_10btc_supply_dominance")), - _1k_btc_to_10k_btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1k_btc_to_10k_btc_supply_dominance")), - _1k_sats_to_10k_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1k_sats_to_10k_sats_supply_dominance")), - _1m_sats_to_10m_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1m_sats_to_10m_sats_supply_dominance")), - _1sat_to_10sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1sat_to_10sats_supply_dominance")), - over_100k_btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "over_100k_btc_supply_dominance")), + _0sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "0sats_supply_dominance"), + ), + _100btc_to_1k_btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "100btc_to_1k_btc_supply_dominance"), + ), + _100k_sats_to_1m_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "100k_sats_to_1m_sats_supply_dominance"), + ), + _100sats_to_1k_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "100sats_to_1k_sats_supply_dominance"), + ), + _10btc_to_100btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10btc_to_100btc_supply_dominance"), + ), + _10k_btc_to_100k_btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10k_btc_to_100k_btc_supply_dominance"), + ), + _10k_sats_to_100k_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10k_sats_to_100k_sats_supply_dominance"), + ), + _10m_sats_to_1btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10m_sats_to_1btc_supply_dominance"), + ), + _10sats_to_100sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10sats_to_100sats_supply_dominance"), + ), + _1btc_to_10btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1btc_to_10btc_supply_dominance"), + ), + _1k_btc_to_10k_btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1k_btc_to_10k_btc_supply_dominance"), + ), + _1k_sats_to_10k_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1k_sats_to_10k_sats_supply_dominance"), + ), + _1m_sats_to_10m_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1m_sats_to_10m_sats_supply_dominance"), + ), + _1sat_to_10sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1sat_to_10sats_supply_dominance"), + ), + over_100k_btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "over_100k_btc_supply_dominance"), + ), } } } @@ -2352,7 +4222,10 @@ impl _100btc100k100sats10btc10k10m10sats1btc1k1mPattern8 { Self { _100btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "100btc_supply_delta")), _100k_btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "100k_btc_supply_delta")), - _100k_sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "100k_sats_supply_delta")), + _100k_sats: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "100k_sats_supply_delta"), + ), _100sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "100sats_supply_delta")), _10btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "10btc_supply_delta")), _10k_btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "10k_btc_supply_delta")), @@ -2389,7 +4262,10 @@ impl _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern8 { pub fn new(client: Arc, acc: String) -> Self { Self { _100btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "100btc_supply_delta")), - _100k_sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "100k_sats_supply_delta")), + _100k_sats: AbsoluteRatePattern2::new( + client.clone(), + _m(&acc, "100k_sats_supply_delta"), + ), _100sats: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "100sats_supply_delta")), _10btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "10btc_supply_delta")), _10k_btc: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "10k_btc_supply_delta")), @@ -2426,19 +4302,58 @@ impl _100btc100k100sats10btc10k10m10sats1btc1k1mPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - _100btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "100btc_transfer_volume")), - _100k_btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "100k_btc_transfer_volume")), - _100k_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "100k_sats_transfer_volume")), - _100sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "100sats_transfer_volume")), - _10btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10btc_transfer_volume")), - _10k_btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10k_btc_transfer_volume")), - _10k_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10k_sats_transfer_volume")), - _10m_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10m_sats_transfer_volume")), - _10sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10sats_transfer_volume")), - _1btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1btc_transfer_volume")), - _1k_btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1k_btc_transfer_volume")), - _1k_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1k_sats_transfer_volume")), - _1m_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1m_sats_transfer_volume")), + _100btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "100btc_transfer_volume"), + ), + _100k_btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "100k_btc_transfer_volume"), + ), + _100k_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "100k_sats_transfer_volume"), + ), + _100sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "100sats_transfer_volume"), + ), + _10btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10btc_transfer_volume"), + ), + _10k_btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10k_btc_transfer_volume"), + ), + _10k_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10k_sats_transfer_volume"), + ), + _10m_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10m_sats_transfer_volume"), + ), + _10sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10sats_transfer_volume"), + ), + _1btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1btc_transfer_volume"), + ), + _1k_btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1k_btc_transfer_volume"), + ), + _1k_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1k_sats_transfer_volume"), + ), + _1m_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1m_sats_transfer_volume"), + ), } } } @@ -2464,19 +4379,58 @@ impl _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - _100btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "100btc_transfer_volume")), - _100k_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "100k_sats_transfer_volume")), - _100sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "100sats_transfer_volume")), - _10btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10btc_transfer_volume")), - _10k_btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10k_btc_transfer_volume")), - _10k_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10k_sats_transfer_volume")), - _10m_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10m_sats_transfer_volume")), - _10sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "10sats_transfer_volume")), - _1btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1btc_transfer_volume")), - _1k_btc: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1k_btc_transfer_volume")), - _1k_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1k_sats_transfer_volume")), - _1m_sats: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1m_sats_transfer_volume")), - _1sat: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "1sat_transfer_volume")), + _100btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "100btc_transfer_volume"), + ), + _100k_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "100k_sats_transfer_volume"), + ), + _100sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "100sats_transfer_volume"), + ), + _10btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10btc_transfer_volume"), + ), + _10k_btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10k_btc_transfer_volume"), + ), + _10k_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10k_sats_transfer_volume"), + ), + _10m_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10m_sats_transfer_volume"), + ), + _10sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "10sats_transfer_volume"), + ), + _1btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1btc_transfer_volume"), + ), + _1k_btc: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1k_btc_transfer_volume"), + ), + _1k_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1k_sats_transfer_volume"), + ), + _1m_sats: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1m_sats_transfer_volume"), + ), + _1sat: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, "1sat_transfer_volume"), + ), } } } @@ -2648,7 +4602,10 @@ impl _100btc100k100sats10btc10k10m10sats1btc1k1mPattern4 { Self { _100btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "100btc_realized_cap")), _100k_btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "100k_btc_realized_cap")), - _100k_sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "100k_sats_realized_cap")), + _100k_sats: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "100k_sats_realized_cap"), + ), _100sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "100sats_realized_cap")), _10btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "10btc_realized_cap")), _10k_btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "10k_btc_realized_cap")), @@ -2685,7 +4642,10 @@ impl _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern4 { pub fn new(client: Arc, acc: String) -> Self { Self { _100btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "100btc_realized_cap")), - _100k_sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "100k_sats_realized_cap")), + _100k_sats: CentsDeltaUsdPattern::new( + client.clone(), + _m(&acc, "100k_sats_realized_cap"), + ), _100sats: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "100sats_realized_cap")), _10btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "10btc_realized_cap")), _10k_btc: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "10k_btc_realized_cap")), @@ -2722,19 +4682,55 @@ impl _100btc100k100sats10btc10k10m10sats1btc1k1mPattern9 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - _100btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "100btc_supply_dominance")), - _100k_btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "100k_btc_supply_dominance")), - _100k_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "100k_sats_supply_dominance")), - _100sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "100sats_supply_dominance")), - _10btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10btc_supply_dominance")), - _10k_btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10k_btc_supply_dominance")), - _10k_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10k_sats_supply_dominance")), - _10m_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10m_sats_supply_dominance")), - _10sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10sats_supply_dominance")), + _100btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "100btc_supply_dominance"), + ), + _100k_btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "100k_btc_supply_dominance"), + ), + _100k_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "100k_sats_supply_dominance"), + ), + _100sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "100sats_supply_dominance"), + ), + _10btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10btc_supply_dominance"), + ), + _10k_btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10k_btc_supply_dominance"), + ), + _10k_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10k_sats_supply_dominance"), + ), + _10m_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10m_sats_supply_dominance"), + ), + _10sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10sats_supply_dominance"), + ), _1btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1btc_supply_dominance")), - _1k_btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1k_btc_supply_dominance")), - _1k_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1k_sats_supply_dominance")), - _1m_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1m_sats_supply_dominance")), + _1k_btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1k_btc_supply_dominance"), + ), + _1k_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1k_sats_supply_dominance"), + ), + _1m_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1m_sats_supply_dominance"), + ), } } } @@ -2760,18 +4756,51 @@ impl _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern9 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - _100btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "100btc_supply_dominance")), - _100k_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "100k_sats_supply_dominance")), - _100sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "100sats_supply_dominance")), - _10btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10btc_supply_dominance")), - _10k_btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10k_btc_supply_dominance")), - _10k_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10k_sats_supply_dominance")), - _10m_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10m_sats_supply_dominance")), - _10sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "10sats_supply_dominance")), + _100btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "100btc_supply_dominance"), + ), + _100k_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "100k_sats_supply_dominance"), + ), + _100sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "100sats_supply_dominance"), + ), + _10btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10btc_supply_dominance"), + ), + _10k_btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10k_btc_supply_dominance"), + ), + _10k_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10k_sats_supply_dominance"), + ), + _10m_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10m_sats_supply_dominance"), + ), + _10sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "10sats_supply_dominance"), + ), _1btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1btc_supply_dominance")), - _1k_btc: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1k_btc_supply_dominance")), - _1k_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1k_sats_supply_dominance")), - _1m_sats: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1m_sats_supply_dominance")), + _1k_btc: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1k_btc_supply_dominance"), + ), + _1k_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1k_sats_supply_dominance"), + ), + _1m_sats: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, "1m_sats_supply_dominance"), + ), _1sat: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, "1sat_supply_dominance")), } } @@ -2885,18 +4914,36 @@ impl EmptyOpP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - empty: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "empty_outputs_output")), - op_return: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "op_return_output")), + empty: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "empty_outputs_output"), + ), + op_return: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "op_return_output"), + ), p2a: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2a_output")), p2ms: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2ms_output")), - p2pk33: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2pk33_output")), - p2pk65: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2pk65_output")), + p2pk33: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "p2pk33_output"), + ), + p2pk65: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "p2pk65_output"), + ), p2pkh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2pkh_output")), p2sh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2sh_output")), p2tr: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2tr_output")), - p2wpkh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2wpkh_output")), + p2wpkh: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "p2wpkh_output"), + ), p2wsh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2wsh_output")), - unknown: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "unknown_outputs_output")), + unknown: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "unknown_outputs_output"), + ), } } } @@ -3071,17 +5118,32 @@ impl EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern13 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - empty: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "empty_outputs_prevout")), + empty: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "empty_outputs_prevout"), + ), p2a: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2a_prevout")), p2ms: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2ms_prevout")), - p2pk33: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2pk33_prevout")), - p2pk65: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2pk65_prevout")), + p2pk33: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "p2pk33_prevout"), + ), + p2pk65: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "p2pk65_prevout"), + ), p2pkh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2pkh_prevout")), p2sh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2sh_prevout")), p2tr: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2tr_prevout")), - p2wpkh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2wpkh_prevout")), + p2wpkh: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "p2wpkh_prevout"), + ), p2wsh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "p2wsh_prevout")), - unknown: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), _m(&acc, "unknown_outputs_prevout")), + unknown: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + _m(&acc, "unknown_outputs_prevout"), + ), } } } @@ -3623,11 +5685,26 @@ impl _01234Pattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String, disc: String) -> Self { Self { - _0: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("0_transfer_volume{disc}", disc=disc))), - _1: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("1_transfer_volume{disc}", disc=disc))), - _2: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("2_transfer_volume{disc}", disc=disc))), - _3: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("3_transfer_volume{disc}", disc=disc))), - _4: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, &format!("4_transfer_volume{disc}", disc=disc))), + _0: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("0_transfer_volume{disc}", disc = disc)), + ), + _1: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("1_transfer_volume{disc}", disc = disc)), + ), + _2: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("2_transfer_volume{disc}", disc = disc)), + ), + _3: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("3_transfer_volume{disc}", disc = disc)), + ), + _4: AverageBlockCumulativeSumPattern2::new( + client.clone(), + _m(&acc, &format!("4_transfer_volume{disc}", disc = disc)), + ), } } } @@ -4234,7 +6311,8 @@ pub struct HeightLossProfitRangePattern2 { pub height: SeriesPattern18, pub loss: _10pct20pct30pct40pct50pct60pct70pct80pctAllPattern2, pub profit: _100pct10pct200pct20pct300pct30pct40pct500pct50pct60pct70pct80pct90pctAllPattern2, - pub range: _0pct100pct10pct200pct20pct300pct30pct40pct500pct50pct60pct70pct80pct90pctOverPattern2, + pub range: + _0pct100pct10pct200pct20pct300pct30pct40pct500pct50pct60pct70pct80pct90pctOverPattern2, } /// Pattern struct for repeated tree structure. @@ -4478,7 +6556,10 @@ impl CumulativeRollingSumPattern { pub fn new(client: Arc, acc: String) -> Self { Self { cumulative: SeriesPattern1::new(client.clone(), _m(&acc, "cumulative")), - rolling: AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), acc.clone()), + rolling: AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new( + client.clone(), + acc.clone(), + ), sum: SeriesPattern18::new(client.clone(), _m(&acc, "sum")), } } @@ -4496,8 +6577,14 @@ impl FloorLevelLossPattern { pub fn new(client: Arc, acc: String) -> Self { Self { floor: Pct95Pct98Pct99Pattern::new(client.clone(), _m(&acc, "floor")), - level: Pct10Pct20Pct30Pct40Pct50Pct60Pct70Pct80Pct90Pattern::new(client.clone(), _m(&acc, "level")), - loss_threshold: Pct95Pct98Pct99Pattern2::new(client.clone(), _m(&acc, "loss_threshold")), + level: Pct10Pct20Pct30Pct40Pct50Pct60Pct70Pct80Pct90Pattern::new( + client.clone(), + _m(&acc, "level"), + ), + loss_threshold: Pct95Pct98Pct99Pattern2::new( + client.clone(), + _m(&acc, "loss_threshold"), + ), } } } @@ -4527,9 +6614,18 @@ impl OverRangeUnderPattern17 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern8::new(client.clone(), _m(&acc, "over")), - range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern8::new(client.clone(), acc.clone()), - under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern8::new(client.clone(), _m(&acc, "under")), + over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern8::new( + client.clone(), + _m(&acc, "over"), + ), + range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern8::new( + client.clone(), + acc.clone(), + ), + under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern8::new( + client.clone(), + _m(&acc, "under"), + ), } } } @@ -4545,9 +6641,18 @@ impl OverRangeUnderPattern19 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern9::new(client.clone(), _m(&acc, "over")), - range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern9::new(client.clone(), acc.clone()), - under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern9::new(client.clone(), _m(&acc, "under")), + over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern9::new( + client.clone(), + _m(&acc, "over"), + ), + range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern9::new( + client.clone(), + acc.clone(), + ), + under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern9::new( + client.clone(), + _m(&acc, "under"), + ), } } } @@ -4584,9 +6689,21 @@ impl OverRangeUnderPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - over: _10y12y18m1d1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mPattern2::new(client.clone(), acc.clone(), "over".to_string()), - range: _10y12y18m1d1h1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mOverUnderPattern2::new(client.clone(), acc.clone(), String::new()), - under: _10y12y15y18m1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mPattern2::new(client.clone(), acc.clone(), "under".to_string()), + over: _10y12y18m1d1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mPattern2::new( + client.clone(), + acc.clone(), + "over".to_string(), + ), + range: _10y12y18m1d1h1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mOverUnderPattern2::new( + client.clone(), + acc.clone(), + String::new(), + ), + under: _10y12y15y18m1m1w1y2m2y3m3y4m4y5m5y6m6y7y8y9mPattern2::new( + client.clone(), + acc.clone(), + "under".to_string(), + ), } } } @@ -4688,9 +6805,15 @@ impl PpmPriceRatioPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String, disc: String) -> Self { Self { - ppm: SeriesPattern1::new(client.clone(), _m(&acc, &format!("ratio_{disc}_ppm", disc=disc))), + ppm: SeriesPattern1::new( + client.clone(), + _m(&acc, &format!("ratio_{disc}_ppm", disc = disc)), + ), price: CentsSatsUsdPattern::new(client.clone(), _m(&acc, &disc)), - ratio: SeriesPattern1::new(client.clone(), _m(&acc, &format!("ratio_{disc}", disc=disc))), + ratio: SeriesPattern1::new( + client.clone(), + _m(&acc, &format!("ratio_{disc}", disc = disc)), + ), } } } @@ -4707,8 +6830,14 @@ impl RsiStochPattern { pub fn new(client: Arc, acc: String, disc: String) -> Self { Self { rsi: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, &disc)), - stoch_rsi_d: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, &format!("stoch_d_{disc}", disc=disc))), - stoch_rsi_k: PercentPpmRatioPattern2::new(client.clone(), _m(&acc, &format!("stoch_k_{disc}", disc=disc))), + stoch_rsi_d: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, &format!("stoch_d_{disc}", disc = disc)), + ), + stoch_rsi_k: PercentPpmRatioPattern2::new( + client.clone(), + _m(&acc, &format!("stoch_k_{disc}", disc = disc)), + ), } } } @@ -5366,18 +7495,27 @@ impl SeriesTree { pub fn new(client: Arc, base_path: String) -> Self { Self { blocks: SeriesTree_Blocks::new(client.clone(), format!("{base_path}_blocks")), - transactions: SeriesTree_Transactions::new(client.clone(), format!("{base_path}_transactions")), + transactions: SeriesTree_Transactions::new( + client.clone(), + format!("{base_path}_transactions"), + ), inputs: SeriesTree_Inputs::new(client.clone(), format!("{base_path}_inputs")), outputs: SeriesTree_Outputs::new(client.clone(), format!("{base_path}_outputs")), addrs: SeriesTree_Addrs::new(client.clone(), format!("{base_path}_addrs")), scripts: SeriesTree_Scripts::new(client.clone(), format!("{base_path}_scripts")), op_return: SeriesTree_OpReturn::new(client.clone(), format!("{base_path}_op_return")), mining: SeriesTree_Mining::new(client.clone(), format!("{base_path}_mining")), - frameworks: SeriesTree_Frameworks::new(client.clone(), format!("{base_path}_frameworks")), + frameworks: SeriesTree_Frameworks::new( + client.clone(), + format!("{base_path}_frameworks"), + ), models: SeriesTree_Models::new(client.clone(), format!("{base_path}_models")), constants: SeriesTree_Constants::new(client.clone(), format!("{base_path}_constants")), indexes: SeriesTree_Indexes::new(client.clone(), format!("{base_path}_indexes")), - indicators: SeriesTree_Indicators::new(client.clone(), format!("{base_path}_indicators")), + indicators: SeriesTree_Indicators::new( + client.clone(), + format!("{base_path}_indicators"), + ), investing: SeriesTree_Investing::new(client.clone(), format!("{base_path}_investing")), market: SeriesTree_Market::new(client.clone(), format!("{base_path}_market")), pools: SeriesTree_Pools::new(client.clone(), format!("{base_path}_pools")), @@ -5413,18 +7551,36 @@ impl SeriesTree_Blocks { Self { blockhash: SeriesPattern18::new(client.clone(), "blockhash".to_string()), coinbase_tag: SeriesPattern18::new(client.clone(), "coinbase_tag".to_string()), - difficulty: SeriesTree_Blocks_Difficulty::new(client.clone(), format!("{base_path}_difficulty")), + difficulty: SeriesTree_Blocks_Difficulty::new( + client.clone(), + format!("{base_path}_difficulty"), + ), time: SeriesTree_Blocks_Time::new(client.clone(), format!("{base_path}_time")), size: SeriesTree_Blocks_Size::new(client.clone(), format!("{base_path}_size")), - weight: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), "block_weight".to_string()), + weight: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new( + client.clone(), + "block_weight".to_string(), + ), segwit_txs: SeriesPattern18::new(client.clone(), "segwit_txs".to_string()), segwit_size: SeriesPattern18::new(client.clone(), "segwit_size".to_string()), segwit_weight: SeriesPattern18::new(client.clone(), "segwit_weight".to_string()), count: SeriesTree_Blocks_Count::new(client.clone(), format!("{base_path}_count")), - lookback: SeriesTree_Blocks_Lookback::new(client.clone(), format!("{base_path}_lookback")), - interval: SeriesTree_Blocks_Interval::new(client.clone(), format!("{base_path}_interval")), - vbytes: AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), "block_vbytes".to_string()), - fullness: SeriesTree_Blocks_Fullness::new(client.clone(), format!("{base_path}_fullness")), + lookback: SeriesTree_Blocks_Lookback::new( + client.clone(), + format!("{base_path}_lookback"), + ), + interval: SeriesTree_Blocks_Interval::new( + client.clone(), + format!("{base_path}_interval"), + ), + vbytes: AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new( + client.clone(), + "block_vbytes".to_string(), + ), + fullness: SeriesTree_Blocks_Fullness::new( + client.clone(), + format!("{base_path}_fullness"), + ), halving: SeriesTree_Blocks_Halving::new(client.clone(), format!("{base_path}_halving")), } } @@ -5445,9 +7601,15 @@ impl SeriesTree_Blocks_Difficulty { Self { value: SeriesPattern1::new(client.clone(), "difficulty".to_string()), hashrate: SeriesPattern1::new(client.clone(), "difficulty_hashrate".to_string()), - adjustment: PercentPpmRatioPattern3::new(client.clone(), "difficulty_adjustment".to_string()), + adjustment: PercentPpmRatioPattern3::new( + client.clone(), + "difficulty_adjustment".to_string(), + ), epoch: SeriesPattern1::new(client.clone(), "difficulty_epoch".to_string()), - blocks_to_retarget: SeriesPattern1::new(client.clone(), "blocks_to_retarget".to_string()), + blocks_to_retarget: SeriesPattern1::new( + client.clone(), + "blocks_to_retarget".to_string(), + ), days_to_retarget: SeriesPattern1::new(client.clone(), "days_to_retarget".to_string()), } } @@ -5684,15 +7846,33 @@ impl SeriesTree_Transactions { pub fn new(client: Arc, base_path: String) -> Self { Self { raw: SeriesTree_Transactions_Raw::new(client.clone(), format!("{base_path}_raw")), - features: SeriesTree_Transactions_Features::new(client.clone(), format!("{base_path}_features")), + features: SeriesTree_Transactions_Features::new( + client.clone(), + format!("{base_path}_features"), + ), count: SeriesTree_Transactions_Count::new(client.clone(), format!("{base_path}_count")), size: SeriesTree_Transactions_Size::new(client.clone(), format!("{base_path}_size")), fees: SeriesTree_Transactions_Fees::new(client.clone(), format!("{base_path}_fees")), - patterns: SeriesTree_Transactions_Patterns::new(client.clone(), format!("{base_path}_patterns")), - policy: SeriesTree_Transactions_Policy::new(client.clone(), format!("{base_path}_policy")), - sigops: SeriesTree_Transactions_Sigops::new(client.clone(), format!("{base_path}_sigops")), - versions: SeriesTree_Transactions_Versions::new(client.clone(), format!("{base_path}_versions")), - volume: SeriesTree_Transactions_Volume::new(client.clone(), format!("{base_path}_volume")), + patterns: SeriesTree_Transactions_Patterns::new( + client.clone(), + format!("{base_path}_patterns"), + ), + policy: SeriesTree_Transactions_Policy::new( + client.clone(), + format!("{base_path}_policy"), + ), + sigops: SeriesTree_Transactions_Sigops::new( + client.clone(), + format!("{base_path}_sigops"), + ), + versions: SeriesTree_Transactions_Versions::new( + client.clone(), + format!("{base_path}_versions"), + ), + volume: SeriesTree_Transactions_Volume::new( + client.clone(), + format!("{base_path}_volume"), + ), } } } @@ -5721,9 +7901,15 @@ impl SeriesTree_Transactions_Raw { weight: SeriesPattern19::new(client.clone(), "tx_weight".to_string()), total_size: SeriesPattern19::new(client.clone(), "total_size".to_string()), total_sigop_cost: SeriesPattern19::new(client.clone(), "total_sigop_cost".to_string()), - is_explicitly_rbf: SeriesPattern19::new(client.clone(), "is_explicitly_rbf".to_string()), + is_explicitly_rbf: SeriesPattern19::new( + client.clone(), + "is_explicitly_rbf".to_string(), + ), first_txin_index: SeriesPattern19::new(client.clone(), "first_txin_index".to_string()), - first_txout_index: SeriesPattern19::new(client.clone(), "first_txout_index".to_string()), + first_txout_index: SeriesPattern19::new( + client.clone(), + "first_txout_index".to_string(), + ), } } } @@ -5757,7 +7943,10 @@ pub struct SeriesTree_Transactions_Features { impl SeriesTree_Transactions_Features { pub fn new(client: Arc, base_path: String) -> Self { Self { - count: SeriesTree_Transactions_Features_Count::new(client.clone(), format!("{base_path}_count")), + count: SeriesTree_Transactions_Features_Count::new( + client.clone(), + format!("{base_path}_count"), + ), has_p2pk: SeriesPattern19::new(client.clone(), "has_p2pk".to_string()), has_p2ms: SeriesPattern19::new(client.clone(), "has_p2ms".to_string()), has_p2pkh: SeriesPattern19::new(client.clone(), "has_p2pkh".to_string()), @@ -5770,14 +7959,26 @@ impl SeriesTree_Transactions_Features { has_empty: SeriesPattern19::new(client.clone(), "has_empty".to_string()), has_unknown: SeriesPattern19::new(client.clone(), "has_unknown".to_string()), has_fake_pubkey: SeriesPattern19::new(client.clone(), "has_fake_pubkey".to_string()), - has_fake_scripthash: SeriesPattern19::new(client.clone(), "has_fake_scripthash".to_string()), + has_fake_scripthash: SeriesPattern19::new( + client.clone(), + "has_fake_scripthash".to_string(), + ), has_inscription: SeriesPattern19::new(client.clone(), "has_inscription".to_string()), has_annex: SeriesPattern19::new(client.clone(), "has_annex".to_string()), has_sighash_all: SeriesPattern19::new(client.clone(), "has_sighash_all".to_string()), has_sighash_none: SeriesPattern19::new(client.clone(), "has_sighash_none".to_string()), - has_sighash_single: SeriesPattern19::new(client.clone(), "has_sighash_single".to_string()), - has_sighash_default: SeriesPattern19::new(client.clone(), "has_sighash_default".to_string()), - has_sighash_anyone_can_pay: SeriesPattern19::new(client.clone(), "has_sighash_anyone_can_pay".to_string()), + has_sighash_single: SeriesPattern19::new( + client.clone(), + "has_sighash_single".to_string(), + ), + has_sighash_default: SeriesPattern19::new( + client.clone(), + "has_sighash_default".to_string(), + ), + has_sighash_anyone_can_pay: SeriesPattern19::new( + client.clone(), + "has_sighash_anyone_can_pay".to_string(), + ), has_dust_output: SeriesPattern19::new(client.clone(), "has_dust_output".to_string()), } } @@ -5821,8 +8022,14 @@ impl SeriesTree_Transactions_Features_Count { v1: SeriesPattern18::new(client.clone(), "tx_count_v1".to_string()), v2: SeriesPattern18::new(client.clone(), "tx_count_v2".to_string()), v3: SeriesPattern18::new(client.clone(), "tx_count_v3".to_string()), - other_version: SeriesPattern18::new(client.clone(), "tx_count_other_version".to_string()), - explicitly_rbf: SeriesPattern18::new(client.clone(), "tx_count_explicitly_rbf".to_string()), + other_version: SeriesPattern18::new( + client.clone(), + "tx_count_other_version".to_string(), + ), + explicitly_rbf: SeriesPattern18::new( + client.clone(), + "tx_count_explicitly_rbf".to_string(), + ), one_input: SeriesPattern18::new(client.clone(), "tx_count_one_input".to_string()), one_output: SeriesPattern18::new(client.clone(), "tx_count_one_output".to_string()), p2pk: SeriesPattern18::new(client.clone(), "tx_count_p2pk".to_string()), @@ -5837,15 +8044,42 @@ impl SeriesTree_Transactions_Features_Count { empty: SeriesPattern18::new(client.clone(), "tx_count_empty".to_string()), unknown: SeriesPattern18::new(client.clone(), "tx_count_unknown".to_string()), fake_pubkey: SeriesPattern18::new(client.clone(), "tx_count_fake_pubkey".to_string()), - fake_scripthash: SeriesPattern18::new(client.clone(), "tx_count_fake_scripthash".to_string()), - inscription: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_inscription".to_string()), - annex: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_annex".to_string()), - sighash_all: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_sighash_all".to_string()), - sighash_none: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_sighash_none".to_string()), - sighash_single: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_sighash_single".to_string()), - sighash_default: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_sighash_default".to_string()), - sighash_anyone_can_pay: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_sighash_anyone_can_pay".to_string()), - dust_output: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_dust_output".to_string()), + fake_scripthash: SeriesPattern18::new( + client.clone(), + "tx_count_fake_scripthash".to_string(), + ), + inscription: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_inscription".to_string(), + ), + annex: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_annex".to_string(), + ), + sighash_all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_sighash_all".to_string(), + ), + sighash_none: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_sighash_none".to_string(), + ), + sighash_single: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_sighash_single".to_string(), + ), + sighash_default: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_sighash_default".to_string(), + ), + sighash_anyone_can_pay: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_sighash_anyone_can_pay".to_string(), + ), + dust_output: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_dust_output".to_string(), + ), } } } @@ -5858,7 +8092,10 @@ pub struct SeriesTree_Transactions_Count { impl SeriesTree_Transactions_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - total: AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), "tx_count".to_string()), + total: AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new( + client.clone(), + "tx_count".to_string(), + ), } } } @@ -5872,8 +8109,14 @@ pub struct SeriesTree_Transactions_Size { impl SeriesTree_Transactions_Size { pub fn new(client: Arc, base_path: String) -> Self { Self { - vsize: SeriesTree_Transactions_Size_Vsize::new(client.clone(), format!("{base_path}_vsize")), - weight: SeriesTree_Transactions_Size_Weight::new(client.clone(), format!("{base_path}_weight")), + vsize: SeriesTree_Transactions_Size_Vsize::new( + client.clone(), + format!("{base_path}_vsize"), + ), + weight: SeriesTree_Transactions_Size_Weight::new( + client.clone(), + format!("{base_path}_weight"), + ), } } } @@ -5889,8 +8132,14 @@ impl SeriesTree_Transactions_Size_Vsize { pub fn new(client: Arc, base_path: String) -> Self { Self { tx_index: SeriesPattern19::new(client.clone(), "tx_vsize".to_string()), - block: MaxMedianMinPct10Pct25Pct75Pct90Pattern2::new(client.clone(), "tx_vsize".to_string()), - _6b: MaxMedianMinPct10Pct25Pct75Pct90Pattern2::new(client.clone(), "tx_vsize_6b".to_string()), + block: MaxMedianMinPct10Pct25Pct75Pct90Pattern2::new( + client.clone(), + "tx_vsize".to_string(), + ), + _6b: MaxMedianMinPct10Pct25Pct75Pct90Pattern2::new( + client.clone(), + "tx_vsize_6b".to_string(), + ), } } } @@ -5904,8 +8153,14 @@ pub struct SeriesTree_Transactions_Size_Weight { impl SeriesTree_Transactions_Size_Weight { pub fn new(client: Arc, base_path: String) -> Self { Self { - block: MaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), "tx_weight".to_string()), - _6b: MaxMedianMinPct10Pct25Pct75Pct90Pattern::new(client.clone(), "tx_weight_6b".to_string()), + block: MaxMedianMinPct10Pct25Pct75Pct90Pattern::new( + client.clone(), + "tx_weight".to_string(), + ), + _6b: MaxMedianMinPct10Pct25Pct75Pct90Pattern::new( + client.clone(), + "tx_weight_6b".to_string(), + ), } } } @@ -5925,12 +8180,18 @@ pub struct SeriesTree_Transactions_Fees { impl SeriesTree_Transactions_Fees { pub fn new(client: Arc, base_path: String) -> Self { Self { - count: SeriesTree_Transactions_Fees_Count::new(client.clone(), format!("{base_path}_count")), + count: SeriesTree_Transactions_Fees_Count::new( + client.clone(), + format!("{base_path}_count"), + ), input_value: SeriesPattern19::new(client.clone(), "input_value".to_string()), output_value: SeriesPattern19::new(client.clone(), "output_value".to_string()), fee: _6bBlockTxPattern::new(client.clone(), "fee".to_string()), fee_rate: SeriesPattern19::new(client.clone(), "fee_rate".to_string()), - effective_fee_rate: _6bBlockTxPattern::new(client.clone(), "effective_fee_rate".to_string()), + effective_fee_rate: _6bBlockTxPattern::new( + client.clone(), + "effective_fee_rate".to_string(), + ), is_cpfp_parent: SeriesPattern19::new(client.clone(), "is_cpfp_parent".to_string()), is_cpfp_child: SeriesPattern19::new(client.clone(), "is_cpfp_child".to_string()), } @@ -5946,8 +8207,14 @@ pub struct SeriesTree_Transactions_Fees_Count { impl SeriesTree_Transactions_Fees_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - cpfp_parent: AverageBlockCumulativeSumPattern::new(client.clone(), "cpfp_parent_count".to_string()), - cpfp_child: AverageBlockCumulativeSumPattern::new(client.clone(), "cpfp_child_count".to_string()), + cpfp_parent: AverageBlockCumulativeSumPattern::new( + client.clone(), + "cpfp_parent_count".to_string(), + ), + cpfp_child: AverageBlockCumulativeSumPattern::new( + client.clone(), + "cpfp_child_count".to_string(), + ), } } } @@ -5963,7 +8230,10 @@ pub struct SeriesTree_Transactions_Patterns { impl SeriesTree_Transactions_Patterns { pub fn new(client: Arc, base_path: String) -> Self { Self { - count: SeriesTree_Transactions_Patterns_Count::new(client.clone(), format!("{base_path}_count")), + count: SeriesTree_Transactions_Patterns_Count::new( + client.clone(), + format!("{base_path}_count"), + ), is_coinjoin: SeriesPattern19::new(client.clone(), "is_coinjoin".to_string()), is_consolidation: SeriesPattern19::new(client.clone(), "is_consolidation".to_string()), is_batch_payout: SeriesPattern19::new(client.clone(), "is_batch_payout".to_string()), @@ -5981,9 +8251,18 @@ pub struct SeriesTree_Transactions_Patterns_Count { impl SeriesTree_Transactions_Patterns_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - coinjoin: AverageBlockCumulativeSumPattern::new(client.clone(), "coinjoin_count".to_string()), - consolidation: AverageBlockCumulativeSumPattern::new(client.clone(), "consolidation_count".to_string()), - batch_payout: AverageBlockCumulativeSumPattern::new(client.clone(), "batch_payout_count".to_string()), + coinjoin: AverageBlockCumulativeSumPattern::new( + client.clone(), + "coinjoin_count".to_string(), + ), + consolidation: AverageBlockCumulativeSumPattern::new( + client.clone(), + "consolidation_count".to_string(), + ), + batch_payout: AverageBlockCumulativeSumPattern::new( + client.clone(), + "batch_payout_count".to_string(), + ), } } } @@ -5997,7 +8276,10 @@ pub struct SeriesTree_Transactions_Policy { impl SeriesTree_Transactions_Policy { pub fn new(client: Arc, base_path: String) -> Self { Self { - count: SeriesTree_Transactions_Policy_Count::new(client.clone(), format!("{base_path}_count")), + count: SeriesTree_Transactions_Policy_Count::new( + client.clone(), + format!("{base_path}_count"), + ), is_nonstandard: SeriesPattern19::new(client.clone(), "is_nonstandard".to_string()), } } @@ -6011,7 +8293,10 @@ pub struct SeriesTree_Transactions_Policy_Count { impl SeriesTree_Transactions_Policy_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - nonstandard: AverageBlockCumulativeSumPattern::new(client.clone(), "nonstandard_count".to_string()), + nonstandard: AverageBlockCumulativeSumPattern::new( + client.clone(), + "nonstandard_count".to_string(), + ), } } } @@ -6024,7 +8309,10 @@ pub struct SeriesTree_Transactions_Sigops { impl SeriesTree_Transactions_Sigops { pub fn new(client: Arc, base_path: String) -> Self { Self { - total: AverageBlockCumulativeSumPattern::new(client.clone(), "total_sigop_cost".to_string()), + total: AverageBlockCumulativeSumPattern::new( + client.clone(), + "total_sigop_cost".to_string(), + ), } } } @@ -6043,7 +8331,10 @@ impl SeriesTree_Transactions_Versions { v1: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_v1".to_string()), v2: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_v2".to_string()), v3: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_v3".to_string()), - other: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_other_version".to_string()), + other: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_other_version".to_string(), + ), } } } @@ -6057,7 +8348,10 @@ pub struct SeriesTree_Transactions_Volume { impl SeriesTree_Transactions_Volume { pub fn new(client: Arc, base_path: String) -> Self { Self { - transfer_volume: AverageBlockCumulativeSumPattern2::new(client.clone(), "transfer_volume_bis".to_string()), + transfer_volume: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "transfer_volume_bis".to_string(), + ), tx_per_sec: _1m1w1y24hPattern::new(client.clone(), "tx_per_sec".to_string()), } } @@ -6118,10 +8412,22 @@ pub struct SeriesTree_Inputs_ByType { impl SeriesTree_Inputs_ByType { pub fn new(client: Arc, base_path: String) -> Self { Self { - input_count: SeriesTree_Inputs_ByType_InputCount::new(client.clone(), format!("{base_path}_input_count")), - input_share: SeriesTree_Inputs_ByType_InputShare::new(client.clone(), format!("{base_path}_input_share")), - tx_count: SeriesTree_Inputs_ByType_TxCount::new(client.clone(), format!("{base_path}_tx_count")), - tx_share: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern13::new(client.clone(), "tx_share_with".to_string()), + input_count: SeriesTree_Inputs_ByType_InputCount::new( + client.clone(), + format!("{base_path}_input_count"), + ), + input_share: SeriesTree_Inputs_ByType_InputShare::new( + client.clone(), + format!("{base_path}_input_share"), + ), + tx_count: SeriesTree_Inputs_ByType_TxCount::new( + client.clone(), + format!("{base_path}_tx_count"), + ), + tx_share: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern13::new( + client.clone(), + "tx_share_with".to_string(), + ), } } } @@ -6146,18 +8452,54 @@ pub struct SeriesTree_Inputs_ByType_InputCount { impl SeriesTree_Inputs_ByType_InputCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "input_count_bis".to_string()), - p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk65_prevout_count".to_string()), - p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk33_prevout_count".to_string()), - p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pkh_prevout_count".to_string()), - p2ms: AverageBlockCumulativeSumPattern::new(client.clone(), "p2ms_prevout_count".to_string()), - p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2sh_prevout_count".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wpkh_prevout_count".to_string()), - p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wsh_prevout_count".to_string()), - p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "p2tr_prevout_count".to_string()), - p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "p2a_prevout_count".to_string()), - unknown: AverageBlockCumulativeSumPattern::new(client.clone(), "unknown_outputs_prevout_count".to_string()), - empty: AverageBlockCumulativeSumPattern::new(client.clone(), "empty_outputs_prevout_count".to_string()), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "input_count_bis".to_string(), + ), + p2pk65: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk65_prevout_count".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk33_prevout_count".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pkh_prevout_count".to_string(), + ), + p2ms: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2ms_prevout_count".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2sh_prevout_count".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wpkh_prevout_count".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wsh_prevout_count".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2tr_prevout_count".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2a_prevout_count".to_string(), + ), + unknown: AverageBlockCumulativeSumPattern::new( + client.clone(), + "unknown_outputs_prevout_count".to_string(), + ), + empty: AverageBlockCumulativeSumPattern::new( + client.clone(), + "empty_outputs_prevout_count".to_string(), + ), height: SeriesPattern18::new(client.clone(), "prevout_count_by_type".to_string()), } } @@ -6181,17 +8523,50 @@ pub struct SeriesTree_Inputs_ByType_InputShare { impl SeriesTree_Inputs_ByType_InputShare { pub fn new(client: Arc, base_path: String) -> Self { Self { - p2pk65: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2pk65_prevout_share".to_string()), - p2pk33: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2pk33_prevout_share".to_string()), - p2pkh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2pkh_prevout_share".to_string()), - p2ms: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2ms_prevout_share".to_string()), - p2sh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2sh_prevout_share".to_string()), - p2wpkh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2wpkh_prevout_share".to_string()), - p2wsh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2wsh_prevout_share".to_string()), - p2tr: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2tr_prevout_share".to_string()), - p2a: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2a_prevout_share".to_string()), - unknown: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "unknown_outputs_prevout_share".to_string()), - empty: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "empty_outputs_prevout_share".to_string()), + p2pk65: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2pk65_prevout_share".to_string(), + ), + p2pk33: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2pk33_prevout_share".to_string(), + ), + p2pkh: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2pkh_prevout_share".to_string(), + ), + p2ms: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2ms_prevout_share".to_string(), + ), + p2sh: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2sh_prevout_share".to_string(), + ), + p2wpkh: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2wpkh_prevout_share".to_string(), + ), + p2wsh: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2wsh_prevout_share".to_string(), + ), + p2tr: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2tr_prevout_share".to_string(), + ), + p2a: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2a_prevout_share".to_string(), + ), + unknown: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "unknown_outputs_prevout_share".to_string(), + ), + empty: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "empty_outputs_prevout_share".to_string(), + ), } } } @@ -6216,19 +8591,58 @@ pub struct SeriesTree_Inputs_ByType_TxCount { impl SeriesTree_Inputs_ByType_TxCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "non_coinbase_tx_count".to_string()), - p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2pk65_prevout".to_string()), - p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2pk33_prevout".to_string()), - p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2pkh_prevout".to_string()), - p2ms: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2ms_prevout".to_string()), - p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2sh_prevout".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2wpkh_prevout".to_string()), - p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2wsh_prevout".to_string()), - p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2tr_prevout".to_string()), - p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2a_prevout".to_string()), - unknown: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_unknown_outputs_prevout".to_string()), - empty: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_empty_outputs_prevout".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "tx_count_with_prevout_by_type_cumulative".to_string()), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "non_coinbase_tx_count".to_string(), + ), + p2pk65: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2pk65_prevout".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2pk33_prevout".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2pkh_prevout".to_string(), + ), + p2ms: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2ms_prevout".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2sh_prevout".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2wpkh_prevout".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2wsh_prevout".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2tr_prevout".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2a_prevout".to_string(), + ), + unknown: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_unknown_outputs_prevout".to_string(), + ), + empty: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_empty_outputs_prevout".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "tx_count_with_prevout_by_type_cumulative".to_string(), + ), } } } @@ -6251,7 +8665,10 @@ impl SeriesTree_Outputs { spent: SeriesTree_Outputs_Spent::new(client.clone(), format!("{base_path}_spent")), count: SeriesTree_Outputs_Count::new(client.clone(), format!("{base_path}_count")), per_sec: _1m1w1y24hPattern::new(client.clone(), "outputs_per_sec".to_string()), - unspent: SeriesTree_Outputs_Unspent::new(client.clone(), format!("{base_path}_unspent")), + unspent: SeriesTree_Outputs_Unspent::new( + client.clone(), + format!("{base_path}_unspent"), + ), by_type: SeriesTree_Outputs_ByType::new(client.clone(), format!("{base_path}_by_type")), value: SeriesTree_Outputs_Value::new(client.clone(), format!("{base_path}_value")), } @@ -6269,7 +8686,10 @@ pub struct SeriesTree_Outputs_Raw { impl SeriesTree_Outputs_Raw { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_txout_index: SeriesPattern18::new(client.clone(), "first_txout_index".to_string()), + first_txout_index: SeriesPattern18::new( + client.clone(), + "first_txout_index".to_string(), + ), value: SeriesPattern21::new(client.clone(), "value".to_string()), output_type: SeriesPattern21::new(client.clone(), "output_type".to_string()), type_index: SeriesPattern21::new(client.clone(), "type_index".to_string()), @@ -6328,11 +8748,26 @@ pub struct SeriesTree_Outputs_ByType { impl SeriesTree_Outputs_ByType { pub fn new(client: Arc, base_path: String) -> Self { Self { - output_count: SeriesTree_Outputs_ByType_OutputCount::new(client.clone(), format!("{base_path}_output_count")), - spendable_output_count: AverageBlockCumulativeSumPattern::new(client.clone(), "spendable_output_count".to_string()), - output_share: SeriesTree_Outputs_ByType_OutputShare::new(client.clone(), format!("{base_path}_output_share")), - tx_count: SeriesTree_Outputs_ByType_TxCount::new(client.clone(), format!("{base_path}_tx_count")), - tx_share: EmptyOpP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern2::new(client.clone(), "tx_share_with".to_string()), + output_count: SeriesTree_Outputs_ByType_OutputCount::new( + client.clone(), + format!("{base_path}_output_count"), + ), + spendable_output_count: AverageBlockCumulativeSumPattern::new( + client.clone(), + "spendable_output_count".to_string(), + ), + output_share: SeriesTree_Outputs_ByType_OutputShare::new( + client.clone(), + format!("{base_path}_output_share"), + ), + tx_count: SeriesTree_Outputs_ByType_TxCount::new( + client.clone(), + format!("{base_path}_tx_count"), + ), + tx_share: EmptyOpP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern2::new( + client.clone(), + "tx_share_with".to_string(), + ), } } } @@ -6358,19 +8793,58 @@ pub struct SeriesTree_Outputs_ByType_OutputCount { impl SeriesTree_Outputs_ByType_OutputCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "output_count_bis".to_string()), - p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk65_output_count".to_string()), - p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk33_output_count".to_string()), - p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pkh_output_count".to_string()), - p2ms: AverageBlockCumulativeSumPattern::new(client.clone(), "p2ms_output_count".to_string()), - p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2sh_output_count".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wpkh_output_count".to_string()), - p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wsh_output_count".to_string()), - p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "p2tr_output_count".to_string()), - p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "p2a_output_count".to_string()), - unknown: AverageBlockCumulativeSumPattern::new(client.clone(), "unknown_outputs_output_count".to_string()), - empty: AverageBlockCumulativeSumPattern::new(client.clone(), "empty_outputs_output_count".to_string()), - op_return: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_output_count".to_string()), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "output_count_bis".to_string(), + ), + p2pk65: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk65_output_count".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk33_output_count".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pkh_output_count".to_string(), + ), + p2ms: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2ms_output_count".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2sh_output_count".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wpkh_output_count".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wsh_output_count".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2tr_output_count".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2a_output_count".to_string(), + ), + unknown: AverageBlockCumulativeSumPattern::new( + client.clone(), + "unknown_outputs_output_count".to_string(), + ), + empty: AverageBlockCumulativeSumPattern::new( + client.clone(), + "empty_outputs_output_count".to_string(), + ), + op_return: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_output_count".to_string(), + ), height: SeriesPattern18::new(client.clone(), "output_count_by_type".to_string()), } } @@ -6395,18 +8869,54 @@ pub struct SeriesTree_Outputs_ByType_OutputShare { impl SeriesTree_Outputs_ByType_OutputShare { pub fn new(client: Arc, base_path: String) -> Self { Self { - p2pk65: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2pk65_output_share".to_string()), - p2pk33: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2pk33_output_share".to_string()), - p2pkh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2pkh_output_share".to_string()), - p2ms: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2ms_output_share".to_string()), - p2sh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2sh_output_share".to_string()), - p2wpkh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2wpkh_output_share".to_string()), - p2wsh: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2wsh_output_share".to_string()), - p2tr: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2tr_output_share".to_string()), - p2a: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "p2a_output_share".to_string()), - unknown: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "unknown_outputs_output_share".to_string()), - empty: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "empty_outputs_output_share".to_string()), - op_return: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "op_return_output_share".to_string()), + p2pk65: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2pk65_output_share".to_string(), + ), + p2pk33: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2pk33_output_share".to_string(), + ), + p2pkh: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2pkh_output_share".to_string(), + ), + p2ms: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2ms_output_share".to_string(), + ), + p2sh: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2sh_output_share".to_string(), + ), + p2wpkh: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2wpkh_output_share".to_string(), + ), + p2wsh: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2wsh_output_share".to_string(), + ), + p2tr: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2tr_output_share".to_string(), + ), + p2a: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "p2a_output_share".to_string(), + ), + unknown: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "unknown_outputs_output_share".to_string(), + ), + empty: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "empty_outputs_output_share".to_string(), + ), + op_return: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "op_return_output_share".to_string(), + ), } } } @@ -6433,19 +8943,58 @@ impl SeriesTree_Outputs_ByType_TxCount { pub fn new(client: Arc, base_path: String) -> Self { Self { all: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_bis".to_string()), - p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2pk65_output".to_string()), - p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2pk33_output".to_string()), - p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2pkh_output".to_string()), - p2ms: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2ms_output".to_string()), - p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2sh_output".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2wpkh_output".to_string()), - p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2wsh_output".to_string()), - p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2tr_output".to_string()), - p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_p2a_output".to_string()), - unknown: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_unknown_outputs_output".to_string()), - empty: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_empty_outputs_output".to_string()), - op_return: AverageBlockCumulativeSumPattern::new(client.clone(), "tx_count_with_op_return_output".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "tx_count_with_output_by_type_cumulative".to_string()), + p2pk65: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2pk65_output".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2pk33_output".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2pkh_output".to_string(), + ), + p2ms: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2ms_output".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2sh_output".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2wpkh_output".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2wsh_output".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2tr_output".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_p2a_output".to_string(), + ), + unknown: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_unknown_outputs_output".to_string(), + ), + empty: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_empty_outputs_output".to_string(), + ), + op_return: AverageBlockCumulativeSumPattern::new( + client.clone(), + "tx_count_with_op_return_output".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "tx_count_with_output_by_type_cumulative".to_string(), + ), } } } @@ -6488,14 +9037,20 @@ impl SeriesTree_Addrs { data: SeriesTree_Addrs_Data::new(client.clone(), format!("{base_path}_data")), funded: SeriesTree_Addrs_Funded::new(client.clone(), format!("{base_path}_funded")), empty: SeriesTree_Addrs_Empty::new(client.clone(), format!("{base_path}_empty")), - activity: SeriesTree_Addrs_Activity::new(client.clone(), format!("{base_path}_activity")), + activity: SeriesTree_Addrs_Activity::new( + client.clone(), + format!("{base_path}_activity"), + ), total: SeriesTree_Addrs_Total::new(client.clone(), format!("{base_path}_total")), new: SeriesTree_Addrs_New::new(client.clone(), format!("{base_path}_new")), reused: SeriesTree_Addrs_Reused::new(client.clone(), format!("{base_path}_reused")), respent: SeriesTree_Addrs_Respent::new(client.clone(), format!("{base_path}_respent")), exposed: SeriesTree_Addrs_Exposed::new(client.clone(), format!("{base_path}_exposed")), delta: SeriesTree_Addrs_Delta::new(client.clone(), format!("{base_path}_delta")), - avg_amount: SeriesTree_Addrs_AvgAmount::new(client.clone(), format!("{base_path}_avg_amount")), + avg_amount: SeriesTree_Addrs_AvgAmount::new( + client.clone(), + format!("{base_path}_avg_amount"), + ), } } } @@ -6536,7 +9091,10 @@ pub struct SeriesTree_Addrs_Raw_P2pk65 { impl SeriesTree_Addrs_Raw_P2pk65 { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_index: SeriesPattern18::new(client.clone(), "first_p2pk65_addr_index".to_string()), + first_index: SeriesPattern18::new( + client.clone(), + "first_p2pk65_addr_index".to_string(), + ), bytes: SeriesPattern27::new(client.clone(), "p2pk65_bytes".to_string()), } } @@ -6551,7 +9109,10 @@ pub struct SeriesTree_Addrs_Raw_P2pk33 { impl SeriesTree_Addrs_Raw_P2pk33 { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_index: SeriesPattern18::new(client.clone(), "first_p2pk33_addr_index".to_string()), + first_index: SeriesPattern18::new( + client.clone(), + "first_p2pk33_addr_index".to_string(), + ), bytes: SeriesPattern26::new(client.clone(), "p2pk33_bytes".to_string()), } } @@ -6596,7 +9157,10 @@ pub struct SeriesTree_Addrs_Raw_P2wpkh { impl SeriesTree_Addrs_Raw_P2wpkh { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_index: SeriesPattern18::new(client.clone(), "first_p2wpkh_addr_index".to_string()), + first_index: SeriesPattern18::new( + client.clone(), + "first_p2wpkh_addr_index".to_string(), + ), bytes: SeriesPattern31::new(client.clone(), "p2wpkh_bytes".to_string()), } } @@ -6721,7 +9285,10 @@ impl SeriesTree_Addrs_Funded { p2tr: SeriesPattern1::new(client.clone(), "p2tr_addr_count".to_string()), p2a: SeriesPattern1::new(client.clone(), "p2a_addr_count".to_string()), height: SeriesPattern18::new(client.clone(), "addr_count_by_type".to_string()), - balance: SeriesTree_Addrs_Funded_Balance::new(client.clone(), format!("{base_path}_balance")), + balance: SeriesTree_Addrs_Funded_Balance::new( + client.clone(), + format!("{base_path}_balance"), + ), } } } @@ -6737,10 +9304,22 @@ pub struct SeriesTree_Addrs_Funded_Balance { impl SeriesTree_Addrs_Funded_Balance { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Addrs_Funded_Balance_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Addrs_Funded_Balance_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Addrs_Funded_Balance_Over::new(client.clone(), format!("{base_path}_over")), - matrix: SeriesPattern18::new(client.clone(), "addrs_addr_count_by_balance_range".to_string()), + range: SeriesTree_Addrs_Funded_Balance_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Addrs_Funded_Balance_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Addrs_Funded_Balance_Over::new( + client.clone(), + format!("{base_path}_over"), + ), + matrix: SeriesPattern18::new( + client.clone(), + "addrs_addr_count_by_balance_range".to_string(), + ), } } } @@ -6768,20 +9347,62 @@ impl SeriesTree_Addrs_Funded_Balance_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { _0sats: BaseDeltaPattern::new(client.clone(), "addrs_0sats_addr_count".to_string()), - _1sat_to_10sats: BaseDeltaPattern::new(client.clone(), "addrs_1sat_to_10sats_addr_count".to_string()), - _10sats_to_100sats: BaseDeltaPattern::new(client.clone(), "addrs_10sats_to_100sats_addr_count".to_string()), - _100sats_to_1k_sats: BaseDeltaPattern::new(client.clone(), "addrs_100sats_to_1k_sats_addr_count".to_string()), - _1k_sats_to_10k_sats: BaseDeltaPattern::new(client.clone(), "addrs_1k_sats_to_10k_sats_addr_count".to_string()), - _10k_sats_to_100k_sats: BaseDeltaPattern::new(client.clone(), "addrs_10k_sats_to_100k_sats_addr_count".to_string()), - _100k_sats_to_1m_sats: BaseDeltaPattern::new(client.clone(), "addrs_100k_sats_to_1m_sats_addr_count".to_string()), - _1m_sats_to_10m_sats: BaseDeltaPattern::new(client.clone(), "addrs_1m_sats_to_10m_sats_addr_count".to_string()), - _10m_sats_to_1btc: BaseDeltaPattern::new(client.clone(), "addrs_10m_sats_to_1btc_addr_count".to_string()), - _1btc_to_10btc: BaseDeltaPattern::new(client.clone(), "addrs_1btc_to_10btc_addr_count".to_string()), - _10btc_to_100btc: BaseDeltaPattern::new(client.clone(), "addrs_10btc_to_100btc_addr_count".to_string()), - _100btc_to_1k_btc: BaseDeltaPattern::new(client.clone(), "addrs_100btc_to_1k_btc_addr_count".to_string()), - _1k_btc_to_10k_btc: BaseDeltaPattern::new(client.clone(), "addrs_1k_btc_to_10k_btc_addr_count".to_string()), - _10k_btc_to_100k_btc: BaseDeltaPattern::new(client.clone(), "addrs_10k_btc_to_100k_btc_addr_count".to_string()), - over_100k_btc: BaseDeltaPattern::new(client.clone(), "addrs_over_100k_btc_addr_count".to_string()), + _1sat_to_10sats: BaseDeltaPattern::new( + client.clone(), + "addrs_1sat_to_10sats_addr_count".to_string(), + ), + _10sats_to_100sats: BaseDeltaPattern::new( + client.clone(), + "addrs_10sats_to_100sats_addr_count".to_string(), + ), + _100sats_to_1k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_100sats_to_1k_sats_addr_count".to_string(), + ), + _1k_sats_to_10k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_1k_sats_to_10k_sats_addr_count".to_string(), + ), + _10k_sats_to_100k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_10k_sats_to_100k_sats_addr_count".to_string(), + ), + _100k_sats_to_1m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_100k_sats_to_1m_sats_addr_count".to_string(), + ), + _1m_sats_to_10m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_1m_sats_to_10m_sats_addr_count".to_string(), + ), + _10m_sats_to_1btc: BaseDeltaPattern::new( + client.clone(), + "addrs_10m_sats_to_1btc_addr_count".to_string(), + ), + _1btc_to_10btc: BaseDeltaPattern::new( + client.clone(), + "addrs_1btc_to_10btc_addr_count".to_string(), + ), + _10btc_to_100btc: BaseDeltaPattern::new( + client.clone(), + "addrs_10btc_to_100btc_addr_count".to_string(), + ), + _100btc_to_1k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_100btc_to_1k_btc_addr_count".to_string(), + ), + _1k_btc_to_10k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_1k_btc_to_10k_btc_addr_count".to_string(), + ), + _10k_btc_to_100k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_10k_btc_to_100k_btc_addr_count".to_string(), + ), + over_100k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_over_100k_btc_addr_count".to_string(), + ), } } } @@ -6806,19 +9427,55 @@ pub struct SeriesTree_Addrs_Funded_Balance_Under { impl SeriesTree_Addrs_Funded_Balance_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _10sats: BaseDeltaPattern::new(client.clone(), "addrs_under_10sats_addr_count".to_string()), - _100sats: BaseDeltaPattern::new(client.clone(), "addrs_under_100sats_addr_count".to_string()), - _1k_sats: BaseDeltaPattern::new(client.clone(), "addrs_under_1k_sats_addr_count".to_string()), - _10k_sats: BaseDeltaPattern::new(client.clone(), "addrs_under_10k_sats_addr_count".to_string()), - _100k_sats: BaseDeltaPattern::new(client.clone(), "addrs_under_100k_sats_addr_count".to_string()), - _1m_sats: BaseDeltaPattern::new(client.clone(), "addrs_under_1m_sats_addr_count".to_string()), - _10m_sats: BaseDeltaPattern::new(client.clone(), "addrs_under_10m_sats_addr_count".to_string()), + _10sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_10sats_addr_count".to_string(), + ), + _100sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_100sats_addr_count".to_string(), + ), + _1k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_1k_sats_addr_count".to_string(), + ), + _10k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_10k_sats_addr_count".to_string(), + ), + _100k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_100k_sats_addr_count".to_string(), + ), + _1m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_1m_sats_addr_count".to_string(), + ), + _10m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_10m_sats_addr_count".to_string(), + ), _1btc: BaseDeltaPattern::new(client.clone(), "addrs_under_1btc_addr_count".to_string()), - _10btc: BaseDeltaPattern::new(client.clone(), "addrs_under_10btc_addr_count".to_string()), - _100btc: BaseDeltaPattern::new(client.clone(), "addrs_under_100btc_addr_count".to_string()), - _1k_btc: BaseDeltaPattern::new(client.clone(), "addrs_under_1k_btc_addr_count".to_string()), - _10k_btc: BaseDeltaPattern::new(client.clone(), "addrs_under_10k_btc_addr_count".to_string()), - _100k_btc: BaseDeltaPattern::new(client.clone(), "addrs_under_100k_btc_addr_count".to_string()), + _10btc: BaseDeltaPattern::new( + client.clone(), + "addrs_under_10btc_addr_count".to_string(), + ), + _100btc: BaseDeltaPattern::new( + client.clone(), + "addrs_under_100btc_addr_count".to_string(), + ), + _1k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_under_1k_btc_addr_count".to_string(), + ), + _10k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_under_10k_btc_addr_count".to_string(), + ), + _100k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_under_100k_btc_addr_count".to_string(), + ), } } } @@ -6844,18 +9501,51 @@ impl SeriesTree_Addrs_Funded_Balance_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { _1sat: BaseDeltaPattern::new(client.clone(), "addrs_over_1sat_addr_count".to_string()), - _10sats: BaseDeltaPattern::new(client.clone(), "addrs_over_10sats_addr_count".to_string()), - _100sats: BaseDeltaPattern::new(client.clone(), "addrs_over_100sats_addr_count".to_string()), - _1k_sats: BaseDeltaPattern::new(client.clone(), "addrs_over_1k_sats_addr_count".to_string()), - _10k_sats: BaseDeltaPattern::new(client.clone(), "addrs_over_10k_sats_addr_count".to_string()), - _100k_sats: BaseDeltaPattern::new(client.clone(), "addrs_over_100k_sats_addr_count".to_string()), - _1m_sats: BaseDeltaPattern::new(client.clone(), "addrs_over_1m_sats_addr_count".to_string()), - _10m_sats: BaseDeltaPattern::new(client.clone(), "addrs_over_10m_sats_addr_count".to_string()), + _10sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_10sats_addr_count".to_string(), + ), + _100sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_100sats_addr_count".to_string(), + ), + _1k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_1k_sats_addr_count".to_string(), + ), + _10k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_10k_sats_addr_count".to_string(), + ), + _100k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_100k_sats_addr_count".to_string(), + ), + _1m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_1m_sats_addr_count".to_string(), + ), + _10m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_10m_sats_addr_count".to_string(), + ), _1btc: BaseDeltaPattern::new(client.clone(), "addrs_over_1btc_addr_count".to_string()), - _10btc: BaseDeltaPattern::new(client.clone(), "addrs_over_10btc_addr_count".to_string()), - _100btc: BaseDeltaPattern::new(client.clone(), "addrs_over_100btc_addr_count".to_string()), - _1k_btc: BaseDeltaPattern::new(client.clone(), "addrs_over_1k_btc_addr_count".to_string()), - _10k_btc: BaseDeltaPattern::new(client.clone(), "addrs_over_10k_btc_addr_count".to_string()), + _10btc: BaseDeltaPattern::new( + client.clone(), + "addrs_over_10btc_addr_count".to_string(), + ), + _100btc: BaseDeltaPattern::new( + client.clone(), + "addrs_over_100btc_addr_count".to_string(), + ), + _1k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_over_1k_btc_addr_count".to_string(), + ), + _10k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_over_10k_btc_addr_count".to_string(), + ), } } } @@ -6903,11 +9593,26 @@ pub struct SeriesTree_Addrs_Activity { impl SeriesTree_Addrs_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - reactivated: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new(client.clone(), "reactivated_addrs".to_string()), - sending: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new(client.clone(), "sending_addrs".to_string()), - receiving: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new(client.clone(), "receiving_addrs".to_string()), - bidirectional: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new(client.clone(), "bidirectional_addrs".to_string()), - active: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new(client.clone(), "active_addrs".to_string()), + reactivated: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new( + client.clone(), + "reactivated_addrs".to_string(), + ), + sending: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new( + client.clone(), + "sending_addrs".to_string(), + ), + receiving: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new( + client.clone(), + "receiving_addrs".to_string(), + ), + bidirectional: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new( + client.clone(), + "bidirectional_addrs".to_string(), + ), + active: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern::new( + client.clone(), + "active_addrs".to_string(), + ), } } } @@ -6959,15 +9664,42 @@ pub struct SeriesTree_Addrs_New { impl SeriesTree_Addrs_New { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "new_addr_count".to_string()), - p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk65_new_addr_count".to_string()), - p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk33_new_addr_count".to_string()), - p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pkh_new_addr_count".to_string()), - p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2sh_new_addr_count".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wpkh_new_addr_count".to_string()), - p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wsh_new_addr_count".to_string()), - p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "p2tr_new_addr_count".to_string()), - p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "p2a_new_addr_count".to_string()), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "new_addr_count".to_string(), + ), + p2pk65: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk65_new_addr_count".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk33_new_addr_count".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pkh_new_addr_count".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2sh_new_addr_count".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wpkh_new_addr_count".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wsh_new_addr_count".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2tr_new_addr_count".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2a_new_addr_count".to_string(), + ), } } } @@ -6983,8 +9715,14 @@ impl SeriesTree_Addrs_Reused { pub fn new(client: Arc, base_path: String) -> Self { Self { count: SeriesTree_Addrs_Reused_Count::new(client.clone(), format!("{base_path}_count")), - events: SeriesTree_Addrs_Reused_Events::new(client.clone(), format!("{base_path}_events")), - supply: SeriesTree_Addrs_Reused_Supply::new(client.clone(), format!("{base_path}_supply")), + events: SeriesTree_Addrs_Reused_Events::new( + client.clone(), + format!("{base_path}_events"), + ), + supply: SeriesTree_Addrs_Reused_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), } } } @@ -6998,8 +9736,14 @@ pub struct SeriesTree_Addrs_Reused_Count { impl SeriesTree_Addrs_Reused_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - funded: SeriesTree_Addrs_Reused_Count_Funded::new(client.clone(), format!("{base_path}_funded")), - total: SeriesTree_Addrs_Reused_Count_Total::new(client.clone(), format!("{base_path}_total")), + funded: SeriesTree_Addrs_Reused_Count_Funded::new( + client.clone(), + format!("{base_path}_funded"), + ), + total: SeriesTree_Addrs_Reused_Count_Total::new( + client.clone(), + format!("{base_path}_total"), + ), } } } @@ -7053,15 +9797,27 @@ impl SeriesTree_Addrs_Reused_Count_Total { pub fn new(client: Arc, base_path: String) -> Self { Self { all: SeriesPattern1::new(client.clone(), "total_reused_addr_count".to_string()), - p2pk65: SeriesPattern1::new(client.clone(), "p2pk65_total_reused_addr_count".to_string()), - p2pk33: SeriesPattern1::new(client.clone(), "p2pk33_total_reused_addr_count".to_string()), + p2pk65: SeriesPattern1::new( + client.clone(), + "p2pk65_total_reused_addr_count".to_string(), + ), + p2pk33: SeriesPattern1::new( + client.clone(), + "p2pk33_total_reused_addr_count".to_string(), + ), p2pkh: SeriesPattern1::new(client.clone(), "p2pkh_total_reused_addr_count".to_string()), p2sh: SeriesPattern1::new(client.clone(), "p2sh_total_reused_addr_count".to_string()), - p2wpkh: SeriesPattern1::new(client.clone(), "p2wpkh_total_reused_addr_count".to_string()), + p2wpkh: SeriesPattern1::new( + client.clone(), + "p2wpkh_total_reused_addr_count".to_string(), + ), p2wsh: SeriesPattern1::new(client.clone(), "p2wsh_total_reused_addr_count".to_string()), p2tr: SeriesPattern1::new(client.clone(), "p2tr_total_reused_addr_count".to_string()), p2a: SeriesPattern1::new(client.clone(), "p2a_total_reused_addr_count".to_string()), - height: SeriesPattern18::new(client.clone(), "total_reused_addr_count_by_type".to_string()), + height: SeriesPattern18::new( + client.clone(), + "total_reused_addr_count_by_type".to_string(), + ), } } } @@ -7080,13 +9836,36 @@ pub struct SeriesTree_Addrs_Reused_Events { impl SeriesTree_Addrs_Reused_Events { pub fn new(client: Arc, base_path: String) -> Self { Self { - output_to_reused_addr_count: SeriesTree_Addrs_Reused_Events_OutputToReusedAddrCount::new(client.clone(), format!("{base_path}_output_to_reused_addr_count")), - output_to_reused_addr_share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6::new(client.clone(), "output_to_reused_addr_share".to_string()), - spendable_output_to_reused_addr_share: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "spendable_output_to_reused_addr_share".to_string()), - input_from_reused_addr_count: SeriesTree_Addrs_Reused_Events_InputFromReusedAddrCount::new(client.clone(), format!("{base_path}_input_from_reused_addr_count")), - input_from_reused_addr_share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6::new(client.clone(), "input_from_reused_addr_share".to_string()), - active_reused_addr_count: _1m1w1y24hBlockPattern::new(client.clone(), "active_reused_addr_count".to_string()), - active_reused_addr_share: _1m1w1y24hBlockPattern2::new(client.clone(), "active_reused_addr_share".to_string()), + output_to_reused_addr_count: + SeriesTree_Addrs_Reused_Events_OutputToReusedAddrCount::new( + client.clone(), + format!("{base_path}_output_to_reused_addr_count"), + ), + output_to_reused_addr_share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6::new( + client.clone(), + "output_to_reused_addr_share".to_string(), + ), + spendable_output_to_reused_addr_share: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "spendable_output_to_reused_addr_share".to_string(), + ), + input_from_reused_addr_count: + SeriesTree_Addrs_Reused_Events_InputFromReusedAddrCount::new( + client.clone(), + format!("{base_path}_input_from_reused_addr_count"), + ), + input_from_reused_addr_share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6::new( + client.clone(), + "input_from_reused_addr_share".to_string(), + ), + active_reused_addr_count: _1m1w1y24hBlockPattern::new( + client.clone(), + "active_reused_addr_count".to_string(), + ), + active_reused_addr_share: _1m1w1y24hBlockPattern2::new( + client.clone(), + "active_reused_addr_share".to_string(), + ), } } } @@ -7108,16 +9887,46 @@ pub struct SeriesTree_Addrs_Reused_Events_OutputToReusedAddrCount { impl SeriesTree_Addrs_Reused_Events_OutputToReusedAddrCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "output_to_reused_addr_count".to_string()), - p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk65_output_to_reused_addr_count".to_string()), - p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk33_output_to_reused_addr_count".to_string()), - p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pkh_output_to_reused_addr_count".to_string()), - p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2sh_output_to_reused_addr_count".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wpkh_output_to_reused_addr_count".to_string()), - p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wsh_output_to_reused_addr_count".to_string()), - p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "p2tr_output_to_reused_addr_count".to_string()), - p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "p2a_output_to_reused_addr_count".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "output_to_reused_addr_count_by_type_cumulative".to_string()), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "output_to_reused_addr_count".to_string(), + ), + p2pk65: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk65_output_to_reused_addr_count".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk33_output_to_reused_addr_count".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pkh_output_to_reused_addr_count".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2sh_output_to_reused_addr_count".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wpkh_output_to_reused_addr_count".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wsh_output_to_reused_addr_count".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2tr_output_to_reused_addr_count".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2a_output_to_reused_addr_count".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "output_to_reused_addr_count_by_type_cumulative".to_string(), + ), } } } @@ -7139,16 +9948,46 @@ pub struct SeriesTree_Addrs_Reused_Events_InputFromReusedAddrCount { impl SeriesTree_Addrs_Reused_Events_InputFromReusedAddrCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "input_from_reused_addr_count".to_string()), - p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk65_input_from_reused_addr_count".to_string()), - p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk33_input_from_reused_addr_count".to_string()), - p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pkh_input_from_reused_addr_count".to_string()), - p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2sh_input_from_reused_addr_count".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wpkh_input_from_reused_addr_count".to_string()), - p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wsh_input_from_reused_addr_count".to_string()), - p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "p2tr_input_from_reused_addr_count".to_string()), - p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "p2a_input_from_reused_addr_count".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "input_from_reused_addr_count_by_type_cumulative".to_string()), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "input_from_reused_addr_count".to_string(), + ), + p2pk65: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk65_input_from_reused_addr_count".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk33_input_from_reused_addr_count".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pkh_input_from_reused_addr_count".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2sh_input_from_reused_addr_count".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wpkh_input_from_reused_addr_count".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wsh_input_from_reused_addr_count".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2tr_input_from_reused_addr_count".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2a_input_from_reused_addr_count".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "input_from_reused_addr_count_by_type_cumulative".to_string(), + ), } } } @@ -7172,16 +10011,43 @@ impl SeriesTree_Addrs_Reused_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BtcCentsSatsUsdPattern::new(client.clone(), "reused_addr_supply".to_string()), - p2pk65: BtcCentsSatsUsdPattern::new(client.clone(), "p2pk65_reused_addr_supply".to_string()), - p2pk33: BtcCentsSatsUsdPattern::new(client.clone(), "p2pk33_reused_addr_supply".to_string()), - p2pkh: BtcCentsSatsUsdPattern::new(client.clone(), "p2pkh_reused_addr_supply".to_string()), - p2sh: BtcCentsSatsUsdPattern::new(client.clone(), "p2sh_reused_addr_supply".to_string()), - p2wpkh: BtcCentsSatsUsdPattern::new(client.clone(), "p2wpkh_reused_addr_supply".to_string()), - p2wsh: BtcCentsSatsUsdPattern::new(client.clone(), "p2wsh_reused_addr_supply".to_string()), - p2tr: BtcCentsSatsUsdPattern::new(client.clone(), "p2tr_reused_addr_supply".to_string()), + p2pk65: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2pk65_reused_addr_supply".to_string(), + ), + p2pk33: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2pk33_reused_addr_supply".to_string(), + ), + p2pkh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2pkh_reused_addr_supply".to_string(), + ), + p2sh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2sh_reused_addr_supply".to_string(), + ), + p2wpkh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2wpkh_reused_addr_supply".to_string(), + ), + p2wsh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2wsh_reused_addr_supply".to_string(), + ), + p2tr: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2tr_reused_addr_supply".to_string(), + ), p2a: BtcCentsSatsUsdPattern::new(client.clone(), "p2a_reused_addr_supply".to_string()), - height: SeriesPattern18::new(client.clone(), "reused_addr_supply_sats_by_type".to_string()), - share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4::new(client.clone(), "reused_addr_supply_share".to_string()), + height: SeriesPattern18::new( + client.clone(), + "reused_addr_supply_sats_by_type".to_string(), + ), + share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4::new( + client.clone(), + "reused_addr_supply_share".to_string(), + ), } } } @@ -7196,9 +10062,18 @@ pub struct SeriesTree_Addrs_Respent { impl SeriesTree_Addrs_Respent { pub fn new(client: Arc, base_path: String) -> Self { Self { - count: SeriesTree_Addrs_Respent_Count::new(client.clone(), format!("{base_path}_count")), - events: SeriesTree_Addrs_Respent_Events::new(client.clone(), format!("{base_path}_events")), - supply: SeriesTree_Addrs_Respent_Supply::new(client.clone(), format!("{base_path}_supply")), + count: SeriesTree_Addrs_Respent_Count::new( + client.clone(), + format!("{base_path}_count"), + ), + events: SeriesTree_Addrs_Respent_Events::new( + client.clone(), + format!("{base_path}_events"), + ), + supply: SeriesTree_Addrs_Respent_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), } } } @@ -7212,8 +10087,14 @@ pub struct SeriesTree_Addrs_Respent_Count { impl SeriesTree_Addrs_Respent_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - funded: SeriesTree_Addrs_Respent_Count_Funded::new(client.clone(), format!("{base_path}_funded")), - total: SeriesTree_Addrs_Respent_Count_Total::new(client.clone(), format!("{base_path}_total")), + funded: SeriesTree_Addrs_Respent_Count_Funded::new( + client.clone(), + format!("{base_path}_funded"), + ), + total: SeriesTree_Addrs_Respent_Count_Total::new( + client.clone(), + format!("{base_path}_total"), + ), } } } @@ -7267,15 +10148,33 @@ impl SeriesTree_Addrs_Respent_Count_Total { pub fn new(client: Arc, base_path: String) -> Self { Self { all: SeriesPattern1::new(client.clone(), "total_respent_addr_count".to_string()), - p2pk65: SeriesPattern1::new(client.clone(), "p2pk65_total_respent_addr_count".to_string()), - p2pk33: SeriesPattern1::new(client.clone(), "p2pk33_total_respent_addr_count".to_string()), - p2pkh: SeriesPattern1::new(client.clone(), "p2pkh_total_respent_addr_count".to_string()), + p2pk65: SeriesPattern1::new( + client.clone(), + "p2pk65_total_respent_addr_count".to_string(), + ), + p2pk33: SeriesPattern1::new( + client.clone(), + "p2pk33_total_respent_addr_count".to_string(), + ), + p2pkh: SeriesPattern1::new( + client.clone(), + "p2pkh_total_respent_addr_count".to_string(), + ), p2sh: SeriesPattern1::new(client.clone(), "p2sh_total_respent_addr_count".to_string()), - p2wpkh: SeriesPattern1::new(client.clone(), "p2wpkh_total_respent_addr_count".to_string()), - p2wsh: SeriesPattern1::new(client.clone(), "p2wsh_total_respent_addr_count".to_string()), + p2wpkh: SeriesPattern1::new( + client.clone(), + "p2wpkh_total_respent_addr_count".to_string(), + ), + p2wsh: SeriesPattern1::new( + client.clone(), + "p2wsh_total_respent_addr_count".to_string(), + ), p2tr: SeriesPattern1::new(client.clone(), "p2tr_total_respent_addr_count".to_string()), p2a: SeriesPattern1::new(client.clone(), "p2a_total_respent_addr_count".to_string()), - height: SeriesPattern18::new(client.clone(), "total_respent_addr_count_by_type".to_string()), + height: SeriesPattern18::new( + client.clone(), + "total_respent_addr_count_by_type".to_string(), + ), } } } @@ -7294,13 +10193,36 @@ pub struct SeriesTree_Addrs_Respent_Events { impl SeriesTree_Addrs_Respent_Events { pub fn new(client: Arc, base_path: String) -> Self { Self { - output_to_reused_addr_count: SeriesTree_Addrs_Respent_Events_OutputToReusedAddrCount::new(client.clone(), format!("{base_path}_output_to_reused_addr_count")), - output_to_reused_addr_share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6::new(client.clone(), "output_to_respent_addr_share".to_string()), - spendable_output_to_reused_addr_share: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "spendable_output_to_respent_addr_share".to_string()), - input_from_reused_addr_count: SeriesTree_Addrs_Respent_Events_InputFromReusedAddrCount::new(client.clone(), format!("{base_path}_input_from_reused_addr_count")), - input_from_reused_addr_share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6::new(client.clone(), "input_from_respent_addr_share".to_string()), - active_reused_addr_count: _1m1w1y24hBlockPattern::new(client.clone(), "active_respent_addr_count".to_string()), - active_reused_addr_share: _1m1w1y24hBlockPattern2::new(client.clone(), "active_respent_addr_share".to_string()), + output_to_reused_addr_count: + SeriesTree_Addrs_Respent_Events_OutputToReusedAddrCount::new( + client.clone(), + format!("{base_path}_output_to_reused_addr_count"), + ), + output_to_reused_addr_share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6::new( + client.clone(), + "output_to_respent_addr_share".to_string(), + ), + spendable_output_to_reused_addr_share: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "spendable_output_to_respent_addr_share".to_string(), + ), + input_from_reused_addr_count: + SeriesTree_Addrs_Respent_Events_InputFromReusedAddrCount::new( + client.clone(), + format!("{base_path}_input_from_reused_addr_count"), + ), + input_from_reused_addr_share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6::new( + client.clone(), + "input_from_respent_addr_share".to_string(), + ), + active_reused_addr_count: _1m1w1y24hBlockPattern::new( + client.clone(), + "active_respent_addr_count".to_string(), + ), + active_reused_addr_share: _1m1w1y24hBlockPattern2::new( + client.clone(), + "active_respent_addr_share".to_string(), + ), } } } @@ -7322,16 +10244,46 @@ pub struct SeriesTree_Addrs_Respent_Events_OutputToReusedAddrCount { impl SeriesTree_Addrs_Respent_Events_OutputToReusedAddrCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "output_to_respent_addr_count".to_string()), - p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk65_output_to_respent_addr_count".to_string()), - p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk33_output_to_respent_addr_count".to_string()), - p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pkh_output_to_respent_addr_count".to_string()), - p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2sh_output_to_respent_addr_count".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wpkh_output_to_respent_addr_count".to_string()), - p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wsh_output_to_respent_addr_count".to_string()), - p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "p2tr_output_to_respent_addr_count".to_string()), - p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "p2a_output_to_respent_addr_count".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "output_to_respent_addr_count_by_type_cumulative".to_string()), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "output_to_respent_addr_count".to_string(), + ), + p2pk65: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk65_output_to_respent_addr_count".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk33_output_to_respent_addr_count".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pkh_output_to_respent_addr_count".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2sh_output_to_respent_addr_count".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wpkh_output_to_respent_addr_count".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wsh_output_to_respent_addr_count".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2tr_output_to_respent_addr_count".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2a_output_to_respent_addr_count".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "output_to_respent_addr_count_by_type_cumulative".to_string(), + ), } } } @@ -7353,16 +10305,46 @@ pub struct SeriesTree_Addrs_Respent_Events_InputFromReusedAddrCount { impl SeriesTree_Addrs_Respent_Events_InputFromReusedAddrCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "input_from_respent_addr_count".to_string()), - p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk65_input_from_respent_addr_count".to_string()), - p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk33_input_from_respent_addr_count".to_string()), - p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pkh_input_from_respent_addr_count".to_string()), - p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2sh_input_from_respent_addr_count".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wpkh_input_from_respent_addr_count".to_string()), - p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wsh_input_from_respent_addr_count".to_string()), - p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "p2tr_input_from_respent_addr_count".to_string()), - p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "p2a_input_from_respent_addr_count".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "input_from_respent_addr_count_by_type_cumulative".to_string()), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "input_from_respent_addr_count".to_string(), + ), + p2pk65: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk65_input_from_respent_addr_count".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk33_input_from_respent_addr_count".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pkh_input_from_respent_addr_count".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2sh_input_from_respent_addr_count".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wpkh_input_from_respent_addr_count".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wsh_input_from_respent_addr_count".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2tr_input_from_respent_addr_count".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2a_input_from_respent_addr_count".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "input_from_respent_addr_count_by_type_cumulative".to_string(), + ), } } } @@ -7386,16 +10368,43 @@ impl SeriesTree_Addrs_Respent_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BtcCentsSatsUsdPattern::new(client.clone(), "respent_addr_supply".to_string()), - p2pk65: BtcCentsSatsUsdPattern::new(client.clone(), "p2pk65_respent_addr_supply".to_string()), - p2pk33: BtcCentsSatsUsdPattern::new(client.clone(), "p2pk33_respent_addr_supply".to_string()), - p2pkh: BtcCentsSatsUsdPattern::new(client.clone(), "p2pkh_respent_addr_supply".to_string()), - p2sh: BtcCentsSatsUsdPattern::new(client.clone(), "p2sh_respent_addr_supply".to_string()), - p2wpkh: BtcCentsSatsUsdPattern::new(client.clone(), "p2wpkh_respent_addr_supply".to_string()), - p2wsh: BtcCentsSatsUsdPattern::new(client.clone(), "p2wsh_respent_addr_supply".to_string()), - p2tr: BtcCentsSatsUsdPattern::new(client.clone(), "p2tr_respent_addr_supply".to_string()), + p2pk65: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2pk65_respent_addr_supply".to_string(), + ), + p2pk33: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2pk33_respent_addr_supply".to_string(), + ), + p2pkh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2pkh_respent_addr_supply".to_string(), + ), + p2sh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2sh_respent_addr_supply".to_string(), + ), + p2wpkh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2wpkh_respent_addr_supply".to_string(), + ), + p2wsh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2wsh_respent_addr_supply".to_string(), + ), + p2tr: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2tr_respent_addr_supply".to_string(), + ), p2a: BtcCentsSatsUsdPattern::new(client.clone(), "p2a_respent_addr_supply".to_string()), - height: SeriesPattern18::new(client.clone(), "respent_addr_supply_sats_by_type".to_string()), - share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4::new(client.clone(), "respent_addr_supply_share".to_string()), + height: SeriesPattern18::new( + client.clone(), + "respent_addr_supply_sats_by_type".to_string(), + ), + share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4::new( + client.clone(), + "respent_addr_supply_share".to_string(), + ), } } } @@ -7409,8 +10418,14 @@ pub struct SeriesTree_Addrs_Exposed { impl SeriesTree_Addrs_Exposed { pub fn new(client: Arc, base_path: String) -> Self { Self { - count: SeriesTree_Addrs_Exposed_Count::new(client.clone(), format!("{base_path}_count")), - supply: SeriesTree_Addrs_Exposed_Supply::new(client.clone(), format!("{base_path}_supply")), + count: SeriesTree_Addrs_Exposed_Count::new( + client.clone(), + format!("{base_path}_count"), + ), + supply: SeriesTree_Addrs_Exposed_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), } } } @@ -7424,8 +10439,14 @@ pub struct SeriesTree_Addrs_Exposed_Count { impl SeriesTree_Addrs_Exposed_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - funded: SeriesTree_Addrs_Exposed_Count_Funded::new(client.clone(), format!("{base_path}_funded")), - total: SeriesTree_Addrs_Exposed_Count_Total::new(client.clone(), format!("{base_path}_total")), + funded: SeriesTree_Addrs_Exposed_Count_Funded::new( + client.clone(), + format!("{base_path}_funded"), + ), + total: SeriesTree_Addrs_Exposed_Count_Total::new( + client.clone(), + format!("{base_path}_total"), + ), } } } @@ -7479,15 +10500,33 @@ impl SeriesTree_Addrs_Exposed_Count_Total { pub fn new(client: Arc, base_path: String) -> Self { Self { all: SeriesPattern1::new(client.clone(), "total_exposed_addr_count".to_string()), - p2pk65: SeriesPattern1::new(client.clone(), "p2pk65_total_exposed_addr_count".to_string()), - p2pk33: SeriesPattern1::new(client.clone(), "p2pk33_total_exposed_addr_count".to_string()), - p2pkh: SeriesPattern1::new(client.clone(), "p2pkh_total_exposed_addr_count".to_string()), + p2pk65: SeriesPattern1::new( + client.clone(), + "p2pk65_total_exposed_addr_count".to_string(), + ), + p2pk33: SeriesPattern1::new( + client.clone(), + "p2pk33_total_exposed_addr_count".to_string(), + ), + p2pkh: SeriesPattern1::new( + client.clone(), + "p2pkh_total_exposed_addr_count".to_string(), + ), p2sh: SeriesPattern1::new(client.clone(), "p2sh_total_exposed_addr_count".to_string()), - p2wpkh: SeriesPattern1::new(client.clone(), "p2wpkh_total_exposed_addr_count".to_string()), - p2wsh: SeriesPattern1::new(client.clone(), "p2wsh_total_exposed_addr_count".to_string()), + p2wpkh: SeriesPattern1::new( + client.clone(), + "p2wpkh_total_exposed_addr_count".to_string(), + ), + p2wsh: SeriesPattern1::new( + client.clone(), + "p2wsh_total_exposed_addr_count".to_string(), + ), p2tr: SeriesPattern1::new(client.clone(), "p2tr_total_exposed_addr_count".to_string()), p2a: SeriesPattern1::new(client.clone(), "p2a_total_exposed_addr_count".to_string()), - height: SeriesPattern18::new(client.clone(), "total_exposed_addr_count_by_type".to_string()), + height: SeriesPattern18::new( + client.clone(), + "total_exposed_addr_count_by_type".to_string(), + ), } } } @@ -7511,16 +10550,43 @@ impl SeriesTree_Addrs_Exposed_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BtcCentsSatsUsdPattern::new(client.clone(), "exposed_addr_supply".to_string()), - p2pk65: BtcCentsSatsUsdPattern::new(client.clone(), "p2pk65_exposed_addr_supply".to_string()), - p2pk33: BtcCentsSatsUsdPattern::new(client.clone(), "p2pk33_exposed_addr_supply".to_string()), - p2pkh: BtcCentsSatsUsdPattern::new(client.clone(), "p2pkh_exposed_addr_supply".to_string()), - p2sh: BtcCentsSatsUsdPattern::new(client.clone(), "p2sh_exposed_addr_supply".to_string()), - p2wpkh: BtcCentsSatsUsdPattern::new(client.clone(), "p2wpkh_exposed_addr_supply".to_string()), - p2wsh: BtcCentsSatsUsdPattern::new(client.clone(), "p2wsh_exposed_addr_supply".to_string()), - p2tr: BtcCentsSatsUsdPattern::new(client.clone(), "p2tr_exposed_addr_supply".to_string()), + p2pk65: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2pk65_exposed_addr_supply".to_string(), + ), + p2pk33: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2pk33_exposed_addr_supply".to_string(), + ), + p2pkh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2pkh_exposed_addr_supply".to_string(), + ), + p2sh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2sh_exposed_addr_supply".to_string(), + ), + p2wpkh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2wpkh_exposed_addr_supply".to_string(), + ), + p2wsh: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2wsh_exposed_addr_supply".to_string(), + ), + p2tr: BtcCentsSatsUsdPattern::new( + client.clone(), + "p2tr_exposed_addr_supply".to_string(), + ), p2a: BtcCentsSatsUsdPattern::new(client.clone(), "p2a_exposed_addr_supply".to_string()), - height: SeriesPattern18::new(client.clone(), "exposed_addr_supply_sats_by_type".to_string()), - share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4::new(client.clone(), "exposed_addr_supply_share".to_string()), + height: SeriesPattern18::new( + client.clone(), + "exposed_addr_supply_sats_by_type".to_string(), + ), + share: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4::new( + client.clone(), + "exposed_addr_supply_share".to_string(), + ), } } } @@ -7563,8 +10629,14 @@ pub struct SeriesTree_Addrs_AvgAmount { impl SeriesTree_Addrs_AvgAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - utxo: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern2::new(client.clone(), "avg_utxo_amount".to_string()), - addr: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern2::new(client.clone(), "avg_addr_amount".to_string()), + utxo: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern2::new( + client.clone(), + "avg_utxo_amount".to_string(), + ), + addr: AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern2::new( + client.clone(), + "avg_addr_amount".to_string(), + ), } } } @@ -7594,7 +10666,10 @@ impl SeriesTree_Scripts_Raw { Self { empty: SeriesTree_Scripts_Raw_Empty::new(client.clone(), format!("{base_path}_empty")), p2ms: SeriesTree_Scripts_Raw_P2ms::new(client.clone(), format!("{base_path}_p2ms")), - unknown: SeriesTree_Scripts_Raw_Unknown::new(client.clone(), format!("{base_path}_unknown")), + unknown: SeriesTree_Scripts_Raw_Unknown::new( + client.clone(), + format!("{base_path}_unknown"), + ), } } } @@ -7608,7 +10683,10 @@ pub struct SeriesTree_Scripts_Raw_Empty { impl SeriesTree_Scripts_Raw_Empty { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_index: SeriesPattern18::new(client.clone(), "first_empty_output_index".to_string()), + first_index: SeriesPattern18::new( + client.clone(), + "first_empty_output_index".to_string(), + ), to_tx_index: SeriesPattern22::new(client.clone(), "tx_index".to_string()), } } @@ -7624,7 +10702,10 @@ pub struct SeriesTree_Scripts_Raw_P2ms { impl SeriesTree_Scripts_Raw_P2ms { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_index: SeriesPattern18::new(client.clone(), "first_p2ms_output_index".to_string()), + first_index: SeriesPattern18::new( + client.clone(), + "first_p2ms_output_index".to_string(), + ), to_tx_index: SeriesPattern25::new(client.clone(), "tx_index".to_string()), legacy_sigops: SeriesPattern25::new(client.clone(), "p2ms_legacy_sigops".to_string()), } @@ -7641,9 +10722,15 @@ pub struct SeriesTree_Scripts_Raw_Unknown { impl SeriesTree_Scripts_Raw_Unknown { pub fn new(client: Arc, base_path: String) -> Self { Self { - first_index: SeriesPattern18::new(client.clone(), "first_unknown_output_index".to_string()), + first_index: SeriesPattern18::new( + client.clone(), + "first_unknown_output_index".to_string(), + ), to_tx_index: SeriesPattern33::new(client.clone(), "tx_index".to_string()), - legacy_sigops: SeriesPattern33::new(client.clone(), "unknown_legacy_sigops".to_string()), + legacy_sigops: SeriesPattern33::new( + client.clone(), + "unknown_legacy_sigops".to_string(), + ), } } } @@ -7661,7 +10748,10 @@ impl SeriesTree_OpReturn { Self { raw: SeriesTree_OpReturn_Raw::new(client.clone(), format!("{base_path}_raw")), total: SeriesTree_OpReturn_Total::new(client.clone(), format!("{base_path}_total")), - by_kind: SeriesTree_OpReturn_ByKind::new(client.clone(), format!("{base_path}_by_kind")), + by_kind: SeriesTree_OpReturn_ByKind::new( + client.clone(), + format!("{base_path}_by_kind"), + ), policy: SeriesTree_OpReturn_Policy::new(client.clone(), format!("{base_path}_policy")), } } @@ -7681,7 +10771,10 @@ impl SeriesTree_OpReturn_Raw { first_index: SeriesPattern18::new(client.clone(), "first_op_return_index".to_string()), to_tx_index: SeriesPattern23::new(client.clone(), "tx_index".to_string()), kind: SeriesPattern23::new(client.clone(), "kind".to_string()), - post_op_return_bytes: SeriesPattern23::new(client.clone(), "op_return_post_op_return_bytes".to_string()), + post_op_return_bytes: SeriesPattern23::new( + client.clone(), + "op_return_post_op_return_bytes".to_string(), + ), } } } @@ -7699,12 +10792,30 @@ pub struct SeriesTree_OpReturn_Total { impl SeriesTree_OpReturn_Total { pub fn new(client: Arc, base_path: String) -> Self { Self { - data_bytes: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_data_bytes".to_string()), - tx_count: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_tx_count".to_string()), - tx_vsize: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_tx_vsize".to_string()), - fees: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_fees".to_string()), - chain_share: PercentPpmRatioPattern2::new(client.clone(), "op_return_chain_share".to_string()), - fee_share: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "op_return_fee_share".to_string()), + data_bytes: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_data_bytes".to_string(), + ), + tx_count: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_tx_count".to_string(), + ), + tx_vsize: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_tx_vsize".to_string(), + ), + fees: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_fees".to_string(), + ), + chain_share: PercentPpmRatioPattern2::new( + client.clone(), + "op_return_chain_share".to_string(), + ), + fee_share: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "op_return_fee_share".to_string(), + ), } } } @@ -7721,10 +10832,22 @@ pub struct SeriesTree_OpReturn_ByKind { impl SeriesTree_OpReturn_ByKind { pub fn new(client: Arc, base_path: String) -> Self { Self { - output_count: SeriesTree_OpReturn_ByKind_OutputCount::new(client.clone(), format!("{base_path}_output_count")), - data_bytes: SeriesTree_OpReturn_ByKind_DataBytes::new(client.clone(), format!("{base_path}_data_bytes")), - tx_count: SeriesTree_OpReturn_ByKind_TxCount::new(client.clone(), format!("{base_path}_tx_count")), - tx_vsize: SeriesTree_OpReturn_ByKind_TxVsize::new(client.clone(), format!("{base_path}_tx_vsize")), + output_count: SeriesTree_OpReturn_ByKind_OutputCount::new( + client.clone(), + format!("{base_path}_output_count"), + ), + data_bytes: SeriesTree_OpReturn_ByKind_DataBytes::new( + client.clone(), + format!("{base_path}_data_bytes"), + ), + tx_count: SeriesTree_OpReturn_ByKind_TxCount::new( + client.clone(), + format!("{base_path}_tx_count"), + ), + tx_vsize: SeriesTree_OpReturn_ByKind_TxVsize::new( + client.clone(), + format!("{base_path}_tx_vsize"), + ), fees: SeriesTree_OpReturn_ByKind_Fees::new(client.clone(), format!("{base_path}_fees")), } } @@ -7761,30 +10884,102 @@ pub struct SeriesTree_OpReturn_ByKind_OutputCount { impl SeriesTree_OpReturn_ByKind_OutputCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - runes: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_runes_output_count".to_string()), - veri_block: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_veri_block_output_count".to_string()), - omni: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_omni_output_count".to_string()), - stacks: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_stacks_output_count".to_string()), - blockstack: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_blockstack_output_count".to_string()), - colu: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_colu_output_count".to_string()), - open_assets: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_open_assets_output_count".to_string()), - komodo: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_komodo_output_count".to_string()), - coin_spark: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_coin_spark_output_count".to_string()), - poet: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_poet_output_count".to_string()), - docproof: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_docproof_output_count".to_string()), - open_timestamps: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_open_timestamps_output_count".to_string()), - factom: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_factom_output_count".to_string()), - eternity_wall: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_eternity_wall_output_count".to_string()), - memo: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_memo_output_count".to_string()), - bitproof: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_bitproof_output_count".to_string()), - ascribe: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_ascribe_output_count".to_string()), - stampery: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_stampery_output_count".to_string()), - epobc: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_epobc_output_count".to_string()), - bare_hash: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_bare_hash_output_count".to_string()), - text: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_text_output_count".to_string()), - empty: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_empty_output_count".to_string()), - unknown: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_unknown_output_count".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "op_return_cumulative_by_kind_output_count".to_string()), + runes: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_runes_output_count".to_string(), + ), + veri_block: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_veri_block_output_count".to_string(), + ), + omni: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_omni_output_count".to_string(), + ), + stacks: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_stacks_output_count".to_string(), + ), + blockstack: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_blockstack_output_count".to_string(), + ), + colu: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_colu_output_count".to_string(), + ), + open_assets: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_open_assets_output_count".to_string(), + ), + komodo: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_komodo_output_count".to_string(), + ), + coin_spark: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_coin_spark_output_count".to_string(), + ), + poet: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_poet_output_count".to_string(), + ), + docproof: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_docproof_output_count".to_string(), + ), + open_timestamps: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_open_timestamps_output_count".to_string(), + ), + factom: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_factom_output_count".to_string(), + ), + eternity_wall: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_eternity_wall_output_count".to_string(), + ), + memo: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_memo_output_count".to_string(), + ), + bitproof: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_bitproof_output_count".to_string(), + ), + ascribe: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_ascribe_output_count".to_string(), + ), + stampery: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_stampery_output_count".to_string(), + ), + epobc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_epobc_output_count".to_string(), + ), + bare_hash: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_bare_hash_output_count".to_string(), + ), + text: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_text_output_count".to_string(), + ), + empty: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_empty_output_count".to_string(), + ), + unknown: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_unknown_output_count".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "op_return_cumulative_by_kind_output_count".to_string(), + ), } } } @@ -7820,30 +11015,102 @@ pub struct SeriesTree_OpReturn_ByKind_DataBytes { impl SeriesTree_OpReturn_ByKind_DataBytes { pub fn new(client: Arc, base_path: String) -> Self { Self { - runes: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_runes".to_string()), - veri_block: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_veri_block".to_string()), - omni: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_omni".to_string()), - stacks: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_stacks".to_string()), - blockstack: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_blockstack".to_string()), - colu: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_colu".to_string()), - open_assets: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_open_assets".to_string()), - komodo: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_komodo".to_string()), - coin_spark: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_coin_spark".to_string()), - poet: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_poet".to_string()), - docproof: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_docproof".to_string()), - open_timestamps: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_open_timestamps".to_string()), - factom: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_factom".to_string()), - eternity_wall: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_eternity_wall".to_string()), - memo: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_memo".to_string()), - bitproof: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_bitproof".to_string()), - ascribe: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_ascribe".to_string()), - stampery: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_stampery".to_string()), - epobc: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_epobc".to_string()), - bare_hash: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_bare_hash".to_string()), - text: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_text".to_string()), - empty: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_empty".to_string()), - unknown: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_unknown".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "op_return_cumulative_by_kind_data_bytes".to_string()), + runes: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_runes".to_string(), + ), + veri_block: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_veri_block".to_string(), + ), + omni: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_omni".to_string(), + ), + stacks: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_stacks".to_string(), + ), + blockstack: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_blockstack".to_string(), + ), + colu: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_colu".to_string(), + ), + open_assets: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_open_assets".to_string(), + ), + komodo: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_komodo".to_string(), + ), + coin_spark: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_coin_spark".to_string(), + ), + poet: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_poet".to_string(), + ), + docproof: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_docproof".to_string(), + ), + open_timestamps: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_open_timestamps".to_string(), + ), + factom: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_factom".to_string(), + ), + eternity_wall: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_eternity_wall".to_string(), + ), + memo: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_memo".to_string(), + ), + bitproof: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_bitproof".to_string(), + ), + ascribe: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_ascribe".to_string(), + ), + stampery: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_stampery".to_string(), + ), + epobc: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_epobc".to_string(), + ), + bare_hash: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_bare_hash".to_string(), + ), + text: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_text".to_string(), + ), + empty: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_empty".to_string(), + ), + unknown: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_unknown".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "op_return_cumulative_by_kind_data_bytes".to_string(), + ), } } } @@ -7879,30 +11146,102 @@ pub struct SeriesTree_OpReturn_ByKind_TxCount { impl SeriesTree_OpReturn_ByKind_TxCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - runes: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_runes_tx_count".to_string()), - veri_block: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_veri_block_tx_count".to_string()), - omni: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_omni_tx_count".to_string()), - stacks: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_stacks_tx_count".to_string()), - blockstack: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_blockstack_tx_count".to_string()), - colu: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_colu_tx_count".to_string()), - open_assets: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_open_assets_tx_count".to_string()), - komodo: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_komodo_tx_count".to_string()), - coin_spark: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_coin_spark_tx_count".to_string()), - poet: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_poet_tx_count".to_string()), - docproof: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_docproof_tx_count".to_string()), - open_timestamps: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_open_timestamps_tx_count".to_string()), - factom: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_factom_tx_count".to_string()), - eternity_wall: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_eternity_wall_tx_count".to_string()), - memo: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_memo_tx_count".to_string()), - bitproof: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_bitproof_tx_count".to_string()), - ascribe: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_ascribe_tx_count".to_string()), - stampery: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_stampery_tx_count".to_string()), - epobc: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_epobc_tx_count".to_string()), - bare_hash: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_bare_hash_tx_count".to_string()), - text: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_text_tx_count".to_string()), - empty: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_empty_tx_count".to_string()), - unknown: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_unknown_tx_count".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "op_return_cumulative_by_kind_tx_count".to_string()), + runes: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_runes_tx_count".to_string(), + ), + veri_block: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_veri_block_tx_count".to_string(), + ), + omni: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_omni_tx_count".to_string(), + ), + stacks: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_stacks_tx_count".to_string(), + ), + blockstack: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_blockstack_tx_count".to_string(), + ), + colu: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_colu_tx_count".to_string(), + ), + open_assets: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_open_assets_tx_count".to_string(), + ), + komodo: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_komodo_tx_count".to_string(), + ), + coin_spark: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_coin_spark_tx_count".to_string(), + ), + poet: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_poet_tx_count".to_string(), + ), + docproof: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_docproof_tx_count".to_string(), + ), + open_timestamps: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_open_timestamps_tx_count".to_string(), + ), + factom: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_factom_tx_count".to_string(), + ), + eternity_wall: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_eternity_wall_tx_count".to_string(), + ), + memo: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_memo_tx_count".to_string(), + ), + bitproof: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_bitproof_tx_count".to_string(), + ), + ascribe: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_ascribe_tx_count".to_string(), + ), + stampery: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_stampery_tx_count".to_string(), + ), + epobc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_epobc_tx_count".to_string(), + ), + bare_hash: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_bare_hash_tx_count".to_string(), + ), + text: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_text_tx_count".to_string(), + ), + empty: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_empty_tx_count".to_string(), + ), + unknown: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_unknown_tx_count".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "op_return_cumulative_by_kind_tx_count".to_string(), + ), } } } @@ -7938,30 +11277,102 @@ pub struct SeriesTree_OpReturn_ByKind_TxVsize { impl SeriesTree_OpReturn_ByKind_TxVsize { pub fn new(client: Arc, base_path: String) -> Self { Self { - runes: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_runes_tx_vsize".to_string()), - veri_block: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_veri_block_tx_vsize".to_string()), - omni: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_omni_tx_vsize".to_string()), - stacks: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_stacks_tx_vsize".to_string()), - blockstack: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_blockstack_tx_vsize".to_string()), - colu: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_colu_tx_vsize".to_string()), - open_assets: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_open_assets_tx_vsize".to_string()), - komodo: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_komodo_tx_vsize".to_string()), - coin_spark: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_coin_spark_tx_vsize".to_string()), - poet: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_poet_tx_vsize".to_string()), - docproof: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_docproof_tx_vsize".to_string()), - open_timestamps: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_open_timestamps_tx_vsize".to_string()), - factom: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_factom_tx_vsize".to_string()), - eternity_wall: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_eternity_wall_tx_vsize".to_string()), - memo: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_memo_tx_vsize".to_string()), - bitproof: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_bitproof_tx_vsize".to_string()), - ascribe: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_ascribe_tx_vsize".to_string()), - stampery: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_stampery_tx_vsize".to_string()), - epobc: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_epobc_tx_vsize".to_string()), - bare_hash: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_bare_hash_tx_vsize".to_string()), - text: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_text_tx_vsize".to_string()), - empty: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_empty_tx_vsize".to_string()), - unknown: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_unknown_tx_vsize".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "op_return_cumulative_by_kind_tx_vsize".to_string()), + runes: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_runes_tx_vsize".to_string(), + ), + veri_block: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_veri_block_tx_vsize".to_string(), + ), + omni: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_omni_tx_vsize".to_string(), + ), + stacks: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_stacks_tx_vsize".to_string(), + ), + blockstack: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_blockstack_tx_vsize".to_string(), + ), + colu: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_colu_tx_vsize".to_string(), + ), + open_assets: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_open_assets_tx_vsize".to_string(), + ), + komodo: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_komodo_tx_vsize".to_string(), + ), + coin_spark: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_coin_spark_tx_vsize".to_string(), + ), + poet: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_poet_tx_vsize".to_string(), + ), + docproof: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_docproof_tx_vsize".to_string(), + ), + open_timestamps: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_open_timestamps_tx_vsize".to_string(), + ), + factom: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_factom_tx_vsize".to_string(), + ), + eternity_wall: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_eternity_wall_tx_vsize".to_string(), + ), + memo: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_memo_tx_vsize".to_string(), + ), + bitproof: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_bitproof_tx_vsize".to_string(), + ), + ascribe: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_ascribe_tx_vsize".to_string(), + ), + stampery: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_stampery_tx_vsize".to_string(), + ), + epobc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_epobc_tx_vsize".to_string(), + ), + bare_hash: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_bare_hash_tx_vsize".to_string(), + ), + text: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_text_tx_vsize".to_string(), + ), + empty: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_empty_tx_vsize".to_string(), + ), + unknown: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_unknown_tx_vsize".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "op_return_cumulative_by_kind_tx_vsize".to_string(), + ), } } } @@ -7997,30 +11408,102 @@ pub struct SeriesTree_OpReturn_ByKind_Fees { impl SeriesTree_OpReturn_ByKind_Fees { pub fn new(client: Arc, base_path: String) -> Self { Self { - runes: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_runes".to_string()), - veri_block: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_veri_block".to_string()), - omni: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_omni".to_string()), - stacks: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_stacks".to_string()), - blockstack: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_blockstack".to_string()), - colu: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_colu".to_string()), - open_assets: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_open_assets".to_string()), - komodo: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_komodo".to_string()), - coin_spark: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_coin_spark".to_string()), - poet: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_poet".to_string()), - docproof: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_docproof".to_string()), - open_timestamps: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_open_timestamps".to_string()), - factom: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_factom".to_string()), - eternity_wall: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_eternity_wall".to_string()), - memo: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_memo".to_string()), - bitproof: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_bitproof".to_string()), - ascribe: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_ascribe".to_string()), - stampery: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_stampery".to_string()), - epobc: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_epobc".to_string()), - bare_hash: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_bare_hash".to_string()), - text: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_text".to_string()), - empty: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_empty".to_string()), - unknown: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_unknown".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "op_return_cumulative_by_kind_fees".to_string()), + runes: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_runes".to_string(), + ), + veri_block: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_veri_block".to_string(), + ), + omni: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_omni".to_string(), + ), + stacks: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_stacks".to_string(), + ), + blockstack: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_blockstack".to_string(), + ), + colu: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_colu".to_string(), + ), + open_assets: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_open_assets".to_string(), + ), + komodo: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_komodo".to_string(), + ), + coin_spark: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_coin_spark".to_string(), + ), + poet: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_poet".to_string(), + ), + docproof: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_docproof".to_string(), + ), + open_timestamps: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_open_timestamps".to_string(), + ), + factom: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_factom".to_string(), + ), + eternity_wall: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_eternity_wall".to_string(), + ), + memo: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_memo".to_string(), + ), + bitproof: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_bitproof".to_string(), + ), + ascribe: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_ascribe".to_string(), + ), + stampery: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_stampery".to_string(), + ), + epobc: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_epobc".to_string(), + ), + bare_hash: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_bare_hash".to_string(), + ), + text: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_text".to_string(), + ), + empty: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_empty".to_string(), + ), + unknown: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_unknown".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "op_return_cumulative_by_kind_fees".to_string(), + ), } } } @@ -8037,10 +11520,22 @@ pub struct SeriesTree_OpReturn_Policy { impl SeriesTree_OpReturn_Policy { pub fn new(client: Arc, base_path: String) -> Self { Self { - output_count: SeriesTree_OpReturn_Policy_OutputCount::new(client.clone(), format!("{base_path}_output_count")), - data_bytes: SeriesTree_OpReturn_Policy_DataBytes::new(client.clone(), format!("{base_path}_data_bytes")), - tx_count: SeriesTree_OpReturn_Policy_TxCount::new(client.clone(), format!("{base_path}_tx_count")), - tx_vsize: SeriesTree_OpReturn_Policy_TxVsize::new(client.clone(), format!("{base_path}_tx_vsize")), + output_count: SeriesTree_OpReturn_Policy_OutputCount::new( + client.clone(), + format!("{base_path}_output_count"), + ), + data_bytes: SeriesTree_OpReturn_Policy_DataBytes::new( + client.clone(), + format!("{base_path}_data_bytes"), + ), + tx_count: SeriesTree_OpReturn_Policy_TxCount::new( + client.clone(), + format!("{base_path}_tx_count"), + ), + tx_vsize: SeriesTree_OpReturn_Policy_TxVsize::new( + client.clone(), + format!("{base_path}_tx_vsize"), + ), fees: SeriesTree_OpReturn_Policy_Fees::new(client.clone(), format!("{base_path}_fees")), } } @@ -8058,11 +11553,26 @@ pub struct SeriesTree_OpReturn_Policy_OutputCount { impl SeriesTree_OpReturn_Policy_OutputCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - pre_v30_standard: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_pre_v30_standard_output_count".to_string()), - pre_v30_nonstandard: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_pre_v30_nonstandard_output_count".to_string()), - oversized: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_oversized_output_count".to_string()), - multiple: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_multiple_output_count".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "op_return_cumulative_policy_output_count".to_string()), + pre_v30_standard: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_pre_v30_standard_output_count".to_string(), + ), + pre_v30_nonstandard: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_pre_v30_nonstandard_output_count".to_string(), + ), + oversized: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_oversized_output_count".to_string(), + ), + multiple: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_multiple_output_count".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "op_return_cumulative_policy_output_count".to_string(), + ), } } } @@ -8079,11 +11589,26 @@ pub struct SeriesTree_OpReturn_Policy_DataBytes { impl SeriesTree_OpReturn_Policy_DataBytes { pub fn new(client: Arc, base_path: String) -> Self { Self { - pre_v30_standard: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_policy_pre_v30_standard".to_string()), - pre_v30_nonstandard: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_policy_pre_v30_nonstandard".to_string()), - oversized: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_policy_oversized".to_string()), - multiple: AverageBlockChainCumulativeDataSumPattern::new(client.clone(), "op_return_policy_multiple".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "op_return_cumulative_policy_data_bytes".to_string()), + pre_v30_standard: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_policy_pre_v30_standard".to_string(), + ), + pre_v30_nonstandard: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_policy_pre_v30_nonstandard".to_string(), + ), + oversized: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_policy_oversized".to_string(), + ), + multiple: AverageBlockChainCumulativeDataSumPattern::new( + client.clone(), + "op_return_policy_multiple".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "op_return_cumulative_policy_data_bytes".to_string(), + ), } } } @@ -8100,11 +11625,26 @@ pub struct SeriesTree_OpReturn_Policy_TxCount { impl SeriesTree_OpReturn_Policy_TxCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - pre_v30_standard: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_pre_v30_standard_tx_count".to_string()), - pre_v30_nonstandard: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_pre_v30_nonstandard_tx_count".to_string()), - oversized: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_oversized_tx_count".to_string()), - multiple: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_multiple_tx_count".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "op_return_cumulative_policy_tx_count".to_string()), + pre_v30_standard: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_pre_v30_standard_tx_count".to_string(), + ), + pre_v30_nonstandard: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_pre_v30_nonstandard_tx_count".to_string(), + ), + oversized: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_oversized_tx_count".to_string(), + ), + multiple: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_multiple_tx_count".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "op_return_cumulative_policy_tx_count".to_string(), + ), } } } @@ -8121,11 +11661,26 @@ pub struct SeriesTree_OpReturn_Policy_TxVsize { impl SeriesTree_OpReturn_Policy_TxVsize { pub fn new(client: Arc, base_path: String) -> Self { Self { - pre_v30_standard: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_pre_v30_standard_tx_vsize".to_string()), - pre_v30_nonstandard: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_pre_v30_nonstandard_tx_vsize".to_string()), - oversized: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_oversized_tx_vsize".to_string()), - multiple: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_policy_multiple_tx_vsize".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "op_return_cumulative_policy_tx_vsize".to_string()), + pre_v30_standard: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_pre_v30_standard_tx_vsize".to_string(), + ), + pre_v30_nonstandard: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_pre_v30_nonstandard_tx_vsize".to_string(), + ), + oversized: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_oversized_tx_vsize".to_string(), + ), + multiple: AverageBlockCumulativeSumPattern::new( + client.clone(), + "op_return_policy_multiple_tx_vsize".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "op_return_cumulative_policy_tx_vsize".to_string(), + ), } } } @@ -8142,11 +11697,26 @@ pub struct SeriesTree_OpReturn_Policy_Fees { impl SeriesTree_OpReturn_Policy_Fees { pub fn new(client: Arc, base_path: String) -> Self { Self { - pre_v30_standard: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_policy_pre_v30_standard".to_string()), - pre_v30_nonstandard: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_policy_pre_v30_nonstandard".to_string()), - oversized: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_policy_oversized".to_string()), - multiple: AverageBlockCumulativeFeeSumPattern::new(client.clone(), "op_return_policy_multiple".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "op_return_cumulative_policy_fees".to_string()), + pre_v30_standard: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_policy_pre_v30_standard".to_string(), + ), + pre_v30_nonstandard: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_policy_pre_v30_nonstandard".to_string(), + ), + oversized: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_policy_oversized".to_string(), + ), + multiple: AverageBlockCumulativeFeeSumPattern::new( + client.clone(), + "op_return_policy_multiple".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "op_return_cumulative_policy_fees".to_string(), + ), } } } @@ -8161,7 +11731,10 @@ impl SeriesTree_Mining { pub fn new(client: Arc, base_path: String) -> Self { Self { rewards: SeriesTree_Mining_Rewards::new(client.clone(), format!("{base_path}_rewards")), - hashrate: SeriesTree_Mining_Hashrate::new(client.clone(), format!("{base_path}_hashrate")), + hashrate: SeriesTree_Mining_Hashrate::new( + client.clone(), + format!("{base_path}_hashrate"), + ), } } } @@ -8178,8 +11751,14 @@ pub struct SeriesTree_Mining_Rewards { impl SeriesTree_Mining_Rewards { pub fn new(client: Arc, base_path: String) -> Self { Self { - coinbase: AverageBlockCumulativeSumPattern2::new(client.clone(), "coinbase".to_string()), - subsidy: SeriesTree_Mining_Rewards_Subsidy::new(client.clone(), format!("{base_path}_subsidy")), + coinbase: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "coinbase".to_string(), + ), + subsidy: SeriesTree_Mining_Rewards_Subsidy::new( + client.clone(), + format!("{base_path}_subsidy"), + ), fees: SeriesTree_Mining_Rewards_Fees::new(client.clone(), format!("{base_path}_fees")), output_volume: SeriesPattern18::new(client.clone(), "output_volume".to_string()), unclaimed: BlockCumulativePattern::new(client.clone(), "unclaimed_rewards".to_string()), @@ -8200,10 +11779,16 @@ impl SeriesTree_Mining_Rewards_Subsidy { pub fn new(client: Arc, base_path: String) -> Self { Self { block: BtcCentsSatsUsdPattern3::new(client.clone(), "subsidy".to_string()), - cumulative: BtcCentsSatsUsdPattern::new(client.clone(), "subsidy_cumulative".to_string()), + cumulative: BtcCentsSatsUsdPattern::new( + client.clone(), + "subsidy_cumulative".to_string(), + ), sum: _1m1w1y24hPattern4::new(client.clone(), "subsidy_sum".to_string()), average: _1m1w1y24hPattern3::new(client.clone(), "subsidy_average".to_string()), - dominance: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "subsidy_dominance".to_string()), + dominance: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "subsidy_dominance".to_string(), + ), } } } @@ -8239,8 +11824,14 @@ impl SeriesTree_Mining_Rewards_Fees { median: _1m1w1y24hPattern4::new(client.clone(), "fees_median".to_string()), pct75: _1m1w1y24hPattern4::new(client.clone(), "fees_pct75".to_string()), pct90: _1m1w1y24hPattern4::new(client.clone(), "fees_pct90".to_string()), - dominance: _1m1w1y24hPercentPpmRatioPattern::new(client.clone(), "fee_dominance".to_string()), - to_subsidy: SeriesTree_Mining_Rewards_Fees_ToSubsidy::new(client.clone(), format!("{base_path}_to_subsidy")), + dominance: _1m1w1y24hPercentPpmRatioPattern::new( + client.clone(), + "fee_dominance".to_string(), + ), + to_subsidy: SeriesTree_Mining_Rewards_Fees_ToSubsidy::new( + client.clone(), + format!("{base_path}_to_subsidy"), + ), } } } @@ -8293,9 +11884,15 @@ impl SeriesTree_Mining_Hashrate_Rate { pub fn new(client: Arc, base_path: String) -> Self { Self { base: SeriesPattern1::new(client.clone(), "hash_rate".to_string()), - sma: SeriesTree_Mining_Hashrate_Rate_Sma::new(client.clone(), format!("{base_path}_sma")), + sma: SeriesTree_Mining_Hashrate_Rate_Sma::new( + client.clone(), + format!("{base_path}_sma"), + ), ath: SeriesPattern1::new(client.clone(), "hash_rate_ath".to_string()), - drawdown: PercentPpmRatioPattern3::new(client.clone(), "hash_rate_drawdown".to_string()), + drawdown: PercentPpmRatioPattern3::new( + client.clone(), + "hash_rate_drawdown".to_string(), + ), } } } @@ -8328,8 +11925,14 @@ pub struct SeriesTree_Frameworks { impl SeriesTree_Frameworks { pub fn new(client: Arc, base_path: String) -> Self { Self { - cointime: SeriesTree_Frameworks_Cointime::new(client.clone(), format!("{base_path}_cointime")), - coinflow: SeriesTree_Frameworks_Coinflow::new(client.clone(), format!("{base_path}_coinflow")), + cointime: SeriesTree_Frameworks_Cointime::new( + client.clone(), + format!("{base_path}_cointime"), + ), + coinflow: SeriesTree_Frameworks_Coinflow::new( + client.clone(), + format!("{base_path}_coinflow"), + ), } } } @@ -8354,19 +11957,55 @@ pub struct SeriesTree_Frameworks_Cointime { impl SeriesTree_Frameworks_Cointime { pub fn new(client: Arc, base_path: String) -> Self { Self { - activity: SeriesTree_Frameworks_Cointime_Activity::new(client.clone(), format!("{base_path}_activity")), - age_range: SeriesTree_Frameworks_Cointime_AgeRange::new(client.clone(), format!("{base_path}_age_range")), - awake: SeriesTree_Frameworks_Cointime_Awake::new(client.clone(), format!("{base_path}_awake")), + activity: SeriesTree_Frameworks_Cointime_Activity::new( + client.clone(), + format!("{base_path}_activity"), + ), + age_range: SeriesTree_Frameworks_Cointime_AgeRange::new( + client.clone(), + format!("{base_path}_age_range"), + ), + awake: SeriesTree_Frameworks_Cointime_Awake::new( + client.clone(), + format!("{base_path}_awake"), + ), dormant: SupplyPattern2::new(client.clone(), "all_dormant_supply".to_string()), - sth: SeriesTree_Frameworks_Cointime_Sth::new(client.clone(), format!("{base_path}_sth")), - lth: SeriesTree_Frameworks_Cointime_Lth::new(client.clone(), format!("{base_path}_lth")), - sources: SeriesTree_Frameworks_Cointime_Sources::new(client.clone(), format!("{base_path}_sources")), - supply: SeriesTree_Frameworks_Cointime_Supply::new(client.clone(), format!("{base_path}_supply")), - value: SeriesTree_Frameworks_Cointime_Value::new(client.clone(), format!("{base_path}_value")), - cap: SeriesTree_Frameworks_Cointime_Cap::new(client.clone(), format!("{base_path}_cap")), - prices: SeriesTree_Frameworks_Cointime_Prices::new(client.clone(), format!("{base_path}_prices")), - adjusted: SeriesTree_Frameworks_Cointime_Adjusted::new(client.clone(), format!("{base_path}_adjusted")), - reserve_risk: SeriesTree_Frameworks_Cointime_ReserveRisk::new(client.clone(), format!("{base_path}_reserve_risk")), + sth: SeriesTree_Frameworks_Cointime_Sth::new( + client.clone(), + format!("{base_path}_sth"), + ), + lth: SeriesTree_Frameworks_Cointime_Lth::new( + client.clone(), + format!("{base_path}_lth"), + ), + sources: SeriesTree_Frameworks_Cointime_Sources::new( + client.clone(), + format!("{base_path}_sources"), + ), + supply: SeriesTree_Frameworks_Cointime_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), + value: SeriesTree_Frameworks_Cointime_Value::new( + client.clone(), + format!("{base_path}_value"), + ), + cap: SeriesTree_Frameworks_Cointime_Cap::new( + client.clone(), + format!("{base_path}_cap"), + ), + prices: SeriesTree_Frameworks_Cointime_Prices::new( + client.clone(), + format!("{base_path}_prices"), + ), + adjusted: SeriesTree_Frameworks_Cointime_Adjusted::new( + client.clone(), + format!("{base_path}_adjusted"), + ), + reserve_risk: SeriesTree_Frameworks_Cointime_ReserveRisk::new( + client.clone(), + format!("{base_path}_reserve_risk"), + ), } } } @@ -8383,8 +12022,14 @@ pub struct SeriesTree_Frameworks_Cointime_Activity { impl SeriesTree_Frameworks_Cointime_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - coinblocks_created: AverageBlockCumulativeSumPattern::new(client.clone(), "coinblocks_created".to_string()), - coinblocks_stored: AverageBlockCumulativeSumPattern::new(client.clone(), "coinblocks_stored".to_string()), + coinblocks_created: AverageBlockCumulativeSumPattern::new( + client.clone(), + "coinblocks_created".to_string(), + ), + coinblocks_stored: AverageBlockCumulativeSumPattern::new( + client.clone(), + "coinblocks_stored".to_string(), + ), liveliness: SeriesPattern1::new(client.clone(), "liveliness".to_string()), vaultedness: SeriesPattern1::new(client.clone(), "vaultedness".to_string()), ratio: SeriesPattern1::new(client.clone(), "activity_to_vaultedness".to_string()), @@ -8404,11 +12049,26 @@ pub struct SeriesTree_Frameworks_Cointime_AgeRange { impl SeriesTree_Frameworks_Cointime_AgeRange { pub fn new(client: Arc, base_path: String) -> Self { Self { - coindays_created: SeriesTree_Frameworks_Cointime_AgeRange_CoindaysCreated::new(client.clone(), format!("{base_path}_coindays_created")), - coindays_consumed: SeriesTree_Frameworks_Cointime_AgeRange_CoindaysConsumed::new(client.clone(), format!("{base_path}_coindays_consumed")), - coindays_stored: SeriesTree_Frameworks_Cointime_AgeRange_CoindaysStored::new(client.clone(), format!("{base_path}_coindays_stored")), - activity: SeriesTree_Frameworks_Cointime_AgeRange_Activity::new(client.clone(), format!("{base_path}_activity")), - supply: SeriesTree_Frameworks_Cointime_AgeRange_Supply::new(client.clone(), format!("{base_path}_supply")), + coindays_created: SeriesTree_Frameworks_Cointime_AgeRange_CoindaysCreated::new( + client.clone(), + format!("{base_path}_coindays_created"), + ), + coindays_consumed: SeriesTree_Frameworks_Cointime_AgeRange_CoindaysConsumed::new( + client.clone(), + format!("{base_path}_coindays_consumed"), + ), + coindays_stored: SeriesTree_Frameworks_Cointime_AgeRange_CoindaysStored::new( + client.clone(), + format!("{base_path}_coindays_stored"), + ), + activity: SeriesTree_Frameworks_Cointime_AgeRange_Activity::new( + client.clone(), + format!("{base_path}_activity"), + ), + supply: SeriesTree_Frameworks_Cointime_AgeRange_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), } } } @@ -8444,30 +12104,102 @@ pub struct SeriesTree_Frameworks_Cointime_AgeRange_CoindaysCreated { impl SeriesTree_Frameworks_Cointime_AgeRange_CoindaysCreated { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1h_old_coindays_created".to_string()), - _1h_to_1d: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1h_to_1d_old_coindays_created".to_string()), - _1d_to_1w: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1d_to_1w_old_coindays_created".to_string()), - _1w_to_1m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1w_to_1m_old_coindays_created".to_string()), - _1m_to_2m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1m_to_2m_old_coindays_created".to_string()), - _2m_to_3m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_2m_to_3m_old_coindays_created".to_string()), - _3m_to_4m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_3m_to_4m_old_coindays_created".to_string()), - _4m_to_5m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_4m_to_5m_old_coindays_created".to_string()), - _5m_to_6m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_5m_to_6m_old_coindays_created".to_string()), - _6m_to_9m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_6m_to_9m_old_coindays_created".to_string()), - _9m_to_1y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_9m_to_1y_old_coindays_created".to_string()), - _1y_to_18m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1y_to_18m_old_coindays_created".to_string()), - _18m_to_2y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_18m_to_2y_old_coindays_created".to_string()), - _2y_to_3y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_2y_to_3y_old_coindays_created".to_string()), - _3y_to_4y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_3y_to_4y_old_coindays_created".to_string()), - _4y_to_5y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_4y_to_5y_old_coindays_created".to_string()), - _5y_to_6y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_5y_to_6y_old_coindays_created".to_string()), - _6y_to_7y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_6y_to_7y_old_coindays_created".to_string()), - _7y_to_8y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_7y_to_8y_old_coindays_created".to_string()), - _8y_to_10y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_8y_to_10y_old_coindays_created".to_string()), - _10y_to_12y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_10y_to_12y_old_coindays_created".to_string()), - _12y_to_15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_12y_to_15y_old_coindays_created".to_string()), - over_15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_15y_old_coindays_created".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "utxos_age_range_coindays_created_cumulative".to_string()), + under_1h: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1h_old_coindays_created".to_string(), + ), + _1h_to_1d: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1h_to_1d_old_coindays_created".to_string(), + ), + _1d_to_1w: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1d_to_1w_old_coindays_created".to_string(), + ), + _1w_to_1m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1w_to_1m_old_coindays_created".to_string(), + ), + _1m_to_2m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_to_2m_old_coindays_created".to_string(), + ), + _2m_to_3m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_2m_to_3m_old_coindays_created".to_string(), + ), + _3m_to_4m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_3m_to_4m_old_coindays_created".to_string(), + ), + _4m_to_5m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_4m_to_5m_old_coindays_created".to_string(), + ), + _5m_to_6m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_5m_to_6m_old_coindays_created".to_string(), + ), + _6m_to_9m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_6m_to_9m_old_coindays_created".to_string(), + ), + _9m_to_1y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_9m_to_1y_old_coindays_created".to_string(), + ), + _1y_to_18m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1y_to_18m_old_coindays_created".to_string(), + ), + _18m_to_2y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_18m_to_2y_old_coindays_created".to_string(), + ), + _2y_to_3y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_2y_to_3y_old_coindays_created".to_string(), + ), + _3y_to_4y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_3y_to_4y_old_coindays_created".to_string(), + ), + _4y_to_5y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_4y_to_5y_old_coindays_created".to_string(), + ), + _5y_to_6y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_5y_to_6y_old_coindays_created".to_string(), + ), + _6y_to_7y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_6y_to_7y_old_coindays_created".to_string(), + ), + _7y_to_8y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_7y_to_8y_old_coindays_created".to_string(), + ), + _8y_to_10y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_8y_to_10y_old_coindays_created".to_string(), + ), + _10y_to_12y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_10y_to_12y_old_coindays_created".to_string(), + ), + _12y_to_15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_12y_to_15y_old_coindays_created".to_string(), + ), + over_15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_15y_old_coindays_created".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "utxos_age_range_coindays_created_cumulative".to_string(), + ), } } } @@ -8503,30 +12235,102 @@ pub struct SeriesTree_Frameworks_Cointime_AgeRange_CoindaysConsumed { impl SeriesTree_Frameworks_Cointime_AgeRange_CoindaysConsumed { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1h_old_coindays_consumed".to_string()), - _1h_to_1d: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1h_to_1d_old_coindays_consumed".to_string()), - _1d_to_1w: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1d_to_1w_old_coindays_consumed".to_string()), - _1w_to_1m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1w_to_1m_old_coindays_consumed".to_string()), - _1m_to_2m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1m_to_2m_old_coindays_consumed".to_string()), - _2m_to_3m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_2m_to_3m_old_coindays_consumed".to_string()), - _3m_to_4m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_3m_to_4m_old_coindays_consumed".to_string()), - _4m_to_5m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_4m_to_5m_old_coindays_consumed".to_string()), - _5m_to_6m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_5m_to_6m_old_coindays_consumed".to_string()), - _6m_to_9m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_6m_to_9m_old_coindays_consumed".to_string()), - _9m_to_1y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_9m_to_1y_old_coindays_consumed".to_string()), - _1y_to_18m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1y_to_18m_old_coindays_consumed".to_string()), - _18m_to_2y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_18m_to_2y_old_coindays_consumed".to_string()), - _2y_to_3y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_2y_to_3y_old_coindays_consumed".to_string()), - _3y_to_4y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_3y_to_4y_old_coindays_consumed".to_string()), - _4y_to_5y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_4y_to_5y_old_coindays_consumed".to_string()), - _5y_to_6y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_5y_to_6y_old_coindays_consumed".to_string()), - _6y_to_7y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_6y_to_7y_old_coindays_consumed".to_string()), - _7y_to_8y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_7y_to_8y_old_coindays_consumed".to_string()), - _8y_to_10y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_8y_to_10y_old_coindays_consumed".to_string()), - _10y_to_12y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_10y_to_12y_old_coindays_consumed".to_string()), - _12y_to_15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_12y_to_15y_old_coindays_consumed".to_string()), - over_15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_15y_old_coindays_consumed".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "utxos_age_range_coindays_consumed_cumulative".to_string()), + under_1h: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1h_old_coindays_consumed".to_string(), + ), + _1h_to_1d: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1h_to_1d_old_coindays_consumed".to_string(), + ), + _1d_to_1w: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1d_to_1w_old_coindays_consumed".to_string(), + ), + _1w_to_1m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1w_to_1m_old_coindays_consumed".to_string(), + ), + _1m_to_2m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_to_2m_old_coindays_consumed".to_string(), + ), + _2m_to_3m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_2m_to_3m_old_coindays_consumed".to_string(), + ), + _3m_to_4m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_3m_to_4m_old_coindays_consumed".to_string(), + ), + _4m_to_5m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_4m_to_5m_old_coindays_consumed".to_string(), + ), + _5m_to_6m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_5m_to_6m_old_coindays_consumed".to_string(), + ), + _6m_to_9m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_6m_to_9m_old_coindays_consumed".to_string(), + ), + _9m_to_1y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_9m_to_1y_old_coindays_consumed".to_string(), + ), + _1y_to_18m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1y_to_18m_old_coindays_consumed".to_string(), + ), + _18m_to_2y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_18m_to_2y_old_coindays_consumed".to_string(), + ), + _2y_to_3y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_2y_to_3y_old_coindays_consumed".to_string(), + ), + _3y_to_4y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_3y_to_4y_old_coindays_consumed".to_string(), + ), + _4y_to_5y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_4y_to_5y_old_coindays_consumed".to_string(), + ), + _5y_to_6y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_5y_to_6y_old_coindays_consumed".to_string(), + ), + _6y_to_7y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_6y_to_7y_old_coindays_consumed".to_string(), + ), + _7y_to_8y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_7y_to_8y_old_coindays_consumed".to_string(), + ), + _8y_to_10y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_8y_to_10y_old_coindays_consumed".to_string(), + ), + _10y_to_12y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_10y_to_12y_old_coindays_consumed".to_string(), + ), + _12y_to_15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_12y_to_15y_old_coindays_consumed".to_string(), + ), + over_15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_15y_old_coindays_consumed".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "utxos_age_range_coindays_consumed_cumulative".to_string(), + ), } } } @@ -8562,30 +12366,102 @@ pub struct SeriesTree_Frameworks_Cointime_AgeRange_CoindaysStored { impl SeriesTree_Frameworks_Cointime_AgeRange_CoindaysStored { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1h_old_coindays_stored".to_string()), - _1h_to_1d: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1h_to_1d_old_coindays_stored".to_string()), - _1d_to_1w: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1d_to_1w_old_coindays_stored".to_string()), - _1w_to_1m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1w_to_1m_old_coindays_stored".to_string()), - _1m_to_2m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1m_to_2m_old_coindays_stored".to_string()), - _2m_to_3m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_2m_to_3m_old_coindays_stored".to_string()), - _3m_to_4m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_3m_to_4m_old_coindays_stored".to_string()), - _4m_to_5m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_4m_to_5m_old_coindays_stored".to_string()), - _5m_to_6m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_5m_to_6m_old_coindays_stored".to_string()), - _6m_to_9m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_6m_to_9m_old_coindays_stored".to_string()), - _9m_to_1y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_9m_to_1y_old_coindays_stored".to_string()), - _1y_to_18m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1y_to_18m_old_coindays_stored".to_string()), - _18m_to_2y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_18m_to_2y_old_coindays_stored".to_string()), - _2y_to_3y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_2y_to_3y_old_coindays_stored".to_string()), - _3y_to_4y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_3y_to_4y_old_coindays_stored".to_string()), - _4y_to_5y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_4y_to_5y_old_coindays_stored".to_string()), - _5y_to_6y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_5y_to_6y_old_coindays_stored".to_string()), - _6y_to_7y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_6y_to_7y_old_coindays_stored".to_string()), - _7y_to_8y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_7y_to_8y_old_coindays_stored".to_string()), - _8y_to_10y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_8y_to_10y_old_coindays_stored".to_string()), - _10y_to_12y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_10y_to_12y_old_coindays_stored".to_string()), - _12y_to_15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_12y_to_15y_old_coindays_stored".to_string()), - over_15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_15y_old_coindays_stored".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "utxos_age_range_coindays_stored_cumulative".to_string()), + under_1h: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1h_old_coindays_stored".to_string(), + ), + _1h_to_1d: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1h_to_1d_old_coindays_stored".to_string(), + ), + _1d_to_1w: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1d_to_1w_old_coindays_stored".to_string(), + ), + _1w_to_1m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1w_to_1m_old_coindays_stored".to_string(), + ), + _1m_to_2m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_to_2m_old_coindays_stored".to_string(), + ), + _2m_to_3m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_2m_to_3m_old_coindays_stored".to_string(), + ), + _3m_to_4m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_3m_to_4m_old_coindays_stored".to_string(), + ), + _4m_to_5m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_4m_to_5m_old_coindays_stored".to_string(), + ), + _5m_to_6m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_5m_to_6m_old_coindays_stored".to_string(), + ), + _6m_to_9m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_6m_to_9m_old_coindays_stored".to_string(), + ), + _9m_to_1y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_9m_to_1y_old_coindays_stored".to_string(), + ), + _1y_to_18m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1y_to_18m_old_coindays_stored".to_string(), + ), + _18m_to_2y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_18m_to_2y_old_coindays_stored".to_string(), + ), + _2y_to_3y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_2y_to_3y_old_coindays_stored".to_string(), + ), + _3y_to_4y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_3y_to_4y_old_coindays_stored".to_string(), + ), + _4y_to_5y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_4y_to_5y_old_coindays_stored".to_string(), + ), + _5y_to_6y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_5y_to_6y_old_coindays_stored".to_string(), + ), + _6y_to_7y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_6y_to_7y_old_coindays_stored".to_string(), + ), + _7y_to_8y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_7y_to_8y_old_coindays_stored".to_string(), + ), + _8y_to_10y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_8y_to_10y_old_coindays_stored".to_string(), + ), + _10y_to_12y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_10y_to_12y_old_coindays_stored".to_string(), + ), + _12y_to_15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_12y_to_15y_old_coindays_stored".to_string(), + ), + over_15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_15y_old_coindays_stored".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "utxos_age_range_coindays_stored_cumulative".to_string(), + ), } } } @@ -8594,16 +12470,27 @@ impl SeriesTree_Frameworks_Cointime_AgeRange_CoindaysStored { pub struct SeriesTree_Frameworks_Cointime_AgeRange_Activity { pub wakefulness: SeriesTree_Frameworks_Cointime_AgeRange_Activity_Wakefulness, pub dormancy: SeriesTree_Frameworks_Cointime_AgeRange_Activity_Dormancy, - pub wakefulness_to_dormancy: SeriesTree_Frameworks_Cointime_AgeRange_Activity_WakefulnessToDormancy, + pub wakefulness_to_dormancy: + SeriesTree_Frameworks_Cointime_AgeRange_Activity_WakefulnessToDormancy, pub height: SeriesPattern18, } impl SeriesTree_Frameworks_Cointime_AgeRange_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - wakefulness: SeriesTree_Frameworks_Cointime_AgeRange_Activity_Wakefulness::new(client.clone(), format!("{base_path}_wakefulness")), - dormancy: SeriesTree_Frameworks_Cointime_AgeRange_Activity_Dormancy::new(client.clone(), format!("{base_path}_dormancy")), - wakefulness_to_dormancy: SeriesTree_Frameworks_Cointime_AgeRange_Activity_WakefulnessToDormancy::new(client.clone(), format!("{base_path}_wakefulness_to_dormancy")), + wakefulness: SeriesTree_Frameworks_Cointime_AgeRange_Activity_Wakefulness::new( + client.clone(), + format!("{base_path}_wakefulness"), + ), + dormancy: SeriesTree_Frameworks_Cointime_AgeRange_Activity_Dormancy::new( + client.clone(), + format!("{base_path}_dormancy"), + ), + wakefulness_to_dormancy: + SeriesTree_Frameworks_Cointime_AgeRange_Activity_WakefulnessToDormancy::new( + client.clone(), + format!("{base_path}_wakefulness_to_dormancy"), + ), height: SeriesPattern18::new(client.clone(), "utxos_age_range_wakefulness".to_string()), } } @@ -8639,29 +12526,98 @@ pub struct SeriesTree_Frameworks_Cointime_AgeRange_Activity_Wakefulness { impl SeriesTree_Frameworks_Cointime_AgeRange_Activity_Wakefulness { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: SeriesPattern1::new(client.clone(), "utxos_under_1h_old_wakefulness".to_string()), - _1h_to_1d: SeriesPattern1::new(client.clone(), "utxos_1h_to_1d_old_wakefulness".to_string()), - _1d_to_1w: SeriesPattern1::new(client.clone(), "utxos_1d_to_1w_old_wakefulness".to_string()), - _1w_to_1m: SeriesPattern1::new(client.clone(), "utxos_1w_to_1m_old_wakefulness".to_string()), - _1m_to_2m: SeriesPattern1::new(client.clone(), "utxos_1m_to_2m_old_wakefulness".to_string()), - _2m_to_3m: SeriesPattern1::new(client.clone(), "utxos_2m_to_3m_old_wakefulness".to_string()), - _3m_to_4m: SeriesPattern1::new(client.clone(), "utxos_3m_to_4m_old_wakefulness".to_string()), - _4m_to_5m: SeriesPattern1::new(client.clone(), "utxos_4m_to_5m_old_wakefulness".to_string()), - _5m_to_6m: SeriesPattern1::new(client.clone(), "utxos_5m_to_6m_old_wakefulness".to_string()), - _6m_to_9m: SeriesPattern1::new(client.clone(), "utxos_6m_to_9m_old_wakefulness".to_string()), - _9m_to_1y: SeriesPattern1::new(client.clone(), "utxos_9m_to_1y_old_wakefulness".to_string()), - _1y_to_18m: SeriesPattern1::new(client.clone(), "utxos_1y_to_18m_old_wakefulness".to_string()), - _18m_to_2y: SeriesPattern1::new(client.clone(), "utxos_18m_to_2y_old_wakefulness".to_string()), - _2y_to_3y: SeriesPattern1::new(client.clone(), "utxos_2y_to_3y_old_wakefulness".to_string()), - _3y_to_4y: SeriesPattern1::new(client.clone(), "utxos_3y_to_4y_old_wakefulness".to_string()), - _4y_to_5y: SeriesPattern1::new(client.clone(), "utxos_4y_to_5y_old_wakefulness".to_string()), - _5y_to_6y: SeriesPattern1::new(client.clone(), "utxos_5y_to_6y_old_wakefulness".to_string()), - _6y_to_7y: SeriesPattern1::new(client.clone(), "utxos_6y_to_7y_old_wakefulness".to_string()), - _7y_to_8y: SeriesPattern1::new(client.clone(), "utxos_7y_to_8y_old_wakefulness".to_string()), - _8y_to_10y: SeriesPattern1::new(client.clone(), "utxos_8y_to_10y_old_wakefulness".to_string()), - _10y_to_12y: SeriesPattern1::new(client.clone(), "utxos_10y_to_12y_old_wakefulness".to_string()), - _12y_to_15y: SeriesPattern1::new(client.clone(), "utxos_12y_to_15y_old_wakefulness".to_string()), - over_15y: SeriesPattern1::new(client.clone(), "utxos_over_15y_old_wakefulness".to_string()), + under_1h: SeriesPattern1::new( + client.clone(), + "utxos_under_1h_old_wakefulness".to_string(), + ), + _1h_to_1d: SeriesPattern1::new( + client.clone(), + "utxos_1h_to_1d_old_wakefulness".to_string(), + ), + _1d_to_1w: SeriesPattern1::new( + client.clone(), + "utxos_1d_to_1w_old_wakefulness".to_string(), + ), + _1w_to_1m: SeriesPattern1::new( + client.clone(), + "utxos_1w_to_1m_old_wakefulness".to_string(), + ), + _1m_to_2m: SeriesPattern1::new( + client.clone(), + "utxos_1m_to_2m_old_wakefulness".to_string(), + ), + _2m_to_3m: SeriesPattern1::new( + client.clone(), + "utxos_2m_to_3m_old_wakefulness".to_string(), + ), + _3m_to_4m: SeriesPattern1::new( + client.clone(), + "utxos_3m_to_4m_old_wakefulness".to_string(), + ), + _4m_to_5m: SeriesPattern1::new( + client.clone(), + "utxos_4m_to_5m_old_wakefulness".to_string(), + ), + _5m_to_6m: SeriesPattern1::new( + client.clone(), + "utxos_5m_to_6m_old_wakefulness".to_string(), + ), + _6m_to_9m: SeriesPattern1::new( + client.clone(), + "utxos_6m_to_9m_old_wakefulness".to_string(), + ), + _9m_to_1y: SeriesPattern1::new( + client.clone(), + "utxos_9m_to_1y_old_wakefulness".to_string(), + ), + _1y_to_18m: SeriesPattern1::new( + client.clone(), + "utxos_1y_to_18m_old_wakefulness".to_string(), + ), + _18m_to_2y: SeriesPattern1::new( + client.clone(), + "utxos_18m_to_2y_old_wakefulness".to_string(), + ), + _2y_to_3y: SeriesPattern1::new( + client.clone(), + "utxos_2y_to_3y_old_wakefulness".to_string(), + ), + _3y_to_4y: SeriesPattern1::new( + client.clone(), + "utxos_3y_to_4y_old_wakefulness".to_string(), + ), + _4y_to_5y: SeriesPattern1::new( + client.clone(), + "utxos_4y_to_5y_old_wakefulness".to_string(), + ), + _5y_to_6y: SeriesPattern1::new( + client.clone(), + "utxos_5y_to_6y_old_wakefulness".to_string(), + ), + _6y_to_7y: SeriesPattern1::new( + client.clone(), + "utxos_6y_to_7y_old_wakefulness".to_string(), + ), + _7y_to_8y: SeriesPattern1::new( + client.clone(), + "utxos_7y_to_8y_old_wakefulness".to_string(), + ), + _8y_to_10y: SeriesPattern1::new( + client.clone(), + "utxos_8y_to_10y_old_wakefulness".to_string(), + ), + _10y_to_12y: SeriesPattern1::new( + client.clone(), + "utxos_10y_to_12y_old_wakefulness".to_string(), + ), + _12y_to_15y: SeriesPattern1::new( + client.clone(), + "utxos_12y_to_15y_old_wakefulness".to_string(), + ), + over_15y: SeriesPattern1::new( + client.clone(), + "utxos_over_15y_old_wakefulness".to_string(), + ), } } } @@ -8696,29 +12652,98 @@ pub struct SeriesTree_Frameworks_Cointime_AgeRange_Activity_Dormancy { impl SeriesTree_Frameworks_Cointime_AgeRange_Activity_Dormancy { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: SeriesPattern1::new(client.clone(), "utxos_under_1h_old_dormancy".to_string()), - _1h_to_1d: SeriesPattern1::new(client.clone(), "utxos_1h_to_1d_old_dormancy".to_string()), - _1d_to_1w: SeriesPattern1::new(client.clone(), "utxos_1d_to_1w_old_dormancy".to_string()), - _1w_to_1m: SeriesPattern1::new(client.clone(), "utxos_1w_to_1m_old_dormancy".to_string()), - _1m_to_2m: SeriesPattern1::new(client.clone(), "utxos_1m_to_2m_old_dormancy".to_string()), - _2m_to_3m: SeriesPattern1::new(client.clone(), "utxos_2m_to_3m_old_dormancy".to_string()), - _3m_to_4m: SeriesPattern1::new(client.clone(), "utxos_3m_to_4m_old_dormancy".to_string()), - _4m_to_5m: SeriesPattern1::new(client.clone(), "utxos_4m_to_5m_old_dormancy".to_string()), - _5m_to_6m: SeriesPattern1::new(client.clone(), "utxos_5m_to_6m_old_dormancy".to_string()), - _6m_to_9m: SeriesPattern1::new(client.clone(), "utxos_6m_to_9m_old_dormancy".to_string()), - _9m_to_1y: SeriesPattern1::new(client.clone(), "utxos_9m_to_1y_old_dormancy".to_string()), - _1y_to_18m: SeriesPattern1::new(client.clone(), "utxos_1y_to_18m_old_dormancy".to_string()), - _18m_to_2y: SeriesPattern1::new(client.clone(), "utxos_18m_to_2y_old_dormancy".to_string()), - _2y_to_3y: SeriesPattern1::new(client.clone(), "utxos_2y_to_3y_old_dormancy".to_string()), - _3y_to_4y: SeriesPattern1::new(client.clone(), "utxos_3y_to_4y_old_dormancy".to_string()), - _4y_to_5y: SeriesPattern1::new(client.clone(), "utxos_4y_to_5y_old_dormancy".to_string()), - _5y_to_6y: SeriesPattern1::new(client.clone(), "utxos_5y_to_6y_old_dormancy".to_string()), - _6y_to_7y: SeriesPattern1::new(client.clone(), "utxos_6y_to_7y_old_dormancy".to_string()), - _7y_to_8y: SeriesPattern1::new(client.clone(), "utxos_7y_to_8y_old_dormancy".to_string()), - _8y_to_10y: SeriesPattern1::new(client.clone(), "utxos_8y_to_10y_old_dormancy".to_string()), - _10y_to_12y: SeriesPattern1::new(client.clone(), "utxos_10y_to_12y_old_dormancy".to_string()), - _12y_to_15y: SeriesPattern1::new(client.clone(), "utxos_12y_to_15y_old_dormancy".to_string()), - over_15y: SeriesPattern1::new(client.clone(), "utxos_over_15y_old_dormancy".to_string()), + under_1h: SeriesPattern1::new( + client.clone(), + "utxos_under_1h_old_dormancy".to_string(), + ), + _1h_to_1d: SeriesPattern1::new( + client.clone(), + "utxos_1h_to_1d_old_dormancy".to_string(), + ), + _1d_to_1w: SeriesPattern1::new( + client.clone(), + "utxos_1d_to_1w_old_dormancy".to_string(), + ), + _1w_to_1m: SeriesPattern1::new( + client.clone(), + "utxos_1w_to_1m_old_dormancy".to_string(), + ), + _1m_to_2m: SeriesPattern1::new( + client.clone(), + "utxos_1m_to_2m_old_dormancy".to_string(), + ), + _2m_to_3m: SeriesPattern1::new( + client.clone(), + "utxos_2m_to_3m_old_dormancy".to_string(), + ), + _3m_to_4m: SeriesPattern1::new( + client.clone(), + "utxos_3m_to_4m_old_dormancy".to_string(), + ), + _4m_to_5m: SeriesPattern1::new( + client.clone(), + "utxos_4m_to_5m_old_dormancy".to_string(), + ), + _5m_to_6m: SeriesPattern1::new( + client.clone(), + "utxos_5m_to_6m_old_dormancy".to_string(), + ), + _6m_to_9m: SeriesPattern1::new( + client.clone(), + "utxos_6m_to_9m_old_dormancy".to_string(), + ), + _9m_to_1y: SeriesPattern1::new( + client.clone(), + "utxos_9m_to_1y_old_dormancy".to_string(), + ), + _1y_to_18m: SeriesPattern1::new( + client.clone(), + "utxos_1y_to_18m_old_dormancy".to_string(), + ), + _18m_to_2y: SeriesPattern1::new( + client.clone(), + "utxos_18m_to_2y_old_dormancy".to_string(), + ), + _2y_to_3y: SeriesPattern1::new( + client.clone(), + "utxos_2y_to_3y_old_dormancy".to_string(), + ), + _3y_to_4y: SeriesPattern1::new( + client.clone(), + "utxos_3y_to_4y_old_dormancy".to_string(), + ), + _4y_to_5y: SeriesPattern1::new( + client.clone(), + "utxos_4y_to_5y_old_dormancy".to_string(), + ), + _5y_to_6y: SeriesPattern1::new( + client.clone(), + "utxos_5y_to_6y_old_dormancy".to_string(), + ), + _6y_to_7y: SeriesPattern1::new( + client.clone(), + "utxos_6y_to_7y_old_dormancy".to_string(), + ), + _7y_to_8y: SeriesPattern1::new( + client.clone(), + "utxos_7y_to_8y_old_dormancy".to_string(), + ), + _8y_to_10y: SeriesPattern1::new( + client.clone(), + "utxos_8y_to_10y_old_dormancy".to_string(), + ), + _10y_to_12y: SeriesPattern1::new( + client.clone(), + "utxos_10y_to_12y_old_dormancy".to_string(), + ), + _12y_to_15y: SeriesPattern1::new( + client.clone(), + "utxos_12y_to_15y_old_dormancy".to_string(), + ), + over_15y: SeriesPattern1::new( + client.clone(), + "utxos_over_15y_old_dormancy".to_string(), + ), } } } @@ -8753,29 +12778,98 @@ pub struct SeriesTree_Frameworks_Cointime_AgeRange_Activity_WakefulnessToDormanc impl SeriesTree_Frameworks_Cointime_AgeRange_Activity_WakefulnessToDormancy { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: SeriesPattern1::new(client.clone(), "utxos_under_1h_old_wakefulness_to_dormancy".to_string()), - _1h_to_1d: SeriesPattern1::new(client.clone(), "utxos_1h_to_1d_old_wakefulness_to_dormancy".to_string()), - _1d_to_1w: SeriesPattern1::new(client.clone(), "utxos_1d_to_1w_old_wakefulness_to_dormancy".to_string()), - _1w_to_1m: SeriesPattern1::new(client.clone(), "utxos_1w_to_1m_old_wakefulness_to_dormancy".to_string()), - _1m_to_2m: SeriesPattern1::new(client.clone(), "utxos_1m_to_2m_old_wakefulness_to_dormancy".to_string()), - _2m_to_3m: SeriesPattern1::new(client.clone(), "utxos_2m_to_3m_old_wakefulness_to_dormancy".to_string()), - _3m_to_4m: SeriesPattern1::new(client.clone(), "utxos_3m_to_4m_old_wakefulness_to_dormancy".to_string()), - _4m_to_5m: SeriesPattern1::new(client.clone(), "utxos_4m_to_5m_old_wakefulness_to_dormancy".to_string()), - _5m_to_6m: SeriesPattern1::new(client.clone(), "utxos_5m_to_6m_old_wakefulness_to_dormancy".to_string()), - _6m_to_9m: SeriesPattern1::new(client.clone(), "utxos_6m_to_9m_old_wakefulness_to_dormancy".to_string()), - _9m_to_1y: SeriesPattern1::new(client.clone(), "utxos_9m_to_1y_old_wakefulness_to_dormancy".to_string()), - _1y_to_18m: SeriesPattern1::new(client.clone(), "utxos_1y_to_18m_old_wakefulness_to_dormancy".to_string()), - _18m_to_2y: SeriesPattern1::new(client.clone(), "utxos_18m_to_2y_old_wakefulness_to_dormancy".to_string()), - _2y_to_3y: SeriesPattern1::new(client.clone(), "utxos_2y_to_3y_old_wakefulness_to_dormancy".to_string()), - _3y_to_4y: SeriesPattern1::new(client.clone(), "utxos_3y_to_4y_old_wakefulness_to_dormancy".to_string()), - _4y_to_5y: SeriesPattern1::new(client.clone(), "utxos_4y_to_5y_old_wakefulness_to_dormancy".to_string()), - _5y_to_6y: SeriesPattern1::new(client.clone(), "utxos_5y_to_6y_old_wakefulness_to_dormancy".to_string()), - _6y_to_7y: SeriesPattern1::new(client.clone(), "utxos_6y_to_7y_old_wakefulness_to_dormancy".to_string()), - _7y_to_8y: SeriesPattern1::new(client.clone(), "utxos_7y_to_8y_old_wakefulness_to_dormancy".to_string()), - _8y_to_10y: SeriesPattern1::new(client.clone(), "utxos_8y_to_10y_old_wakefulness_to_dormancy".to_string()), - _10y_to_12y: SeriesPattern1::new(client.clone(), "utxos_10y_to_12y_old_wakefulness_to_dormancy".to_string()), - _12y_to_15y: SeriesPattern1::new(client.clone(), "utxos_12y_to_15y_old_wakefulness_to_dormancy".to_string()), - over_15y: SeriesPattern1::new(client.clone(), "utxos_over_15y_old_wakefulness_to_dormancy".to_string()), + under_1h: SeriesPattern1::new( + client.clone(), + "utxos_under_1h_old_wakefulness_to_dormancy".to_string(), + ), + _1h_to_1d: SeriesPattern1::new( + client.clone(), + "utxos_1h_to_1d_old_wakefulness_to_dormancy".to_string(), + ), + _1d_to_1w: SeriesPattern1::new( + client.clone(), + "utxos_1d_to_1w_old_wakefulness_to_dormancy".to_string(), + ), + _1w_to_1m: SeriesPattern1::new( + client.clone(), + "utxos_1w_to_1m_old_wakefulness_to_dormancy".to_string(), + ), + _1m_to_2m: SeriesPattern1::new( + client.clone(), + "utxos_1m_to_2m_old_wakefulness_to_dormancy".to_string(), + ), + _2m_to_3m: SeriesPattern1::new( + client.clone(), + "utxos_2m_to_3m_old_wakefulness_to_dormancy".to_string(), + ), + _3m_to_4m: SeriesPattern1::new( + client.clone(), + "utxos_3m_to_4m_old_wakefulness_to_dormancy".to_string(), + ), + _4m_to_5m: SeriesPattern1::new( + client.clone(), + "utxos_4m_to_5m_old_wakefulness_to_dormancy".to_string(), + ), + _5m_to_6m: SeriesPattern1::new( + client.clone(), + "utxos_5m_to_6m_old_wakefulness_to_dormancy".to_string(), + ), + _6m_to_9m: SeriesPattern1::new( + client.clone(), + "utxos_6m_to_9m_old_wakefulness_to_dormancy".to_string(), + ), + _9m_to_1y: SeriesPattern1::new( + client.clone(), + "utxos_9m_to_1y_old_wakefulness_to_dormancy".to_string(), + ), + _1y_to_18m: SeriesPattern1::new( + client.clone(), + "utxos_1y_to_18m_old_wakefulness_to_dormancy".to_string(), + ), + _18m_to_2y: SeriesPattern1::new( + client.clone(), + "utxos_18m_to_2y_old_wakefulness_to_dormancy".to_string(), + ), + _2y_to_3y: SeriesPattern1::new( + client.clone(), + "utxos_2y_to_3y_old_wakefulness_to_dormancy".to_string(), + ), + _3y_to_4y: SeriesPattern1::new( + client.clone(), + "utxos_3y_to_4y_old_wakefulness_to_dormancy".to_string(), + ), + _4y_to_5y: SeriesPattern1::new( + client.clone(), + "utxos_4y_to_5y_old_wakefulness_to_dormancy".to_string(), + ), + _5y_to_6y: SeriesPattern1::new( + client.clone(), + "utxos_5y_to_6y_old_wakefulness_to_dormancy".to_string(), + ), + _6y_to_7y: SeriesPattern1::new( + client.clone(), + "utxos_6y_to_7y_old_wakefulness_to_dormancy".to_string(), + ), + _7y_to_8y: SeriesPattern1::new( + client.clone(), + "utxos_7y_to_8y_old_wakefulness_to_dormancy".to_string(), + ), + _8y_to_10y: SeriesPattern1::new( + client.clone(), + "utxos_8y_to_10y_old_wakefulness_to_dormancy".to_string(), + ), + _10y_to_12y: SeriesPattern1::new( + client.clone(), + "utxos_10y_to_12y_old_wakefulness_to_dormancy".to_string(), + ), + _12y_to_15y: SeriesPattern1::new( + client.clone(), + "utxos_12y_to_15y_old_wakefulness_to_dormancy".to_string(), + ), + over_15y: SeriesPattern1::new( + client.clone(), + "utxos_over_15y_old_wakefulness_to_dormancy".to_string(), + ), } } } @@ -8789,8 +12883,14 @@ pub struct SeriesTree_Frameworks_Cointime_AgeRange_Supply { impl SeriesTree_Frameworks_Cointime_AgeRange_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - awake: SeriesTree_Frameworks_Cointime_AgeRange_Supply_Awake::new(client.clone(), format!("{base_path}_awake")), - dormant: SeriesTree_Frameworks_Cointime_AgeRange_Supply_Dormant::new(client.clone(), format!("{base_path}_dormant")), + awake: SeriesTree_Frameworks_Cointime_AgeRange_Supply_Awake::new( + client.clone(), + format!("{base_path}_awake"), + ), + dormant: SeriesTree_Frameworks_Cointime_AgeRange_Supply_Dormant::new( + client.clone(), + format!("{base_path}_dormant"), + ), } } } @@ -8826,30 +12926,102 @@ pub struct SeriesTree_Frameworks_Cointime_AgeRange_Supply_Awake { impl SeriesTree_Frameworks_Cointime_AgeRange_Supply_Awake { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1h_old_awake_supply".to_string()), - _1h_to_1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_awake_supply".to_string()), - _1d_to_1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_awake_supply".to_string()), - _1w_to_1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_awake_supply".to_string()), - _1m_to_2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_awake_supply".to_string()), - _2m_to_3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_awake_supply".to_string()), - _3m_to_4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_awake_supply".to_string()), - _4m_to_5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_awake_supply".to_string()), - _5m_to_6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_awake_supply".to_string()), - _6m_to_9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_awake_supply".to_string()), - _9m_to_1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_awake_supply".to_string()), - _1y_to_18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_awake_supply".to_string()), - _18m_to_2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_awake_supply".to_string()), - _2y_to_3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_awake_supply".to_string()), - _3y_to_4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_awake_supply".to_string()), - _4y_to_5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_awake_supply".to_string()), - _5y_to_6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_awake_supply".to_string()), - _6y_to_7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_awake_supply".to_string()), - _7y_to_8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_awake_supply".to_string()), - _8y_to_10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_awake_supply".to_string()), - _10y_to_12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_awake_supply".to_string()), - _12y_to_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_awake_supply".to_string()), - over_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_15y_old_awake_supply".to_string()), - height: SeriesPattern18::new(client.clone(), "utxos_age_range_awake_supply_sats".to_string()), + under_1h: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1h_old_awake_supply".to_string(), + ), + _1h_to_1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_awake_supply".to_string(), + ), + _1d_to_1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_awake_supply".to_string(), + ), + _1w_to_1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_awake_supply".to_string(), + ), + _1m_to_2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_awake_supply".to_string(), + ), + _2m_to_3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_awake_supply".to_string(), + ), + _3m_to_4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_awake_supply".to_string(), + ), + _4m_to_5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_awake_supply".to_string(), + ), + _5m_to_6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_awake_supply".to_string(), + ), + _6m_to_9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_awake_supply".to_string(), + ), + _9m_to_1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_awake_supply".to_string(), + ), + _1y_to_18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_awake_supply".to_string(), + ), + _18m_to_2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_awake_supply".to_string(), + ), + _2y_to_3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_awake_supply".to_string(), + ), + _3y_to_4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_awake_supply".to_string(), + ), + _4y_to_5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_awake_supply".to_string(), + ), + _5y_to_6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_awake_supply".to_string(), + ), + _6y_to_7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_awake_supply".to_string(), + ), + _7y_to_8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_awake_supply".to_string(), + ), + _8y_to_10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_awake_supply".to_string(), + ), + _10y_to_12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_awake_supply".to_string(), + ), + _12y_to_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_awake_supply".to_string(), + ), + over_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_15y_old_awake_supply".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "utxos_age_range_awake_supply_sats".to_string(), + ), } } } @@ -8885,30 +13057,102 @@ pub struct SeriesTree_Frameworks_Cointime_AgeRange_Supply_Dormant { impl SeriesTree_Frameworks_Cointime_AgeRange_Supply_Dormant { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1h_old_dormant_supply".to_string()), - _1h_to_1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_dormant_supply".to_string()), - _1d_to_1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_dormant_supply".to_string()), - _1w_to_1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_dormant_supply".to_string()), - _1m_to_2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_dormant_supply".to_string()), - _2m_to_3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_dormant_supply".to_string()), - _3m_to_4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_dormant_supply".to_string()), - _4m_to_5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_dormant_supply".to_string()), - _5m_to_6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_dormant_supply".to_string()), - _6m_to_9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_dormant_supply".to_string()), - _9m_to_1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_dormant_supply".to_string()), - _1y_to_18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_dormant_supply".to_string()), - _18m_to_2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_dormant_supply".to_string()), - _2y_to_3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_dormant_supply".to_string()), - _3y_to_4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_dormant_supply".to_string()), - _4y_to_5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_dormant_supply".to_string()), - _5y_to_6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_dormant_supply".to_string()), - _6y_to_7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_dormant_supply".to_string()), - _7y_to_8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_dormant_supply".to_string()), - _8y_to_10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_dormant_supply".to_string()), - _10y_to_12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_dormant_supply".to_string()), - _12y_to_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_dormant_supply".to_string()), - over_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_15y_old_dormant_supply".to_string()), - height: SeriesPattern18::new(client.clone(), "utxos_age_range_dormant_supply_sats".to_string()), + under_1h: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1h_old_dormant_supply".to_string(), + ), + _1h_to_1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_dormant_supply".to_string(), + ), + _1d_to_1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_dormant_supply".to_string(), + ), + _1w_to_1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_dormant_supply".to_string(), + ), + _1m_to_2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_dormant_supply".to_string(), + ), + _2m_to_3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_dormant_supply".to_string(), + ), + _3m_to_4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_dormant_supply".to_string(), + ), + _4m_to_5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_dormant_supply".to_string(), + ), + _5m_to_6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_dormant_supply".to_string(), + ), + _6m_to_9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_dormant_supply".to_string(), + ), + _9m_to_1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_dormant_supply".to_string(), + ), + _1y_to_18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_dormant_supply".to_string(), + ), + _18m_to_2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_dormant_supply".to_string(), + ), + _2y_to_3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_dormant_supply".to_string(), + ), + _3y_to_4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_dormant_supply".to_string(), + ), + _4y_to_5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_dormant_supply".to_string(), + ), + _5y_to_6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_dormant_supply".to_string(), + ), + _6y_to_7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_dormant_supply".to_string(), + ), + _7y_to_8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_dormant_supply".to_string(), + ), + _8y_to_10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_dormant_supply".to_string(), + ), + _10y_to_12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_dormant_supply".to_string(), + ), + _12y_to_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_dormant_supply".to_string(), + ), + over_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_15y_old_dormant_supply".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "utxos_age_range_dormant_supply_sats".to_string(), + ), } } } @@ -8923,7 +13167,10 @@ pub struct SeriesTree_Frameworks_Cointime_Awake { impl SeriesTree_Frameworks_Cointime_Awake { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: SeriesTree_Frameworks_Cointime_Awake_Supply::new(client.clone(), format!("{base_path}_supply")), + supply: SeriesTree_Frameworks_Cointime_Awake_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), cap: CentsUsdPattern3::new(client.clone(), "all_awake_cap".to_string()), price: CentsPpmRatioSatsUsdPattern::new(client.clone(), "all_awake_price".to_string()), } @@ -8946,7 +13193,10 @@ impl SeriesTree_Frameworks_Cointime_Awake_Supply { sats: SeriesPattern1::new(client.clone(), "all_awake_supply_sats".to_string()), usd: SeriesPattern1::new(client.clone(), "all_awake_supply_usd".to_string()), cents: SeriesPattern1::new(client.clone(), "all_awake_supply_cents".to_string()), - in_loss: SharePattern3::new(client.clone(), "all_awake_supply_in_loss_share".to_string()), + in_loss: SharePattern3::new( + client.clone(), + "all_awake_supply_in_loss_share".to_string(), + ), } } } @@ -8960,7 +13210,10 @@ pub struct SeriesTree_Frameworks_Cointime_Sth { impl SeriesTree_Frameworks_Cointime_Sth { pub fn new(client: Arc, base_path: String) -> Self { Self { - awake: SeriesTree_Frameworks_Cointime_Sth_Awake::new(client.clone(), format!("{base_path}_awake")), + awake: SeriesTree_Frameworks_Cointime_Sth_Awake::new( + client.clone(), + format!("{base_path}_awake"), + ), dormant: SupplyPattern2::new(client.clone(), "sth_dormant_supply".to_string()), } } @@ -8976,7 +13229,10 @@ pub struct SeriesTree_Frameworks_Cointime_Sth_Awake { impl SeriesTree_Frameworks_Cointime_Sth_Awake { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: SeriesTree_Frameworks_Cointime_Sth_Awake_Supply::new(client.clone(), format!("{base_path}_supply")), + supply: SeriesTree_Frameworks_Cointime_Sth_Awake_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), cap: CentsUsdPattern3::new(client.clone(), "sth_awake_cap".to_string()), price: CentsPpmRatioSatsUsdPattern::new(client.clone(), "sth_awake_price".to_string()), } @@ -8999,7 +13255,10 @@ impl SeriesTree_Frameworks_Cointime_Sth_Awake_Supply { sats: SeriesPattern1::new(client.clone(), "sth_awake_supply_sats".to_string()), usd: SeriesPattern1::new(client.clone(), "sth_awake_supply_usd".to_string()), cents: SeriesPattern1::new(client.clone(), "sth_awake_supply_cents".to_string()), - in_loss: SharePattern3::new(client.clone(), "sth_awake_supply_in_loss_share".to_string()), + in_loss: SharePattern3::new( + client.clone(), + "sth_awake_supply_in_loss_share".to_string(), + ), } } } @@ -9013,7 +13272,10 @@ pub struct SeriesTree_Frameworks_Cointime_Lth { impl SeriesTree_Frameworks_Cointime_Lth { pub fn new(client: Arc, base_path: String) -> Self { Self { - awake: SeriesTree_Frameworks_Cointime_Lth_Awake::new(client.clone(), format!("{base_path}_awake")), + awake: SeriesTree_Frameworks_Cointime_Lth_Awake::new( + client.clone(), + format!("{base_path}_awake"), + ), dormant: SupplyPattern2::new(client.clone(), "lth_dormant_supply".to_string()), } } @@ -9029,7 +13291,10 @@ pub struct SeriesTree_Frameworks_Cointime_Lth_Awake { impl SeriesTree_Frameworks_Cointime_Lth_Awake { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: SeriesTree_Frameworks_Cointime_Lth_Awake_Supply::new(client.clone(), format!("{base_path}_supply")), + supply: SeriesTree_Frameworks_Cointime_Lth_Awake_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), cap: CentsUsdPattern3::new(client.clone(), "lth_awake_cap".to_string()), price: CentsPpmRatioSatsUsdPattern::new(client.clone(), "lth_awake_price".to_string()), } @@ -9052,7 +13317,10 @@ impl SeriesTree_Frameworks_Cointime_Lth_Awake_Supply { sats: SeriesPattern1::new(client.clone(), "lth_awake_supply_sats".to_string()), usd: SeriesPattern1::new(client.clone(), "lth_awake_supply_usd".to_string()), cents: SeriesPattern1::new(client.clone(), "lth_awake_supply_cents".to_string()), - in_loss: SharePattern3::new(client.clone(), "lth_awake_supply_in_loss_share".to_string()), + in_loss: SharePattern3::new( + client.clone(), + "lth_awake_supply_in_loss_share".to_string(), + ), } } } @@ -9069,11 +13337,26 @@ pub struct SeriesTree_Frameworks_Cointime_Sources { impl SeriesTree_Frameworks_Cointime_Sources { pub fn new(client: Arc, base_path: String) -> Self { Self { - awake_supply: SeriesPattern18::new(client.clone(), "cointime_awake_supply_sats_by_term".to_string()), - dormant_supply: SeriesPattern18::new(client.clone(), "cointime_dormant_supply_sats_by_term".to_string()), - awake_cap: SeriesPattern18::new(client.clone(), "cointime_awake_cap_cents_by_term".to_string()), - awake_price: SeriesPattern18::new(client.clone(), "cointime_awake_price_cents_by_aggregate".to_string()), - supply_in_loss_share: SeriesPattern18::new(client.clone(), "cointime_awake_supply_in_loss_share_by_term".to_string()), + awake_supply: SeriesPattern18::new( + client.clone(), + "cointime_awake_supply_sats_by_term".to_string(), + ), + dormant_supply: SeriesPattern18::new( + client.clone(), + "cointime_dormant_supply_sats_by_term".to_string(), + ), + awake_cap: SeriesPattern18::new( + client.clone(), + "cointime_awake_cap_cents_by_term".to_string(), + ), + awake_price: SeriesPattern18::new( + client.clone(), + "cointime_awake_price_cents_by_aggregate".to_string(), + ), + supply_in_loss_share: SeriesPattern18::new( + client.clone(), + "cointime_awake_supply_in_loss_share_by_term".to_string(), + ), } } } @@ -9088,7 +13371,10 @@ impl SeriesTree_Frameworks_Cointime_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { vaulted: BtcCentsSatsUsdPattern::new(client.clone(), "vaulted_supply".to_string()), - active: SeriesTree_Frameworks_Cointime_Supply_Active::new(client.clone(), format!("{base_path}_active")), + active: SeriesTree_Frameworks_Cointime_Supply_Active::new( + client.clone(), + format!("{base_path}_active"), + ), } } } @@ -9109,7 +13395,10 @@ impl SeriesTree_Frameworks_Cointime_Supply_Active { sats: SeriesPattern1::new(client.clone(), "active_supply_sats".to_string()), usd: SeriesPattern1::new(client.clone(), "active_supply_usd".to_string()), cents: SeriesPattern1::new(client.clone(), "active_supply_cents".to_string()), - in_loss: SharePattern3::new(client.clone(), "cointime_supply_in_loss_share".to_string()), + in_loss: SharePattern3::new( + client.clone(), + "cointime_supply_in_loss_share".to_string(), + ), } } } @@ -9125,9 +13414,18 @@ pub struct SeriesTree_Frameworks_Cointime_Value { impl SeriesTree_Frameworks_Cointime_Value { pub fn new(client: Arc, base_path: String) -> Self { Self { - destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "cointime_value_destroyed".to_string()), - created: AverageBlockCumulativeSumPattern::new(client.clone(), "cointime_value_created".to_string()), - stored: AverageBlockCumulativeSumPattern::new(client.clone(), "cointime_value_stored".to_string()), + destroyed: AverageBlockCumulativeSumPattern::new( + client.clone(), + "cointime_value_destroyed".to_string(), + ), + created: AverageBlockCumulativeSumPattern::new( + client.clone(), + "cointime_value_created".to_string(), + ), + stored: AverageBlockCumulativeSumPattern::new( + client.clone(), + "cointime_value_stored".to_string(), + ), vocdd: AverageBlockCumulativeSumPattern::new(client.clone(), "vocdd".to_string()), } } @@ -9169,8 +13467,14 @@ impl SeriesTree_Frameworks_Cointime_Prices { Self { vaulted: CentsPpmRatioSatsUsdPattern::new(client.clone(), "vaulted_price".to_string()), active: CentsPpmRatioSatsUsdPattern::new(client.clone(), "active_price".to_string()), - true_market_mean: CentsPpmRatioSatsUsdPattern::new(client.clone(), "true_market_mean".to_string()), - cointime: CentsPpmRatioSatsUsdPattern::new(client.clone(), "cointime_price".to_string()), + true_market_mean: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "true_market_mean".to_string(), + ), + cointime: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "cointime_price".to_string(), + ), } } } @@ -9185,9 +13489,18 @@ pub struct SeriesTree_Frameworks_Cointime_Adjusted { impl SeriesTree_Frameworks_Cointime_Adjusted { pub fn new(client: Arc, base_path: String) -> Self { Self { - inflation_rate: PercentPpmRatioPattern::new(client.clone(), "cointime_adj_inflation_rate".to_string()), - tx_velocity_native: SeriesPattern1::new(client.clone(), "cointime_adj_tx_velocity_btc".to_string()), - tx_velocity_fiat: SeriesPattern1::new(client.clone(), "cointime_adj_tx_velocity_usd".to_string()), + inflation_rate: PercentPpmRatioPattern::new( + client.clone(), + "cointime_adj_inflation_rate".to_string(), + ), + tx_velocity_native: SeriesPattern1::new( + client.clone(), + "cointime_adj_tx_velocity_btc".to_string(), + ), + tx_velocity_fiat: SeriesPattern1::new( + client.clone(), + "cointime_adj_tx_velocity_usd".to_string(), + ), } } } @@ -9224,14 +13537,32 @@ pub struct SeriesTree_Frameworks_Coinflow { impl SeriesTree_Frameworks_Coinflow { pub fn new(client: Arc, base_path: String) -> Self { Self { - age_range: SeriesTree_Frameworks_Coinflow_AgeRange::new(client.clone(), format!("{base_path}_age_range")), - supply: SeriesTree_Frameworks_Coinflow_Supply::new(client.clone(), format!("{base_path}_supply")), + age_range: SeriesTree_Frameworks_Coinflow_AgeRange::new( + client.clone(), + format!("{base_path}_age_range"), + ), + supply: SeriesTree_Frameworks_Coinflow_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), horizon: _1m1y2y3m4y6m8yPattern2::new(client.clone(), "all_coinflow".to_string()), cap: CentsUsdPattern3::new(client.clone(), "all_coinflow_cap".to_string()), - price: CentsPpmRatioSatsUsdPattern::new(client.clone(), "all_coinflow_price".to_string()), - sth: SeriesTree_Frameworks_Coinflow_Sth::new(client.clone(), format!("{base_path}_sth")), - lth: SeriesTree_Frameworks_Coinflow_Lth::new(client.clone(), format!("{base_path}_lth")), - aggregate_sources: SeriesTree_Frameworks_Coinflow_AggregateSources::new(client.clone(), format!("{base_path}_aggregate_sources")), + price: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "all_coinflow_price".to_string(), + ), + sth: SeriesTree_Frameworks_Coinflow_Sth::new( + client.clone(), + format!("{base_path}_sth"), + ), + lth: SeriesTree_Frameworks_Coinflow_Lth::new( + client.clone(), + format!("{base_path}_lth"), + ), + aggregate_sources: SeriesTree_Frameworks_Coinflow_AggregateSources::new( + client.clone(), + format!("{base_path}_aggregate_sources"), + ), } } } @@ -9246,9 +13577,18 @@ pub struct SeriesTree_Frameworks_Coinflow_AgeRange { impl SeriesTree_Frameworks_Coinflow_AgeRange { pub fn new(client: Arc, base_path: String) -> Self { Self { - spending_rate: SeriesTree_Frameworks_Coinflow_AgeRange_SpendingRate::new(client.clone(), format!("{base_path}_spending_rate")), - spending_exposure: SeriesTree_Frameworks_Coinflow_AgeRange_SpendingExposure::new(client.clone(), format!("{base_path}_spending_exposure")), - supply: SeriesTree_Frameworks_Coinflow_AgeRange_Supply::new(client.clone(), format!("{base_path}_supply")), + spending_rate: SeriesTree_Frameworks_Coinflow_AgeRange_SpendingRate::new( + client.clone(), + format!("{base_path}_spending_rate"), + ), + spending_exposure: SeriesTree_Frameworks_Coinflow_AgeRange_SpendingExposure::new( + client.clone(), + format!("{base_path}_spending_exposure"), + ), + supply: SeriesTree_Frameworks_Coinflow_AgeRange_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), } } } @@ -9284,30 +13624,102 @@ pub struct SeriesTree_Frameworks_Coinflow_AgeRange_SpendingRate { impl SeriesTree_Frameworks_Coinflow_AgeRange_SpendingRate { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: SeriesPattern1::new(client.clone(), "utxos_under_1h_old_spending_rate".to_string()), - _1h_to_1d: SeriesPattern1::new(client.clone(), "utxos_1h_to_1d_old_spending_rate".to_string()), - _1d_to_1w: SeriesPattern1::new(client.clone(), "utxos_1d_to_1w_old_spending_rate".to_string()), - _1w_to_1m: SeriesPattern1::new(client.clone(), "utxos_1w_to_1m_old_spending_rate".to_string()), - _1m_to_2m: SeriesPattern1::new(client.clone(), "utxos_1m_to_2m_old_spending_rate".to_string()), - _2m_to_3m: SeriesPattern1::new(client.clone(), "utxos_2m_to_3m_old_spending_rate".to_string()), - _3m_to_4m: SeriesPattern1::new(client.clone(), "utxos_3m_to_4m_old_spending_rate".to_string()), - _4m_to_5m: SeriesPattern1::new(client.clone(), "utxos_4m_to_5m_old_spending_rate".to_string()), - _5m_to_6m: SeriesPattern1::new(client.clone(), "utxos_5m_to_6m_old_spending_rate".to_string()), - _6m_to_9m: SeriesPattern1::new(client.clone(), "utxos_6m_to_9m_old_spending_rate".to_string()), - _9m_to_1y: SeriesPattern1::new(client.clone(), "utxos_9m_to_1y_old_spending_rate".to_string()), - _1y_to_18m: SeriesPattern1::new(client.clone(), "utxos_1y_to_18m_old_spending_rate".to_string()), - _18m_to_2y: SeriesPattern1::new(client.clone(), "utxos_18m_to_2y_old_spending_rate".to_string()), - _2y_to_3y: SeriesPattern1::new(client.clone(), "utxos_2y_to_3y_old_spending_rate".to_string()), - _3y_to_4y: SeriesPattern1::new(client.clone(), "utxos_3y_to_4y_old_spending_rate".to_string()), - _4y_to_5y: SeriesPattern1::new(client.clone(), "utxos_4y_to_5y_old_spending_rate".to_string()), - _5y_to_6y: SeriesPattern1::new(client.clone(), "utxos_5y_to_6y_old_spending_rate".to_string()), - _6y_to_7y: SeriesPattern1::new(client.clone(), "utxos_6y_to_7y_old_spending_rate".to_string()), - _7y_to_8y: SeriesPattern1::new(client.clone(), "utxos_7y_to_8y_old_spending_rate".to_string()), - _8y_to_10y: SeriesPattern1::new(client.clone(), "utxos_8y_to_10y_old_spending_rate".to_string()), - _10y_to_12y: SeriesPattern1::new(client.clone(), "utxos_10y_to_12y_old_spending_rate".to_string()), - _12y_to_15y: SeriesPattern1::new(client.clone(), "utxos_12y_to_15y_old_spending_rate".to_string()), - over_15y: SeriesPattern1::new(client.clone(), "utxos_over_15y_old_spending_rate".to_string()), - height: SeriesPattern18::new(client.clone(), "utxos_age_range_spending_rate".to_string()), + under_1h: SeriesPattern1::new( + client.clone(), + "utxos_under_1h_old_spending_rate".to_string(), + ), + _1h_to_1d: SeriesPattern1::new( + client.clone(), + "utxos_1h_to_1d_old_spending_rate".to_string(), + ), + _1d_to_1w: SeriesPattern1::new( + client.clone(), + "utxos_1d_to_1w_old_spending_rate".to_string(), + ), + _1w_to_1m: SeriesPattern1::new( + client.clone(), + "utxos_1w_to_1m_old_spending_rate".to_string(), + ), + _1m_to_2m: SeriesPattern1::new( + client.clone(), + "utxos_1m_to_2m_old_spending_rate".to_string(), + ), + _2m_to_3m: SeriesPattern1::new( + client.clone(), + "utxos_2m_to_3m_old_spending_rate".to_string(), + ), + _3m_to_4m: SeriesPattern1::new( + client.clone(), + "utxos_3m_to_4m_old_spending_rate".to_string(), + ), + _4m_to_5m: SeriesPattern1::new( + client.clone(), + "utxos_4m_to_5m_old_spending_rate".to_string(), + ), + _5m_to_6m: SeriesPattern1::new( + client.clone(), + "utxos_5m_to_6m_old_spending_rate".to_string(), + ), + _6m_to_9m: SeriesPattern1::new( + client.clone(), + "utxos_6m_to_9m_old_spending_rate".to_string(), + ), + _9m_to_1y: SeriesPattern1::new( + client.clone(), + "utxos_9m_to_1y_old_spending_rate".to_string(), + ), + _1y_to_18m: SeriesPattern1::new( + client.clone(), + "utxos_1y_to_18m_old_spending_rate".to_string(), + ), + _18m_to_2y: SeriesPattern1::new( + client.clone(), + "utxos_18m_to_2y_old_spending_rate".to_string(), + ), + _2y_to_3y: SeriesPattern1::new( + client.clone(), + "utxos_2y_to_3y_old_spending_rate".to_string(), + ), + _3y_to_4y: SeriesPattern1::new( + client.clone(), + "utxos_3y_to_4y_old_spending_rate".to_string(), + ), + _4y_to_5y: SeriesPattern1::new( + client.clone(), + "utxos_4y_to_5y_old_spending_rate".to_string(), + ), + _5y_to_6y: SeriesPattern1::new( + client.clone(), + "utxos_5y_to_6y_old_spending_rate".to_string(), + ), + _6y_to_7y: SeriesPattern1::new( + client.clone(), + "utxos_6y_to_7y_old_spending_rate".to_string(), + ), + _7y_to_8y: SeriesPattern1::new( + client.clone(), + "utxos_7y_to_8y_old_spending_rate".to_string(), + ), + _8y_to_10y: SeriesPattern1::new( + client.clone(), + "utxos_8y_to_10y_old_spending_rate".to_string(), + ), + _10y_to_12y: SeriesPattern1::new( + client.clone(), + "utxos_10y_to_12y_old_spending_rate".to_string(), + ), + _12y_to_15y: SeriesPattern1::new( + client.clone(), + "utxos_12y_to_15y_old_spending_rate".to_string(), + ), + over_15y: SeriesPattern1::new( + client.clone(), + "utxos_over_15y_old_spending_rate".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "utxos_age_range_spending_rate".to_string(), + ), } } } @@ -9344,31 +13756,106 @@ pub struct SeriesTree_Frameworks_Coinflow_AgeRange_SpendingExposure { impl SeriesTree_Frameworks_Coinflow_AgeRange_SpendingExposure { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: SeriesPattern1::new(client.clone(), "utxos_under_1h_old_spending_exposure".to_string()), - _1h_to_1d: SeriesPattern1::new(client.clone(), "utxos_1h_to_1d_old_spending_exposure".to_string()), - _1d_to_1w: SeriesPattern1::new(client.clone(), "utxos_1d_to_1w_old_spending_exposure".to_string()), - _1w_to_1m: SeriesPattern1::new(client.clone(), "utxos_1w_to_1m_old_spending_exposure".to_string()), - _1m_to_2m: SeriesPattern1::new(client.clone(), "utxos_1m_to_2m_old_spending_exposure".to_string()), - _2m_to_3m: SeriesPattern1::new(client.clone(), "utxos_2m_to_3m_old_spending_exposure".to_string()), - _3m_to_4m: SeriesPattern1::new(client.clone(), "utxos_3m_to_4m_old_spending_exposure".to_string()), - _4m_to_5m: SeriesPattern1::new(client.clone(), "utxos_4m_to_5m_old_spending_exposure".to_string()), - _5m_to_6m: SeriesPattern1::new(client.clone(), "utxos_5m_to_6m_old_spending_exposure".to_string()), - _6m_to_9m: SeriesPattern1::new(client.clone(), "utxos_6m_to_9m_old_spending_exposure".to_string()), - _9m_to_1y: SeriesPattern1::new(client.clone(), "utxos_9m_to_1y_old_spending_exposure".to_string()), - _1y_to_18m: SeriesPattern1::new(client.clone(), "utxos_1y_to_18m_old_spending_exposure".to_string()), - _18m_to_2y: SeriesPattern1::new(client.clone(), "utxos_18m_to_2y_old_spending_exposure".to_string()), - _2y_to_3y: SeriesPattern1::new(client.clone(), "utxos_2y_to_3y_old_spending_exposure".to_string()), - _3y_to_4y: SeriesPattern1::new(client.clone(), "utxos_3y_to_4y_old_spending_exposure".to_string()), - _4y_to_5y: SeriesPattern1::new(client.clone(), "utxos_4y_to_5y_old_spending_exposure".to_string()), - _5y_to_6y: SeriesPattern1::new(client.clone(), "utxos_5y_to_6y_old_spending_exposure".to_string()), - _6y_to_7y: SeriesPattern1::new(client.clone(), "utxos_6y_to_7y_old_spending_exposure".to_string()), - _7y_to_8y: SeriesPattern1::new(client.clone(), "utxos_7y_to_8y_old_spending_exposure".to_string()), - _8y_to_10y: SeriesPattern1::new(client.clone(), "utxos_8y_to_10y_old_spending_exposure".to_string()), - _10y_to_12y: SeriesPattern1::new(client.clone(), "utxos_10y_to_12y_old_spending_exposure".to_string()), - _12y_to_15y: SeriesPattern1::new(client.clone(), "utxos_12y_to_15y_old_spending_exposure".to_string()), - over_15y: SeriesPattern1::new(client.clone(), "utxos_over_15y_old_spending_exposure".to_string()), - mobility: SeriesTree_Frameworks_Coinflow_AgeRange_SpendingExposure_Mobility::new(client.clone(), format!("{base_path}_mobility")), - height: SeriesPattern18::new(client.clone(), "utxos_age_range_spending_exposure".to_string()), + under_1h: SeriesPattern1::new( + client.clone(), + "utxos_under_1h_old_spending_exposure".to_string(), + ), + _1h_to_1d: SeriesPattern1::new( + client.clone(), + "utxos_1h_to_1d_old_spending_exposure".to_string(), + ), + _1d_to_1w: SeriesPattern1::new( + client.clone(), + "utxos_1d_to_1w_old_spending_exposure".to_string(), + ), + _1w_to_1m: SeriesPattern1::new( + client.clone(), + "utxos_1w_to_1m_old_spending_exposure".to_string(), + ), + _1m_to_2m: SeriesPattern1::new( + client.clone(), + "utxos_1m_to_2m_old_spending_exposure".to_string(), + ), + _2m_to_3m: SeriesPattern1::new( + client.clone(), + "utxos_2m_to_3m_old_spending_exposure".to_string(), + ), + _3m_to_4m: SeriesPattern1::new( + client.clone(), + "utxos_3m_to_4m_old_spending_exposure".to_string(), + ), + _4m_to_5m: SeriesPattern1::new( + client.clone(), + "utxos_4m_to_5m_old_spending_exposure".to_string(), + ), + _5m_to_6m: SeriesPattern1::new( + client.clone(), + "utxos_5m_to_6m_old_spending_exposure".to_string(), + ), + _6m_to_9m: SeriesPattern1::new( + client.clone(), + "utxos_6m_to_9m_old_spending_exposure".to_string(), + ), + _9m_to_1y: SeriesPattern1::new( + client.clone(), + "utxos_9m_to_1y_old_spending_exposure".to_string(), + ), + _1y_to_18m: SeriesPattern1::new( + client.clone(), + "utxos_1y_to_18m_old_spending_exposure".to_string(), + ), + _18m_to_2y: SeriesPattern1::new( + client.clone(), + "utxos_18m_to_2y_old_spending_exposure".to_string(), + ), + _2y_to_3y: SeriesPattern1::new( + client.clone(), + "utxos_2y_to_3y_old_spending_exposure".to_string(), + ), + _3y_to_4y: SeriesPattern1::new( + client.clone(), + "utxos_3y_to_4y_old_spending_exposure".to_string(), + ), + _4y_to_5y: SeriesPattern1::new( + client.clone(), + "utxos_4y_to_5y_old_spending_exposure".to_string(), + ), + _5y_to_6y: SeriesPattern1::new( + client.clone(), + "utxos_5y_to_6y_old_spending_exposure".to_string(), + ), + _6y_to_7y: SeriesPattern1::new( + client.clone(), + "utxos_6y_to_7y_old_spending_exposure".to_string(), + ), + _7y_to_8y: SeriesPattern1::new( + client.clone(), + "utxos_7y_to_8y_old_spending_exposure".to_string(), + ), + _8y_to_10y: SeriesPattern1::new( + client.clone(), + "utxos_8y_to_10y_old_spending_exposure".to_string(), + ), + _10y_to_12y: SeriesPattern1::new( + client.clone(), + "utxos_10y_to_12y_old_spending_exposure".to_string(), + ), + _12y_to_15y: SeriesPattern1::new( + client.clone(), + "utxos_12y_to_15y_old_spending_exposure".to_string(), + ), + over_15y: SeriesPattern1::new( + client.clone(), + "utxos_over_15y_old_spending_exposure".to_string(), + ), + mobility: SeriesTree_Frameworks_Coinflow_AgeRange_SpendingExposure_Mobility::new( + client.clone(), + format!("{base_path}_mobility"), + ), + height: SeriesPattern18::new( + client.clone(), + "utxos_age_range_spending_exposure".to_string(), + ), } } } @@ -9403,29 +13890,98 @@ pub struct SeriesTree_Frameworks_Coinflow_AgeRange_SpendingExposure_Mobility { impl SeriesTree_Frameworks_Coinflow_AgeRange_SpendingExposure_Mobility { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: SeriesPattern1::new(client.clone(), "utxos_under_1h_old_mobility".to_string()), - _1h_to_1d: SeriesPattern1::new(client.clone(), "utxos_1h_to_1d_old_mobility".to_string()), - _1d_to_1w: SeriesPattern1::new(client.clone(), "utxos_1d_to_1w_old_mobility".to_string()), - _1w_to_1m: SeriesPattern1::new(client.clone(), "utxos_1w_to_1m_old_mobility".to_string()), - _1m_to_2m: SeriesPattern1::new(client.clone(), "utxos_1m_to_2m_old_mobility".to_string()), - _2m_to_3m: SeriesPattern1::new(client.clone(), "utxos_2m_to_3m_old_mobility".to_string()), - _3m_to_4m: SeriesPattern1::new(client.clone(), "utxos_3m_to_4m_old_mobility".to_string()), - _4m_to_5m: SeriesPattern1::new(client.clone(), "utxos_4m_to_5m_old_mobility".to_string()), - _5m_to_6m: SeriesPattern1::new(client.clone(), "utxos_5m_to_6m_old_mobility".to_string()), - _6m_to_9m: SeriesPattern1::new(client.clone(), "utxos_6m_to_9m_old_mobility".to_string()), - _9m_to_1y: SeriesPattern1::new(client.clone(), "utxos_9m_to_1y_old_mobility".to_string()), - _1y_to_18m: SeriesPattern1::new(client.clone(), "utxos_1y_to_18m_old_mobility".to_string()), - _18m_to_2y: SeriesPattern1::new(client.clone(), "utxos_18m_to_2y_old_mobility".to_string()), - _2y_to_3y: SeriesPattern1::new(client.clone(), "utxos_2y_to_3y_old_mobility".to_string()), - _3y_to_4y: SeriesPattern1::new(client.clone(), "utxos_3y_to_4y_old_mobility".to_string()), - _4y_to_5y: SeriesPattern1::new(client.clone(), "utxos_4y_to_5y_old_mobility".to_string()), - _5y_to_6y: SeriesPattern1::new(client.clone(), "utxos_5y_to_6y_old_mobility".to_string()), - _6y_to_7y: SeriesPattern1::new(client.clone(), "utxos_6y_to_7y_old_mobility".to_string()), - _7y_to_8y: SeriesPattern1::new(client.clone(), "utxos_7y_to_8y_old_mobility".to_string()), - _8y_to_10y: SeriesPattern1::new(client.clone(), "utxos_8y_to_10y_old_mobility".to_string()), - _10y_to_12y: SeriesPattern1::new(client.clone(), "utxos_10y_to_12y_old_mobility".to_string()), - _12y_to_15y: SeriesPattern1::new(client.clone(), "utxos_12y_to_15y_old_mobility".to_string()), - over_15y: SeriesPattern1::new(client.clone(), "utxos_over_15y_old_mobility".to_string()), + under_1h: SeriesPattern1::new( + client.clone(), + "utxos_under_1h_old_mobility".to_string(), + ), + _1h_to_1d: SeriesPattern1::new( + client.clone(), + "utxos_1h_to_1d_old_mobility".to_string(), + ), + _1d_to_1w: SeriesPattern1::new( + client.clone(), + "utxos_1d_to_1w_old_mobility".to_string(), + ), + _1w_to_1m: SeriesPattern1::new( + client.clone(), + "utxos_1w_to_1m_old_mobility".to_string(), + ), + _1m_to_2m: SeriesPattern1::new( + client.clone(), + "utxos_1m_to_2m_old_mobility".to_string(), + ), + _2m_to_3m: SeriesPattern1::new( + client.clone(), + "utxos_2m_to_3m_old_mobility".to_string(), + ), + _3m_to_4m: SeriesPattern1::new( + client.clone(), + "utxos_3m_to_4m_old_mobility".to_string(), + ), + _4m_to_5m: SeriesPattern1::new( + client.clone(), + "utxos_4m_to_5m_old_mobility".to_string(), + ), + _5m_to_6m: SeriesPattern1::new( + client.clone(), + "utxos_5m_to_6m_old_mobility".to_string(), + ), + _6m_to_9m: SeriesPattern1::new( + client.clone(), + "utxos_6m_to_9m_old_mobility".to_string(), + ), + _9m_to_1y: SeriesPattern1::new( + client.clone(), + "utxos_9m_to_1y_old_mobility".to_string(), + ), + _1y_to_18m: SeriesPattern1::new( + client.clone(), + "utxos_1y_to_18m_old_mobility".to_string(), + ), + _18m_to_2y: SeriesPattern1::new( + client.clone(), + "utxos_18m_to_2y_old_mobility".to_string(), + ), + _2y_to_3y: SeriesPattern1::new( + client.clone(), + "utxos_2y_to_3y_old_mobility".to_string(), + ), + _3y_to_4y: SeriesPattern1::new( + client.clone(), + "utxos_3y_to_4y_old_mobility".to_string(), + ), + _4y_to_5y: SeriesPattern1::new( + client.clone(), + "utxos_4y_to_5y_old_mobility".to_string(), + ), + _5y_to_6y: SeriesPattern1::new( + client.clone(), + "utxos_5y_to_6y_old_mobility".to_string(), + ), + _6y_to_7y: SeriesPattern1::new( + client.clone(), + "utxos_6y_to_7y_old_mobility".to_string(), + ), + _7y_to_8y: SeriesPattern1::new( + client.clone(), + "utxos_7y_to_8y_old_mobility".to_string(), + ), + _8y_to_10y: SeriesPattern1::new( + client.clone(), + "utxos_8y_to_10y_old_mobility".to_string(), + ), + _10y_to_12y: SeriesPattern1::new( + client.clone(), + "utxos_10y_to_12y_old_mobility".to_string(), + ), + _12y_to_15y: SeriesPattern1::new( + client.clone(), + "utxos_12y_to_15y_old_mobility".to_string(), + ), + over_15y: SeriesPattern1::new( + client.clone(), + "utxos_over_15y_old_mobility".to_string(), + ), } } } @@ -9439,8 +13995,14 @@ pub struct SeriesTree_Frameworks_Coinflow_AgeRange_Supply { impl SeriesTree_Frameworks_Coinflow_AgeRange_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - mobile: SeriesTree_Frameworks_Coinflow_AgeRange_Supply_Mobile::new(client.clone(), format!("{base_path}_mobile")), - immobile: SeriesTree_Frameworks_Coinflow_AgeRange_Supply_Immobile::new(client.clone(), format!("{base_path}_immobile")), + mobile: SeriesTree_Frameworks_Coinflow_AgeRange_Supply_Mobile::new( + client.clone(), + format!("{base_path}_mobile"), + ), + immobile: SeriesTree_Frameworks_Coinflow_AgeRange_Supply_Immobile::new( + client.clone(), + format!("{base_path}_immobile"), + ), } } } @@ -9476,30 +14038,102 @@ pub struct SeriesTree_Frameworks_Coinflow_AgeRange_Supply_Mobile { impl SeriesTree_Frameworks_Coinflow_AgeRange_Supply_Mobile { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1h_old_mobile_supply".to_string()), - _1h_to_1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_mobile_supply".to_string()), - _1d_to_1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_mobile_supply".to_string()), - _1w_to_1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_mobile_supply".to_string()), - _1m_to_2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_mobile_supply".to_string()), - _2m_to_3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_mobile_supply".to_string()), - _3m_to_4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_mobile_supply".to_string()), - _4m_to_5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_mobile_supply".to_string()), - _5m_to_6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_mobile_supply".to_string()), - _6m_to_9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_mobile_supply".to_string()), - _9m_to_1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_mobile_supply".to_string()), - _1y_to_18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_mobile_supply".to_string()), - _18m_to_2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_mobile_supply".to_string()), - _2y_to_3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_mobile_supply".to_string()), - _3y_to_4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_mobile_supply".to_string()), - _4y_to_5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_mobile_supply".to_string()), - _5y_to_6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_mobile_supply".to_string()), - _6y_to_7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_mobile_supply".to_string()), - _7y_to_8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_mobile_supply".to_string()), - _8y_to_10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_mobile_supply".to_string()), - _10y_to_12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_mobile_supply".to_string()), - _12y_to_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_mobile_supply".to_string()), - over_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_15y_old_mobile_supply".to_string()), - height: SeriesPattern18::new(client.clone(), "utxos_age_range_mobile_supply_sats".to_string()), + under_1h: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1h_old_mobile_supply".to_string(), + ), + _1h_to_1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_mobile_supply".to_string(), + ), + _1d_to_1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_mobile_supply".to_string(), + ), + _1w_to_1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_mobile_supply".to_string(), + ), + _1m_to_2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_mobile_supply".to_string(), + ), + _2m_to_3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_mobile_supply".to_string(), + ), + _3m_to_4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_mobile_supply".to_string(), + ), + _4m_to_5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_mobile_supply".to_string(), + ), + _5m_to_6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_mobile_supply".to_string(), + ), + _6m_to_9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_mobile_supply".to_string(), + ), + _9m_to_1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_mobile_supply".to_string(), + ), + _1y_to_18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_mobile_supply".to_string(), + ), + _18m_to_2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_mobile_supply".to_string(), + ), + _2y_to_3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_mobile_supply".to_string(), + ), + _3y_to_4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_mobile_supply".to_string(), + ), + _4y_to_5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_mobile_supply".to_string(), + ), + _5y_to_6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_mobile_supply".to_string(), + ), + _6y_to_7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_mobile_supply".to_string(), + ), + _7y_to_8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_mobile_supply".to_string(), + ), + _8y_to_10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_mobile_supply".to_string(), + ), + _10y_to_12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_mobile_supply".to_string(), + ), + _12y_to_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_mobile_supply".to_string(), + ), + over_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_15y_old_mobile_supply".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "utxos_age_range_mobile_supply_sats".to_string(), + ), } } } @@ -9535,30 +14169,102 @@ pub struct SeriesTree_Frameworks_Coinflow_AgeRange_Supply_Immobile { impl SeriesTree_Frameworks_Coinflow_AgeRange_Supply_Immobile { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1h_old_immobile_supply".to_string()), - _1h_to_1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_immobile_supply".to_string()), - _1d_to_1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_immobile_supply".to_string()), - _1w_to_1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_immobile_supply".to_string()), - _1m_to_2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_immobile_supply".to_string()), - _2m_to_3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_immobile_supply".to_string()), - _3m_to_4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_immobile_supply".to_string()), - _4m_to_5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_immobile_supply".to_string()), - _5m_to_6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_immobile_supply".to_string()), - _6m_to_9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_immobile_supply".to_string()), - _9m_to_1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_immobile_supply".to_string()), - _1y_to_18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_immobile_supply".to_string()), - _18m_to_2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_immobile_supply".to_string()), - _2y_to_3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_immobile_supply".to_string()), - _3y_to_4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_immobile_supply".to_string()), - _4y_to_5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_immobile_supply".to_string()), - _5y_to_6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_immobile_supply".to_string()), - _6y_to_7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_immobile_supply".to_string()), - _7y_to_8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_immobile_supply".to_string()), - _8y_to_10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_immobile_supply".to_string()), - _10y_to_12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_immobile_supply".to_string()), - _12y_to_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_immobile_supply".to_string()), - over_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_15y_old_immobile_supply".to_string()), - height: SeriesPattern18::new(client.clone(), "utxos_age_range_immobile_supply_sats".to_string()), + under_1h: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1h_old_immobile_supply".to_string(), + ), + _1h_to_1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_immobile_supply".to_string(), + ), + _1d_to_1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_immobile_supply".to_string(), + ), + _1w_to_1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_immobile_supply".to_string(), + ), + _1m_to_2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_immobile_supply".to_string(), + ), + _2m_to_3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_immobile_supply".to_string(), + ), + _3m_to_4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_immobile_supply".to_string(), + ), + _4m_to_5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_immobile_supply".to_string(), + ), + _5m_to_6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_immobile_supply".to_string(), + ), + _6m_to_9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_immobile_supply".to_string(), + ), + _9m_to_1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_immobile_supply".to_string(), + ), + _1y_to_18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_immobile_supply".to_string(), + ), + _18m_to_2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_immobile_supply".to_string(), + ), + _2y_to_3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_immobile_supply".to_string(), + ), + _3y_to_4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_immobile_supply".to_string(), + ), + _4y_to_5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_immobile_supply".to_string(), + ), + _5y_to_6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_immobile_supply".to_string(), + ), + _6y_to_7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_immobile_supply".to_string(), + ), + _7y_to_8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_immobile_supply".to_string(), + ), + _8y_to_10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_immobile_supply".to_string(), + ), + _10y_to_12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_immobile_supply".to_string(), + ), + _12y_to_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_immobile_supply".to_string(), + ), + over_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_15y_old_immobile_supply".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "utxos_age_range_immobile_supply_sats".to_string(), + ), } } } @@ -9572,8 +14278,14 @@ pub struct SeriesTree_Frameworks_Coinflow_Supply { impl SeriesTree_Frameworks_Coinflow_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - mobile: SeriesTree_Frameworks_Coinflow_Supply_Mobile::new(client.clone(), format!("{base_path}_mobile")), - immobile: BtcCentsSatsUsdPattern::new(client.clone(), "all_immobile_supply".to_string()), + mobile: SeriesTree_Frameworks_Coinflow_Supply_Mobile::new( + client.clone(), + format!("{base_path}_mobile"), + ), + immobile: BtcCentsSatsUsdPattern::new( + client.clone(), + "all_immobile_supply".to_string(), + ), } } } @@ -9594,7 +14306,10 @@ impl SeriesTree_Frameworks_Coinflow_Supply_Mobile { sats: SeriesPattern1::new(client.clone(), "all_mobile_supply_sats".to_string()), usd: SeriesPattern1::new(client.clone(), "all_mobile_supply_usd".to_string()), cents: SeriesPattern1::new(client.clone(), "all_mobile_supply_cents".to_string()), - in_loss: SharePattern3::new(client.clone(), "all_coinflow_supply_in_loss_share".to_string()), + in_loss: SharePattern3::new( + client.clone(), + "all_coinflow_supply_in_loss_share".to_string(), + ), } } } @@ -9610,10 +14325,16 @@ pub struct SeriesTree_Frameworks_Coinflow_Sth { impl SeriesTree_Frameworks_Coinflow_Sth { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: SeriesTree_Frameworks_Coinflow_Sth_Supply::new(client.clone(), format!("{base_path}_supply")), + supply: SeriesTree_Frameworks_Coinflow_Sth_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), horizon: _1m1y2y3m4y6m8yPattern2::new(client.clone(), "sth_coinflow".to_string()), cap: CentsUsdPattern3::new(client.clone(), "sth_coinflow_cap".to_string()), - price: CentsPpmRatioSatsUsdPattern::new(client.clone(), "sth_coinflow_price".to_string()), + price: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "sth_coinflow_price".to_string(), + ), } } } @@ -9627,8 +14348,14 @@ pub struct SeriesTree_Frameworks_Coinflow_Sth_Supply { impl SeriesTree_Frameworks_Coinflow_Sth_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - mobile: SeriesTree_Frameworks_Coinflow_Sth_Supply_Mobile::new(client.clone(), format!("{base_path}_mobile")), - immobile: BtcCentsSatsUsdPattern::new(client.clone(), "sth_immobile_supply".to_string()), + mobile: SeriesTree_Frameworks_Coinflow_Sth_Supply_Mobile::new( + client.clone(), + format!("{base_path}_mobile"), + ), + immobile: BtcCentsSatsUsdPattern::new( + client.clone(), + "sth_immobile_supply".to_string(), + ), } } } @@ -9649,7 +14376,10 @@ impl SeriesTree_Frameworks_Coinflow_Sth_Supply_Mobile { sats: SeriesPattern1::new(client.clone(), "sth_mobile_supply_sats".to_string()), usd: SeriesPattern1::new(client.clone(), "sth_mobile_supply_usd".to_string()), cents: SeriesPattern1::new(client.clone(), "sth_mobile_supply_cents".to_string()), - in_loss: SharePattern3::new(client.clone(), "sth_coinflow_supply_in_loss_share".to_string()), + in_loss: SharePattern3::new( + client.clone(), + "sth_coinflow_supply_in_loss_share".to_string(), + ), } } } @@ -9665,10 +14395,16 @@ pub struct SeriesTree_Frameworks_Coinflow_Lth { impl SeriesTree_Frameworks_Coinflow_Lth { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: SeriesTree_Frameworks_Coinflow_Lth_Supply::new(client.clone(), format!("{base_path}_supply")), + supply: SeriesTree_Frameworks_Coinflow_Lth_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), horizon: _1m1y2y3m4y6m8yPattern2::new(client.clone(), "lth_coinflow".to_string()), cap: CentsUsdPattern3::new(client.clone(), "lth_coinflow_cap".to_string()), - price: CentsPpmRatioSatsUsdPattern::new(client.clone(), "lth_coinflow_price".to_string()), + price: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "lth_coinflow_price".to_string(), + ), } } } @@ -9682,8 +14418,14 @@ pub struct SeriesTree_Frameworks_Coinflow_Lth_Supply { impl SeriesTree_Frameworks_Coinflow_Lth_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - mobile: SeriesTree_Frameworks_Coinflow_Lth_Supply_Mobile::new(client.clone(), format!("{base_path}_mobile")), - immobile: BtcCentsSatsUsdPattern::new(client.clone(), "lth_immobile_supply".to_string()), + mobile: SeriesTree_Frameworks_Coinflow_Lth_Supply_Mobile::new( + client.clone(), + format!("{base_path}_mobile"), + ), + immobile: BtcCentsSatsUsdPattern::new( + client.clone(), + "lth_immobile_supply".to_string(), + ), } } } @@ -9704,7 +14446,10 @@ impl SeriesTree_Frameworks_Coinflow_Lth_Supply_Mobile { sats: SeriesPattern1::new(client.clone(), "lth_mobile_supply_sats".to_string()), usd: SeriesPattern1::new(client.clone(), "lth_mobile_supply_usd".to_string()), cents: SeriesPattern1::new(client.clone(), "lth_mobile_supply_cents".to_string()), - in_loss: SharePattern3::new(client.clone(), "lth_coinflow_supply_in_loss_share".to_string()), + in_loss: SharePattern3::new( + client.clone(), + "lth_coinflow_supply_in_loss_share".to_string(), + ), } } } @@ -9721,11 +14466,23 @@ pub struct SeriesTree_Frameworks_Coinflow_AggregateSources { impl SeriesTree_Frameworks_Coinflow_AggregateSources { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: SeriesTree_Frameworks_Coinflow_AggregateSources_Supply::new(client.clone(), format!("{base_path}_supply")), - supply_in_loss_share: SeriesPattern18::new(client.clone(), "coinflow_supply_in_loss_share_by_aggregate".to_string()), - horizon: SeriesTree_Frameworks_Coinflow_AggregateSources_Horizon::new(client.clone(), format!("{base_path}_horizon")), + supply: SeriesTree_Frameworks_Coinflow_AggregateSources_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), + supply_in_loss_share: SeriesPattern18::new( + client.clone(), + "coinflow_supply_in_loss_share_by_aggregate".to_string(), + ), + horizon: SeriesTree_Frameworks_Coinflow_AggregateSources_Horizon::new( + client.clone(), + format!("{base_path}_horizon"), + ), cap: SeriesPattern18::new(client.clone(), "coinflow_cap_cents_by_term".to_string()), - price: SeriesPattern18::new(client.clone(), "coinflow_price_cents_by_aggregate".to_string()), + price: SeriesPattern18::new( + client.clone(), + "coinflow_price_cents_by_aggregate".to_string(), + ), } } } @@ -9739,8 +14496,14 @@ pub struct SeriesTree_Frameworks_Coinflow_AggregateSources_Supply { impl SeriesTree_Frameworks_Coinflow_AggregateSources_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - mobile: SeriesPattern18::new(client.clone(), "coinflow_mobile_supply_sats_by_term".to_string()), - immobile: SeriesPattern18::new(client.clone(), "coinflow_immobile_supply_sats_by_term".to_string()), + mobile: SeriesPattern18::new( + client.clone(), + "coinflow_mobile_supply_sats_by_term".to_string(), + ), + immobile: SeriesPattern18::new( + client.clone(), + "coinflow_immobile_supply_sats_by_term".to_string(), + ), } } } @@ -9759,13 +14522,34 @@ pub struct SeriesTree_Frameworks_Coinflow_AggregateSources_Horizon { impl SeriesTree_Frameworks_Coinflow_AggregateSources_Horizon { pub fn new(client: Arc, base_path: String) -> Self { Self { - _8y: SeriesPattern18::new(client.clone(), "coinflow_8y_supply_in_loss_share_by_aggregate".to_string()), - _4y: SeriesPattern18::new(client.clone(), "coinflow_4y_supply_in_loss_share_by_aggregate".to_string()), - _2y: SeriesPattern18::new(client.clone(), "coinflow_2y_supply_in_loss_share_by_aggregate".to_string()), - _1y: SeriesPattern18::new(client.clone(), "coinflow_1y_supply_in_loss_share_by_aggregate".to_string()), - _6m: SeriesPattern18::new(client.clone(), "coinflow_6m_supply_in_loss_share_by_aggregate".to_string()), - _3m: SeriesPattern18::new(client.clone(), "coinflow_3m_supply_in_loss_share_by_aggregate".to_string()), - _1m: SeriesPattern18::new(client.clone(), "coinflow_1m_supply_in_loss_share_by_aggregate".to_string()), + _8y: SeriesPattern18::new( + client.clone(), + "coinflow_8y_supply_in_loss_share_by_aggregate".to_string(), + ), + _4y: SeriesPattern18::new( + client.clone(), + "coinflow_4y_supply_in_loss_share_by_aggregate".to_string(), + ), + _2y: SeriesPattern18::new( + client.clone(), + "coinflow_2y_supply_in_loss_share_by_aggregate".to_string(), + ), + _1y: SeriesPattern18::new( + client.clone(), + "coinflow_1y_supply_in_loss_share_by_aggregate".to_string(), + ), + _6m: SeriesPattern18::new( + client.clone(), + "coinflow_6m_supply_in_loss_share_by_aggregate".to_string(), + ), + _3m: SeriesPattern18::new( + client.clone(), + "coinflow_3m_supply_in_loss_share_by_aggregate".to_string(), + ), + _1m: SeriesPattern18::new( + client.clone(), + "coinflow_1m_supply_in_loss_share_by_aggregate".to_string(), + ), } } } @@ -9781,8 +14565,14 @@ impl SeriesTree_Models { pub fn new(client: Arc, base_path: String) -> Self { Self { bedrock: SeriesTree_Models_Bedrock::new(client.clone(), format!("{base_path}_bedrock")), - capital_sentiment: SeriesTree_Models_CapitalSentiment::new(client.clone(), format!("{base_path}_capital_sentiment")), - rarity_meter: SeriesTree_Models_RarityMeter::new(client.clone(), format!("{base_path}_rarity_meter")), + capital_sentiment: SeriesTree_Models_CapitalSentiment::new( + client.clone(), + format!("{base_path}_capital_sentiment"), + ), + rarity_meter: SeriesTree_Models_RarityMeter::new( + client.clone(), + format!("{base_path}_rarity_meter"), + ), } } } @@ -9807,13 +14597,34 @@ impl SeriesTree_Models_Bedrock { raw: FloorLevelLossPattern::new(client.clone(), "bedrock_raw".to_string()), cointime: FloorLevelLossPattern::new(client.clone(), "bedrock_cointime".to_string()), coinflow: FloorLevelLossPattern::new(client.clone(), "bedrock_coinflow".to_string()), - coinflow_8y: FloorLevelLossPattern::new(client.clone(), "bedrock_coinflow_8y".to_string()), - coinflow_4y: FloorLevelLossPattern::new(client.clone(), "bedrock_coinflow_4y".to_string()), - coinflow_2y: FloorLevelLossPattern::new(client.clone(), "bedrock_coinflow_2y".to_string()), - coinflow_1y: FloorLevelLossPattern::new(client.clone(), "bedrock_coinflow_1y".to_string()), - coinflow_6m: FloorLevelLossPattern::new(client.clone(), "bedrock_coinflow_6m".to_string()), - coinflow_3m: FloorLevelLossPattern::new(client.clone(), "bedrock_coinflow_3m".to_string()), - coinflow_1m: FloorLevelLossPattern::new(client.clone(), "bedrock_coinflow_1m".to_string()), + coinflow_8y: FloorLevelLossPattern::new( + client.clone(), + "bedrock_coinflow_8y".to_string(), + ), + coinflow_4y: FloorLevelLossPattern::new( + client.clone(), + "bedrock_coinflow_4y".to_string(), + ), + coinflow_2y: FloorLevelLossPattern::new( + client.clone(), + "bedrock_coinflow_2y".to_string(), + ), + coinflow_1y: FloorLevelLossPattern::new( + client.clone(), + "bedrock_coinflow_1y".to_string(), + ), + coinflow_6m: FloorLevelLossPattern::new( + client.clone(), + "bedrock_coinflow_6m".to_string(), + ), + coinflow_3m: FloorLevelLossPattern::new( + client.clone(), + "bedrock_coinflow_3m".to_string(), + ), + coinflow_1m: FloorLevelLossPattern::new( + client.clone(), + "bedrock_coinflow_1m".to_string(), + ), } } } @@ -9860,21 +14671,36 @@ impl SeriesTree_Models_RarityMeter { /// Series tree node. pub struct SeriesTree_Models_RarityMeter_Components { - pub realized_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub capitalized_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub sth_realized_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub sth_capitalized_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub lth_realized_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub lth_capitalized_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub over_6m_realized_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub over_4m_realized_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub under_4m_realized_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub under_6m_realized_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub vaulted_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub active_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub true_market_mean_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub cointime_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, - pub coinflow_price: Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub realized_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub capitalized_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub sth_realized_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub sth_capitalized_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub lth_realized_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub lth_capitalized_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub over_6m_realized_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub over_4m_realized_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub under_4m_realized_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub under_6m_realized_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub vaulted_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub active_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub true_market_mean_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub cointime_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, + pub coinflow_price: + Pct0Pct1Pct10Pct2Pct20Pct30Pct40Pct5Pct50Pct60Pct70Pct80Pct90Pct95Pct98Pct99RatiosPattern, } impl SeriesTree_Models_RarityMeter_Components { @@ -9911,11 +14737,26 @@ pub struct SeriesTree_Models_RarityMeter_Extremes { impl SeriesTree_Models_RarityMeter_Extremes { pub fn new(client: Arc, base_path: String) -> Self { Self { - coins_in_loss: SeriesTree_Models_RarityMeter_Extremes_CoinsInLoss::new(client.clone(), format!("{base_path}_coins_in_loss")), - profit_taking: HeightRankTailThresholdPattern::new(client.clone(), "rarity_meter_profit_taking".to_string()), - capitulation: HeightRankTailThresholdPattern::new(client.clone(), "rarity_meter_capitulation".to_string()), - peak_regret: HeightRankTailThresholdPattern::new(client.clone(), "rarity_meter_peak_regret".to_string()), - seller_exhaustion: SeriesTree_Models_RarityMeter_Extremes_SellerExhaustion::new(client.clone(), format!("{base_path}_seller_exhaustion")), + coins_in_loss: SeriesTree_Models_RarityMeter_Extremes_CoinsInLoss::new( + client.clone(), + format!("{base_path}_coins_in_loss"), + ), + profit_taking: HeightRankTailThresholdPattern::new( + client.clone(), + "rarity_meter_profit_taking".to_string(), + ), + capitulation: HeightRankTailThresholdPattern::new( + client.clone(), + "rarity_meter_capitulation".to_string(), + ), + peak_regret: HeightRankTailThresholdPattern::new( + client.clone(), + "rarity_meter_peak_regret".to_string(), + ), + seller_exhaustion: SeriesTree_Models_RarityMeter_Extremes_SellerExhaustion::new( + client.clone(), + format!("{base_path}_seller_exhaustion"), + ), } } } @@ -9933,12 +14774,30 @@ pub struct SeriesTree_Models_RarityMeter_Extremes_CoinsInLoss { impl SeriesTree_Models_RarityMeter_Extremes_CoinsInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - threshold_pct0_1: SeriesPattern1::new(client.clone(), "rarity_meter_coins_in_loss_threshold_pct0_1".to_string()), - threshold_pct0_05: SeriesPattern1::new(client.clone(), "rarity_meter_coins_in_loss_threshold_pct0_05".to_string()), - threshold_pct0_025: SeriesPattern1::new(client.clone(), "rarity_meter_coins_in_loss_threshold".to_string()), - height: SeriesPattern18::new(client.clone(), "rarity_meter_coins_in_loss_thresholds".to_string()), - tail: PercentPpmRatioPattern2::new(client.clone(), "rarity_meter_coins_in_loss_tail".to_string()), - rank: SeriesPattern1::new(client.clone(), "rarity_meter_coins_in_loss_rank".to_string()), + threshold_pct0_1: SeriesPattern1::new( + client.clone(), + "rarity_meter_coins_in_loss_threshold_pct0_1".to_string(), + ), + threshold_pct0_05: SeriesPattern1::new( + client.clone(), + "rarity_meter_coins_in_loss_threshold_pct0_05".to_string(), + ), + threshold_pct0_025: SeriesPattern1::new( + client.clone(), + "rarity_meter_coins_in_loss_threshold".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "rarity_meter_coins_in_loss_thresholds".to_string(), + ), + tail: PercentPpmRatioPattern2::new( + client.clone(), + "rarity_meter_coins_in_loss_tail".to_string(), + ), + rank: SeriesPattern1::new( + client.clone(), + "rarity_meter_coins_in_loss_rank".to_string(), + ), } } } @@ -9956,12 +14815,30 @@ pub struct SeriesTree_Models_RarityMeter_Extremes_SellerExhaustion { impl SeriesTree_Models_RarityMeter_Extremes_SellerExhaustion { pub fn new(client: Arc, base_path: String) -> Self { Self { - threshold_pct0_1: SeriesPattern1::new(client.clone(), "rarity_meter_seller_exhaustion_threshold_pct0_1".to_string()), - threshold_pct0_05: SeriesPattern1::new(client.clone(), "rarity_meter_seller_exhaustion_threshold_pct0_05".to_string()), - threshold_pct0_025: SeriesPattern1::new(client.clone(), "rarity_meter_seller_exhaustion_threshold".to_string()), - height: SeriesPattern18::new(client.clone(), "rarity_meter_seller_exhaustion_thresholds".to_string()), - tail: PercentPpmRatioPattern2::new(client.clone(), "rarity_meter_seller_exhaustion_tail".to_string()), - rank: SeriesPattern1::new(client.clone(), "rarity_meter_seller_exhaustion_rank".to_string()), + threshold_pct0_1: SeriesPattern1::new( + client.clone(), + "rarity_meter_seller_exhaustion_threshold_pct0_1".to_string(), + ), + threshold_pct0_05: SeriesPattern1::new( + client.clone(), + "rarity_meter_seller_exhaustion_threshold_pct0_05".to_string(), + ), + threshold_pct0_025: SeriesPattern1::new( + client.clone(), + "rarity_meter_seller_exhaustion_threshold".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "rarity_meter_seller_exhaustion_thresholds".to_string(), + ), + tail: PercentPpmRatioPattern2::new( + client.clone(), + "rarity_meter_seller_exhaustion_tail".to_string(), + ), + rank: SeriesPattern1::new( + client.clone(), + "rarity_meter_seller_exhaustion_rank".to_string(), + ), } } } @@ -10044,9 +14921,18 @@ impl SeriesTree_Indexes { addr: SeriesTree_Indexes_Addr::new(client.clone(), format!("{base_path}_addr")), height: SeriesTree_Indexes_Height::new(client.clone(), format!("{base_path}_height")), epoch: SeriesTree_Indexes_Epoch::new(client.clone(), format!("{base_path}_epoch")), - halving: SeriesTree_Indexes_Halving::new(client.clone(), format!("{base_path}_halving")), - minute10: SeriesTree_Indexes_Minute10::new(client.clone(), format!("{base_path}_minute10")), - minute30: SeriesTree_Indexes_Minute30::new(client.clone(), format!("{base_path}_minute30")), + halving: SeriesTree_Indexes_Halving::new( + client.clone(), + format!("{base_path}_halving"), + ), + minute10: SeriesTree_Indexes_Minute10::new( + client.clone(), + format!("{base_path}_minute10"), + ), + minute30: SeriesTree_Indexes_Minute30::new( + client.clone(), + format!("{base_path}_minute30"), + ), hour1: SeriesTree_Indexes_Hour1::new(client.clone(), format!("{base_path}_hour1")), hour4: SeriesTree_Indexes_Hour4::new(client.clone(), format!("{base_path}_hour4")), hour12: SeriesTree_Indexes_Hour12::new(client.clone(), format!("{base_path}_hour12")), @@ -10058,10 +14944,22 @@ impl SeriesTree_Indexes { month6: SeriesTree_Indexes_Month6::new(client.clone(), format!("{base_path}_month6")), year1: SeriesTree_Indexes_Year1::new(client.clone(), format!("{base_path}_year1")), year10: SeriesTree_Indexes_Year10::new(client.clone(), format!("{base_path}_year10")), - tx_index: SeriesTree_Indexes_TxIndex::new(client.clone(), format!("{base_path}_tx_index")), - txin_index: SeriesTree_Indexes_TxinIndex::new(client.clone(), format!("{base_path}_txin_index")), - txout_index: SeriesTree_Indexes_TxoutIndex::new(client.clone(), format!("{base_path}_txout_index")), - timestamp: SeriesTree_Indexes_Timestamp::new(client.clone(), format!("{base_path}_timestamp")), + tx_index: SeriesTree_Indexes_TxIndex::new( + client.clone(), + format!("{base_path}_tx_index"), + ), + txin_index: SeriesTree_Indexes_TxinIndex::new( + client.clone(), + format!("{base_path}_txin_index"), + ), + txout_index: SeriesTree_Indexes_TxoutIndex::new( + client.clone(), + format!("{base_path}_txout_index"), + ), + timestamp: SeriesTree_Indexes_Timestamp::new( + client.clone(), + format!("{base_path}_timestamp"), + ), } } } @@ -10085,18 +14983,33 @@ pub struct SeriesTree_Indexes_Addr { impl SeriesTree_Indexes_Addr { pub fn new(client: Arc, base_path: String) -> Self { Self { - p2pk33: SeriesTree_Indexes_Addr_P2pk33::new(client.clone(), format!("{base_path}_p2pk33")), - p2pk65: SeriesTree_Indexes_Addr_P2pk65::new(client.clone(), format!("{base_path}_p2pk65")), + p2pk33: SeriesTree_Indexes_Addr_P2pk33::new( + client.clone(), + format!("{base_path}_p2pk33"), + ), + p2pk65: SeriesTree_Indexes_Addr_P2pk65::new( + client.clone(), + format!("{base_path}_p2pk65"), + ), p2pkh: SeriesTree_Indexes_Addr_P2pkh::new(client.clone(), format!("{base_path}_p2pkh")), p2sh: SeriesTree_Indexes_Addr_P2sh::new(client.clone(), format!("{base_path}_p2sh")), p2tr: SeriesTree_Indexes_Addr_P2tr::new(client.clone(), format!("{base_path}_p2tr")), - p2wpkh: SeriesTree_Indexes_Addr_P2wpkh::new(client.clone(), format!("{base_path}_p2wpkh")), + p2wpkh: SeriesTree_Indexes_Addr_P2wpkh::new( + client.clone(), + format!("{base_path}_p2wpkh"), + ), p2wsh: SeriesTree_Indexes_Addr_P2wsh::new(client.clone(), format!("{base_path}_p2wsh")), p2a: SeriesTree_Indexes_Addr_P2a::new(client.clone(), format!("{base_path}_p2a")), p2ms: SeriesTree_Indexes_Addr_P2ms::new(client.clone(), format!("{base_path}_p2ms")), empty: SeriesTree_Indexes_Addr_Empty::new(client.clone(), format!("{base_path}_empty")), - unknown: SeriesTree_Indexes_Addr_Unknown::new(client.clone(), format!("{base_path}_unknown")), - op_return: SeriesTree_Indexes_Addr_OpReturn::new(client.clone(), format!("{base_path}_op_return")), + unknown: SeriesTree_Indexes_Addr_Unknown::new( + client.clone(), + format!("{base_path}_unknown"), + ), + op_return: SeriesTree_Indexes_Addr_OpReturn::new( + client.clone(), + format!("{base_path}_op_return"), + ), } } } @@ -10606,10 +15519,22 @@ impl SeriesTree_Indicators { nvt: PpmRatioPattern3::new(client.clone(), "nvt".to_string()), gini: PercentPpmRatioPattern2::new(client.clone(), "gini".to_string()), rhodl_ratio: PpmRatioPattern3::new(client.clone(), "rhodl_ratio".to_string()), - thermo_cap_multiple: PpmRatioPattern3::new(client.clone(), "thermo_cap_multiple".to_string()), - coindays_destroyed_supply_adj: SeriesPattern1::new(client.clone(), "coindays_destroyed_supply_adj".to_string()), - coinyears_destroyed_supply_adj: SeriesPattern1::new(client.clone(), "coinyears_destroyed_supply_adj".to_string()), - dormancy: SeriesTree_Indicators_Dormancy::new(client.clone(), format!("{base_path}_dormancy")), + thermo_cap_multiple: PpmRatioPattern3::new( + client.clone(), + "thermo_cap_multiple".to_string(), + ), + coindays_destroyed_supply_adj: SeriesPattern1::new( + client.clone(), + "coindays_destroyed_supply_adj".to_string(), + ), + coinyears_destroyed_supply_adj: SeriesPattern1::new( + client.clone(), + "coinyears_destroyed_supply_adj".to_string(), + ), + dormancy: SeriesTree_Indicators_Dormancy::new( + client.clone(), + format!("{base_path}_dormancy"), + ), stock_to_flow: SeriesPattern1::new(client.clone(), "stock_to_flow".to_string()), seller_exhaustion: SeriesPattern1::new(client.clone(), "seller_exhaustion".to_string()), } @@ -10661,12 +15586,27 @@ pub struct SeriesTree_Investing_Period { impl SeriesTree_Investing_Period { pub fn new(client: Arc, base_path: String) -> Self { Self { - dca_stack: _10y1m1w1y2y3m3y4y5y6m6y8yPattern3::new(client.clone(), "dca_stack".to_string()), - dca_cost_basis: SeriesTree_Investing_Period_DcaCostBasis::new(client.clone(), format!("{base_path}_dca_cost_basis")), - dca_return: _10y1m1w1y2y3m3y4y5y6m6y8yPattern2::new(client.clone(), "dca_return".to_string()), + dca_stack: _10y1m1w1y2y3m3y4y5y6m6y8yPattern3::new( + client.clone(), + "dca_stack".to_string(), + ), + dca_cost_basis: SeriesTree_Investing_Period_DcaCostBasis::new( + client.clone(), + format!("{base_path}_dca_cost_basis"), + ), + dca_return: _10y1m1w1y2y3m3y4y5y6m6y8yPattern2::new( + client.clone(), + "dca_return".to_string(), + ), dca_cagr: _10y2y3y4y5y6y8yPattern::new(client.clone(), "dca_cagr".to_string()), - lump_sum_stack: _10y1m1w1y2y3m3y4y5y6m6y8yPattern3::new(client.clone(), "lump_sum_stack".to_string()), - lump_sum_return: _10y1m1w1y2y3m3y4y5y6m6y8yPattern2::new(client.clone(), "lump_sum_return".to_string()), + lump_sum_stack: _10y1m1w1y2y3m3y4y5y6m6y8yPattern3::new( + client.clone(), + "lump_sum_stack".to_string(), + ), + lump_sum_return: _10y1m1w1y2y3m3y4y5y6m6y8yPattern2::new( + client.clone(), + "lump_sum_return".to_string(), + ), } } } @@ -10716,9 +15656,18 @@ pub struct SeriesTree_Investing_Class { impl SeriesTree_Investing_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - dca_stack: SeriesTree_Investing_Class_DcaStack::new(client.clone(), format!("{base_path}_dca_stack")), - dca_cost_basis: SeriesTree_Investing_Class_DcaCostBasis::new(client.clone(), format!("{base_path}_dca_cost_basis")), - dca_return: SeriesTree_Investing_Class_DcaReturn::new(client.clone(), format!("{base_path}_dca_return")), + dca_stack: SeriesTree_Investing_Class_DcaStack::new( + client.clone(), + format!("{base_path}_dca_stack"), + ), + dca_cost_basis: SeriesTree_Investing_Class_DcaCostBasis::new( + client.clone(), + format!("{base_path}_dca_cost_basis"), + ), + dca_return: SeriesTree_Investing_Class_DcaReturn::new( + client.clone(), + format!("{base_path}_dca_return"), + ), } } } @@ -10742,18 +15691,54 @@ pub struct SeriesTree_Investing_Class_DcaStack { impl SeriesTree_Investing_Class_DcaStack { pub fn new(client: Arc, base_path: String) -> Self { Self { - from_2015: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2015".to_string()), - from_2016: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2016".to_string()), - from_2017: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2017".to_string()), - from_2018: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2018".to_string()), - from_2019: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2019".to_string()), - from_2020: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2020".to_string()), - from_2021: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2021".to_string()), - from_2022: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2022".to_string()), - from_2023: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2023".to_string()), - from_2024: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2024".to_string()), - from_2025: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2025".to_string()), - from_2026: BtcCentsSatsUsdPattern::new(client.clone(), "dca_stack_from_2026".to_string()), + from_2015: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2015".to_string(), + ), + from_2016: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2016".to_string(), + ), + from_2017: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2017".to_string(), + ), + from_2018: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2018".to_string(), + ), + from_2019: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2019".to_string(), + ), + from_2020: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2020".to_string(), + ), + from_2021: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2021".to_string(), + ), + from_2022: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2022".to_string(), + ), + from_2023: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2023".to_string(), + ), + from_2024: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2024".to_string(), + ), + from_2025: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2025".to_string(), + ), + from_2026: BtcCentsSatsUsdPattern::new( + client.clone(), + "dca_stack_from_2026".to_string(), + ), } } } @@ -10777,18 +15762,54 @@ pub struct SeriesTree_Investing_Class_DcaCostBasis { impl SeriesTree_Investing_Class_DcaCostBasis { pub fn new(client: Arc, base_path: String) -> Self { Self { - from_2015: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2015".to_string()), - from_2016: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2016".to_string()), - from_2017: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2017".to_string()), - from_2018: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2018".to_string()), - from_2019: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2019".to_string()), - from_2020: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2020".to_string()), - from_2021: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2021".to_string()), - from_2022: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2022".to_string()), - from_2023: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2023".to_string()), - from_2024: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2024".to_string()), - from_2025: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2025".to_string()), - from_2026: CentsSatsUsdPattern::new(client.clone(), "dca_cost_basis_from_2026".to_string()), + from_2015: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2015".to_string(), + ), + from_2016: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2016".to_string(), + ), + from_2017: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2017".to_string(), + ), + from_2018: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2018".to_string(), + ), + from_2019: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2019".to_string(), + ), + from_2020: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2020".to_string(), + ), + from_2021: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2021".to_string(), + ), + from_2022: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2022".to_string(), + ), + from_2023: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2023".to_string(), + ), + from_2024: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2024".to_string(), + ), + from_2025: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2025".to_string(), + ), + from_2026: CentsSatsUsdPattern::new( + client.clone(), + "dca_cost_basis_from_2026".to_string(), + ), } } } @@ -10812,18 +15833,54 @@ pub struct SeriesTree_Investing_Class_DcaReturn { impl SeriesTree_Investing_Class_DcaReturn { pub fn new(client: Arc, base_path: String) -> Self { Self { - from_2015: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2015".to_string()), - from_2016: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2016".to_string()), - from_2017: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2017".to_string()), - from_2018: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2018".to_string()), - from_2019: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2019".to_string()), - from_2020: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2020".to_string()), - from_2021: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2021".to_string()), - from_2022: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2022".to_string()), - from_2023: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2023".to_string()), - from_2024: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2024".to_string()), - from_2025: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2025".to_string()), - from_2026: PercentPpmRatioPattern::new(client.clone(), "dca_return_from_2026".to_string()), + from_2015: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2015".to_string(), + ), + from_2016: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2016".to_string(), + ), + from_2017: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2017".to_string(), + ), + from_2018: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2018".to_string(), + ), + from_2019: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2019".to_string(), + ), + from_2020: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2020".to_string(), + ), + from_2021: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2021".to_string(), + ), + from_2022: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2022".to_string(), + ), + from_2023: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2023".to_string(), + ), + from_2024: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2024".to_string(), + ), + from_2025: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2025".to_string(), + ), + from_2026: PercentPpmRatioPattern::new( + client.clone(), + "dca_return_from_2026".to_string(), + ), } } } @@ -10843,12 +15900,21 @@ impl SeriesTree_Market { pub fn new(client: Arc, base_path: String) -> Self { Self { ath: SeriesTree_Market_Ath::new(client.clone(), format!("{base_path}_ath")), - lookback: SeriesTree_Market_Lookback::new(client.clone(), format!("{base_path}_lookback")), + lookback: SeriesTree_Market_Lookback::new( + client.clone(), + format!("{base_path}_lookback"), + ), returns: SeriesTree_Market_Returns::new(client.clone(), format!("{base_path}_returns")), volatility: _1m1w1y24hPattern::new(client.clone(), "price_volatility".to_string()), range: SeriesTree_Market_Range::new(client.clone(), format!("{base_path}_range")), - moving_average: SeriesTree_Market_MovingAverage::new(client.clone(), format!("{base_path}_moving_average")), - technical: SeriesTree_Market_Technical::new(client.clone(), format!("{base_path}_technical")), + moving_average: SeriesTree_Market_MovingAverage::new( + client.clone(), + format!("{base_path}_moving_average"), + ), + technical: SeriesTree_Market_Technical::new( + client.clone(), + format!("{base_path}_technical"), + ), } } } @@ -10870,8 +15936,14 @@ impl SeriesTree_Market_Ath { drawdown: PercentPpmRatioPattern3::new(client.clone(), "price_drawdown".to_string()), days_since: SeriesPattern1::new(client.clone(), "days_since_price_ath".to_string()), years_since: SeriesPattern1::new(client.clone(), "years_since_price_ath".to_string()), - max_days_between: SeriesPattern1::new(client.clone(), "max_days_between_price_ath".to_string()), - max_years_between: SeriesPattern1::new(client.clone(), "max_years_between_price_ath".to_string()), + max_days_between: SeriesPattern1::new( + client.clone(), + "max_days_between_price_ath".to_string(), + ), + max_years_between: SeriesPattern1::new( + client.clone(), + "max_years_between_price_ath".to_string(), + ), } } } @@ -10923,9 +15995,15 @@ pub struct SeriesTree_Market_Returns { impl SeriesTree_Market_Returns { pub fn new(client: Arc, base_path: String) -> Self { Self { - periods: SeriesTree_Market_Returns_Periods::new(client.clone(), format!("{base_path}_periods")), + periods: SeriesTree_Market_Returns_Periods::new( + client.clone(), + format!("{base_path}_periods"), + ), cagr: _10y2y3y4y5y6y8yPattern::new(client.clone(), "price_cagr".to_string()), - sd_24h: SeriesTree_Market_Returns_Sd24h::new(client.clone(), format!("{base_path}_sd_24h")), + sd_24h: SeriesTree_Market_Returns_Sd24h::new( + client.clone(), + format!("{base_path}_sd_24h"), + ), } } } @@ -10978,7 +16056,10 @@ pub struct SeriesTree_Market_Returns_Sd24h { impl SeriesTree_Market_Returns_Sd24h { pub fn new(client: Arc, base_path: String) -> Self { Self { - _24h: SeriesTree_Market_Returns_Sd24h_24h::new(client.clone(), format!("{base_path}_24h")), + _24h: SeriesTree_Market_Returns_Sd24h_24h::new( + client.clone(), + format!("{base_path}_24h"), + ), _1w: SeriesTree_Market_Returns_Sd24h_1w::new(client.clone(), format!("{base_path}_1w")), _1m: SeriesTree_Market_Returns_Sd24h_1m::new(client.clone(), format!("{base_path}_1m")), _1y: SeriesTree_Market_Returns_Sd24h_1y::new(client.clone(), format!("{base_path}_1y")), @@ -11061,8 +16142,14 @@ impl SeriesTree_Market_Range { min: _1m1w1y2wPattern::new(client.clone(), "price_min".to_string()), max: _1m1w1y2wPattern::new(client.clone(), "price_max".to_string()), true_range: SeriesPattern1::new(client.clone(), "price_true_range".to_string()), - true_range_sum_2w: SeriesPattern1::new(client.clone(), "price_true_range_sum_2w".to_string()), - choppiness_index_2w: PercentPpmRatioPattern2::new(client.clone(), "price_choppiness_index_2w".to_string()), + true_range_sum_2w: SeriesPattern1::new( + client.clone(), + "price_true_range_sum_2w".to_string(), + ), + choppiness_index_2w: PercentPpmRatioPattern2::new( + client.clone(), + "price_choppiness_index_2w".to_string(), + ), } } } @@ -11076,8 +16163,14 @@ pub struct SeriesTree_Market_MovingAverage { impl SeriesTree_Market_MovingAverage { pub fn new(client: Arc, base_path: String) -> Self { Self { - sma: SeriesTree_Market_MovingAverage_Sma::new(client.clone(), format!("{base_path}_sma")), - ema: SeriesTree_Market_MovingAverage_Ema::new(client.clone(), format!("{base_path}_ema")), + sma: SeriesTree_Market_MovingAverage_Sma::new( + client.clone(), + format!("{base_path}_sma"), + ), + ema: SeriesTree_Market_MovingAverage_Ema::new( + client.clone(), + format!("{base_path}_ema"), + ), } } } @@ -11115,8 +16208,14 @@ impl SeriesTree_Market_MovingAverage_Sma { _89d: CentsPpmRatioSatsUsdPattern::new(client.clone(), "price_sma_89d".to_string()), _111d: CentsPpmRatioSatsUsdPattern::new(client.clone(), "price_sma_111d".to_string()), _144d: CentsPpmRatioSatsUsdPattern::new(client.clone(), "price_sma_144d".to_string()), - _200d: SeriesTree_Market_MovingAverage_Sma_200d::new(client.clone(), format!("{base_path}_200d")), - _350d: SeriesTree_Market_MovingAverage_Sma_350d::new(client.clone(), format!("{base_path}_350d")), + _200d: SeriesTree_Market_MovingAverage_Sma_200d::new( + client.clone(), + format!("{base_path}_200d"), + ), + _350d: SeriesTree_Market_MovingAverage_Sma_350d::new( + client.clone(), + format!("{base_path}_350d"), + ), _1y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "price_sma_1y".to_string()), _2y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "price_sma_2y".to_string()), _200w: CentsPpmRatioSatsUsdPattern::new(client.clone(), "price_sma_200w".to_string()), @@ -11230,7 +16329,10 @@ impl SeriesTree_Market_Technical { Self { rsi: SeriesTree_Market_Technical_Rsi::new(client.clone(), format!("{base_path}_rsi")), pi_cycle: PpmRatioPattern2::new(client.clone(), "pi_cycle".to_string()), - macd: SeriesTree_Market_Technical_Macd::new(client.clone(), format!("{base_path}_macd")), + macd: SeriesTree_Market_Technical_Macd::new( + client.clone(), + format!("{base_path}_macd"), + ), } } } @@ -11262,9 +16364,18 @@ pub struct SeriesTree_Market_Technical_Macd { impl SeriesTree_Market_Technical_Macd { pub fn new(client: Arc, base_path: String) -> Self { Self { - _24h: SeriesTree_Market_Technical_Macd_24h::new(client.clone(), format!("{base_path}_24h")), - _1w: SeriesTree_Market_Technical_Macd_1w::new(client.clone(), format!("{base_path}_1w")), - _1m: SeriesTree_Market_Technical_Macd_1m::new(client.clone(), format!("{base_path}_1m")), + _24h: SeriesTree_Market_Technical_Macd_24h::new( + client.clone(), + format!("{base_path}_24h"), + ), + _1w: SeriesTree_Market_Technical_Macd_1w::new( + client.clone(), + format!("{base_path}_1w"), + ), + _1m: SeriesTree_Market_Technical_Macd_1m::new( + client.clone(), + format!("{base_path}_1m"), + ), } } } @@ -11385,16 +16496,28 @@ impl SeriesTree_Pools_Major { btcguild: BlocksDominanceRewardsPattern::new(client.clone(), "btcguild".to_string()), eligius: BlocksDominanceRewardsPattern::new(client.clone(), "eligius".to_string()), f2pool: BlocksDominanceRewardsPattern::new(client.clone(), "f2pool".to_string()), - braiinspool: BlocksDominanceRewardsPattern::new(client.clone(), "braiinspool".to_string()), + braiinspool: BlocksDominanceRewardsPattern::new( + client.clone(), + "braiinspool".to_string(), + ), antpool: BlocksDominanceRewardsPattern::new(client.clone(), "antpool".to_string()), btcc: BlocksDominanceRewardsPattern::new(client.clone(), "btcc".to_string()), bwpool: BlocksDominanceRewardsPattern::new(client.clone(), "bwpool".to_string()), bitfury: BlocksDominanceRewardsPattern::new(client.clone(), "bitfury".to_string()), viabtc: BlocksDominanceRewardsPattern::new(client.clone(), "viabtc".to_string()), poolin: BlocksDominanceRewardsPattern::new(client.clone(), "poolin".to_string()), - spiderpool: BlocksDominanceRewardsPattern::new(client.clone(), "spiderpool".to_string()), - binancepool: BlocksDominanceRewardsPattern::new(client.clone(), "binancepool".to_string()), - foundryusa: BlocksDominanceRewardsPattern::new(client.clone(), "foundryusa".to_string()), + spiderpool: BlocksDominanceRewardsPattern::new( + client.clone(), + "spiderpool".to_string(), + ), + binancepool: BlocksDominanceRewardsPattern::new( + client.clone(), + "binancepool".to_string(), + ), + foundryusa: BlocksDominanceRewardsPattern::new( + client.clone(), + "foundryusa".to_string(), + ), sbicrypto: BlocksDominanceRewardsPattern::new(client.clone(), "sbicrypto".to_string()), marapool: BlocksDominanceRewardsPattern::new(client.clone(), "marapool".to_string()), secpool: BlocksDominanceRewardsPattern::new(client.clone(), "secpool".to_string()), @@ -11599,7 +16722,10 @@ impl SeriesTree_Pools_Minor { ckpool: BlocksDominancePattern::new(client.clone(), "ckpool".to_string()), nicehash: BlocksDominancePattern::new(client.clone(), "nicehash".to_string()), bitclub: BlocksDominancePattern::new(client.clone(), "bitclub".to_string()), - bitcoinaffiliatenetwork: BlocksDominancePattern::new(client.clone(), "bitcoinaffiliatenetwork".to_string()), + bitcoinaffiliatenetwork: BlocksDominancePattern::new( + client.clone(), + "bitcoinaffiliatenetwork".to_string(), + ), exxbw: BlocksDominancePattern::new(client.clone(), "exxbw".to_string()), bitsolo: BlocksDominancePattern::new(client.clone(), "bitsolo".to_string()), twentyoneinc: BlocksDominancePattern::new(client.clone(), "twentyoneinc".to_string()), @@ -11622,7 +16748,10 @@ impl SeriesTree_Pools_Minor { dcexploration: BlocksDominancePattern::new(client.clone(), "dcexploration".to_string()), dcex: BlocksDominancePattern::new(client.clone(), "dcex".to_string()), btpool: BlocksDominancePattern::new(client.clone(), "btpool".to_string()), - fiftyeightcoin: BlocksDominancePattern::new(client.clone(), "fiftyeightcoin".to_string()), + fiftyeightcoin: BlocksDominancePattern::new( + client.clone(), + "fiftyeightcoin".to_string(), + ), bitcoinindia: BlocksDominancePattern::new(client.clone(), "bitcoinindia".to_string()), shawnp0wers: BlocksDominancePattern::new(client.clone(), "shawnp0wers".to_string()), phashio: BlocksDominancePattern::new(client.clone(), "phashio".to_string()), @@ -11635,8 +16764,14 @@ impl SeriesTree_Pools_Minor { rawpool: BlocksDominancePattern::new(client.clone(), "rawpool".to_string()), haominer: BlocksDominancePattern::new(client.clone(), "haominer".to_string()), helix: BlocksDominancePattern::new(client.clone(), "helix".to_string()), - bitcoinukraine: BlocksDominancePattern::new(client.clone(), "bitcoinukraine".to_string()), - secretsuperstar: BlocksDominancePattern::new(client.clone(), "secretsuperstar".to_string()), + bitcoinukraine: BlocksDominancePattern::new( + client.clone(), + "bitcoinukraine".to_string(), + ), + secretsuperstar: BlocksDominancePattern::new( + client.clone(), + "secretsuperstar".to_string(), + ), tigerpoolnet: BlocksDominancePattern::new(client.clone(), "tigerpoolnet".to_string()), sigmapoolcom: BlocksDominancePattern::new(client.clone(), "sigmapoolcom".to_string()), okpooltop: BlocksDominancePattern::new(client.clone(), "okpooltop".to_string()), @@ -11653,25 +16788,40 @@ impl SeriesTree_Pools_Minor { arkpool: BlocksDominancePattern::new(client.clone(), "arkpool".to_string()), purebtccom: BlocksDominancePattern::new(client.clone(), "purebtccom".to_string()), kucoinpool: BlocksDominancePattern::new(client.clone(), "kucoinpool".to_string()), - entrustcharitypool: BlocksDominancePattern::new(client.clone(), "entrustcharitypool".to_string()), + entrustcharitypool: BlocksDominancePattern::new( + client.clone(), + "entrustcharitypool".to_string(), + ), okminer: BlocksDominancePattern::new(client.clone(), "okminer".to_string()), titan: BlocksDominancePattern::new(client.clone(), "titan".to_string()), pegapool: BlocksDominancePattern::new(client.clone(), "pegapool".to_string()), btcnuggets: BlocksDominancePattern::new(client.clone(), "btcnuggets".to_string()), cloudhashing: BlocksDominancePattern::new(client.clone(), "cloudhashing".to_string()), - digitalxmintsy: BlocksDominancePattern::new(client.clone(), "digitalxmintsy".to_string()), + digitalxmintsy: BlocksDominancePattern::new( + client.clone(), + "digitalxmintsy".to_string(), + ), telco214: BlocksDominancePattern::new(client.clone(), "telco214".to_string()), btcpoolparty: BlocksDominancePattern::new(client.clone(), "btcpoolparty".to_string()), multipool: BlocksDominancePattern::new(client.clone(), "multipool".to_string()), - transactioncoinmining: BlocksDominancePattern::new(client.clone(), "transactioncoinmining".to_string()), + transactioncoinmining: BlocksDominancePattern::new( + client.clone(), + "transactioncoinmining".to_string(), + ), btcdig: BlocksDominancePattern::new(client.clone(), "btcdig".to_string()), - trickysbtcpool: BlocksDominancePattern::new(client.clone(), "trickysbtcpool".to_string()), + trickysbtcpool: BlocksDominancePattern::new( + client.clone(), + "trickysbtcpool".to_string(), + ), btcmp: BlocksDominancePattern::new(client.clone(), "btcmp".to_string()), eobot: BlocksDominancePattern::new(client.clone(), "eobot".to_string()), unomp: BlocksDominancePattern::new(client.clone(), "unomp".to_string()), patels: BlocksDominancePattern::new(client.clone(), "patels".to_string()), gogreenlight: BlocksDominancePattern::new(client.clone(), "gogreenlight".to_string()), - bitcoinindiapool: BlocksDominancePattern::new(client.clone(), "bitcoinindiapool".to_string()), + bitcoinindiapool: BlocksDominancePattern::new( + client.clone(), + "bitcoinindiapool".to_string(), + ), ekanembtc: BlocksDominancePattern::new(client.clone(), "ekanembtc".to_string()), canoe: BlocksDominancePattern::new(client.clone(), "canoe".to_string()), tiger: BlocksDominancePattern::new(client.clone(), "tiger".to_string()), @@ -11679,8 +16829,14 @@ impl SeriesTree_Pools_Minor { zulupool: BlocksDominancePattern::new(client.clone(), "zulupool".to_string()), wiz: BlocksDominancePattern::new(client.clone(), "wiz".to_string()), wk057: BlocksDominancePattern::new(client.clone(), "wk057".to_string()), - futurebitapollosolo: BlocksDominancePattern::new(client.clone(), "futurebitapollosolo".to_string()), - carbonnegative: BlocksDominancePattern::new(client.clone(), "carbonnegative".to_string()), + futurebitapollosolo: BlocksDominancePattern::new( + client.clone(), + "futurebitapollosolo".to_string(), + ), + carbonnegative: BlocksDominancePattern::new( + client.clone(), + "carbonnegative".to_string(), + ), portlandhodl: BlocksDominancePattern::new(client.clone(), "portlandhodl".to_string()), phoenix: BlocksDominancePattern::new(client.clone(), "phoenix".to_string()), neopool: BlocksDominancePattern::new(client.clone(), "neopool".to_string()), @@ -11789,13 +16945,28 @@ impl SeriesTree_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { state: SeriesPattern18::new(client.clone(), "supply_state".to_string()), - circulating: BtcCentsSatsUsdPattern::new(client.clone(), "circulating_supply".to_string()), + circulating: BtcCentsSatsUsdPattern::new( + client.clone(), + "circulating_supply".to_string(), + ), burned: BlockCumulativePattern::new(client.clone(), "unspendable_supply".to_string()), - inflation_rate: PercentPpmRatioPattern::new(client.clone(), "inflation_rate".to_string()), - velocity: SeriesTree_Supply_Velocity::new(client.clone(), format!("{base_path}_velocity")), + inflation_rate: PercentPpmRatioPattern::new( + client.clone(), + "inflation_rate".to_string(), + ), + velocity: SeriesTree_Supply_Velocity::new( + client.clone(), + format!("{base_path}_velocity"), + ), market_cap: CentsDeltaUsdPattern::new(client.clone(), "market_cap".to_string()), - market_minus_realized_cap_growth_rate: _1m1w1y24hPattern::new(client.clone(), "market_minus_realized_cap_growth_rate".to_string()), - hodled_or_lost: BtcCentsSatsUsdPattern::new(client.clone(), "hodled_or_lost_supply".to_string()), + market_minus_realized_cap_growth_rate: _1m1w1y24hPattern::new( + client.clone(), + "market_minus_realized_cap_growth_rate".to_string(), + ), + hodled_or_lost: BtcCentsSatsUsdPattern::new( + client.clone(), + "hodled_or_lost_supply".to_string(), + ), } } } @@ -11823,7 +16994,10 @@ pub struct SeriesTree_Cohorts { impl SeriesTree_Cohorts { pub fn new(client: Arc, base_path: String) -> Self { Self { - cohorts: SeriesTree_Cohorts_Cohorts::new(client.clone(), format!("{base_path}_cohorts")), + cohorts: SeriesTree_Cohorts_Cohorts::new( + client.clone(), + format!("{base_path}_cohorts"), + ), } } } @@ -11843,14 +17017,38 @@ pub struct SeriesTree_Cohorts_Cohorts { impl SeriesTree_Cohorts_Cohorts { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: SeriesTree_Cohorts_Cohorts_Supply::new(client.clone(), format!("{base_path}_supply")), - outputs: SeriesTree_Cohorts_Cohorts_Outputs::new(client.clone(), format!("{base_path}_outputs")), - activity: SeriesTree_Cohorts_Cohorts_Activity::new(client.clone(), format!("{base_path}_activity")), - realized: SeriesTree_Cohorts_Cohorts_Realized::new(client.clone(), format!("{base_path}_realized")), - unrealized: SeriesTree_Cohorts_Cohorts_Unrealized::new(client.clone(), format!("{base_path}_unrealized")), - cost_basis: SeriesTree_Cohorts_Cohorts_CostBasis::new(client.clone(), format!("{base_path}_cost_basis")), - relative: SeriesTree_Cohorts_Cohorts_Relative::new(client.clone(), format!("{base_path}_relative")), - profitability: SeriesTree_Cohorts_Cohorts_Profitability::new(client.clone(), format!("{base_path}_profitability")), + supply: SeriesTree_Cohorts_Cohorts_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), + outputs: SeriesTree_Cohorts_Cohorts_Outputs::new( + client.clone(), + format!("{base_path}_outputs"), + ), + activity: SeriesTree_Cohorts_Cohorts_Activity::new( + client.clone(), + format!("{base_path}_activity"), + ), + realized: SeriesTree_Cohorts_Cohorts_Realized::new( + client.clone(), + format!("{base_path}_realized"), + ), + unrealized: SeriesTree_Cohorts_Cohorts_Unrealized::new( + client.clone(), + format!("{base_path}_unrealized"), + ), + cost_basis: SeriesTree_Cohorts_Cohorts_CostBasis::new( + client.clone(), + format!("{base_path}_cost_basis"), + ), + relative: SeriesTree_Cohorts_Cohorts_Relative::new( + client.clone(), + format!("{base_path}_relative"), + ), + profitability: SeriesTree_Cohorts_Cohorts_Profitability::new( + client.clone(), + format!("{base_path}_profitability"), + ), } } } @@ -11869,13 +17067,34 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply { impl SeriesTree_Cohorts_Cohorts_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - total: SeriesTree_Cohorts_Cohorts_Supply_Total::new(client.clone(), format!("{base_path}_total")), - matured: SeriesTree_Cohorts_Cohorts_Supply_Matured::new(client.clone(), format!("{base_path}_matured")), - half: SeriesTree_Cohorts_Cohorts_Supply_Half::new(client.clone(), format!("{base_path}_half")), - in_profit: SeriesTree_Cohorts_Cohorts_Supply_InProfit::new(client.clone(), format!("{base_path}_in_profit")), - in_loss: SeriesTree_Cohorts_Cohorts_Supply_InLoss::new(client.clone(), format!("{base_path}_in_loss")), - delta: SeriesTree_Cohorts_Cohorts_Supply_Delta::new(client.clone(), format!("{base_path}_delta")), - dominance: SeriesTree_Cohorts_Cohorts_Supply_Dominance::new(client.clone(), format!("{base_path}_dominance")), + total: SeriesTree_Cohorts_Cohorts_Supply_Total::new( + client.clone(), + format!("{base_path}_total"), + ), + matured: SeriesTree_Cohorts_Cohorts_Supply_Matured::new( + client.clone(), + format!("{base_path}_matured"), + ), + half: SeriesTree_Cohorts_Cohorts_Supply_Half::new( + client.clone(), + format!("{base_path}_half"), + ), + in_profit: SeriesTree_Cohorts_Cohorts_Supply_InProfit::new( + client.clone(), + format!("{base_path}_in_profit"), + ), + in_loss: SeriesTree_Cohorts_Cohorts_Supply_InLoss::new( + client.clone(), + format!("{base_path}_in_loss"), + ), + delta: SeriesTree_Cohorts_Cohorts_Supply_Delta::new( + client.clone(), + format!("{base_path}_delta"), + ), + dominance: SeriesTree_Cohorts_Cohorts_Supply_Dominance::new( + client.clone(), + format!("{base_path}_dominance"), + ), } } } @@ -11903,20 +17122,44 @@ impl SeriesTree_Cohorts_Cohorts_Supply_Total { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BtcCentsSatsUsdPattern::new(client.clone(), "supply".to_string()), - age: SeriesTree_Cohorts_Cohorts_Supply_Total_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Supply_Total_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Supply_Total_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Supply_Total_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Supply_Total_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Supply_Total_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern12::new(client.clone(), "supply".to_string()), - utxo_amount: SeriesTree_Cohorts_Cohorts_Supply_Total_UtxoAmount::new(client.clone(), format!("{base_path}_utxo_amount")), + utxo_amount: SeriesTree_Cohorts_Cohorts_Supply_Total_UtxoAmount::new( + client.clone(), + format!("{base_path}_utxo_amount"), + ), term: LongShortPattern13::new(client.clone(), "supply".to_string()), - type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern10::new(client.clone(), "supply".to_string()), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_supply_sats_by_age_range".to_string()), + type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern10::new( + client.clone(), + "supply".to_string(), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_supply_sats_by_age_range".to_string(), + ), epoch_matrix: SeriesPattern18::new(client.clone(), "supply_sats_by_epoch".to_string()), class_matrix: SeriesPattern18::new(client.clone(), "supply_sats_by_class".to_string()), entry_matrix: SeriesPattern18::new(client.clone(), "supply_sats_by_entry".to_string()), type_matrix: SeriesPattern18::new(client.clone(), "supply_sats_by_type".to_string()), - amount_range_matrix: SeriesPattern18::new(client.clone(), "utxos_supply_sats_by_amount_range".to_string()), - addr_balance: SeriesTree_Cohorts_Cohorts_Supply_Total_AddrBalance::new(client.clone(), format!("{base_path}_addr_balance")), + amount_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_supply_sats_by_amount_range".to_string(), + ), + addr_balance: SeriesTree_Cohorts_Cohorts_Supply_Total_AddrBalance::new( + client.clone(), + format!("{base_path}_addr_balance"), + ), } } } @@ -11931,9 +17174,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Total_Age { impl SeriesTree_Cohorts_Cohorts_Supply_Total_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -11968,29 +17220,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Range { impl SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1h_old_supply".to_string()), - _1h_to_1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_supply".to_string()), - _1d_to_1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_supply".to_string()), - _1w_to_1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_supply".to_string()), - _1m_to_2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_supply".to_string()), - _2m_to_3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_supply".to_string()), - _3m_to_4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_supply".to_string()), - _4m_to_5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_supply".to_string()), - _5m_to_6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_supply".to_string()), - _6m_to_9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_supply".to_string()), - _9m_to_1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_supply".to_string()), - _1y_to_18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_supply".to_string()), - _18m_to_2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_supply".to_string()), - _2y_to_3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_supply".to_string()), - _3y_to_4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_supply".to_string()), - _4y_to_5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_supply".to_string()), - _5y_to_6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_supply".to_string()), - _6y_to_7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_supply".to_string()), - _7y_to_8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_supply".to_string()), - _8y_to_10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_supply".to_string()), - _10y_to_12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_supply".to_string()), - _12y_to_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_supply".to_string()), - over_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_15y_old_supply".to_string()), + under_1h: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1h_old_supply".to_string(), + ), + _1h_to_1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_supply".to_string(), + ), + _1d_to_1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_supply".to_string(), + ), + _1w_to_1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_supply".to_string(), + ), + _1m_to_2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_supply".to_string(), + ), + _2m_to_3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_supply".to_string(), + ), + _3m_to_4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_supply".to_string(), + ), + _4m_to_5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_supply".to_string(), + ), + _5m_to_6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_supply".to_string(), + ), + _6m_to_9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_supply".to_string(), + ), + _9m_to_1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_supply".to_string(), + ), + _1y_to_18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_supply".to_string(), + ), + _18m_to_2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_supply".to_string(), + ), + _2y_to_3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_supply".to_string(), + ), + _3y_to_4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_supply".to_string(), + ), + _4y_to_5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_supply".to_string(), + ), + _5y_to_6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_supply".to_string(), + ), + _6y_to_7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_supply".to_string(), + ), + _7y_to_8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_supply".to_string(), + ), + _8y_to_10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_supply".to_string(), + ), + _10y_to_12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_supply".to_string(), + ), + _12y_to_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_supply".to_string(), + ), + over_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_15y_old_supply".to_string(), + ), } } } @@ -12022,26 +17343,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Under { impl SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1w_old_supply".to_string()), - _1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1m_old_supply".to_string()), - _2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_2m_old_supply".to_string()), - _3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_3m_old_supply".to_string()), - _4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_4m_old_supply".to_string()), - _5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_5m_old_supply".to_string()), - _6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_6m_old_supply".to_string()), - _9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_9m_old_supply".to_string()), - _1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1y_old_supply".to_string()), - _18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_18m_old_supply".to_string()), - _2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_2y_old_supply".to_string()), - _3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_3y_old_supply".to_string()), - _4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_4y_old_supply".to_string()), - _5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_5y_old_supply".to_string()), - _6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_6y_old_supply".to_string()), - _7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_7y_old_supply".to_string()), - _8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_8y_old_supply".to_string()), - _10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_10y_old_supply".to_string()), - _12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_12y_old_supply".to_string()), - _15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_15y_old_supply".to_string()), + _1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1w_old_supply".to_string(), + ), + _1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1m_old_supply".to_string(), + ), + _2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_2m_old_supply".to_string(), + ), + _3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_3m_old_supply".to_string(), + ), + _4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_4m_old_supply".to_string(), + ), + _5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_5m_old_supply".to_string(), + ), + _6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_6m_old_supply".to_string(), + ), + _9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_9m_old_supply".to_string(), + ), + _1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1y_old_supply".to_string(), + ), + _18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_18m_old_supply".to_string(), + ), + _2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_2y_old_supply".to_string(), + ), + _3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_3y_old_supply".to_string(), + ), + _4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_4y_old_supply".to_string(), + ), + _5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_5y_old_supply".to_string(), + ), + _6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_6y_old_supply".to_string(), + ), + _7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_7y_old_supply".to_string(), + ), + _8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_8y_old_supply".to_string(), + ), + _10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_10y_old_supply".to_string(), + ), + _12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_12y_old_supply".to_string(), + ), + _15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_15y_old_supply".to_string(), + ), } } } @@ -12073,26 +17454,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Over { impl SeriesTree_Cohorts_Cohorts_Supply_Total_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1d_old_supply".to_string()), - _1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1w_old_supply".to_string()), - _1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1m_old_supply".to_string()), - _2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_2m_old_supply".to_string()), - _3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_3m_old_supply".to_string()), - _4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_4m_old_supply".to_string()), - _5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_5m_old_supply".to_string()), - _6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_6m_old_supply".to_string()), - _9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_9m_old_supply".to_string()), - _1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1y_old_supply".to_string()), - _18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_18m_old_supply".to_string()), - _2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_2y_old_supply".to_string()), - _3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_3y_old_supply".to_string()), - _4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_4y_old_supply".to_string()), - _5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_5y_old_supply".to_string()), - _6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_6y_old_supply".to_string()), - _7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_7y_old_supply".to_string()), - _8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_8y_old_supply".to_string()), - _10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_10y_old_supply".to_string()), - _12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_12y_old_supply".to_string()), + _1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1d_old_supply".to_string(), + ), + _1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1w_old_supply".to_string(), + ), + _1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1m_old_supply".to_string(), + ), + _2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_2m_old_supply".to_string(), + ), + _3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_3m_old_supply".to_string(), + ), + _4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_4m_old_supply".to_string(), + ), + _5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_5m_old_supply".to_string(), + ), + _6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_6m_old_supply".to_string(), + ), + _9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_9m_old_supply".to_string(), + ), + _1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1y_old_supply".to_string(), + ), + _18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_18m_old_supply".to_string(), + ), + _2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_2y_old_supply".to_string(), + ), + _3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_3y_old_supply".to_string(), + ), + _4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_4y_old_supply".to_string(), + ), + _5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_5y_old_supply".to_string(), + ), + _6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_6y_old_supply".to_string(), + ), + _7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_7y_old_supply".to_string(), + ), + _8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_8y_old_supply".to_string(), + ), + _10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_10y_old_supply".to_string(), + ), + _12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_12y_old_supply".to_string(), + ), } } } @@ -12175,9 +17616,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Total_UtxoAmount { impl SeriesTree_Cohorts_Cohorts_Supply_Total_UtxoAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern10::new(client.clone(), "utxos".to_string()), - under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern10::new(client.clone(), "utxos_under".to_string()), - over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern10::new(client.clone(), "utxos_over".to_string()), + range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern10::new( + client.clone(), + "utxos".to_string(), + ), + under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern10::new( + client.clone(), + "utxos_under".to_string(), + ), + over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern10::new( + client.clone(), + "utxos_over".to_string(), + ), } } } @@ -12193,10 +17643,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Total_AddrBalance { impl SeriesTree_Cohorts_Cohorts_Supply_Total_AddrBalance { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern10::new(client.clone(), "addrs".to_string()), - under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern10::new(client.clone(), "addrs_under".to_string()), - over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern10::new(client.clone(), "addrs_over".to_string()), - matrix: SeriesPattern18::new(client.clone(), "addrs_supply_sats_by_balance_range".to_string()), + range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern10::new( + client.clone(), + "addrs".to_string(), + ), + under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern10::new( + client.clone(), + "addrs_under".to_string(), + ), + over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern10::new( + client.clone(), + "addrs_over".to_string(), + ), + matrix: SeriesPattern18::new( + client.clone(), + "addrs_supply_sats_by_balance_range".to_string(), + ), } } } @@ -12233,31 +17695,106 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Matured { impl SeriesTree_Cohorts_Cohorts_Supply_Matured { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_under_1h_old_matured_supply".to_string()), - _1h_to_1d: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_1h_to_1d_old_matured_supply".to_string()), - _1d_to_1w: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_1d_to_1w_old_matured_supply".to_string()), - _1w_to_1m: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_1w_to_1m_old_matured_supply".to_string()), - _1m_to_2m: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_1m_to_2m_old_matured_supply".to_string()), - _2m_to_3m: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_2m_to_3m_old_matured_supply".to_string()), - _3m_to_4m: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_3m_to_4m_old_matured_supply".to_string()), - _4m_to_5m: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_4m_to_5m_old_matured_supply".to_string()), - _5m_to_6m: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_5m_to_6m_old_matured_supply".to_string()), - _6m_to_9m: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_6m_to_9m_old_matured_supply".to_string()), - _9m_to_1y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_9m_to_1y_old_matured_supply".to_string()), - _1y_to_18m: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_1y_to_18m_old_matured_supply".to_string()), - _18m_to_2y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_18m_to_2y_old_matured_supply".to_string()), - _2y_to_3y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_2y_to_3y_old_matured_supply".to_string()), - _3y_to_4y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_3y_to_4y_old_matured_supply".to_string()), - _4y_to_5y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_4y_to_5y_old_matured_supply".to_string()), - _5y_to_6y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_5y_to_6y_old_matured_supply".to_string()), - _6y_to_7y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_6y_to_7y_old_matured_supply".to_string()), - _7y_to_8y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_7y_to_8y_old_matured_supply".to_string()), - _8y_to_10y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_8y_to_10y_old_matured_supply".to_string()), - _10y_to_12y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_10y_to_12y_old_matured_supply".to_string()), - _12y_to_15y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_12y_to_15y_old_matured_supply".to_string()), - over_15y: AverageBlockCumulativeSumPattern2::new(client.clone(), "utxos_over_15y_old_matured_supply".to_string()), - sats: CumulativePattern::new(client.clone(), "utxos_age_range_matured_supply_cumulative_sats".to_string()), - cents: CumulativePattern::new(client.clone(), "utxos_age_range_matured_supply_cumulative_cents".to_string()), + under_1h: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_under_1h_old_matured_supply".to_string(), + ), + _1h_to_1d: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_1h_to_1d_old_matured_supply".to_string(), + ), + _1d_to_1w: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_1d_to_1w_old_matured_supply".to_string(), + ), + _1w_to_1m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_1w_to_1m_old_matured_supply".to_string(), + ), + _1m_to_2m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_1m_to_2m_old_matured_supply".to_string(), + ), + _2m_to_3m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_2m_to_3m_old_matured_supply".to_string(), + ), + _3m_to_4m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_3m_to_4m_old_matured_supply".to_string(), + ), + _4m_to_5m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_4m_to_5m_old_matured_supply".to_string(), + ), + _5m_to_6m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_5m_to_6m_old_matured_supply".to_string(), + ), + _6m_to_9m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_6m_to_9m_old_matured_supply".to_string(), + ), + _9m_to_1y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_9m_to_1y_old_matured_supply".to_string(), + ), + _1y_to_18m: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_1y_to_18m_old_matured_supply".to_string(), + ), + _18m_to_2y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_18m_to_2y_old_matured_supply".to_string(), + ), + _2y_to_3y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_2y_to_3y_old_matured_supply".to_string(), + ), + _3y_to_4y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_3y_to_4y_old_matured_supply".to_string(), + ), + _4y_to_5y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_4y_to_5y_old_matured_supply".to_string(), + ), + _5y_to_6y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_5y_to_6y_old_matured_supply".to_string(), + ), + _6y_to_7y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_6y_to_7y_old_matured_supply".to_string(), + ), + _7y_to_8y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_7y_to_8y_old_matured_supply".to_string(), + ), + _8y_to_10y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_8y_to_10y_old_matured_supply".to_string(), + ), + _10y_to_12y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_10y_to_12y_old_matured_supply".to_string(), + ), + _12y_to_15y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_12y_to_15y_old_matured_supply".to_string(), + ), + over_15y: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "utxos_over_15y_old_matured_supply".to_string(), + ), + sats: CumulativePattern::new( + client.clone(), + "utxos_age_range_matured_supply_cumulative_sats".to_string(), + ), + cents: CumulativePattern::new( + client.clone(), + "utxos_age_range_matured_supply_cumulative_cents".to_string(), + ), } } } @@ -12277,12 +17814,24 @@ impl SeriesTree_Cohorts_Cohorts_Supply_Half { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BtcCentsSatsUsdPattern::new(client.clone(), "supply_half".to_string()), - age: SeriesTree_Cohorts_Cohorts_Supply_Half_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Supply_Half_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Supply_Half_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Supply_Half_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Supply_Half_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Supply_Half_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern12::new(client.clone(), "supply_half".to_string()), term: LongShortPattern13::new(client.clone(), "supply_half".to_string()), - type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern10::new(client.clone(), "supply_half".to_string()), + type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern10::new( + client.clone(), + "supply_half".to_string(), + ), } } } @@ -12297,9 +17846,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Half_Age { impl SeriesTree_Cohorts_Cohorts_Supply_Half_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -12334,29 +17892,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Range { impl SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1h_old_supply_half".to_string()), - _1h_to_1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_supply_half".to_string()), - _1d_to_1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_supply_half".to_string()), - _1w_to_1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_supply_half".to_string()), - _1m_to_2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_supply_half".to_string()), - _2m_to_3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_supply_half".to_string()), - _3m_to_4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_supply_half".to_string()), - _4m_to_5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_supply_half".to_string()), - _5m_to_6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_supply_half".to_string()), - _6m_to_9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_supply_half".to_string()), - _9m_to_1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_supply_half".to_string()), - _1y_to_18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_supply_half".to_string()), - _18m_to_2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_supply_half".to_string()), - _2y_to_3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_supply_half".to_string()), - _3y_to_4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_supply_half".to_string()), - _4y_to_5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_supply_half".to_string()), - _5y_to_6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_supply_half".to_string()), - _6y_to_7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_supply_half".to_string()), - _7y_to_8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_supply_half".to_string()), - _8y_to_10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_supply_half".to_string()), - _10y_to_12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_supply_half".to_string()), - _12y_to_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_supply_half".to_string()), - over_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_15y_old_supply_half".to_string()), + under_1h: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1h_old_supply_half".to_string(), + ), + _1h_to_1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_supply_half".to_string(), + ), + _1d_to_1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_supply_half".to_string(), + ), + _1w_to_1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_supply_half".to_string(), + ), + _1m_to_2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_supply_half".to_string(), + ), + _2m_to_3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_supply_half".to_string(), + ), + _3m_to_4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_supply_half".to_string(), + ), + _4m_to_5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_supply_half".to_string(), + ), + _5m_to_6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_supply_half".to_string(), + ), + _6m_to_9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_supply_half".to_string(), + ), + _9m_to_1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_supply_half".to_string(), + ), + _1y_to_18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_supply_half".to_string(), + ), + _18m_to_2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_supply_half".to_string(), + ), + _2y_to_3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_supply_half".to_string(), + ), + _3y_to_4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_supply_half".to_string(), + ), + _4y_to_5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_supply_half".to_string(), + ), + _5y_to_6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_supply_half".to_string(), + ), + _6y_to_7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_supply_half".to_string(), + ), + _7y_to_8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_supply_half".to_string(), + ), + _8y_to_10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_supply_half".to_string(), + ), + _10y_to_12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_supply_half".to_string(), + ), + _12y_to_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_supply_half".to_string(), + ), + over_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_15y_old_supply_half".to_string(), + ), } } } @@ -12388,26 +18015,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Under { impl SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1w_old_supply_half".to_string()), - _1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1m_old_supply_half".to_string()), - _2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_2m_old_supply_half".to_string()), - _3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_3m_old_supply_half".to_string()), - _4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_4m_old_supply_half".to_string()), - _5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_5m_old_supply_half".to_string()), - _6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_6m_old_supply_half".to_string()), - _9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_9m_old_supply_half".to_string()), - _1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1y_old_supply_half".to_string()), - _18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_18m_old_supply_half".to_string()), - _2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_2y_old_supply_half".to_string()), - _3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_3y_old_supply_half".to_string()), - _4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_4y_old_supply_half".to_string()), - _5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_5y_old_supply_half".to_string()), - _6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_6y_old_supply_half".to_string()), - _7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_7y_old_supply_half".to_string()), - _8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_8y_old_supply_half".to_string()), - _10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_10y_old_supply_half".to_string()), - _12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_12y_old_supply_half".to_string()), - _15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_15y_old_supply_half".to_string()), + _1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1w_old_supply_half".to_string(), + ), + _1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1m_old_supply_half".to_string(), + ), + _2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_2m_old_supply_half".to_string(), + ), + _3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_3m_old_supply_half".to_string(), + ), + _4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_4m_old_supply_half".to_string(), + ), + _5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_5m_old_supply_half".to_string(), + ), + _6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_6m_old_supply_half".to_string(), + ), + _9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_9m_old_supply_half".to_string(), + ), + _1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1y_old_supply_half".to_string(), + ), + _18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_18m_old_supply_half".to_string(), + ), + _2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_2y_old_supply_half".to_string(), + ), + _3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_3y_old_supply_half".to_string(), + ), + _4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_4y_old_supply_half".to_string(), + ), + _5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_5y_old_supply_half".to_string(), + ), + _6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_6y_old_supply_half".to_string(), + ), + _7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_7y_old_supply_half".to_string(), + ), + _8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_8y_old_supply_half".to_string(), + ), + _10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_10y_old_supply_half".to_string(), + ), + _12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_12y_old_supply_half".to_string(), + ), + _15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_15y_old_supply_half".to_string(), + ), } } } @@ -12439,26 +18126,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Over { impl SeriesTree_Cohorts_Cohorts_Supply_Half_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1d_old_supply_half".to_string()), - _1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1w_old_supply_half".to_string()), - _1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1m_old_supply_half".to_string()), - _2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_2m_old_supply_half".to_string()), - _3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_3m_old_supply_half".to_string()), - _4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_4m_old_supply_half".to_string()), - _5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_5m_old_supply_half".to_string()), - _6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_6m_old_supply_half".to_string()), - _9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_9m_old_supply_half".to_string()), - _1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1y_old_supply_half".to_string()), - _18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_18m_old_supply_half".to_string()), - _2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_2y_old_supply_half".to_string()), - _3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_3y_old_supply_half".to_string()), - _4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_4y_old_supply_half".to_string()), - _5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_5y_old_supply_half".to_string()), - _6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_6y_old_supply_half".to_string()), - _7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_7y_old_supply_half".to_string()), - _8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_8y_old_supply_half".to_string()), - _10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_10y_old_supply_half".to_string()), - _12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_12y_old_supply_half".to_string()), + _1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1d_old_supply_half".to_string(), + ), + _1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1w_old_supply_half".to_string(), + ), + _1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1m_old_supply_half".to_string(), + ), + _2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_2m_old_supply_half".to_string(), + ), + _3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_3m_old_supply_half".to_string(), + ), + _4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_4m_old_supply_half".to_string(), + ), + _5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_5m_old_supply_half".to_string(), + ), + _6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_6m_old_supply_half".to_string(), + ), + _9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_9m_old_supply_half".to_string(), + ), + _1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1y_old_supply_half".to_string(), + ), + _18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_18m_old_supply_half".to_string(), + ), + _2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_2y_old_supply_half".to_string(), + ), + _3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_3y_old_supply_half".to_string(), + ), + _4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_4y_old_supply_half".to_string(), + ), + _5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_5y_old_supply_half".to_string(), + ), + _6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_6y_old_supply_half".to_string(), + ), + _7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_7y_old_supply_half".to_string(), + ), + _8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_8y_old_supply_half".to_string(), + ), + _10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_10y_old_supply_half".to_string(), + ), + _12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_12y_old_supply_half".to_string(), + ), } } } @@ -12509,24 +18256,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Half_Class { impl SeriesTree_Cohorts_Cohorts_Supply_Half_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: BtcCentsSatsUsdPattern::new(client.clone(), "class_2009_supply_half".to_string()), - _2010: BtcCentsSatsUsdPattern::new(client.clone(), "class_2010_supply_half".to_string()), - _2011: BtcCentsSatsUsdPattern::new(client.clone(), "class_2011_supply_half".to_string()), - _2012: BtcCentsSatsUsdPattern::new(client.clone(), "class_2012_supply_half".to_string()), - _2013: BtcCentsSatsUsdPattern::new(client.clone(), "class_2013_supply_half".to_string()), - _2014: BtcCentsSatsUsdPattern::new(client.clone(), "class_2014_supply_half".to_string()), - _2015: BtcCentsSatsUsdPattern::new(client.clone(), "class_2015_supply_half".to_string()), - _2016: BtcCentsSatsUsdPattern::new(client.clone(), "class_2016_supply_half".to_string()), - _2017: BtcCentsSatsUsdPattern::new(client.clone(), "class_2017_supply_half".to_string()), - _2018: BtcCentsSatsUsdPattern::new(client.clone(), "class_2018_supply_half".to_string()), - _2019: BtcCentsSatsUsdPattern::new(client.clone(), "class_2019_supply_half".to_string()), - _2020: BtcCentsSatsUsdPattern::new(client.clone(), "class_2020_supply_half".to_string()), - _2021: BtcCentsSatsUsdPattern::new(client.clone(), "class_2021_supply_half".to_string()), - _2022: BtcCentsSatsUsdPattern::new(client.clone(), "class_2022_supply_half".to_string()), - _2023: BtcCentsSatsUsdPattern::new(client.clone(), "class_2023_supply_half".to_string()), - _2024: BtcCentsSatsUsdPattern::new(client.clone(), "class_2024_supply_half".to_string()), - _2025: BtcCentsSatsUsdPattern::new(client.clone(), "class_2025_supply_half".to_string()), - _2026: BtcCentsSatsUsdPattern::new(client.clone(), "class_2026_supply_half".to_string()), + _2009: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2009_supply_half".to_string(), + ), + _2010: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2010_supply_half".to_string(), + ), + _2011: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2011_supply_half".to_string(), + ), + _2012: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2012_supply_half".to_string(), + ), + _2013: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2013_supply_half".to_string(), + ), + _2014: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2014_supply_half".to_string(), + ), + _2015: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2015_supply_half".to_string(), + ), + _2016: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2016_supply_half".to_string(), + ), + _2017: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2017_supply_half".to_string(), + ), + _2018: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2018_supply_half".to_string(), + ), + _2019: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2019_supply_half".to_string(), + ), + _2020: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2020_supply_half".to_string(), + ), + _2021: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2021_supply_half".to_string(), + ), + _2022: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2022_supply_half".to_string(), + ), + _2023: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2023_supply_half".to_string(), + ), + _2024: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2024_supply_half".to_string(), + ), + _2025: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2025_supply_half".to_string(), + ), + _2026: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2026_supply_half".to_string(), + ), } } } @@ -12551,17 +18352,44 @@ impl SeriesTree_Cohorts_Cohorts_Supply_InProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BtcCentsSatsUsdPattern::new(client.clone(), "supply_in_profit".to_string()), - age: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern12::new(client.clone(), "supply_in_profit".to_string()), term: LongShortPattern13::new(client.clone(), "supply_in_profit".to_string()), - type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern10::new(client.clone(), "supply_in_profit".to_string()), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_supply_in_profit_sats_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "supply_in_profit_sats_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "supply_in_profit_sats_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "supply_in_profit_sats_by_entry".to_string()), - type_matrix: SeriesPattern18::new(client.clone(), "supply_in_profit_sats_by_type".to_string()), + type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern10::new( + client.clone(), + "supply_in_profit".to_string(), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_supply_in_profit_sats_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "supply_in_profit_sats_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "supply_in_profit_sats_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "supply_in_profit_sats_by_entry".to_string(), + ), + type_matrix: SeriesPattern18::new( + client.clone(), + "supply_in_profit_sats_by_type".to_string(), + ), } } } @@ -12576,9 +18404,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age { impl SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -12613,29 +18450,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Range { impl SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1h_old_supply_in_profit".to_string()), - _1h_to_1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_supply_in_profit".to_string()), - _1d_to_1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_supply_in_profit".to_string()), - _1w_to_1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_supply_in_profit".to_string()), - _1m_to_2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_supply_in_profit".to_string()), - _2m_to_3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_supply_in_profit".to_string()), - _3m_to_4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_supply_in_profit".to_string()), - _4m_to_5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_supply_in_profit".to_string()), - _5m_to_6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_supply_in_profit".to_string()), - _6m_to_9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_supply_in_profit".to_string()), - _9m_to_1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_supply_in_profit".to_string()), - _1y_to_18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_supply_in_profit".to_string()), - _18m_to_2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_supply_in_profit".to_string()), - _2y_to_3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_supply_in_profit".to_string()), - _3y_to_4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_supply_in_profit".to_string()), - _4y_to_5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_supply_in_profit".to_string()), - _5y_to_6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_supply_in_profit".to_string()), - _6y_to_7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_supply_in_profit".to_string()), - _7y_to_8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_supply_in_profit".to_string()), - _8y_to_10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_supply_in_profit".to_string()), - _10y_to_12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_supply_in_profit".to_string()), - _12y_to_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_supply_in_profit".to_string()), - over_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_15y_old_supply_in_profit".to_string()), + under_1h: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1h_old_supply_in_profit".to_string(), + ), + _1h_to_1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_supply_in_profit".to_string(), + ), + _1d_to_1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_supply_in_profit".to_string(), + ), + _1w_to_1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_supply_in_profit".to_string(), + ), + _1m_to_2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_supply_in_profit".to_string(), + ), + _2m_to_3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_supply_in_profit".to_string(), + ), + _3m_to_4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_supply_in_profit".to_string(), + ), + _4m_to_5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_supply_in_profit".to_string(), + ), + _5m_to_6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_supply_in_profit".to_string(), + ), + _6m_to_9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_supply_in_profit".to_string(), + ), + _9m_to_1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_supply_in_profit".to_string(), + ), + _1y_to_18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_supply_in_profit".to_string(), + ), + _18m_to_2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_supply_in_profit".to_string(), + ), + _2y_to_3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_supply_in_profit".to_string(), + ), + _3y_to_4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_supply_in_profit".to_string(), + ), + _4y_to_5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_supply_in_profit".to_string(), + ), + _5y_to_6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_supply_in_profit".to_string(), + ), + _6y_to_7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_supply_in_profit".to_string(), + ), + _7y_to_8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_supply_in_profit".to_string(), + ), + _8y_to_10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_supply_in_profit".to_string(), + ), + _10y_to_12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_supply_in_profit".to_string(), + ), + _12y_to_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_supply_in_profit".to_string(), + ), + over_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_15y_old_supply_in_profit".to_string(), + ), } } } @@ -12667,26 +18573,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Under { impl SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1w_old_supply_in_profit".to_string()), - _1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1m_old_supply_in_profit".to_string()), - _2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_2m_old_supply_in_profit".to_string()), - _3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_3m_old_supply_in_profit".to_string()), - _4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_4m_old_supply_in_profit".to_string()), - _5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_5m_old_supply_in_profit".to_string()), - _6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_6m_old_supply_in_profit".to_string()), - _9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_9m_old_supply_in_profit".to_string()), - _1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1y_old_supply_in_profit".to_string()), - _18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_18m_old_supply_in_profit".to_string()), - _2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_2y_old_supply_in_profit".to_string()), - _3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_3y_old_supply_in_profit".to_string()), - _4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_4y_old_supply_in_profit".to_string()), - _5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_5y_old_supply_in_profit".to_string()), - _6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_6y_old_supply_in_profit".to_string()), - _7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_7y_old_supply_in_profit".to_string()), - _8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_8y_old_supply_in_profit".to_string()), - _10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_10y_old_supply_in_profit".to_string()), - _12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_12y_old_supply_in_profit".to_string()), - _15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_15y_old_supply_in_profit".to_string()), + _1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1w_old_supply_in_profit".to_string(), + ), + _1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1m_old_supply_in_profit".to_string(), + ), + _2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_2m_old_supply_in_profit".to_string(), + ), + _3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_3m_old_supply_in_profit".to_string(), + ), + _4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_4m_old_supply_in_profit".to_string(), + ), + _5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_5m_old_supply_in_profit".to_string(), + ), + _6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_6m_old_supply_in_profit".to_string(), + ), + _9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_9m_old_supply_in_profit".to_string(), + ), + _1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1y_old_supply_in_profit".to_string(), + ), + _18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_18m_old_supply_in_profit".to_string(), + ), + _2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_2y_old_supply_in_profit".to_string(), + ), + _3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_3y_old_supply_in_profit".to_string(), + ), + _4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_4y_old_supply_in_profit".to_string(), + ), + _5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_5y_old_supply_in_profit".to_string(), + ), + _6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_6y_old_supply_in_profit".to_string(), + ), + _7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_7y_old_supply_in_profit".to_string(), + ), + _8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_8y_old_supply_in_profit".to_string(), + ), + _10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_10y_old_supply_in_profit".to_string(), + ), + _12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_12y_old_supply_in_profit".to_string(), + ), + _15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_15y_old_supply_in_profit".to_string(), + ), } } } @@ -12718,26 +18684,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Over { impl SeriesTree_Cohorts_Cohorts_Supply_InProfit_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1d_old_supply_in_profit".to_string()), - _1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1w_old_supply_in_profit".to_string()), - _1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1m_old_supply_in_profit".to_string()), - _2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_2m_old_supply_in_profit".to_string()), - _3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_3m_old_supply_in_profit".to_string()), - _4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_4m_old_supply_in_profit".to_string()), - _5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_5m_old_supply_in_profit".to_string()), - _6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_6m_old_supply_in_profit".to_string()), - _9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_9m_old_supply_in_profit".to_string()), - _1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1y_old_supply_in_profit".to_string()), - _18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_18m_old_supply_in_profit".to_string()), - _2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_2y_old_supply_in_profit".to_string()), - _3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_3y_old_supply_in_profit".to_string()), - _4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_4y_old_supply_in_profit".to_string()), - _5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_5y_old_supply_in_profit".to_string()), - _6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_6y_old_supply_in_profit".to_string()), - _7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_7y_old_supply_in_profit".to_string()), - _8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_8y_old_supply_in_profit".to_string()), - _10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_10y_old_supply_in_profit".to_string()), - _12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_12y_old_supply_in_profit".to_string()), + _1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1d_old_supply_in_profit".to_string(), + ), + _1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1w_old_supply_in_profit".to_string(), + ), + _1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1m_old_supply_in_profit".to_string(), + ), + _2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_2m_old_supply_in_profit".to_string(), + ), + _3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_3m_old_supply_in_profit".to_string(), + ), + _4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_4m_old_supply_in_profit".to_string(), + ), + _5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_5m_old_supply_in_profit".to_string(), + ), + _6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_6m_old_supply_in_profit".to_string(), + ), + _9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_9m_old_supply_in_profit".to_string(), + ), + _1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1y_old_supply_in_profit".to_string(), + ), + _18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_18m_old_supply_in_profit".to_string(), + ), + _2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_2y_old_supply_in_profit".to_string(), + ), + _3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_3y_old_supply_in_profit".to_string(), + ), + _4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_4y_old_supply_in_profit".to_string(), + ), + _5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_5y_old_supply_in_profit".to_string(), + ), + _6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_6y_old_supply_in_profit".to_string(), + ), + _7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_7y_old_supply_in_profit".to_string(), + ), + _8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_8y_old_supply_in_profit".to_string(), + ), + _10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_10y_old_supply_in_profit".to_string(), + ), + _12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_12y_old_supply_in_profit".to_string(), + ), } } } @@ -12788,24 +18814,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_InProfit_Class { impl SeriesTree_Cohorts_Cohorts_Supply_InProfit_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: BtcCentsSatsUsdPattern::new(client.clone(), "class_2009_supply_in_profit".to_string()), - _2010: BtcCentsSatsUsdPattern::new(client.clone(), "class_2010_supply_in_profit".to_string()), - _2011: BtcCentsSatsUsdPattern::new(client.clone(), "class_2011_supply_in_profit".to_string()), - _2012: BtcCentsSatsUsdPattern::new(client.clone(), "class_2012_supply_in_profit".to_string()), - _2013: BtcCentsSatsUsdPattern::new(client.clone(), "class_2013_supply_in_profit".to_string()), - _2014: BtcCentsSatsUsdPattern::new(client.clone(), "class_2014_supply_in_profit".to_string()), - _2015: BtcCentsSatsUsdPattern::new(client.clone(), "class_2015_supply_in_profit".to_string()), - _2016: BtcCentsSatsUsdPattern::new(client.clone(), "class_2016_supply_in_profit".to_string()), - _2017: BtcCentsSatsUsdPattern::new(client.clone(), "class_2017_supply_in_profit".to_string()), - _2018: BtcCentsSatsUsdPattern::new(client.clone(), "class_2018_supply_in_profit".to_string()), - _2019: BtcCentsSatsUsdPattern::new(client.clone(), "class_2019_supply_in_profit".to_string()), - _2020: BtcCentsSatsUsdPattern::new(client.clone(), "class_2020_supply_in_profit".to_string()), - _2021: BtcCentsSatsUsdPattern::new(client.clone(), "class_2021_supply_in_profit".to_string()), - _2022: BtcCentsSatsUsdPattern::new(client.clone(), "class_2022_supply_in_profit".to_string()), - _2023: BtcCentsSatsUsdPattern::new(client.clone(), "class_2023_supply_in_profit".to_string()), - _2024: BtcCentsSatsUsdPattern::new(client.clone(), "class_2024_supply_in_profit".to_string()), - _2025: BtcCentsSatsUsdPattern::new(client.clone(), "class_2025_supply_in_profit".to_string()), - _2026: BtcCentsSatsUsdPattern::new(client.clone(), "class_2026_supply_in_profit".to_string()), + _2009: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2009_supply_in_profit".to_string(), + ), + _2010: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2010_supply_in_profit".to_string(), + ), + _2011: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2011_supply_in_profit".to_string(), + ), + _2012: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2012_supply_in_profit".to_string(), + ), + _2013: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2013_supply_in_profit".to_string(), + ), + _2014: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2014_supply_in_profit".to_string(), + ), + _2015: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2015_supply_in_profit".to_string(), + ), + _2016: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2016_supply_in_profit".to_string(), + ), + _2017: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2017_supply_in_profit".to_string(), + ), + _2018: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2018_supply_in_profit".to_string(), + ), + _2019: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2019_supply_in_profit".to_string(), + ), + _2020: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2020_supply_in_profit".to_string(), + ), + _2021: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2021_supply_in_profit".to_string(), + ), + _2022: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2022_supply_in_profit".to_string(), + ), + _2023: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2023_supply_in_profit".to_string(), + ), + _2024: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2024_supply_in_profit".to_string(), + ), + _2025: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2025_supply_in_profit".to_string(), + ), + _2026: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2026_supply_in_profit".to_string(), + ), } } } @@ -12830,17 +18910,44 @@ impl SeriesTree_Cohorts_Cohorts_Supply_InLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BtcCentsSatsUsdPattern::new(client.clone(), "supply_in_loss".to_string()), - age: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern12::new(client.clone(), "supply_in_loss".to_string()), term: LongShortPattern13::new(client.clone(), "supply_in_loss".to_string()), - type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern10::new(client.clone(), "supply_in_loss".to_string()), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_supply_in_loss_sats_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "supply_in_loss_sats_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "supply_in_loss_sats_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "supply_in_loss_sats_by_entry".to_string()), - type_matrix: SeriesPattern18::new(client.clone(), "supply_in_loss_sats_by_type".to_string()), + type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern10::new( + client.clone(), + "supply_in_loss".to_string(), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_supply_in_loss_sats_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "supply_in_loss_sats_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "supply_in_loss_sats_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "supply_in_loss_sats_by_entry".to_string(), + ), + type_matrix: SeriesPattern18::new( + client.clone(), + "supply_in_loss_sats_by_type".to_string(), + ), } } } @@ -12855,9 +18962,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age { impl SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -12892,29 +19008,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Range { impl SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1h_old_supply_in_loss".to_string()), - _1h_to_1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_supply_in_loss".to_string()), - _1d_to_1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_supply_in_loss".to_string()), - _1w_to_1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_supply_in_loss".to_string()), - _1m_to_2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_supply_in_loss".to_string()), - _2m_to_3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_supply_in_loss".to_string()), - _3m_to_4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_supply_in_loss".to_string()), - _4m_to_5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_supply_in_loss".to_string()), - _5m_to_6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_supply_in_loss".to_string()), - _6m_to_9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_supply_in_loss".to_string()), - _9m_to_1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_supply_in_loss".to_string()), - _1y_to_18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_supply_in_loss".to_string()), - _18m_to_2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_supply_in_loss".to_string()), - _2y_to_3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_supply_in_loss".to_string()), - _3y_to_4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_supply_in_loss".to_string()), - _4y_to_5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_supply_in_loss".to_string()), - _5y_to_6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_supply_in_loss".to_string()), - _6y_to_7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_supply_in_loss".to_string()), - _7y_to_8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_supply_in_loss".to_string()), - _8y_to_10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_supply_in_loss".to_string()), - _10y_to_12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_supply_in_loss".to_string()), - _12y_to_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_supply_in_loss".to_string()), - over_15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_15y_old_supply_in_loss".to_string()), + under_1h: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1h_old_supply_in_loss".to_string(), + ), + _1h_to_1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_supply_in_loss".to_string(), + ), + _1d_to_1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_supply_in_loss".to_string(), + ), + _1w_to_1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_supply_in_loss".to_string(), + ), + _1m_to_2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_supply_in_loss".to_string(), + ), + _2m_to_3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_supply_in_loss".to_string(), + ), + _3m_to_4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_supply_in_loss".to_string(), + ), + _4m_to_5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_supply_in_loss".to_string(), + ), + _5m_to_6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_supply_in_loss".to_string(), + ), + _6m_to_9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_supply_in_loss".to_string(), + ), + _9m_to_1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_supply_in_loss".to_string(), + ), + _1y_to_18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_supply_in_loss".to_string(), + ), + _18m_to_2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_supply_in_loss".to_string(), + ), + _2y_to_3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_supply_in_loss".to_string(), + ), + _3y_to_4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_supply_in_loss".to_string(), + ), + _4y_to_5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_supply_in_loss".to_string(), + ), + _5y_to_6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_supply_in_loss".to_string(), + ), + _6y_to_7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_supply_in_loss".to_string(), + ), + _7y_to_8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_supply_in_loss".to_string(), + ), + _8y_to_10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_supply_in_loss".to_string(), + ), + _10y_to_12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_supply_in_loss".to_string(), + ), + _12y_to_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_supply_in_loss".to_string(), + ), + over_15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_15y_old_supply_in_loss".to_string(), + ), } } } @@ -12946,26 +19131,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Under { impl SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1w_old_supply_in_loss".to_string()), - _1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1m_old_supply_in_loss".to_string()), - _2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_2m_old_supply_in_loss".to_string()), - _3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_3m_old_supply_in_loss".to_string()), - _4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_4m_old_supply_in_loss".to_string()), - _5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_5m_old_supply_in_loss".to_string()), - _6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_6m_old_supply_in_loss".to_string()), - _9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_9m_old_supply_in_loss".to_string()), - _1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_1y_old_supply_in_loss".to_string()), - _18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_18m_old_supply_in_loss".to_string()), - _2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_2y_old_supply_in_loss".to_string()), - _3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_3y_old_supply_in_loss".to_string()), - _4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_4y_old_supply_in_loss".to_string()), - _5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_5y_old_supply_in_loss".to_string()), - _6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_6y_old_supply_in_loss".to_string()), - _7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_7y_old_supply_in_loss".to_string()), - _8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_8y_old_supply_in_loss".to_string()), - _10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_10y_old_supply_in_loss".to_string()), - _12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_12y_old_supply_in_loss".to_string()), - _15y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_under_15y_old_supply_in_loss".to_string()), + _1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1w_old_supply_in_loss".to_string(), + ), + _1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1m_old_supply_in_loss".to_string(), + ), + _2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_2m_old_supply_in_loss".to_string(), + ), + _3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_3m_old_supply_in_loss".to_string(), + ), + _4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_4m_old_supply_in_loss".to_string(), + ), + _5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_5m_old_supply_in_loss".to_string(), + ), + _6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_6m_old_supply_in_loss".to_string(), + ), + _9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_9m_old_supply_in_loss".to_string(), + ), + _1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_1y_old_supply_in_loss".to_string(), + ), + _18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_18m_old_supply_in_loss".to_string(), + ), + _2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_2y_old_supply_in_loss".to_string(), + ), + _3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_3y_old_supply_in_loss".to_string(), + ), + _4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_4y_old_supply_in_loss".to_string(), + ), + _5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_5y_old_supply_in_loss".to_string(), + ), + _6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_6y_old_supply_in_loss".to_string(), + ), + _7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_7y_old_supply_in_loss".to_string(), + ), + _8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_8y_old_supply_in_loss".to_string(), + ), + _10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_10y_old_supply_in_loss".to_string(), + ), + _12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_12y_old_supply_in_loss".to_string(), + ), + _15y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_under_15y_old_supply_in_loss".to_string(), + ), } } } @@ -12997,26 +19242,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Over { impl SeriesTree_Cohorts_Cohorts_Supply_InLoss_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1d_old_supply_in_loss".to_string()), - _1w: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1w_old_supply_in_loss".to_string()), - _1m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1m_old_supply_in_loss".to_string()), - _2m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_2m_old_supply_in_loss".to_string()), - _3m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_3m_old_supply_in_loss".to_string()), - _4m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_4m_old_supply_in_loss".to_string()), - _5m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_5m_old_supply_in_loss".to_string()), - _6m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_6m_old_supply_in_loss".to_string()), - _9m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_9m_old_supply_in_loss".to_string()), - _1y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_1y_old_supply_in_loss".to_string()), - _18m: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_18m_old_supply_in_loss".to_string()), - _2y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_2y_old_supply_in_loss".to_string()), - _3y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_3y_old_supply_in_loss".to_string()), - _4y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_4y_old_supply_in_loss".to_string()), - _5y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_5y_old_supply_in_loss".to_string()), - _6y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_6y_old_supply_in_loss".to_string()), - _7y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_7y_old_supply_in_loss".to_string()), - _8y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_8y_old_supply_in_loss".to_string()), - _10y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_10y_old_supply_in_loss".to_string()), - _12y: BtcCentsSatsUsdPattern::new(client.clone(), "utxos_over_12y_old_supply_in_loss".to_string()), + _1d: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1d_old_supply_in_loss".to_string(), + ), + _1w: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1w_old_supply_in_loss".to_string(), + ), + _1m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1m_old_supply_in_loss".to_string(), + ), + _2m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_2m_old_supply_in_loss".to_string(), + ), + _3m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_3m_old_supply_in_loss".to_string(), + ), + _4m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_4m_old_supply_in_loss".to_string(), + ), + _5m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_5m_old_supply_in_loss".to_string(), + ), + _6m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_6m_old_supply_in_loss".to_string(), + ), + _9m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_9m_old_supply_in_loss".to_string(), + ), + _1y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_1y_old_supply_in_loss".to_string(), + ), + _18m: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_18m_old_supply_in_loss".to_string(), + ), + _2y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_2y_old_supply_in_loss".to_string(), + ), + _3y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_3y_old_supply_in_loss".to_string(), + ), + _4y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_4y_old_supply_in_loss".to_string(), + ), + _5y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_5y_old_supply_in_loss".to_string(), + ), + _6y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_6y_old_supply_in_loss".to_string(), + ), + _7y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_7y_old_supply_in_loss".to_string(), + ), + _8y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_8y_old_supply_in_loss".to_string(), + ), + _10y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_10y_old_supply_in_loss".to_string(), + ), + _12y: BtcCentsSatsUsdPattern::new( + client.clone(), + "utxos_over_12y_old_supply_in_loss".to_string(), + ), } } } @@ -13067,24 +19372,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_InLoss_Class { impl SeriesTree_Cohorts_Cohorts_Supply_InLoss_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: BtcCentsSatsUsdPattern::new(client.clone(), "class_2009_supply_in_loss".to_string()), - _2010: BtcCentsSatsUsdPattern::new(client.clone(), "class_2010_supply_in_loss".to_string()), - _2011: BtcCentsSatsUsdPattern::new(client.clone(), "class_2011_supply_in_loss".to_string()), - _2012: BtcCentsSatsUsdPattern::new(client.clone(), "class_2012_supply_in_loss".to_string()), - _2013: BtcCentsSatsUsdPattern::new(client.clone(), "class_2013_supply_in_loss".to_string()), - _2014: BtcCentsSatsUsdPattern::new(client.clone(), "class_2014_supply_in_loss".to_string()), - _2015: BtcCentsSatsUsdPattern::new(client.clone(), "class_2015_supply_in_loss".to_string()), - _2016: BtcCentsSatsUsdPattern::new(client.clone(), "class_2016_supply_in_loss".to_string()), - _2017: BtcCentsSatsUsdPattern::new(client.clone(), "class_2017_supply_in_loss".to_string()), - _2018: BtcCentsSatsUsdPattern::new(client.clone(), "class_2018_supply_in_loss".to_string()), - _2019: BtcCentsSatsUsdPattern::new(client.clone(), "class_2019_supply_in_loss".to_string()), - _2020: BtcCentsSatsUsdPattern::new(client.clone(), "class_2020_supply_in_loss".to_string()), - _2021: BtcCentsSatsUsdPattern::new(client.clone(), "class_2021_supply_in_loss".to_string()), - _2022: BtcCentsSatsUsdPattern::new(client.clone(), "class_2022_supply_in_loss".to_string()), - _2023: BtcCentsSatsUsdPattern::new(client.clone(), "class_2023_supply_in_loss".to_string()), - _2024: BtcCentsSatsUsdPattern::new(client.clone(), "class_2024_supply_in_loss".to_string()), - _2025: BtcCentsSatsUsdPattern::new(client.clone(), "class_2025_supply_in_loss".to_string()), - _2026: BtcCentsSatsUsdPattern::new(client.clone(), "class_2026_supply_in_loss".to_string()), + _2009: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2009_supply_in_loss".to_string(), + ), + _2010: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2010_supply_in_loss".to_string(), + ), + _2011: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2011_supply_in_loss".to_string(), + ), + _2012: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2012_supply_in_loss".to_string(), + ), + _2013: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2013_supply_in_loss".to_string(), + ), + _2014: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2014_supply_in_loss".to_string(), + ), + _2015: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2015_supply_in_loss".to_string(), + ), + _2016: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2016_supply_in_loss".to_string(), + ), + _2017: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2017_supply_in_loss".to_string(), + ), + _2018: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2018_supply_in_loss".to_string(), + ), + _2019: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2019_supply_in_loss".to_string(), + ), + _2020: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2020_supply_in_loss".to_string(), + ), + _2021: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2021_supply_in_loss".to_string(), + ), + _2022: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2022_supply_in_loss".to_string(), + ), + _2023: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2023_supply_in_loss".to_string(), + ), + _2024: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2024_supply_in_loss".to_string(), + ), + _2025: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2025_supply_in_loss".to_string(), + ), + _2026: BtcCentsSatsUsdPattern::new( + client.clone(), + "class_2026_supply_in_loss".to_string(), + ), } } } @@ -13106,13 +19465,31 @@ impl SeriesTree_Cohorts_Cohorts_Supply_Delta { pub fn new(client: Arc, base_path: String) -> Self { Self { all: AbsoluteRatePattern2::new(client.clone(), "supply_delta".to_string()), - age: SeriesTree_Cohorts_Cohorts_Supply_Delta_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Supply_Delta_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Supply_Delta_Class::new(client.clone(), format!("{base_path}_class")), - entry: SeriesTree_Cohorts_Cohorts_Supply_Delta_Entry::new(client.clone(), format!("{base_path}_entry")), + age: SeriesTree_Cohorts_Cohorts_Supply_Delta_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Supply_Delta_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Supply_Delta_Class::new( + client.clone(), + format!("{base_path}_class"), + ), + entry: SeriesTree_Cohorts_Cohorts_Supply_Delta_Entry::new( + client.clone(), + format!("{base_path}_entry"), + ), utxo_amount: OverRangeUnderPattern17::new(client.clone(), "utxos".to_string()), - term: SeriesTree_Cohorts_Cohorts_Supply_Delta_Term::new(client.clone(), format!("{base_path}_term")), - type_: SeriesTree_Cohorts_Cohorts_Supply_Delta_Type::new(client.clone(), format!("{base_path}_type")), + term: SeriesTree_Cohorts_Cohorts_Supply_Delta_Term::new( + client.clone(), + format!("{base_path}_term"), + ), + type_: SeriesTree_Cohorts_Cohorts_Supply_Delta_Type::new( + client.clone(), + format!("{base_path}_type"), + ), addr_balance: OverRangeUnderPattern17::new(client.clone(), "addrs".to_string()), } } @@ -13128,9 +19505,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Delta_Age { impl SeriesTree_Cohorts_Cohorts_Supply_Delta_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -13165,29 +19551,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Range { impl SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: AbsoluteRatePattern2::new(client.clone(), "utxos_under_1h_old_supply_delta".to_string()), - _1h_to_1d: AbsoluteRatePattern2::new(client.clone(), "utxos_1h_to_1d_old_supply_delta".to_string()), - _1d_to_1w: AbsoluteRatePattern2::new(client.clone(), "utxos_1d_to_1w_old_supply_delta".to_string()), - _1w_to_1m: AbsoluteRatePattern2::new(client.clone(), "utxos_1w_to_1m_old_supply_delta".to_string()), - _1m_to_2m: AbsoluteRatePattern2::new(client.clone(), "utxos_1m_to_2m_old_supply_delta".to_string()), - _2m_to_3m: AbsoluteRatePattern2::new(client.clone(), "utxos_2m_to_3m_old_supply_delta".to_string()), - _3m_to_4m: AbsoluteRatePattern2::new(client.clone(), "utxos_3m_to_4m_old_supply_delta".to_string()), - _4m_to_5m: AbsoluteRatePattern2::new(client.clone(), "utxos_4m_to_5m_old_supply_delta".to_string()), - _5m_to_6m: AbsoluteRatePattern2::new(client.clone(), "utxos_5m_to_6m_old_supply_delta".to_string()), - _6m_to_9m: AbsoluteRatePattern2::new(client.clone(), "utxos_6m_to_9m_old_supply_delta".to_string()), - _9m_to_1y: AbsoluteRatePattern2::new(client.clone(), "utxos_9m_to_1y_old_supply_delta".to_string()), - _1y_to_18m: AbsoluteRatePattern2::new(client.clone(), "utxos_1y_to_18m_old_supply_delta".to_string()), - _18m_to_2y: AbsoluteRatePattern2::new(client.clone(), "utxos_18m_to_2y_old_supply_delta".to_string()), - _2y_to_3y: AbsoluteRatePattern2::new(client.clone(), "utxos_2y_to_3y_old_supply_delta".to_string()), - _3y_to_4y: AbsoluteRatePattern2::new(client.clone(), "utxos_3y_to_4y_old_supply_delta".to_string()), - _4y_to_5y: AbsoluteRatePattern2::new(client.clone(), "utxos_4y_to_5y_old_supply_delta".to_string()), - _5y_to_6y: AbsoluteRatePattern2::new(client.clone(), "utxos_5y_to_6y_old_supply_delta".to_string()), - _6y_to_7y: AbsoluteRatePattern2::new(client.clone(), "utxos_6y_to_7y_old_supply_delta".to_string()), - _7y_to_8y: AbsoluteRatePattern2::new(client.clone(), "utxos_7y_to_8y_old_supply_delta".to_string()), - _8y_to_10y: AbsoluteRatePattern2::new(client.clone(), "utxos_8y_to_10y_old_supply_delta".to_string()), - _10y_to_12y: AbsoluteRatePattern2::new(client.clone(), "utxos_10y_to_12y_old_supply_delta".to_string()), - _12y_to_15y: AbsoluteRatePattern2::new(client.clone(), "utxos_12y_to_15y_old_supply_delta".to_string()), - over_15y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_15y_old_supply_delta".to_string()), + under_1h: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_1h_old_supply_delta".to_string(), + ), + _1h_to_1d: AbsoluteRatePattern2::new( + client.clone(), + "utxos_1h_to_1d_old_supply_delta".to_string(), + ), + _1d_to_1w: AbsoluteRatePattern2::new( + client.clone(), + "utxos_1d_to_1w_old_supply_delta".to_string(), + ), + _1w_to_1m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_1w_to_1m_old_supply_delta".to_string(), + ), + _1m_to_2m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_1m_to_2m_old_supply_delta".to_string(), + ), + _2m_to_3m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_2m_to_3m_old_supply_delta".to_string(), + ), + _3m_to_4m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_3m_to_4m_old_supply_delta".to_string(), + ), + _4m_to_5m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_4m_to_5m_old_supply_delta".to_string(), + ), + _5m_to_6m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_5m_to_6m_old_supply_delta".to_string(), + ), + _6m_to_9m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_6m_to_9m_old_supply_delta".to_string(), + ), + _9m_to_1y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_9m_to_1y_old_supply_delta".to_string(), + ), + _1y_to_18m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_1y_to_18m_old_supply_delta".to_string(), + ), + _18m_to_2y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_18m_to_2y_old_supply_delta".to_string(), + ), + _2y_to_3y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_2y_to_3y_old_supply_delta".to_string(), + ), + _3y_to_4y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_3y_to_4y_old_supply_delta".to_string(), + ), + _4y_to_5y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_4y_to_5y_old_supply_delta".to_string(), + ), + _5y_to_6y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_5y_to_6y_old_supply_delta".to_string(), + ), + _6y_to_7y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_6y_to_7y_old_supply_delta".to_string(), + ), + _7y_to_8y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_7y_to_8y_old_supply_delta".to_string(), + ), + _8y_to_10y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_8y_to_10y_old_supply_delta".to_string(), + ), + _10y_to_12y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_10y_to_12y_old_supply_delta".to_string(), + ), + _12y_to_15y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_12y_to_15y_old_supply_delta".to_string(), + ), + over_15y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_15y_old_supply_delta".to_string(), + ), } } } @@ -13219,26 +19674,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Under { impl SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: AbsoluteRatePattern2::new(client.clone(), "utxos_under_1w_old_supply_delta".to_string()), - _1m: AbsoluteRatePattern2::new(client.clone(), "utxos_under_1m_old_supply_delta".to_string()), - _2m: AbsoluteRatePattern2::new(client.clone(), "utxos_under_2m_old_supply_delta".to_string()), - _3m: AbsoluteRatePattern2::new(client.clone(), "utxos_under_3m_old_supply_delta".to_string()), - _4m: AbsoluteRatePattern2::new(client.clone(), "utxos_under_4m_old_supply_delta".to_string()), - _5m: AbsoluteRatePattern2::new(client.clone(), "utxos_under_5m_old_supply_delta".to_string()), - _6m: AbsoluteRatePattern2::new(client.clone(), "utxos_under_6m_old_supply_delta".to_string()), - _9m: AbsoluteRatePattern2::new(client.clone(), "utxos_under_9m_old_supply_delta".to_string()), - _1y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_1y_old_supply_delta".to_string()), - _18m: AbsoluteRatePattern2::new(client.clone(), "utxos_under_18m_old_supply_delta".to_string()), - _2y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_2y_old_supply_delta".to_string()), - _3y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_3y_old_supply_delta".to_string()), - _4y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_4y_old_supply_delta".to_string()), - _5y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_5y_old_supply_delta".to_string()), - _6y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_6y_old_supply_delta".to_string()), - _7y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_7y_old_supply_delta".to_string()), - _8y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_8y_old_supply_delta".to_string()), - _10y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_10y_old_supply_delta".to_string()), - _12y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_12y_old_supply_delta".to_string()), - _15y: AbsoluteRatePattern2::new(client.clone(), "utxos_under_15y_old_supply_delta".to_string()), + _1w: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_1w_old_supply_delta".to_string(), + ), + _1m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_1m_old_supply_delta".to_string(), + ), + _2m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_2m_old_supply_delta".to_string(), + ), + _3m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_3m_old_supply_delta".to_string(), + ), + _4m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_4m_old_supply_delta".to_string(), + ), + _5m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_5m_old_supply_delta".to_string(), + ), + _6m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_6m_old_supply_delta".to_string(), + ), + _9m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_9m_old_supply_delta".to_string(), + ), + _1y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_1y_old_supply_delta".to_string(), + ), + _18m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_18m_old_supply_delta".to_string(), + ), + _2y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_2y_old_supply_delta".to_string(), + ), + _3y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_3y_old_supply_delta".to_string(), + ), + _4y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_4y_old_supply_delta".to_string(), + ), + _5y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_5y_old_supply_delta".to_string(), + ), + _6y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_6y_old_supply_delta".to_string(), + ), + _7y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_7y_old_supply_delta".to_string(), + ), + _8y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_8y_old_supply_delta".to_string(), + ), + _10y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_10y_old_supply_delta".to_string(), + ), + _12y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_12y_old_supply_delta".to_string(), + ), + _15y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_under_15y_old_supply_delta".to_string(), + ), } } } @@ -13270,26 +19785,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Over { impl SeriesTree_Cohorts_Cohorts_Supply_Delta_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: AbsoluteRatePattern2::new(client.clone(), "utxos_over_1d_old_supply_delta".to_string()), - _1w: AbsoluteRatePattern2::new(client.clone(), "utxos_over_1w_old_supply_delta".to_string()), - _1m: AbsoluteRatePattern2::new(client.clone(), "utxos_over_1m_old_supply_delta".to_string()), - _2m: AbsoluteRatePattern2::new(client.clone(), "utxos_over_2m_old_supply_delta".to_string()), - _3m: AbsoluteRatePattern2::new(client.clone(), "utxos_over_3m_old_supply_delta".to_string()), - _4m: AbsoluteRatePattern2::new(client.clone(), "utxos_over_4m_old_supply_delta".to_string()), - _5m: AbsoluteRatePattern2::new(client.clone(), "utxos_over_5m_old_supply_delta".to_string()), - _6m: AbsoluteRatePattern2::new(client.clone(), "utxos_over_6m_old_supply_delta".to_string()), - _9m: AbsoluteRatePattern2::new(client.clone(), "utxos_over_9m_old_supply_delta".to_string()), - _1y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_1y_old_supply_delta".to_string()), - _18m: AbsoluteRatePattern2::new(client.clone(), "utxos_over_18m_old_supply_delta".to_string()), - _2y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_2y_old_supply_delta".to_string()), - _3y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_3y_old_supply_delta".to_string()), - _4y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_4y_old_supply_delta".to_string()), - _5y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_5y_old_supply_delta".to_string()), - _6y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_6y_old_supply_delta".to_string()), - _7y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_7y_old_supply_delta".to_string()), - _8y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_8y_old_supply_delta".to_string()), - _10y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_10y_old_supply_delta".to_string()), - _12y: AbsoluteRatePattern2::new(client.clone(), "utxos_over_12y_old_supply_delta".to_string()), + _1d: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_1d_old_supply_delta".to_string(), + ), + _1w: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_1w_old_supply_delta".to_string(), + ), + _1m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_1m_old_supply_delta".to_string(), + ), + _2m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_2m_old_supply_delta".to_string(), + ), + _3m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_3m_old_supply_delta".to_string(), + ), + _4m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_4m_old_supply_delta".to_string(), + ), + _5m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_5m_old_supply_delta".to_string(), + ), + _6m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_6m_old_supply_delta".to_string(), + ), + _9m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_9m_old_supply_delta".to_string(), + ), + _1y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_1y_old_supply_delta".to_string(), + ), + _18m: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_18m_old_supply_delta".to_string(), + ), + _2y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_2y_old_supply_delta".to_string(), + ), + _3y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_3y_old_supply_delta".to_string(), + ), + _4y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_4y_old_supply_delta".to_string(), + ), + _5y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_5y_old_supply_delta".to_string(), + ), + _6y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_6y_old_supply_delta".to_string(), + ), + _7y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_7y_old_supply_delta".to_string(), + ), + _8y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_8y_old_supply_delta".to_string(), + ), + _10y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_10y_old_supply_delta".to_string(), + ), + _12y: AbsoluteRatePattern2::new( + client.clone(), + "utxos_over_12y_old_supply_delta".to_string(), + ), } } } @@ -13419,8 +19994,14 @@ impl SeriesTree_Cohorts_Cohorts_Supply_Delta_Type { p2wsh: AbsoluteRatePattern2::new(client.clone(), "p2wsh_supply_delta".to_string()), p2tr: AbsoluteRatePattern2::new(client.clone(), "p2tr_supply_delta".to_string()), p2a: AbsoluteRatePattern2::new(client.clone(), "p2a_supply_delta".to_string()), - unknown: AbsoluteRatePattern2::new(client.clone(), "unknown_outputs_supply_delta".to_string()), - empty: AbsoluteRatePattern2::new(client.clone(), "empty_outputs_supply_delta".to_string()), + unknown: AbsoluteRatePattern2::new( + client.clone(), + "unknown_outputs_supply_delta".to_string(), + ), + empty: AbsoluteRatePattern2::new( + client.clone(), + "empty_outputs_supply_delta".to_string(), + ), } } } @@ -13442,13 +20023,31 @@ impl SeriesTree_Cohorts_Cohorts_Supply_Dominance { pub fn new(client: Arc, base_path: String) -> Self { Self { all: PercentPpmRatioPattern2::new(client.clone(), "supply_dominance".to_string()), - age: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Class::new(client.clone(), format!("{base_path}_class")), - entry: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Entry::new(client.clone(), format!("{base_path}_entry")), + age: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Class::new( + client.clone(), + format!("{base_path}_class"), + ), + entry: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Entry::new( + client.clone(), + format!("{base_path}_entry"), + ), utxo_amount: OverRangeUnderPattern19::new(client.clone(), "utxos".to_string()), - term: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Term::new(client.clone(), format!("{base_path}_term")), - type_: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Type::new(client.clone(), format!("{base_path}_type")), + term: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Term::new( + client.clone(), + format!("{base_path}_term"), + ), + type_: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Type::new( + client.clone(), + format!("{base_path}_type"), + ), addr_balance: OverRangeUnderPattern19::new(client.clone(), "addrs".to_string()), } } @@ -13464,9 +20063,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age { impl SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -13501,29 +20109,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Range { impl SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_1h_old_supply_dominance".to_string()), - _1h_to_1d: PercentPpmRatioPattern2::new(client.clone(), "utxos_1h_to_1d_old_supply_dominance".to_string()), - _1d_to_1w: PercentPpmRatioPattern2::new(client.clone(), "utxos_1d_to_1w_old_supply_dominance".to_string()), - _1w_to_1m: PercentPpmRatioPattern2::new(client.clone(), "utxos_1w_to_1m_old_supply_dominance".to_string()), - _1m_to_2m: PercentPpmRatioPattern2::new(client.clone(), "utxos_1m_to_2m_old_supply_dominance".to_string()), - _2m_to_3m: PercentPpmRatioPattern2::new(client.clone(), "utxos_2m_to_3m_old_supply_dominance".to_string()), - _3m_to_4m: PercentPpmRatioPattern2::new(client.clone(), "utxos_3m_to_4m_old_supply_dominance".to_string()), - _4m_to_5m: PercentPpmRatioPattern2::new(client.clone(), "utxos_4m_to_5m_old_supply_dominance".to_string()), - _5m_to_6m: PercentPpmRatioPattern2::new(client.clone(), "utxos_5m_to_6m_old_supply_dominance".to_string()), - _6m_to_9m: PercentPpmRatioPattern2::new(client.clone(), "utxos_6m_to_9m_old_supply_dominance".to_string()), - _9m_to_1y: PercentPpmRatioPattern2::new(client.clone(), "utxos_9m_to_1y_old_supply_dominance".to_string()), - _1y_to_18m: PercentPpmRatioPattern2::new(client.clone(), "utxos_1y_to_18m_old_supply_dominance".to_string()), - _18m_to_2y: PercentPpmRatioPattern2::new(client.clone(), "utxos_18m_to_2y_old_supply_dominance".to_string()), - _2y_to_3y: PercentPpmRatioPattern2::new(client.clone(), "utxos_2y_to_3y_old_supply_dominance".to_string()), - _3y_to_4y: PercentPpmRatioPattern2::new(client.clone(), "utxos_3y_to_4y_old_supply_dominance".to_string()), - _4y_to_5y: PercentPpmRatioPattern2::new(client.clone(), "utxos_4y_to_5y_old_supply_dominance".to_string()), - _5y_to_6y: PercentPpmRatioPattern2::new(client.clone(), "utxos_5y_to_6y_old_supply_dominance".to_string()), - _6y_to_7y: PercentPpmRatioPattern2::new(client.clone(), "utxos_6y_to_7y_old_supply_dominance".to_string()), - _7y_to_8y: PercentPpmRatioPattern2::new(client.clone(), "utxos_7y_to_8y_old_supply_dominance".to_string()), - _8y_to_10y: PercentPpmRatioPattern2::new(client.clone(), "utxos_8y_to_10y_old_supply_dominance".to_string()), - _10y_to_12y: PercentPpmRatioPattern2::new(client.clone(), "utxos_10y_to_12y_old_supply_dominance".to_string()), - _12y_to_15y: PercentPpmRatioPattern2::new(client.clone(), "utxos_12y_to_15y_old_supply_dominance".to_string()), - over_15y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_15y_old_supply_dominance".to_string()), + under_1h: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_1h_old_supply_dominance".to_string(), + ), + _1h_to_1d: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_1h_to_1d_old_supply_dominance".to_string(), + ), + _1d_to_1w: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_1d_to_1w_old_supply_dominance".to_string(), + ), + _1w_to_1m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_1w_to_1m_old_supply_dominance".to_string(), + ), + _1m_to_2m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_1m_to_2m_old_supply_dominance".to_string(), + ), + _2m_to_3m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_2m_to_3m_old_supply_dominance".to_string(), + ), + _3m_to_4m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_3m_to_4m_old_supply_dominance".to_string(), + ), + _4m_to_5m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_4m_to_5m_old_supply_dominance".to_string(), + ), + _5m_to_6m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_5m_to_6m_old_supply_dominance".to_string(), + ), + _6m_to_9m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_6m_to_9m_old_supply_dominance".to_string(), + ), + _9m_to_1y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_9m_to_1y_old_supply_dominance".to_string(), + ), + _1y_to_18m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_1y_to_18m_old_supply_dominance".to_string(), + ), + _18m_to_2y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_18m_to_2y_old_supply_dominance".to_string(), + ), + _2y_to_3y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_2y_to_3y_old_supply_dominance".to_string(), + ), + _3y_to_4y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_3y_to_4y_old_supply_dominance".to_string(), + ), + _4y_to_5y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_4y_to_5y_old_supply_dominance".to_string(), + ), + _5y_to_6y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_5y_to_6y_old_supply_dominance".to_string(), + ), + _6y_to_7y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_6y_to_7y_old_supply_dominance".to_string(), + ), + _7y_to_8y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_7y_to_8y_old_supply_dominance".to_string(), + ), + _8y_to_10y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_8y_to_10y_old_supply_dominance".to_string(), + ), + _10y_to_12y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_10y_to_12y_old_supply_dominance".to_string(), + ), + _12y_to_15y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_12y_to_15y_old_supply_dominance".to_string(), + ), + over_15y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_15y_old_supply_dominance".to_string(), + ), } } } @@ -13555,26 +20232,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Under { impl SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_1w_old_supply_dominance".to_string()), - _1m: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_1m_old_supply_dominance".to_string()), - _2m: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_2m_old_supply_dominance".to_string()), - _3m: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_3m_old_supply_dominance".to_string()), - _4m: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_4m_old_supply_dominance".to_string()), - _5m: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_5m_old_supply_dominance".to_string()), - _6m: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_6m_old_supply_dominance".to_string()), - _9m: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_9m_old_supply_dominance".to_string()), - _1y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_1y_old_supply_dominance".to_string()), - _18m: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_18m_old_supply_dominance".to_string()), - _2y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_2y_old_supply_dominance".to_string()), - _3y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_3y_old_supply_dominance".to_string()), - _4y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_4y_old_supply_dominance".to_string()), - _5y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_5y_old_supply_dominance".to_string()), - _6y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_6y_old_supply_dominance".to_string()), - _7y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_7y_old_supply_dominance".to_string()), - _8y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_8y_old_supply_dominance".to_string()), - _10y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_10y_old_supply_dominance".to_string()), - _12y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_12y_old_supply_dominance".to_string()), - _15y: PercentPpmRatioPattern2::new(client.clone(), "utxos_under_15y_old_supply_dominance".to_string()), + _1w: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_1w_old_supply_dominance".to_string(), + ), + _1m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_1m_old_supply_dominance".to_string(), + ), + _2m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_2m_old_supply_dominance".to_string(), + ), + _3m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_3m_old_supply_dominance".to_string(), + ), + _4m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_4m_old_supply_dominance".to_string(), + ), + _5m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_5m_old_supply_dominance".to_string(), + ), + _6m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_6m_old_supply_dominance".to_string(), + ), + _9m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_9m_old_supply_dominance".to_string(), + ), + _1y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_1y_old_supply_dominance".to_string(), + ), + _18m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_18m_old_supply_dominance".to_string(), + ), + _2y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_2y_old_supply_dominance".to_string(), + ), + _3y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_3y_old_supply_dominance".to_string(), + ), + _4y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_4y_old_supply_dominance".to_string(), + ), + _5y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_5y_old_supply_dominance".to_string(), + ), + _6y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_6y_old_supply_dominance".to_string(), + ), + _7y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_7y_old_supply_dominance".to_string(), + ), + _8y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_8y_old_supply_dominance".to_string(), + ), + _10y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_10y_old_supply_dominance".to_string(), + ), + _12y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_12y_old_supply_dominance".to_string(), + ), + _15y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_under_15y_old_supply_dominance".to_string(), + ), } } } @@ -13606,26 +20343,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Over { impl SeriesTree_Cohorts_Cohorts_Supply_Dominance_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_1d_old_supply_dominance".to_string()), - _1w: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_1w_old_supply_dominance".to_string()), - _1m: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_1m_old_supply_dominance".to_string()), - _2m: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_2m_old_supply_dominance".to_string()), - _3m: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_3m_old_supply_dominance".to_string()), - _4m: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_4m_old_supply_dominance".to_string()), - _5m: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_5m_old_supply_dominance".to_string()), - _6m: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_6m_old_supply_dominance".to_string()), - _9m: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_9m_old_supply_dominance".to_string()), - _1y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_1y_old_supply_dominance".to_string()), - _18m: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_18m_old_supply_dominance".to_string()), - _2y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_2y_old_supply_dominance".to_string()), - _3y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_3y_old_supply_dominance".to_string()), - _4y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_4y_old_supply_dominance".to_string()), - _5y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_5y_old_supply_dominance".to_string()), - _6y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_6y_old_supply_dominance".to_string()), - _7y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_7y_old_supply_dominance".to_string()), - _8y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_8y_old_supply_dominance".to_string()), - _10y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_10y_old_supply_dominance".to_string()), - _12y: PercentPpmRatioPattern2::new(client.clone(), "utxos_over_12y_old_supply_dominance".to_string()), + _1d: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_1d_old_supply_dominance".to_string(), + ), + _1w: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_1w_old_supply_dominance".to_string(), + ), + _1m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_1m_old_supply_dominance".to_string(), + ), + _2m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_2m_old_supply_dominance".to_string(), + ), + _3m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_3m_old_supply_dominance".to_string(), + ), + _4m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_4m_old_supply_dominance".to_string(), + ), + _5m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_5m_old_supply_dominance".to_string(), + ), + _6m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_6m_old_supply_dominance".to_string(), + ), + _9m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_9m_old_supply_dominance".to_string(), + ), + _1y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_1y_old_supply_dominance".to_string(), + ), + _18m: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_18m_old_supply_dominance".to_string(), + ), + _2y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_2y_old_supply_dominance".to_string(), + ), + _3y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_3y_old_supply_dominance".to_string(), + ), + _4y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_4y_old_supply_dominance".to_string(), + ), + _5y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_5y_old_supply_dominance".to_string(), + ), + _6y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_6y_old_supply_dominance".to_string(), + ), + _7y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_7y_old_supply_dominance".to_string(), + ), + _8y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_8y_old_supply_dominance".to_string(), + ), + _10y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_10y_old_supply_dominance".to_string(), + ), + _12y: PercentPpmRatioPattern2::new( + client.clone(), + "utxos_over_12y_old_supply_dominance".to_string(), + ), } } } @@ -13642,11 +20439,26 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Dominance_Epoch { impl SeriesTree_Cohorts_Cohorts_Supply_Dominance_Epoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0: PercentPpmRatioPattern2::new(client.clone(), "epoch_0_supply_dominance".to_string()), - _1: PercentPpmRatioPattern2::new(client.clone(), "epoch_1_supply_dominance".to_string()), - _2: PercentPpmRatioPattern2::new(client.clone(), "epoch_2_supply_dominance".to_string()), - _3: PercentPpmRatioPattern2::new(client.clone(), "epoch_3_supply_dominance".to_string()), - _4: PercentPpmRatioPattern2::new(client.clone(), "epoch_4_supply_dominance".to_string()), + _0: PercentPpmRatioPattern2::new( + client.clone(), + "epoch_0_supply_dominance".to_string(), + ), + _1: PercentPpmRatioPattern2::new( + client.clone(), + "epoch_1_supply_dominance".to_string(), + ), + _2: PercentPpmRatioPattern2::new( + client.clone(), + "epoch_2_supply_dominance".to_string(), + ), + _3: PercentPpmRatioPattern2::new( + client.clone(), + "epoch_3_supply_dominance".to_string(), + ), + _4: PercentPpmRatioPattern2::new( + client.clone(), + "epoch_4_supply_dominance".to_string(), + ), } } } @@ -13676,24 +20488,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Dominance_Class { impl SeriesTree_Cohorts_Cohorts_Supply_Dominance_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: PercentPpmRatioPattern2::new(client.clone(), "class_2009_supply_dominance".to_string()), - _2010: PercentPpmRatioPattern2::new(client.clone(), "class_2010_supply_dominance".to_string()), - _2011: PercentPpmRatioPattern2::new(client.clone(), "class_2011_supply_dominance".to_string()), - _2012: PercentPpmRatioPattern2::new(client.clone(), "class_2012_supply_dominance".to_string()), - _2013: PercentPpmRatioPattern2::new(client.clone(), "class_2013_supply_dominance".to_string()), - _2014: PercentPpmRatioPattern2::new(client.clone(), "class_2014_supply_dominance".to_string()), - _2015: PercentPpmRatioPattern2::new(client.clone(), "class_2015_supply_dominance".to_string()), - _2016: PercentPpmRatioPattern2::new(client.clone(), "class_2016_supply_dominance".to_string()), - _2017: PercentPpmRatioPattern2::new(client.clone(), "class_2017_supply_dominance".to_string()), - _2018: PercentPpmRatioPattern2::new(client.clone(), "class_2018_supply_dominance".to_string()), - _2019: PercentPpmRatioPattern2::new(client.clone(), "class_2019_supply_dominance".to_string()), - _2020: PercentPpmRatioPattern2::new(client.clone(), "class_2020_supply_dominance".to_string()), - _2021: PercentPpmRatioPattern2::new(client.clone(), "class_2021_supply_dominance".to_string()), - _2022: PercentPpmRatioPattern2::new(client.clone(), "class_2022_supply_dominance".to_string()), - _2023: PercentPpmRatioPattern2::new(client.clone(), "class_2023_supply_dominance".to_string()), - _2024: PercentPpmRatioPattern2::new(client.clone(), "class_2024_supply_dominance".to_string()), - _2025: PercentPpmRatioPattern2::new(client.clone(), "class_2025_supply_dominance".to_string()), - _2026: PercentPpmRatioPattern2::new(client.clone(), "class_2026_supply_dominance".to_string()), + _2009: PercentPpmRatioPattern2::new( + client.clone(), + "class_2009_supply_dominance".to_string(), + ), + _2010: PercentPpmRatioPattern2::new( + client.clone(), + "class_2010_supply_dominance".to_string(), + ), + _2011: PercentPpmRatioPattern2::new( + client.clone(), + "class_2011_supply_dominance".to_string(), + ), + _2012: PercentPpmRatioPattern2::new( + client.clone(), + "class_2012_supply_dominance".to_string(), + ), + _2013: PercentPpmRatioPattern2::new( + client.clone(), + "class_2013_supply_dominance".to_string(), + ), + _2014: PercentPpmRatioPattern2::new( + client.clone(), + "class_2014_supply_dominance".to_string(), + ), + _2015: PercentPpmRatioPattern2::new( + client.clone(), + "class_2015_supply_dominance".to_string(), + ), + _2016: PercentPpmRatioPattern2::new( + client.clone(), + "class_2016_supply_dominance".to_string(), + ), + _2017: PercentPpmRatioPattern2::new( + client.clone(), + "class_2017_supply_dominance".to_string(), + ), + _2018: PercentPpmRatioPattern2::new( + client.clone(), + "class_2018_supply_dominance".to_string(), + ), + _2019: PercentPpmRatioPattern2::new( + client.clone(), + "class_2019_supply_dominance".to_string(), + ), + _2020: PercentPpmRatioPattern2::new( + client.clone(), + "class_2020_supply_dominance".to_string(), + ), + _2021: PercentPpmRatioPattern2::new( + client.clone(), + "class_2021_supply_dominance".to_string(), + ), + _2022: PercentPpmRatioPattern2::new( + client.clone(), + "class_2022_supply_dominance".to_string(), + ), + _2023: PercentPpmRatioPattern2::new( + client.clone(), + "class_2023_supply_dominance".to_string(), + ), + _2024: PercentPpmRatioPattern2::new( + client.clone(), + "class_2024_supply_dominance".to_string(), + ), + _2025: PercentPpmRatioPattern2::new( + client.clone(), + "class_2025_supply_dominance".to_string(), + ), + _2026: PercentPpmRatioPattern2::new( + client.clone(), + "class_2026_supply_dominance".to_string(), + ), } } } @@ -13707,8 +20573,14 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Dominance_Entry { impl SeriesTree_Cohorts_Cohorts_Supply_Dominance_Entry { pub fn new(client: Arc, base_path: String) -> Self { Self { - discount: PercentPpmRatioPattern2::new(client.clone(), "veteran_supply_dominance".to_string()), - premium: PercentPpmRatioPattern2::new(client.clone(), "rookie_supply_dominance".to_string()), + discount: PercentPpmRatioPattern2::new( + client.clone(), + "veteran_supply_dominance".to_string(), + ), + premium: PercentPpmRatioPattern2::new( + client.clone(), + "rookie_supply_dominance".to_string(), + ), } } } @@ -13746,17 +20618,38 @@ pub struct SeriesTree_Cohorts_Cohorts_Supply_Dominance_Type { impl SeriesTree_Cohorts_Cohorts_Supply_Dominance_Type { pub fn new(client: Arc, base_path: String) -> Self { Self { - p2pk65: PercentPpmRatioPattern2::new(client.clone(), "p2pk65_supply_dominance".to_string()), - p2pk33: PercentPpmRatioPattern2::new(client.clone(), "p2pk33_supply_dominance".to_string()), - p2pkh: PercentPpmRatioPattern2::new(client.clone(), "p2pkh_supply_dominance".to_string()), + p2pk65: PercentPpmRatioPattern2::new( + client.clone(), + "p2pk65_supply_dominance".to_string(), + ), + p2pk33: PercentPpmRatioPattern2::new( + client.clone(), + "p2pk33_supply_dominance".to_string(), + ), + p2pkh: PercentPpmRatioPattern2::new( + client.clone(), + "p2pkh_supply_dominance".to_string(), + ), p2ms: PercentPpmRatioPattern2::new(client.clone(), "p2ms_supply_dominance".to_string()), p2sh: PercentPpmRatioPattern2::new(client.clone(), "p2sh_supply_dominance".to_string()), - p2wpkh: PercentPpmRatioPattern2::new(client.clone(), "p2wpkh_supply_dominance".to_string()), - p2wsh: PercentPpmRatioPattern2::new(client.clone(), "p2wsh_supply_dominance".to_string()), + p2wpkh: PercentPpmRatioPattern2::new( + client.clone(), + "p2wpkh_supply_dominance".to_string(), + ), + p2wsh: PercentPpmRatioPattern2::new( + client.clone(), + "p2wsh_supply_dominance".to_string(), + ), p2tr: PercentPpmRatioPattern2::new(client.clone(), "p2tr_supply_dominance".to_string()), p2a: PercentPpmRatioPattern2::new(client.clone(), "p2a_supply_dominance".to_string()), - unknown: PercentPpmRatioPattern2::new(client.clone(), "unknown_outputs_supply_dominance".to_string()), - empty: PercentPpmRatioPattern2::new(client.clone(), "empty_outputs_supply_dominance".to_string()), + unknown: PercentPpmRatioPattern2::new( + client.clone(), + "unknown_outputs_supply_dominance".to_string(), + ), + empty: PercentPpmRatioPattern2::new( + client.clone(), + "empty_outputs_supply_dominance".to_string(), + ), } } } @@ -13770,8 +20663,14 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs { impl SeriesTree_Cohorts_Cohorts_Outputs { pub fn new(client: Arc, base_path: String) -> Self { Self { - unspent_count: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount::new(client.clone(), format!("{base_path}_unspent_count")), - spent_count: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount::new(client.clone(), format!("{base_path}_spent_count")), + unspent_count: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount::new( + client.clone(), + format!("{base_path}_unspent_count"), + ), + spent_count: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount::new( + client.clone(), + format!("{base_path}_spent_count"), + ), } } } @@ -13799,20 +20698,50 @@ impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BaseDeltaPattern::new(client.clone(), "utxo_count".to_string()), - age: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Class::new(client.clone(), format!("{base_path}_class")), - entry: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Entry::new(client.clone(), format!("{base_path}_entry")), - utxo_amount: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount::new(client.clone(), format!("{base_path}_utxo_amount")), - term: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Term::new(client.clone(), format!("{base_path}_term")), - type_: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Type::new(client.clone(), format!("{base_path}_type")), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_utxo_count_by_age_range".to_string()), + age: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Class::new( + client.clone(), + format!("{base_path}_class"), + ), + entry: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Entry::new( + client.clone(), + format!("{base_path}_entry"), + ), + utxo_amount: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount::new( + client.clone(), + format!("{base_path}_utxo_amount"), + ), + term: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Term::new( + client.clone(), + format!("{base_path}_term"), + ), + type_: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Type::new( + client.clone(), + format!("{base_path}_type"), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_utxo_count_by_age_range".to_string(), + ), epoch_matrix: SeriesPattern18::new(client.clone(), "utxo_count_by_epoch".to_string()), class_matrix: SeriesPattern18::new(client.clone(), "utxo_count_by_class".to_string()), entry_matrix: SeriesPattern18::new(client.clone(), "utxo_count_by_entry".to_string()), type_matrix: SeriesPattern18::new(client.clone(), "utxo_count_by_type".to_string()), - amount_range_matrix: SeriesPattern18::new(client.clone(), "utxos_utxo_count_by_amount_range".to_string()), - addr_balance: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance::new(client.clone(), format!("{base_path}_addr_balance")), + amount_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_utxo_count_by_amount_range".to_string(), + ), + addr_balance: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance::new( + client.clone(), + format!("{base_path}_addr_balance"), + ), } } } @@ -13827,9 +20756,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age { impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -13864,29 +20802,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Range { impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BaseDeltaPattern::new(client.clone(), "utxos_under_1h_old_utxo_count".to_string()), - _1h_to_1d: BaseDeltaPattern::new(client.clone(), "utxos_1h_to_1d_old_utxo_count".to_string()), - _1d_to_1w: BaseDeltaPattern::new(client.clone(), "utxos_1d_to_1w_old_utxo_count".to_string()), - _1w_to_1m: BaseDeltaPattern::new(client.clone(), "utxos_1w_to_1m_old_utxo_count".to_string()), - _1m_to_2m: BaseDeltaPattern::new(client.clone(), "utxos_1m_to_2m_old_utxo_count".to_string()), - _2m_to_3m: BaseDeltaPattern::new(client.clone(), "utxos_2m_to_3m_old_utxo_count".to_string()), - _3m_to_4m: BaseDeltaPattern::new(client.clone(), "utxos_3m_to_4m_old_utxo_count".to_string()), - _4m_to_5m: BaseDeltaPattern::new(client.clone(), "utxos_4m_to_5m_old_utxo_count".to_string()), - _5m_to_6m: BaseDeltaPattern::new(client.clone(), "utxos_5m_to_6m_old_utxo_count".to_string()), - _6m_to_9m: BaseDeltaPattern::new(client.clone(), "utxos_6m_to_9m_old_utxo_count".to_string()), - _9m_to_1y: BaseDeltaPattern::new(client.clone(), "utxos_9m_to_1y_old_utxo_count".to_string()), - _1y_to_18m: BaseDeltaPattern::new(client.clone(), "utxos_1y_to_18m_old_utxo_count".to_string()), - _18m_to_2y: BaseDeltaPattern::new(client.clone(), "utxos_18m_to_2y_old_utxo_count".to_string()), - _2y_to_3y: BaseDeltaPattern::new(client.clone(), "utxos_2y_to_3y_old_utxo_count".to_string()), - _3y_to_4y: BaseDeltaPattern::new(client.clone(), "utxos_3y_to_4y_old_utxo_count".to_string()), - _4y_to_5y: BaseDeltaPattern::new(client.clone(), "utxos_4y_to_5y_old_utxo_count".to_string()), - _5y_to_6y: BaseDeltaPattern::new(client.clone(), "utxos_5y_to_6y_old_utxo_count".to_string()), - _6y_to_7y: BaseDeltaPattern::new(client.clone(), "utxos_6y_to_7y_old_utxo_count".to_string()), - _7y_to_8y: BaseDeltaPattern::new(client.clone(), "utxos_7y_to_8y_old_utxo_count".to_string()), - _8y_to_10y: BaseDeltaPattern::new(client.clone(), "utxos_8y_to_10y_old_utxo_count".to_string()), - _10y_to_12y: BaseDeltaPattern::new(client.clone(), "utxos_10y_to_12y_old_utxo_count".to_string()), - _12y_to_15y: BaseDeltaPattern::new(client.clone(), "utxos_12y_to_15y_old_utxo_count".to_string()), - over_15y: BaseDeltaPattern::new(client.clone(), "utxos_over_15y_old_utxo_count".to_string()), + under_1h: BaseDeltaPattern::new( + client.clone(), + "utxos_under_1h_old_utxo_count".to_string(), + ), + _1h_to_1d: BaseDeltaPattern::new( + client.clone(), + "utxos_1h_to_1d_old_utxo_count".to_string(), + ), + _1d_to_1w: BaseDeltaPattern::new( + client.clone(), + "utxos_1d_to_1w_old_utxo_count".to_string(), + ), + _1w_to_1m: BaseDeltaPattern::new( + client.clone(), + "utxos_1w_to_1m_old_utxo_count".to_string(), + ), + _1m_to_2m: BaseDeltaPattern::new( + client.clone(), + "utxos_1m_to_2m_old_utxo_count".to_string(), + ), + _2m_to_3m: BaseDeltaPattern::new( + client.clone(), + "utxos_2m_to_3m_old_utxo_count".to_string(), + ), + _3m_to_4m: BaseDeltaPattern::new( + client.clone(), + "utxos_3m_to_4m_old_utxo_count".to_string(), + ), + _4m_to_5m: BaseDeltaPattern::new( + client.clone(), + "utxos_4m_to_5m_old_utxo_count".to_string(), + ), + _5m_to_6m: BaseDeltaPattern::new( + client.clone(), + "utxos_5m_to_6m_old_utxo_count".to_string(), + ), + _6m_to_9m: BaseDeltaPattern::new( + client.clone(), + "utxos_6m_to_9m_old_utxo_count".to_string(), + ), + _9m_to_1y: BaseDeltaPattern::new( + client.clone(), + "utxos_9m_to_1y_old_utxo_count".to_string(), + ), + _1y_to_18m: BaseDeltaPattern::new( + client.clone(), + "utxos_1y_to_18m_old_utxo_count".to_string(), + ), + _18m_to_2y: BaseDeltaPattern::new( + client.clone(), + "utxos_18m_to_2y_old_utxo_count".to_string(), + ), + _2y_to_3y: BaseDeltaPattern::new( + client.clone(), + "utxos_2y_to_3y_old_utxo_count".to_string(), + ), + _3y_to_4y: BaseDeltaPattern::new( + client.clone(), + "utxos_3y_to_4y_old_utxo_count".to_string(), + ), + _4y_to_5y: BaseDeltaPattern::new( + client.clone(), + "utxos_4y_to_5y_old_utxo_count".to_string(), + ), + _5y_to_6y: BaseDeltaPattern::new( + client.clone(), + "utxos_5y_to_6y_old_utxo_count".to_string(), + ), + _6y_to_7y: BaseDeltaPattern::new( + client.clone(), + "utxos_6y_to_7y_old_utxo_count".to_string(), + ), + _7y_to_8y: BaseDeltaPattern::new( + client.clone(), + "utxos_7y_to_8y_old_utxo_count".to_string(), + ), + _8y_to_10y: BaseDeltaPattern::new( + client.clone(), + "utxos_8y_to_10y_old_utxo_count".to_string(), + ), + _10y_to_12y: BaseDeltaPattern::new( + client.clone(), + "utxos_10y_to_12y_old_utxo_count".to_string(), + ), + _12y_to_15y: BaseDeltaPattern::new( + client.clone(), + "utxos_12y_to_15y_old_utxo_count".to_string(), + ), + over_15y: BaseDeltaPattern::new( + client.clone(), + "utxos_over_15y_old_utxo_count".to_string(), + ), } } } @@ -13927,7 +20934,10 @@ impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Under { _6m: BaseDeltaPattern::new(client.clone(), "utxos_under_6m_old_utxo_count".to_string()), _9m: BaseDeltaPattern::new(client.clone(), "utxos_under_9m_old_utxo_count".to_string()), _1y: BaseDeltaPattern::new(client.clone(), "utxos_under_1y_old_utxo_count".to_string()), - _18m: BaseDeltaPattern::new(client.clone(), "utxos_under_18m_old_utxo_count".to_string()), + _18m: BaseDeltaPattern::new( + client.clone(), + "utxos_under_18m_old_utxo_count".to_string(), + ), _2y: BaseDeltaPattern::new(client.clone(), "utxos_under_2y_old_utxo_count".to_string()), _3y: BaseDeltaPattern::new(client.clone(), "utxos_under_3y_old_utxo_count".to_string()), _4y: BaseDeltaPattern::new(client.clone(), "utxos_under_4y_old_utxo_count".to_string()), @@ -13935,9 +20945,18 @@ impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Under { _6y: BaseDeltaPattern::new(client.clone(), "utxos_under_6y_old_utxo_count".to_string()), _7y: BaseDeltaPattern::new(client.clone(), "utxos_under_7y_old_utxo_count".to_string()), _8y: BaseDeltaPattern::new(client.clone(), "utxos_under_8y_old_utxo_count".to_string()), - _10y: BaseDeltaPattern::new(client.clone(), "utxos_under_10y_old_utxo_count".to_string()), - _12y: BaseDeltaPattern::new(client.clone(), "utxos_under_12y_old_utxo_count".to_string()), - _15y: BaseDeltaPattern::new(client.clone(), "utxos_under_15y_old_utxo_count".to_string()), + _10y: BaseDeltaPattern::new( + client.clone(), + "utxos_under_10y_old_utxo_count".to_string(), + ), + _12y: BaseDeltaPattern::new( + client.clone(), + "utxos_under_12y_old_utxo_count".to_string(), + ), + _15y: BaseDeltaPattern::new( + client.clone(), + "utxos_under_15y_old_utxo_count".to_string(), + ), } } } @@ -13979,7 +20998,10 @@ impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Over { _6m: BaseDeltaPattern::new(client.clone(), "utxos_over_6m_old_utxo_count".to_string()), _9m: BaseDeltaPattern::new(client.clone(), "utxos_over_9m_old_utxo_count".to_string()), _1y: BaseDeltaPattern::new(client.clone(), "utxos_over_1y_old_utxo_count".to_string()), - _18m: BaseDeltaPattern::new(client.clone(), "utxos_over_18m_old_utxo_count".to_string()), + _18m: BaseDeltaPattern::new( + client.clone(), + "utxos_over_18m_old_utxo_count".to_string(), + ), _2y: BaseDeltaPattern::new(client.clone(), "utxos_over_2y_old_utxo_count".to_string()), _3y: BaseDeltaPattern::new(client.clone(), "utxos_over_3y_old_utxo_count".to_string()), _4y: BaseDeltaPattern::new(client.clone(), "utxos_over_4y_old_utxo_count".to_string()), @@ -13987,8 +21009,14 @@ impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Age_Over { _6y: BaseDeltaPattern::new(client.clone(), "utxos_over_6y_old_utxo_count".to_string()), _7y: BaseDeltaPattern::new(client.clone(), "utxos_over_7y_old_utxo_count".to_string()), _8y: BaseDeltaPattern::new(client.clone(), "utxos_over_8y_old_utxo_count".to_string()), - _10y: BaseDeltaPattern::new(client.clone(), "utxos_over_10y_old_utxo_count".to_string()), - _12y: BaseDeltaPattern::new(client.clone(), "utxos_over_12y_old_utxo_count".to_string()), + _10y: BaseDeltaPattern::new( + client.clone(), + "utxos_over_10y_old_utxo_count".to_string(), + ), + _12y: BaseDeltaPattern::new( + client.clone(), + "utxos_over_12y_old_utxo_count".to_string(), + ), } } } @@ -14086,9 +21114,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount { impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -14116,20 +21153,62 @@ impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { _0sats: BaseDeltaPattern::new(client.clone(), "utxos_0sats_utxo_count".to_string()), - _1sat_to_10sats: BaseDeltaPattern::new(client.clone(), "utxos_1sat_to_10sats_utxo_count".to_string()), - _10sats_to_100sats: BaseDeltaPattern::new(client.clone(), "utxos_10sats_to_100sats_utxo_count".to_string()), - _100sats_to_1k_sats: BaseDeltaPattern::new(client.clone(), "utxos_100sats_to_1k_sats_utxo_count".to_string()), - _1k_sats_to_10k_sats: BaseDeltaPattern::new(client.clone(), "utxos_1k_sats_to_10k_sats_utxo_count".to_string()), - _10k_sats_to_100k_sats: BaseDeltaPattern::new(client.clone(), "utxos_10k_sats_to_100k_sats_utxo_count".to_string()), - _100k_sats_to_1m_sats: BaseDeltaPattern::new(client.clone(), "utxos_100k_sats_to_1m_sats_utxo_count".to_string()), - _1m_sats_to_10m_sats: BaseDeltaPattern::new(client.clone(), "utxos_1m_sats_to_10m_sats_utxo_count".to_string()), - _10m_sats_to_1btc: BaseDeltaPattern::new(client.clone(), "utxos_10m_sats_to_1btc_utxo_count".to_string()), - _1btc_to_10btc: BaseDeltaPattern::new(client.clone(), "utxos_1btc_to_10btc_utxo_count".to_string()), - _10btc_to_100btc: BaseDeltaPattern::new(client.clone(), "utxos_10btc_to_100btc_utxo_count".to_string()), - _100btc_to_1k_btc: BaseDeltaPattern::new(client.clone(), "utxos_100btc_to_1k_btc_utxo_count".to_string()), - _1k_btc_to_10k_btc: BaseDeltaPattern::new(client.clone(), "utxos_1k_btc_to_10k_btc_utxo_count".to_string()), - _10k_btc_to_100k_btc: BaseDeltaPattern::new(client.clone(), "utxos_10k_btc_to_100k_btc_utxo_count".to_string()), - over_100k_btc: BaseDeltaPattern::new(client.clone(), "utxos_over_100k_btc_utxo_count".to_string()), + _1sat_to_10sats: BaseDeltaPattern::new( + client.clone(), + "utxos_1sat_to_10sats_utxo_count".to_string(), + ), + _10sats_to_100sats: BaseDeltaPattern::new( + client.clone(), + "utxos_10sats_to_100sats_utxo_count".to_string(), + ), + _100sats_to_1k_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_100sats_to_1k_sats_utxo_count".to_string(), + ), + _1k_sats_to_10k_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_1k_sats_to_10k_sats_utxo_count".to_string(), + ), + _10k_sats_to_100k_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_10k_sats_to_100k_sats_utxo_count".to_string(), + ), + _100k_sats_to_1m_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_100k_sats_to_1m_sats_utxo_count".to_string(), + ), + _1m_sats_to_10m_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_1m_sats_to_10m_sats_utxo_count".to_string(), + ), + _10m_sats_to_1btc: BaseDeltaPattern::new( + client.clone(), + "utxos_10m_sats_to_1btc_utxo_count".to_string(), + ), + _1btc_to_10btc: BaseDeltaPattern::new( + client.clone(), + "utxos_1btc_to_10btc_utxo_count".to_string(), + ), + _10btc_to_100btc: BaseDeltaPattern::new( + client.clone(), + "utxos_10btc_to_100btc_utxo_count".to_string(), + ), + _100btc_to_1k_btc: BaseDeltaPattern::new( + client.clone(), + "utxos_100btc_to_1k_btc_utxo_count".to_string(), + ), + _1k_btc_to_10k_btc: BaseDeltaPattern::new( + client.clone(), + "utxos_1k_btc_to_10k_btc_utxo_count".to_string(), + ), + _10k_btc_to_100k_btc: BaseDeltaPattern::new( + client.clone(), + "utxos_10k_btc_to_100k_btc_utxo_count".to_string(), + ), + over_100k_btc: BaseDeltaPattern::new( + client.clone(), + "utxos_over_100k_btc_utxo_count".to_string(), + ), } } } @@ -14154,19 +21233,55 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount_Under { impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _10sats: BaseDeltaPattern::new(client.clone(), "utxos_under_10sats_utxo_count".to_string()), - _100sats: BaseDeltaPattern::new(client.clone(), "utxos_under_100sats_utxo_count".to_string()), - _1k_sats: BaseDeltaPattern::new(client.clone(), "utxos_under_1k_sats_utxo_count".to_string()), - _10k_sats: BaseDeltaPattern::new(client.clone(), "utxos_under_10k_sats_utxo_count".to_string()), - _100k_sats: BaseDeltaPattern::new(client.clone(), "utxos_under_100k_sats_utxo_count".to_string()), - _1m_sats: BaseDeltaPattern::new(client.clone(), "utxos_under_1m_sats_utxo_count".to_string()), - _10m_sats: BaseDeltaPattern::new(client.clone(), "utxos_under_10m_sats_utxo_count".to_string()), + _10sats: BaseDeltaPattern::new( + client.clone(), + "utxos_under_10sats_utxo_count".to_string(), + ), + _100sats: BaseDeltaPattern::new( + client.clone(), + "utxos_under_100sats_utxo_count".to_string(), + ), + _1k_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_under_1k_sats_utxo_count".to_string(), + ), + _10k_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_under_10k_sats_utxo_count".to_string(), + ), + _100k_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_under_100k_sats_utxo_count".to_string(), + ), + _1m_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_under_1m_sats_utxo_count".to_string(), + ), + _10m_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_under_10m_sats_utxo_count".to_string(), + ), _1btc: BaseDeltaPattern::new(client.clone(), "utxos_under_1btc_utxo_count".to_string()), - _10btc: BaseDeltaPattern::new(client.clone(), "utxos_under_10btc_utxo_count".to_string()), - _100btc: BaseDeltaPattern::new(client.clone(), "utxos_under_100btc_utxo_count".to_string()), - _1k_btc: BaseDeltaPattern::new(client.clone(), "utxos_under_1k_btc_utxo_count".to_string()), - _10k_btc: BaseDeltaPattern::new(client.clone(), "utxos_under_10k_btc_utxo_count".to_string()), - _100k_btc: BaseDeltaPattern::new(client.clone(), "utxos_under_100k_btc_utxo_count".to_string()), + _10btc: BaseDeltaPattern::new( + client.clone(), + "utxos_under_10btc_utxo_count".to_string(), + ), + _100btc: BaseDeltaPattern::new( + client.clone(), + "utxos_under_100btc_utxo_count".to_string(), + ), + _1k_btc: BaseDeltaPattern::new( + client.clone(), + "utxos_under_1k_btc_utxo_count".to_string(), + ), + _10k_btc: BaseDeltaPattern::new( + client.clone(), + "utxos_under_10k_btc_utxo_count".to_string(), + ), + _100k_btc: BaseDeltaPattern::new( + client.clone(), + "utxos_under_100k_btc_utxo_count".to_string(), + ), } } } @@ -14192,18 +21307,51 @@ impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_UtxoAmount_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { _1sat: BaseDeltaPattern::new(client.clone(), "utxos_over_1sat_utxo_count".to_string()), - _10sats: BaseDeltaPattern::new(client.clone(), "utxos_over_10sats_utxo_count".to_string()), - _100sats: BaseDeltaPattern::new(client.clone(), "utxos_over_100sats_utxo_count".to_string()), - _1k_sats: BaseDeltaPattern::new(client.clone(), "utxos_over_1k_sats_utxo_count".to_string()), - _10k_sats: BaseDeltaPattern::new(client.clone(), "utxos_over_10k_sats_utxo_count".to_string()), - _100k_sats: BaseDeltaPattern::new(client.clone(), "utxos_over_100k_sats_utxo_count".to_string()), - _1m_sats: BaseDeltaPattern::new(client.clone(), "utxos_over_1m_sats_utxo_count".to_string()), - _10m_sats: BaseDeltaPattern::new(client.clone(), "utxos_over_10m_sats_utxo_count".to_string()), + _10sats: BaseDeltaPattern::new( + client.clone(), + "utxos_over_10sats_utxo_count".to_string(), + ), + _100sats: BaseDeltaPattern::new( + client.clone(), + "utxos_over_100sats_utxo_count".to_string(), + ), + _1k_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_over_1k_sats_utxo_count".to_string(), + ), + _10k_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_over_10k_sats_utxo_count".to_string(), + ), + _100k_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_over_100k_sats_utxo_count".to_string(), + ), + _1m_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_over_1m_sats_utxo_count".to_string(), + ), + _10m_sats: BaseDeltaPattern::new( + client.clone(), + "utxos_over_10m_sats_utxo_count".to_string(), + ), _1btc: BaseDeltaPattern::new(client.clone(), "utxos_over_1btc_utxo_count".to_string()), - _10btc: BaseDeltaPattern::new(client.clone(), "utxos_over_10btc_utxo_count".to_string()), - _100btc: BaseDeltaPattern::new(client.clone(), "utxos_over_100btc_utxo_count".to_string()), - _1k_btc: BaseDeltaPattern::new(client.clone(), "utxos_over_1k_btc_utxo_count".to_string()), - _10k_btc: BaseDeltaPattern::new(client.clone(), "utxos_over_10k_btc_utxo_count".to_string()), + _10btc: BaseDeltaPattern::new( + client.clone(), + "utxos_over_10btc_utxo_count".to_string(), + ), + _100btc: BaseDeltaPattern::new( + client.clone(), + "utxos_over_100btc_utxo_count".to_string(), + ), + _1k_btc: BaseDeltaPattern::new( + client.clone(), + "utxos_over_1k_btc_utxo_count".to_string(), + ), + _10k_btc: BaseDeltaPattern::new( + client.clone(), + "utxos_over_10k_btc_utxo_count".to_string(), + ), } } } @@ -14250,7 +21398,10 @@ impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_Type { p2wsh: BaseDeltaPattern::new(client.clone(), "p2wsh_utxo_count".to_string()), p2tr: BaseDeltaPattern::new(client.clone(), "p2tr_utxo_count".to_string()), p2a: BaseDeltaPattern::new(client.clone(), "p2a_utxo_count".to_string()), - unknown: BaseDeltaPattern::new(client.clone(), "unknown_outputs_utxo_count".to_string()), + unknown: BaseDeltaPattern::new( + client.clone(), + "unknown_outputs_utxo_count".to_string(), + ), empty: BaseDeltaPattern::new(client.clone(), "empty_outputs_utxo_count".to_string()), } } @@ -14267,10 +21418,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance { impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance_Over::new(client.clone(), format!("{base_path}_over")), - matrix: SeriesPattern18::new(client.clone(), "addrs_utxo_count_by_balance_range".to_string()), + range: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance_Over::new( + client.clone(), + format!("{base_path}_over"), + ), + matrix: SeriesPattern18::new( + client.clone(), + "addrs_utxo_count_by_balance_range".to_string(), + ), } } } @@ -14298,20 +21461,62 @@ impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { _0sats: BaseDeltaPattern::new(client.clone(), "addrs_0sats_utxo_count".to_string()), - _1sat_to_10sats: BaseDeltaPattern::new(client.clone(), "addrs_1sat_to_10sats_utxo_count".to_string()), - _10sats_to_100sats: BaseDeltaPattern::new(client.clone(), "addrs_10sats_to_100sats_utxo_count".to_string()), - _100sats_to_1k_sats: BaseDeltaPattern::new(client.clone(), "addrs_100sats_to_1k_sats_utxo_count".to_string()), - _1k_sats_to_10k_sats: BaseDeltaPattern::new(client.clone(), "addrs_1k_sats_to_10k_sats_utxo_count".to_string()), - _10k_sats_to_100k_sats: BaseDeltaPattern::new(client.clone(), "addrs_10k_sats_to_100k_sats_utxo_count".to_string()), - _100k_sats_to_1m_sats: BaseDeltaPattern::new(client.clone(), "addrs_100k_sats_to_1m_sats_utxo_count".to_string()), - _1m_sats_to_10m_sats: BaseDeltaPattern::new(client.clone(), "addrs_1m_sats_to_10m_sats_utxo_count".to_string()), - _10m_sats_to_1btc: BaseDeltaPattern::new(client.clone(), "addrs_10m_sats_to_1btc_utxo_count".to_string()), - _1btc_to_10btc: BaseDeltaPattern::new(client.clone(), "addrs_1btc_to_10btc_utxo_count".to_string()), - _10btc_to_100btc: BaseDeltaPattern::new(client.clone(), "addrs_10btc_to_100btc_utxo_count".to_string()), - _100btc_to_1k_btc: BaseDeltaPattern::new(client.clone(), "addrs_100btc_to_1k_btc_utxo_count".to_string()), - _1k_btc_to_10k_btc: BaseDeltaPattern::new(client.clone(), "addrs_1k_btc_to_10k_btc_utxo_count".to_string()), - _10k_btc_to_100k_btc: BaseDeltaPattern::new(client.clone(), "addrs_10k_btc_to_100k_btc_utxo_count".to_string()), - over_100k_btc: BaseDeltaPattern::new(client.clone(), "addrs_over_100k_btc_utxo_count".to_string()), + _1sat_to_10sats: BaseDeltaPattern::new( + client.clone(), + "addrs_1sat_to_10sats_utxo_count".to_string(), + ), + _10sats_to_100sats: BaseDeltaPattern::new( + client.clone(), + "addrs_10sats_to_100sats_utxo_count".to_string(), + ), + _100sats_to_1k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_100sats_to_1k_sats_utxo_count".to_string(), + ), + _1k_sats_to_10k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_1k_sats_to_10k_sats_utxo_count".to_string(), + ), + _10k_sats_to_100k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_10k_sats_to_100k_sats_utxo_count".to_string(), + ), + _100k_sats_to_1m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_100k_sats_to_1m_sats_utxo_count".to_string(), + ), + _1m_sats_to_10m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_1m_sats_to_10m_sats_utxo_count".to_string(), + ), + _10m_sats_to_1btc: BaseDeltaPattern::new( + client.clone(), + "addrs_10m_sats_to_1btc_utxo_count".to_string(), + ), + _1btc_to_10btc: BaseDeltaPattern::new( + client.clone(), + "addrs_1btc_to_10btc_utxo_count".to_string(), + ), + _10btc_to_100btc: BaseDeltaPattern::new( + client.clone(), + "addrs_10btc_to_100btc_utxo_count".to_string(), + ), + _100btc_to_1k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_100btc_to_1k_btc_utxo_count".to_string(), + ), + _1k_btc_to_10k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_1k_btc_to_10k_btc_utxo_count".to_string(), + ), + _10k_btc_to_100k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_10k_btc_to_100k_btc_utxo_count".to_string(), + ), + over_100k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_over_100k_btc_utxo_count".to_string(), + ), } } } @@ -14336,19 +21541,55 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance_Under { impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _10sats: BaseDeltaPattern::new(client.clone(), "addrs_under_10sats_utxo_count".to_string()), - _100sats: BaseDeltaPattern::new(client.clone(), "addrs_under_100sats_utxo_count".to_string()), - _1k_sats: BaseDeltaPattern::new(client.clone(), "addrs_under_1k_sats_utxo_count".to_string()), - _10k_sats: BaseDeltaPattern::new(client.clone(), "addrs_under_10k_sats_utxo_count".to_string()), - _100k_sats: BaseDeltaPattern::new(client.clone(), "addrs_under_100k_sats_utxo_count".to_string()), - _1m_sats: BaseDeltaPattern::new(client.clone(), "addrs_under_1m_sats_utxo_count".to_string()), - _10m_sats: BaseDeltaPattern::new(client.clone(), "addrs_under_10m_sats_utxo_count".to_string()), + _10sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_10sats_utxo_count".to_string(), + ), + _100sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_100sats_utxo_count".to_string(), + ), + _1k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_1k_sats_utxo_count".to_string(), + ), + _10k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_10k_sats_utxo_count".to_string(), + ), + _100k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_100k_sats_utxo_count".to_string(), + ), + _1m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_1m_sats_utxo_count".to_string(), + ), + _10m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_under_10m_sats_utxo_count".to_string(), + ), _1btc: BaseDeltaPattern::new(client.clone(), "addrs_under_1btc_utxo_count".to_string()), - _10btc: BaseDeltaPattern::new(client.clone(), "addrs_under_10btc_utxo_count".to_string()), - _100btc: BaseDeltaPattern::new(client.clone(), "addrs_under_100btc_utxo_count".to_string()), - _1k_btc: BaseDeltaPattern::new(client.clone(), "addrs_under_1k_btc_utxo_count".to_string()), - _10k_btc: BaseDeltaPattern::new(client.clone(), "addrs_under_10k_btc_utxo_count".to_string()), - _100k_btc: BaseDeltaPattern::new(client.clone(), "addrs_under_100k_btc_utxo_count".to_string()), + _10btc: BaseDeltaPattern::new( + client.clone(), + "addrs_under_10btc_utxo_count".to_string(), + ), + _100btc: BaseDeltaPattern::new( + client.clone(), + "addrs_under_100btc_utxo_count".to_string(), + ), + _1k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_under_1k_btc_utxo_count".to_string(), + ), + _10k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_under_10k_btc_utxo_count".to_string(), + ), + _100k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_under_100k_btc_utxo_count".to_string(), + ), } } } @@ -14374,18 +21615,51 @@ impl SeriesTree_Cohorts_Cohorts_Outputs_UnspentCount_AddrBalance_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { _1sat: BaseDeltaPattern::new(client.clone(), "addrs_over_1sat_utxo_count".to_string()), - _10sats: BaseDeltaPattern::new(client.clone(), "addrs_over_10sats_utxo_count".to_string()), - _100sats: BaseDeltaPattern::new(client.clone(), "addrs_over_100sats_utxo_count".to_string()), - _1k_sats: BaseDeltaPattern::new(client.clone(), "addrs_over_1k_sats_utxo_count".to_string()), - _10k_sats: BaseDeltaPattern::new(client.clone(), "addrs_over_10k_sats_utxo_count".to_string()), - _100k_sats: BaseDeltaPattern::new(client.clone(), "addrs_over_100k_sats_utxo_count".to_string()), - _1m_sats: BaseDeltaPattern::new(client.clone(), "addrs_over_1m_sats_utxo_count".to_string()), - _10m_sats: BaseDeltaPattern::new(client.clone(), "addrs_over_10m_sats_utxo_count".to_string()), + _10sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_10sats_utxo_count".to_string(), + ), + _100sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_100sats_utxo_count".to_string(), + ), + _1k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_1k_sats_utxo_count".to_string(), + ), + _10k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_10k_sats_utxo_count".to_string(), + ), + _100k_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_100k_sats_utxo_count".to_string(), + ), + _1m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_1m_sats_utxo_count".to_string(), + ), + _10m_sats: BaseDeltaPattern::new( + client.clone(), + "addrs_over_10m_sats_utxo_count".to_string(), + ), _1btc: BaseDeltaPattern::new(client.clone(), "addrs_over_1btc_utxo_count".to_string()), - _10btc: BaseDeltaPattern::new(client.clone(), "addrs_over_10btc_utxo_count".to_string()), - _100btc: BaseDeltaPattern::new(client.clone(), "addrs_over_100btc_utxo_count".to_string()), - _1k_btc: BaseDeltaPattern::new(client.clone(), "addrs_over_1k_btc_utxo_count".to_string()), - _10k_btc: BaseDeltaPattern::new(client.clone(), "addrs_over_10k_btc_utxo_count".to_string()), + _10btc: BaseDeltaPattern::new( + client.clone(), + "addrs_over_10btc_utxo_count".to_string(), + ), + _100btc: BaseDeltaPattern::new( + client.clone(), + "addrs_over_100btc_utxo_count".to_string(), + ), + _1k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_over_1k_btc_utxo_count".to_string(), + ), + _10k_btc: BaseDeltaPattern::new( + client.clone(), + "addrs_over_10k_btc_utxo_count".to_string(), + ), } } } @@ -14411,20 +21685,56 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "spent_utxo_count".to_string()), - age: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Class::new(client.clone(), format!("{base_path}_class")), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "spent_utxo_count".to_string(), + ), + age: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern::new(client.clone(), "spent_utxo_count".to_string()), - utxo_amount: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount::new(client.clone(), format!("{base_path}_utxo_amount")), + utxo_amount: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount::new( + client.clone(), + format!("{base_path}_utxo_amount"), + ), term: LongShortPattern::new(client.clone(), "spent_utxo_count".to_string()), - type_: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Type::new(client.clone(), format!("{base_path}_type")), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_spent_utxo_count_cumulative_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "spent_utxo_count_cumulative_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "spent_utxo_count_cumulative_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "spent_utxo_count_cumulative_by_entry".to_string()), - type_matrix: SeriesPattern18::new(client.clone(), "spent_utxo_count_cumulative_by_type".to_string()), - amount_range_matrix: SeriesPattern18::new(client.clone(), "utxos_spent_utxo_count_cumulative_by_amount_range".to_string()), + type_: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Type::new( + client.clone(), + format!("{base_path}_type"), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_spent_utxo_count_cumulative_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "spent_utxo_count_cumulative_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "spent_utxo_count_cumulative_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "spent_utxo_count_cumulative_by_entry".to_string(), + ), + type_matrix: SeriesPattern18::new( + client.clone(), + "spent_utxo_count_cumulative_by_type".to_string(), + ), + amount_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_spent_utxo_count_cumulative_by_amount_range".to_string(), + ), } } } @@ -14439,9 +21749,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -14476,29 +21795,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Range { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1h_old_spent_utxo_count".to_string()), - _1h_to_1d: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1h_to_1d_old_spent_utxo_count".to_string()), - _1d_to_1w: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1d_to_1w_old_spent_utxo_count".to_string()), - _1w_to_1m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1w_to_1m_old_spent_utxo_count".to_string()), - _1m_to_2m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1m_to_2m_old_spent_utxo_count".to_string()), - _2m_to_3m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_2m_to_3m_old_spent_utxo_count".to_string()), - _3m_to_4m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_3m_to_4m_old_spent_utxo_count".to_string()), - _4m_to_5m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_4m_to_5m_old_spent_utxo_count".to_string()), - _5m_to_6m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_5m_to_6m_old_spent_utxo_count".to_string()), - _6m_to_9m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_6m_to_9m_old_spent_utxo_count".to_string()), - _9m_to_1y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_9m_to_1y_old_spent_utxo_count".to_string()), - _1y_to_18m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1y_to_18m_old_spent_utxo_count".to_string()), - _18m_to_2y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_18m_to_2y_old_spent_utxo_count".to_string()), - _2y_to_3y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_2y_to_3y_old_spent_utxo_count".to_string()), - _3y_to_4y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_3y_to_4y_old_spent_utxo_count".to_string()), - _4y_to_5y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_4y_to_5y_old_spent_utxo_count".to_string()), - _5y_to_6y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_5y_to_6y_old_spent_utxo_count".to_string()), - _6y_to_7y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_6y_to_7y_old_spent_utxo_count".to_string()), - _7y_to_8y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_7y_to_8y_old_spent_utxo_count".to_string()), - _8y_to_10y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_8y_to_10y_old_spent_utxo_count".to_string()), - _10y_to_12y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_10y_to_12y_old_spent_utxo_count".to_string()), - _12y_to_15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_12y_to_15y_old_spent_utxo_count".to_string()), - over_15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_15y_old_spent_utxo_count".to_string()), + under_1h: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1h_old_spent_utxo_count".to_string(), + ), + _1h_to_1d: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1h_to_1d_old_spent_utxo_count".to_string(), + ), + _1d_to_1w: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1d_to_1w_old_spent_utxo_count".to_string(), + ), + _1w_to_1m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1w_to_1m_old_spent_utxo_count".to_string(), + ), + _1m_to_2m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_to_2m_old_spent_utxo_count".to_string(), + ), + _2m_to_3m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_2m_to_3m_old_spent_utxo_count".to_string(), + ), + _3m_to_4m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_3m_to_4m_old_spent_utxo_count".to_string(), + ), + _4m_to_5m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_4m_to_5m_old_spent_utxo_count".to_string(), + ), + _5m_to_6m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_5m_to_6m_old_spent_utxo_count".to_string(), + ), + _6m_to_9m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_6m_to_9m_old_spent_utxo_count".to_string(), + ), + _9m_to_1y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_9m_to_1y_old_spent_utxo_count".to_string(), + ), + _1y_to_18m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1y_to_18m_old_spent_utxo_count".to_string(), + ), + _18m_to_2y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_18m_to_2y_old_spent_utxo_count".to_string(), + ), + _2y_to_3y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_2y_to_3y_old_spent_utxo_count".to_string(), + ), + _3y_to_4y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_3y_to_4y_old_spent_utxo_count".to_string(), + ), + _4y_to_5y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_4y_to_5y_old_spent_utxo_count".to_string(), + ), + _5y_to_6y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_5y_to_6y_old_spent_utxo_count".to_string(), + ), + _6y_to_7y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_6y_to_7y_old_spent_utxo_count".to_string(), + ), + _7y_to_8y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_7y_to_8y_old_spent_utxo_count".to_string(), + ), + _8y_to_10y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_8y_to_10y_old_spent_utxo_count".to_string(), + ), + _10y_to_12y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_10y_to_12y_old_spent_utxo_count".to_string(), + ), + _12y_to_15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_12y_to_15y_old_spent_utxo_count".to_string(), + ), + over_15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_15y_old_spent_utxo_count".to_string(), + ), } } } @@ -14530,26 +21918,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Under { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1w_old_spent_utxo_count".to_string()), - _1m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1m_old_spent_utxo_count".to_string()), - _2m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_2m_old_spent_utxo_count".to_string()), - _3m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_3m_old_spent_utxo_count".to_string()), - _4m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_4m_old_spent_utxo_count".to_string()), - _5m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_5m_old_spent_utxo_count".to_string()), - _6m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_6m_old_spent_utxo_count".to_string()), - _9m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_9m_old_spent_utxo_count".to_string()), - _1y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1y_old_spent_utxo_count".to_string()), - _18m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_18m_old_spent_utxo_count".to_string()), - _2y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_2y_old_spent_utxo_count".to_string()), - _3y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_3y_old_spent_utxo_count".to_string()), - _4y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_4y_old_spent_utxo_count".to_string()), - _5y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_5y_old_spent_utxo_count".to_string()), - _6y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_6y_old_spent_utxo_count".to_string()), - _7y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_7y_old_spent_utxo_count".to_string()), - _8y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_8y_old_spent_utxo_count".to_string()), - _10y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_10y_old_spent_utxo_count".to_string()), - _12y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_12y_old_spent_utxo_count".to_string()), - _15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_15y_old_spent_utxo_count".to_string()), + _1w: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1w_old_spent_utxo_count".to_string(), + ), + _1m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1m_old_spent_utxo_count".to_string(), + ), + _2m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_2m_old_spent_utxo_count".to_string(), + ), + _3m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_3m_old_spent_utxo_count".to_string(), + ), + _4m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_4m_old_spent_utxo_count".to_string(), + ), + _5m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_5m_old_spent_utxo_count".to_string(), + ), + _6m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_6m_old_spent_utxo_count".to_string(), + ), + _9m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_9m_old_spent_utxo_count".to_string(), + ), + _1y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1y_old_spent_utxo_count".to_string(), + ), + _18m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_18m_old_spent_utxo_count".to_string(), + ), + _2y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_2y_old_spent_utxo_count".to_string(), + ), + _3y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_3y_old_spent_utxo_count".to_string(), + ), + _4y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_4y_old_spent_utxo_count".to_string(), + ), + _5y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_5y_old_spent_utxo_count".to_string(), + ), + _6y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_6y_old_spent_utxo_count".to_string(), + ), + _7y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_7y_old_spent_utxo_count".to_string(), + ), + _8y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_8y_old_spent_utxo_count".to_string(), + ), + _10y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10y_old_spent_utxo_count".to_string(), + ), + _12y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_12y_old_spent_utxo_count".to_string(), + ), + _15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_15y_old_spent_utxo_count".to_string(), + ), } } } @@ -14581,26 +22029,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Over { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1d_old_spent_utxo_count".to_string()), - _1w: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1w_old_spent_utxo_count".to_string()), - _1m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1m_old_spent_utxo_count".to_string()), - _2m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_2m_old_spent_utxo_count".to_string()), - _3m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_3m_old_spent_utxo_count".to_string()), - _4m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_4m_old_spent_utxo_count".to_string()), - _5m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_5m_old_spent_utxo_count".to_string()), - _6m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_6m_old_spent_utxo_count".to_string()), - _9m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_9m_old_spent_utxo_count".to_string()), - _1y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1y_old_spent_utxo_count".to_string()), - _18m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_18m_old_spent_utxo_count".to_string()), - _2y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_2y_old_spent_utxo_count".to_string()), - _3y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_3y_old_spent_utxo_count".to_string()), - _4y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_4y_old_spent_utxo_count".to_string()), - _5y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_5y_old_spent_utxo_count".to_string()), - _6y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_6y_old_spent_utxo_count".to_string()), - _7y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_7y_old_spent_utxo_count".to_string()), - _8y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_8y_old_spent_utxo_count".to_string()), - _10y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_10y_old_spent_utxo_count".to_string()), - _12y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_12y_old_spent_utxo_count".to_string()), + _1d: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1d_old_spent_utxo_count".to_string(), + ), + _1w: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1w_old_spent_utxo_count".to_string(), + ), + _1m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1m_old_spent_utxo_count".to_string(), + ), + _2m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_2m_old_spent_utxo_count".to_string(), + ), + _3m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_3m_old_spent_utxo_count".to_string(), + ), + _4m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_4m_old_spent_utxo_count".to_string(), + ), + _5m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_5m_old_spent_utxo_count".to_string(), + ), + _6m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_6m_old_spent_utxo_count".to_string(), + ), + _9m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_9m_old_spent_utxo_count".to_string(), + ), + _1y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1y_old_spent_utxo_count".to_string(), + ), + _18m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_18m_old_spent_utxo_count".to_string(), + ), + _2y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_2y_old_spent_utxo_count".to_string(), + ), + _3y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_3y_old_spent_utxo_count".to_string(), + ), + _4y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_4y_old_spent_utxo_count".to_string(), + ), + _5y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_5y_old_spent_utxo_count".to_string(), + ), + _6y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_6y_old_spent_utxo_count".to_string(), + ), + _7y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_7y_old_spent_utxo_count".to_string(), + ), + _8y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_8y_old_spent_utxo_count".to_string(), + ), + _10y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10y_old_spent_utxo_count".to_string(), + ), + _12y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_12y_old_spent_utxo_count".to_string(), + ), } } } @@ -14617,11 +22125,26 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Epoch { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Epoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0: AverageBlockCumulativeSumPattern::new(client.clone(), "epoch_0_spent_utxo_count".to_string()), - _1: AverageBlockCumulativeSumPattern::new(client.clone(), "epoch_1_spent_utxo_count".to_string()), - _2: AverageBlockCumulativeSumPattern::new(client.clone(), "epoch_2_spent_utxo_count".to_string()), - _3: AverageBlockCumulativeSumPattern::new(client.clone(), "epoch_3_spent_utxo_count".to_string()), - _4: AverageBlockCumulativeSumPattern::new(client.clone(), "epoch_4_spent_utxo_count".to_string()), + _0: AverageBlockCumulativeSumPattern::new( + client.clone(), + "epoch_0_spent_utxo_count".to_string(), + ), + _1: AverageBlockCumulativeSumPattern::new( + client.clone(), + "epoch_1_spent_utxo_count".to_string(), + ), + _2: AverageBlockCumulativeSumPattern::new( + client.clone(), + "epoch_2_spent_utxo_count".to_string(), + ), + _3: AverageBlockCumulativeSumPattern::new( + client.clone(), + "epoch_3_spent_utxo_count".to_string(), + ), + _4: AverageBlockCumulativeSumPattern::new( + client.clone(), + "epoch_4_spent_utxo_count".to_string(), + ), } } } @@ -14651,24 +22174,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Class { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2009_spent_utxo_count".to_string()), - _2010: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2010_spent_utxo_count".to_string()), - _2011: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2011_spent_utxo_count".to_string()), - _2012: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2012_spent_utxo_count".to_string()), - _2013: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2013_spent_utxo_count".to_string()), - _2014: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2014_spent_utxo_count".to_string()), - _2015: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2015_spent_utxo_count".to_string()), - _2016: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2016_spent_utxo_count".to_string()), - _2017: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2017_spent_utxo_count".to_string()), - _2018: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2018_spent_utxo_count".to_string()), - _2019: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2019_spent_utxo_count".to_string()), - _2020: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2020_spent_utxo_count".to_string()), - _2021: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2021_spent_utxo_count".to_string()), - _2022: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2022_spent_utxo_count".to_string()), - _2023: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2023_spent_utxo_count".to_string()), - _2024: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2024_spent_utxo_count".to_string()), - _2025: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2025_spent_utxo_count".to_string()), - _2026: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2026_spent_utxo_count".to_string()), + _2009: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2009_spent_utxo_count".to_string(), + ), + _2010: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2010_spent_utxo_count".to_string(), + ), + _2011: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2011_spent_utxo_count".to_string(), + ), + _2012: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2012_spent_utxo_count".to_string(), + ), + _2013: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2013_spent_utxo_count".to_string(), + ), + _2014: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2014_spent_utxo_count".to_string(), + ), + _2015: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2015_spent_utxo_count".to_string(), + ), + _2016: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2016_spent_utxo_count".to_string(), + ), + _2017: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2017_spent_utxo_count".to_string(), + ), + _2018: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2018_spent_utxo_count".to_string(), + ), + _2019: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2019_spent_utxo_count".to_string(), + ), + _2020: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2020_spent_utxo_count".to_string(), + ), + _2021: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2021_spent_utxo_count".to_string(), + ), + _2022: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2022_spent_utxo_count".to_string(), + ), + _2023: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2023_spent_utxo_count".to_string(), + ), + _2024: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2024_spent_utxo_count".to_string(), + ), + _2025: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2025_spent_utxo_count".to_string(), + ), + _2026: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2026_spent_utxo_count".to_string(), + ), } } } @@ -14683,9 +22260,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -14712,21 +22298,66 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Range { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_0sats_spent_utxo_count".to_string()), - _1sat_to_10sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1sat_to_10sats_spent_utxo_count".to_string()), - _10sats_to_100sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_10sats_to_100sats_spent_utxo_count".to_string()), - _100sats_to_1k_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_100sats_to_1k_sats_spent_utxo_count".to_string()), - _1k_sats_to_10k_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1k_sats_to_10k_sats_spent_utxo_count".to_string()), - _10k_sats_to_100k_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_10k_sats_to_100k_sats_spent_utxo_count".to_string()), - _100k_sats_to_1m_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_100k_sats_to_1m_sats_spent_utxo_count".to_string()), - _1m_sats_to_10m_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1m_sats_to_10m_sats_spent_utxo_count".to_string()), - _10m_sats_to_1btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_10m_sats_to_1btc_spent_utxo_count".to_string()), - _1btc_to_10btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1btc_to_10btc_spent_utxo_count".to_string()), - _10btc_to_100btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_10btc_to_100btc_spent_utxo_count".to_string()), - _100btc_to_1k_btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_100btc_to_1k_btc_spent_utxo_count".to_string()), - _1k_btc_to_10k_btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1k_btc_to_10k_btc_spent_utxo_count".to_string()), - _10k_btc_to_100k_btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_10k_btc_to_100k_btc_spent_utxo_count".to_string()), - over_100k_btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_100k_btc_spent_utxo_count".to_string()), + _0sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_0sats_spent_utxo_count".to_string(), + ), + _1sat_to_10sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1sat_to_10sats_spent_utxo_count".to_string(), + ), + _10sats_to_100sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_10sats_to_100sats_spent_utxo_count".to_string(), + ), + _100sats_to_1k_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_100sats_to_1k_sats_spent_utxo_count".to_string(), + ), + _1k_sats_to_10k_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1k_sats_to_10k_sats_spent_utxo_count".to_string(), + ), + _10k_sats_to_100k_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_10k_sats_to_100k_sats_spent_utxo_count".to_string(), + ), + _100k_sats_to_1m_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_100k_sats_to_1m_sats_spent_utxo_count".to_string(), + ), + _1m_sats_to_10m_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_sats_to_10m_sats_spent_utxo_count".to_string(), + ), + _10m_sats_to_1btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_10m_sats_to_1btc_spent_utxo_count".to_string(), + ), + _1btc_to_10btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1btc_to_10btc_spent_utxo_count".to_string(), + ), + _10btc_to_100btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_10btc_to_100btc_spent_utxo_count".to_string(), + ), + _100btc_to_1k_btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_100btc_to_1k_btc_spent_utxo_count".to_string(), + ), + _1k_btc_to_10k_btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1k_btc_to_10k_btc_spent_utxo_count".to_string(), + ), + _10k_btc_to_100k_btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_10k_btc_to_100k_btc_spent_utxo_count".to_string(), + ), + over_100k_btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100k_btc_spent_utxo_count".to_string(), + ), } } } @@ -14751,19 +22382,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Under { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _10sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_10sats_spent_utxo_count".to_string()), - _100sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_100sats_spent_utxo_count".to_string()), - _1k_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1k_sats_spent_utxo_count".to_string()), - _10k_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_10k_sats_spent_utxo_count".to_string()), - _100k_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_100k_sats_spent_utxo_count".to_string()), - _1m_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1m_sats_spent_utxo_count".to_string()), - _10m_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_10m_sats_spent_utxo_count".to_string()), - _1btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1btc_spent_utxo_count".to_string()), - _10btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_10btc_spent_utxo_count".to_string()), - _100btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_100btc_spent_utxo_count".to_string()), - _1k_btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1k_btc_spent_utxo_count".to_string()), - _10k_btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_10k_btc_spent_utxo_count".to_string()), - _100k_btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_100k_btc_spent_utxo_count".to_string()), + _10sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10sats_spent_utxo_count".to_string(), + ), + _100sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100sats_spent_utxo_count".to_string(), + ), + _1k_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1k_sats_spent_utxo_count".to_string(), + ), + _10k_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10k_sats_spent_utxo_count".to_string(), + ), + _100k_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100k_sats_spent_utxo_count".to_string(), + ), + _1m_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1m_sats_spent_utxo_count".to_string(), + ), + _10m_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10m_sats_spent_utxo_count".to_string(), + ), + _1btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1btc_spent_utxo_count".to_string(), + ), + _10btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10btc_spent_utxo_count".to_string(), + ), + _100btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100btc_spent_utxo_count".to_string(), + ), + _1k_btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1k_btc_spent_utxo_count".to_string(), + ), + _10k_btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10k_btc_spent_utxo_count".to_string(), + ), + _100k_btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100k_btc_spent_utxo_count".to_string(), + ), } } } @@ -14788,19 +22458,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Over { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_UtxoAmount_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1sat: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1sat_spent_utxo_count".to_string()), - _10sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_10sats_spent_utxo_count".to_string()), - _100sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_100sats_spent_utxo_count".to_string()), - _1k_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1k_sats_spent_utxo_count".to_string()), - _10k_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_10k_sats_spent_utxo_count".to_string()), - _100k_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_100k_sats_spent_utxo_count".to_string()), - _1m_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1m_sats_spent_utxo_count".to_string()), - _10m_sats: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_10m_sats_spent_utxo_count".to_string()), - _1btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1btc_spent_utxo_count".to_string()), - _10btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_10btc_spent_utxo_count".to_string()), - _100btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_100btc_spent_utxo_count".to_string()), - _1k_btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1k_btc_spent_utxo_count".to_string()), - _10k_btc: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_10k_btc_spent_utxo_count".to_string()), + _1sat: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1sat_spent_utxo_count".to_string(), + ), + _10sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10sats_spent_utxo_count".to_string(), + ), + _100sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100sats_spent_utxo_count".to_string(), + ), + _1k_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1k_sats_spent_utxo_count".to_string(), + ), + _10k_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10k_sats_spent_utxo_count".to_string(), + ), + _100k_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100k_sats_spent_utxo_count".to_string(), + ), + _1m_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1m_sats_spent_utxo_count".to_string(), + ), + _10m_sats: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10m_sats_spent_utxo_count".to_string(), + ), + _1btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1btc_spent_utxo_count".to_string(), + ), + _10btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10btc_spent_utxo_count".to_string(), + ), + _100btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100btc_spent_utxo_count".to_string(), + ), + _1k_btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1k_btc_spent_utxo_count".to_string(), + ), + _10k_btc: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10k_btc_spent_utxo_count".to_string(), + ), } } } @@ -14823,17 +22532,50 @@ pub struct SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Type { impl SeriesTree_Cohorts_Cohorts_Outputs_SpentCount_Type { pub fn new(client: Arc, base_path: String) -> Self { Self { - p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk65_spent_utxo_count".to_string()), - p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk33_spent_utxo_count".to_string()), - p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pkh_spent_utxo_count".to_string()), - p2ms: AverageBlockCumulativeSumPattern::new(client.clone(), "p2ms_spent_utxo_count".to_string()), - p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2sh_spent_utxo_count".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wpkh_spent_utxo_count".to_string()), - p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wsh_spent_utxo_count".to_string()), - p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "p2tr_spent_utxo_count".to_string()), - p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "p2a_spent_utxo_count".to_string()), - unknown: AverageBlockCumulativeSumPattern::new(client.clone(), "unknown_outputs_spent_utxo_count".to_string()), - empty: AverageBlockCumulativeSumPattern::new(client.clone(), "empty_outputs_spent_utxo_count".to_string()), + p2pk65: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk65_spent_utxo_count".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pk33_spent_utxo_count".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2pkh_spent_utxo_count".to_string(), + ), + p2ms: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2ms_spent_utxo_count".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2sh_spent_utxo_count".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wpkh_spent_utxo_count".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2wsh_spent_utxo_count".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2tr_spent_utxo_count".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern::new( + client.clone(), + "p2a_spent_utxo_count".to_string(), + ), + unknown: AverageBlockCumulativeSumPattern::new( + client.clone(), + "unknown_outputs_spent_utxo_count".to_string(), + ), + empty: AverageBlockCumulativeSumPattern::new( + client.clone(), + "empty_outputs_spent_utxo_count".to_string(), + ), } } } @@ -14849,10 +22591,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity { impl SeriesTree_Cohorts_Cohorts_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - transfer_volume: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume::new(client.clone(), format!("{base_path}_transfer_volume")), - coindays_destroyed: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed::new(client.clone(), format!("{base_path}_coindays_destroyed")), - coinyears_destroyed: SeriesTree_Cohorts_Cohorts_Activity_CoinyearsDestroyed::new(client.clone(), format!("{base_path}_coinyears_destroyed")), - dormancy: SeriesTree_Cohorts_Cohorts_Activity_Dormancy::new(client.clone(), format!("{base_path}_dormancy")), + transfer_volume: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume::new( + client.clone(), + format!("{base_path}_transfer_volume"), + ), + coindays_destroyed: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed::new( + client.clone(), + format!("{base_path}_coindays_destroyed"), + ), + coinyears_destroyed: SeriesTree_Cohorts_Cohorts_Activity_CoinyearsDestroyed::new( + client.clone(), + format!("{base_path}_coinyears_destroyed"), + ), + dormancy: SeriesTree_Cohorts_Cohorts_Activity_Dormancy::new( + client.clone(), + format!("{base_path}_dormancy"), + ), } } } @@ -14876,18 +22630,45 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_TransferVolume { impl SeriesTree_Cohorts_Cohorts_Activity_TransferVolume { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern2::new(client.clone(), "transfer_volume".to_string()), + all: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "transfer_volume".to_string(), + ), age: OverRangeUnderPattern2::new(client.clone(), "utxos".to_string()), - epoch: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Class::new(client.clone(), format!("{base_path}_class")), + epoch: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern2::new(client.clone(), "transfer_volume".to_string()), - utxo_amount: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_UtxoAmount::new(client.clone(), format!("{base_path}_utxo_amount")), + utxo_amount: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_UtxoAmount::new( + client.clone(), + format!("{base_path}_utxo_amount"), + ), term: LongShortPattern2::new(client.clone(), "transfer_volume".to_string()), - type_: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Type::new(client.clone(), format!("{base_path}_type")), - cumulative: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Cumulative::new(client.clone(), format!("{base_path}_cumulative")), - addr_balance: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_AddrBalance::new(client.clone(), format!("{base_path}_addr_balance")), - in_profit: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_InProfit::new(client.clone(), format!("{base_path}_in_profit")), - in_loss: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_InLoss::new(client.clone(), format!("{base_path}_in_loss")), + type_: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Type::new( + client.clone(), + format!("{base_path}_type"), + ), + cumulative: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Cumulative::new( + client.clone(), + format!("{base_path}_cumulative"), + ), + addr_balance: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_AddrBalance::new( + client.clone(), + format!("{base_path}_addr_balance"), + ), + in_profit: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_InProfit::new( + client.clone(), + format!("{base_path}_in_profit"), + ), + in_loss: SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_InLoss::new( + client.clone(), + format!("{base_path}_in_loss"), + ), } } } @@ -14904,11 +22685,26 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Epoch { impl SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Epoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0: AverageBlockCumulativeSumPattern2::new(client.clone(), "epoch_0_transfer_volume".to_string()), - _1: AverageBlockCumulativeSumPattern2::new(client.clone(), "epoch_1_transfer_volume".to_string()), - _2: AverageBlockCumulativeSumPattern2::new(client.clone(), "epoch_2_transfer_volume".to_string()), - _3: AverageBlockCumulativeSumPattern2::new(client.clone(), "epoch_3_transfer_volume".to_string()), - _4: AverageBlockCumulativeSumPattern2::new(client.clone(), "epoch_4_transfer_volume".to_string()), + _0: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "epoch_0_transfer_volume".to_string(), + ), + _1: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "epoch_1_transfer_volume".to_string(), + ), + _2: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "epoch_2_transfer_volume".to_string(), + ), + _3: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "epoch_3_transfer_volume".to_string(), + ), + _4: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "epoch_4_transfer_volume".to_string(), + ), } } } @@ -14938,24 +22734,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Class { impl SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2009_transfer_volume".to_string()), - _2010: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2010_transfer_volume".to_string()), - _2011: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2011_transfer_volume".to_string()), - _2012: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2012_transfer_volume".to_string()), - _2013: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2013_transfer_volume".to_string()), - _2014: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2014_transfer_volume".to_string()), - _2015: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2015_transfer_volume".to_string()), - _2016: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2016_transfer_volume".to_string()), - _2017: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2017_transfer_volume".to_string()), - _2018: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2018_transfer_volume".to_string()), - _2019: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2019_transfer_volume".to_string()), - _2020: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2020_transfer_volume".to_string()), - _2021: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2021_transfer_volume".to_string()), - _2022: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2022_transfer_volume".to_string()), - _2023: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2023_transfer_volume".to_string()), - _2024: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2024_transfer_volume".to_string()), - _2025: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2025_transfer_volume".to_string()), - _2026: AverageBlockCumulativeSumPattern2::new(client.clone(), "class_2026_transfer_volume".to_string()), + _2009: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2009_transfer_volume".to_string(), + ), + _2010: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2010_transfer_volume".to_string(), + ), + _2011: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2011_transfer_volume".to_string(), + ), + _2012: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2012_transfer_volume".to_string(), + ), + _2013: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2013_transfer_volume".to_string(), + ), + _2014: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2014_transfer_volume".to_string(), + ), + _2015: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2015_transfer_volume".to_string(), + ), + _2016: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2016_transfer_volume".to_string(), + ), + _2017: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2017_transfer_volume".to_string(), + ), + _2018: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2018_transfer_volume".to_string(), + ), + _2019: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2019_transfer_volume".to_string(), + ), + _2020: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2020_transfer_volume".to_string(), + ), + _2021: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2021_transfer_volume".to_string(), + ), + _2022: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2022_transfer_volume".to_string(), + ), + _2023: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2023_transfer_volume".to_string(), + ), + _2024: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2024_transfer_volume".to_string(), + ), + _2025: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2025_transfer_volume".to_string(), + ), + _2026: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "class_2026_transfer_volume".to_string(), + ), } } } @@ -14970,9 +22820,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_UtxoAmount { impl SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_UtxoAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern2::new(client.clone(), "utxos".to_string()), - under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern2::new(client.clone(), "utxos_under".to_string()), - over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern2::new(client.clone(), "utxos_over".to_string()), + range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern2::new( + client.clone(), + "utxos".to_string(), + ), + under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern2::new( + client.clone(), + "utxos_under".to_string(), + ), + over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern2::new( + client.clone(), + "utxos_over".to_string(), + ), } } } @@ -14995,17 +22854,50 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Type { impl SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Type { pub fn new(client: Arc, base_path: String) -> Self { Self { - p2pk65: AverageBlockCumulativeSumPattern2::new(client.clone(), "p2pk65_transfer_volume".to_string()), - p2pk33: AverageBlockCumulativeSumPattern2::new(client.clone(), "p2pk33_transfer_volume".to_string()), - p2pkh: AverageBlockCumulativeSumPattern2::new(client.clone(), "p2pkh_transfer_volume".to_string()), - p2ms: AverageBlockCumulativeSumPattern2::new(client.clone(), "p2ms_transfer_volume".to_string()), - p2sh: AverageBlockCumulativeSumPattern2::new(client.clone(), "p2sh_transfer_volume".to_string()), - p2wpkh: AverageBlockCumulativeSumPattern2::new(client.clone(), "p2wpkh_transfer_volume".to_string()), - p2wsh: AverageBlockCumulativeSumPattern2::new(client.clone(), "p2wsh_transfer_volume".to_string()), - p2tr: AverageBlockCumulativeSumPattern2::new(client.clone(), "p2tr_transfer_volume".to_string()), - p2a: AverageBlockCumulativeSumPattern2::new(client.clone(), "p2a_transfer_volume".to_string()), - unknown: AverageBlockCumulativeSumPattern2::new(client.clone(), "unknown_outputs_transfer_volume".to_string()), - empty: AverageBlockCumulativeSumPattern2::new(client.clone(), "empty_outputs_transfer_volume".to_string()), + p2pk65: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "p2pk65_transfer_volume".to_string(), + ), + p2pk33: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "p2pk33_transfer_volume".to_string(), + ), + p2pkh: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "p2pkh_transfer_volume".to_string(), + ), + p2ms: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "p2ms_transfer_volume".to_string(), + ), + p2sh: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "p2sh_transfer_volume".to_string(), + ), + p2wpkh: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "p2wpkh_transfer_volume".to_string(), + ), + p2wsh: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "p2wsh_transfer_volume".to_string(), + ), + p2tr: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "p2tr_transfer_volume".to_string(), + ), + p2a: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "p2a_transfer_volume".to_string(), + ), + unknown: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "unknown_outputs_transfer_volume".to_string(), + ), + empty: AverageBlockCumulativeSumPattern2::new( + client.clone(), + "empty_outputs_transfer_volume".to_string(), + ), } } } @@ -15023,12 +22915,30 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Cumulative { impl SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_Cumulative { pub fn new(client: Arc, base_path: String) -> Self { Self { - age_range: CentsSatsPattern::new(client.clone(), "utxos_transfer_volume_cumulative_by_age_range".to_string()), - epoch: CentsSatsPattern::new(client.clone(), "transfer_volume_cumulative_by_epoch".to_string()), - class: CentsSatsPattern::new(client.clone(), "transfer_volume_cumulative_by_class".to_string()), - entry: CentsSatsPattern::new(client.clone(), "transfer_volume_cumulative_by_entry".to_string()), - amount_range: CentsSatsPattern::new(client.clone(), "utxos_transfer_volume_cumulative_by_amount_range".to_string()), - type_: CentsSatsPattern::new(client.clone(), "transfer_volume_cumulative_by_type".to_string()), + age_range: CentsSatsPattern::new( + client.clone(), + "utxos_transfer_volume_cumulative_by_age_range".to_string(), + ), + epoch: CentsSatsPattern::new( + client.clone(), + "transfer_volume_cumulative_by_epoch".to_string(), + ), + class: CentsSatsPattern::new( + client.clone(), + "transfer_volume_cumulative_by_class".to_string(), + ), + entry: CentsSatsPattern::new( + client.clone(), + "transfer_volume_cumulative_by_entry".to_string(), + ), + amount_range: CentsSatsPattern::new( + client.clone(), + "utxos_transfer_volume_cumulative_by_amount_range".to_string(), + ), + type_: CentsSatsPattern::new( + client.clone(), + "transfer_volume_cumulative_by_type".to_string(), + ), } } } @@ -15044,10 +22954,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_AddrBalance { impl SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_AddrBalance { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern2::new(client.clone(), "addrs".to_string()), - under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern2::new(client.clone(), "addrs_under".to_string()), - over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern2::new(client.clone(), "addrs_over".to_string()), - values: CentsSatsPattern::new(client.clone(), "addrs_transfer_volume_cumulative_by_balance_range".to_string()), + range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern2::new( + client.clone(), + "addrs".to_string(), + ), + under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern2::new( + client.clone(), + "addrs_under".to_string(), + ), + over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern2::new( + client.clone(), + "addrs_over".to_string(), + ), + values: CentsSatsPattern::new( + client.clone(), + "addrs_transfer_volume_cumulative_by_balance_range".to_string(), + ), } } } @@ -15088,10 +23010,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_InProfit_Cumulativ impl SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_InProfit_Cumulative { pub fn new(client: Arc, base_path: String) -> Self { Self { - age_range: CentsSatsPattern::new(client.clone(), "utxos_transfer_volume_in_profit_cumulative_by_age_range".to_string()), - epoch: CentsSatsPattern::new(client.clone(), "transfer_volume_in_profit_cumulative_by_epoch".to_string()), - class: CentsSatsPattern::new(client.clone(), "transfer_volume_in_profit_cumulative_by_class".to_string()), - entry: CentsSatsPattern::new(client.clone(), "transfer_volume_in_profit_cumulative_by_entry".to_string()), + age_range: CentsSatsPattern::new( + client.clone(), + "utxos_transfer_volume_in_profit_cumulative_by_age_range".to_string(), + ), + epoch: CentsSatsPattern::new( + client.clone(), + "transfer_volume_in_profit_cumulative_by_epoch".to_string(), + ), + class: CentsSatsPattern::new( + client.clone(), + "transfer_volume_in_profit_cumulative_by_class".to_string(), + ), + entry: CentsSatsPattern::new( + client.clone(), + "transfer_volume_in_profit_cumulative_by_entry".to_string(), + ), } } } @@ -15132,10 +23066,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_InLoss_Cumulative impl SeriesTree_Cohorts_Cohorts_Activity_TransferVolume_InLoss_Cumulative { pub fn new(client: Arc, base_path: String) -> Self { Self { - age_range: CentsSatsPattern::new(client.clone(), "utxos_transfer_volume_in_loss_cumulative_by_age_range".to_string()), - epoch: CentsSatsPattern::new(client.clone(), "transfer_volume_in_loss_cumulative_by_epoch".to_string()), - class: CentsSatsPattern::new(client.clone(), "transfer_volume_in_loss_cumulative_by_class".to_string()), - entry: CentsSatsPattern::new(client.clone(), "transfer_volume_in_loss_cumulative_by_entry".to_string()), + age_range: CentsSatsPattern::new( + client.clone(), + "utxos_transfer_volume_in_loss_cumulative_by_age_range".to_string(), + ), + epoch: CentsSatsPattern::new( + client.clone(), + "transfer_volume_in_loss_cumulative_by_epoch".to_string(), + ), + class: CentsSatsPattern::new( + client.clone(), + "transfer_volume_in_loss_cumulative_by_class".to_string(), + ), + entry: CentsSatsPattern::new( + client.clone(), + "transfer_volume_in_loss_cumulative_by_entry".to_string(), + ), } } } @@ -15157,16 +23103,40 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed { impl SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "coindays_destroyed".to_string()), - age: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Class::new(client.clone(), format!("{base_path}_class")), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "coindays_destroyed".to_string(), + ), + age: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern::new(client.clone(), "coindays_destroyed".to_string()), term: LongShortPattern::new(client.clone(), "coindays_destroyed".to_string()), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_coindays_destroyed_cumulative_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "coindays_destroyed_cumulative_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "coindays_destroyed_cumulative_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "coindays_destroyed_cumulative_by_entry".to_string()), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_coindays_destroyed_cumulative_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "coindays_destroyed_cumulative_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "coindays_destroyed_cumulative_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "coindays_destroyed_cumulative_by_entry".to_string(), + ), } } } @@ -15181,9 +23151,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age { impl SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -15218,29 +23197,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Range { impl SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1h_old_coindays_destroyed".to_string()), - _1h_to_1d: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1h_to_1d_old_coindays_destroyed".to_string()), - _1d_to_1w: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1d_to_1w_old_coindays_destroyed".to_string()), - _1w_to_1m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1w_to_1m_old_coindays_destroyed".to_string()), - _1m_to_2m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1m_to_2m_old_coindays_destroyed".to_string()), - _2m_to_3m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_2m_to_3m_old_coindays_destroyed".to_string()), - _3m_to_4m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_3m_to_4m_old_coindays_destroyed".to_string()), - _4m_to_5m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_4m_to_5m_old_coindays_destroyed".to_string()), - _5m_to_6m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_5m_to_6m_old_coindays_destroyed".to_string()), - _6m_to_9m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_6m_to_9m_old_coindays_destroyed".to_string()), - _9m_to_1y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_9m_to_1y_old_coindays_destroyed".to_string()), - _1y_to_18m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_1y_to_18m_old_coindays_destroyed".to_string()), - _18m_to_2y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_18m_to_2y_old_coindays_destroyed".to_string()), - _2y_to_3y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_2y_to_3y_old_coindays_destroyed".to_string()), - _3y_to_4y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_3y_to_4y_old_coindays_destroyed".to_string()), - _4y_to_5y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_4y_to_5y_old_coindays_destroyed".to_string()), - _5y_to_6y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_5y_to_6y_old_coindays_destroyed".to_string()), - _6y_to_7y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_6y_to_7y_old_coindays_destroyed".to_string()), - _7y_to_8y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_7y_to_8y_old_coindays_destroyed".to_string()), - _8y_to_10y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_8y_to_10y_old_coindays_destroyed".to_string()), - _10y_to_12y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_10y_to_12y_old_coindays_destroyed".to_string()), - _12y_to_15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_12y_to_15y_old_coindays_destroyed".to_string()), - over_15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_15y_old_coindays_destroyed".to_string()), + under_1h: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1h_old_coindays_destroyed".to_string(), + ), + _1h_to_1d: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1h_to_1d_old_coindays_destroyed".to_string(), + ), + _1d_to_1w: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1d_to_1w_old_coindays_destroyed".to_string(), + ), + _1w_to_1m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1w_to_1m_old_coindays_destroyed".to_string(), + ), + _1m_to_2m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_to_2m_old_coindays_destroyed".to_string(), + ), + _2m_to_3m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_2m_to_3m_old_coindays_destroyed".to_string(), + ), + _3m_to_4m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_3m_to_4m_old_coindays_destroyed".to_string(), + ), + _4m_to_5m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_4m_to_5m_old_coindays_destroyed".to_string(), + ), + _5m_to_6m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_5m_to_6m_old_coindays_destroyed".to_string(), + ), + _6m_to_9m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_6m_to_9m_old_coindays_destroyed".to_string(), + ), + _9m_to_1y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_9m_to_1y_old_coindays_destroyed".to_string(), + ), + _1y_to_18m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_1y_to_18m_old_coindays_destroyed".to_string(), + ), + _18m_to_2y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_18m_to_2y_old_coindays_destroyed".to_string(), + ), + _2y_to_3y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_2y_to_3y_old_coindays_destroyed".to_string(), + ), + _3y_to_4y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_3y_to_4y_old_coindays_destroyed".to_string(), + ), + _4y_to_5y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_4y_to_5y_old_coindays_destroyed".to_string(), + ), + _5y_to_6y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_5y_to_6y_old_coindays_destroyed".to_string(), + ), + _6y_to_7y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_6y_to_7y_old_coindays_destroyed".to_string(), + ), + _7y_to_8y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_7y_to_8y_old_coindays_destroyed".to_string(), + ), + _8y_to_10y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_8y_to_10y_old_coindays_destroyed".to_string(), + ), + _10y_to_12y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_10y_to_12y_old_coindays_destroyed".to_string(), + ), + _12y_to_15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_12y_to_15y_old_coindays_destroyed".to_string(), + ), + over_15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_15y_old_coindays_destroyed".to_string(), + ), } } } @@ -15272,26 +23320,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Under { impl SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1w_old_coindays_destroyed".to_string()), - _1m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1m_old_coindays_destroyed".to_string()), - _2m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_2m_old_coindays_destroyed".to_string()), - _3m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_3m_old_coindays_destroyed".to_string()), - _4m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_4m_old_coindays_destroyed".to_string()), - _5m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_5m_old_coindays_destroyed".to_string()), - _6m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_6m_old_coindays_destroyed".to_string()), - _9m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_9m_old_coindays_destroyed".to_string()), - _1y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_1y_old_coindays_destroyed".to_string()), - _18m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_18m_old_coindays_destroyed".to_string()), - _2y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_2y_old_coindays_destroyed".to_string()), - _3y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_3y_old_coindays_destroyed".to_string()), - _4y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_4y_old_coindays_destroyed".to_string()), - _5y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_5y_old_coindays_destroyed".to_string()), - _6y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_6y_old_coindays_destroyed".to_string()), - _7y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_7y_old_coindays_destroyed".to_string()), - _8y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_8y_old_coindays_destroyed".to_string()), - _10y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_10y_old_coindays_destroyed".to_string()), - _12y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_12y_old_coindays_destroyed".to_string()), - _15y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_under_15y_old_coindays_destroyed".to_string()), + _1w: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1w_old_coindays_destroyed".to_string(), + ), + _1m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1m_old_coindays_destroyed".to_string(), + ), + _2m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_2m_old_coindays_destroyed".to_string(), + ), + _3m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_3m_old_coindays_destroyed".to_string(), + ), + _4m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_4m_old_coindays_destroyed".to_string(), + ), + _5m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_5m_old_coindays_destroyed".to_string(), + ), + _6m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_6m_old_coindays_destroyed".to_string(), + ), + _9m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_9m_old_coindays_destroyed".to_string(), + ), + _1y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1y_old_coindays_destroyed".to_string(), + ), + _18m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_18m_old_coindays_destroyed".to_string(), + ), + _2y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_2y_old_coindays_destroyed".to_string(), + ), + _3y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_3y_old_coindays_destroyed".to_string(), + ), + _4y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_4y_old_coindays_destroyed".to_string(), + ), + _5y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_5y_old_coindays_destroyed".to_string(), + ), + _6y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_6y_old_coindays_destroyed".to_string(), + ), + _7y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_7y_old_coindays_destroyed".to_string(), + ), + _8y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_8y_old_coindays_destroyed".to_string(), + ), + _10y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10y_old_coindays_destroyed".to_string(), + ), + _12y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_12y_old_coindays_destroyed".to_string(), + ), + _15y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_15y_old_coindays_destroyed".to_string(), + ), } } } @@ -15323,26 +23431,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Over { impl SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1d_old_coindays_destroyed".to_string()), - _1w: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1w_old_coindays_destroyed".to_string()), - _1m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1m_old_coindays_destroyed".to_string()), - _2m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_2m_old_coindays_destroyed".to_string()), - _3m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_3m_old_coindays_destroyed".to_string()), - _4m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_4m_old_coindays_destroyed".to_string()), - _5m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_5m_old_coindays_destroyed".to_string()), - _6m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_6m_old_coindays_destroyed".to_string()), - _9m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_9m_old_coindays_destroyed".to_string()), - _1y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_1y_old_coindays_destroyed".to_string()), - _18m: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_18m_old_coindays_destroyed".to_string()), - _2y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_2y_old_coindays_destroyed".to_string()), - _3y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_3y_old_coindays_destroyed".to_string()), - _4y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_4y_old_coindays_destroyed".to_string()), - _5y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_5y_old_coindays_destroyed".to_string()), - _6y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_6y_old_coindays_destroyed".to_string()), - _7y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_7y_old_coindays_destroyed".to_string()), - _8y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_8y_old_coindays_destroyed".to_string()), - _10y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_10y_old_coindays_destroyed".to_string()), - _12y: AverageBlockCumulativeSumPattern::new(client.clone(), "utxos_over_12y_old_coindays_destroyed".to_string()), + _1d: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1d_old_coindays_destroyed".to_string(), + ), + _1w: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1w_old_coindays_destroyed".to_string(), + ), + _1m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1m_old_coindays_destroyed".to_string(), + ), + _2m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_2m_old_coindays_destroyed".to_string(), + ), + _3m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_3m_old_coindays_destroyed".to_string(), + ), + _4m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_4m_old_coindays_destroyed".to_string(), + ), + _5m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_5m_old_coindays_destroyed".to_string(), + ), + _6m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_6m_old_coindays_destroyed".to_string(), + ), + _9m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_9m_old_coindays_destroyed".to_string(), + ), + _1y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1y_old_coindays_destroyed".to_string(), + ), + _18m: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_18m_old_coindays_destroyed".to_string(), + ), + _2y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_2y_old_coindays_destroyed".to_string(), + ), + _3y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_3y_old_coindays_destroyed".to_string(), + ), + _4y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_4y_old_coindays_destroyed".to_string(), + ), + _5y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_5y_old_coindays_destroyed".to_string(), + ), + _6y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_6y_old_coindays_destroyed".to_string(), + ), + _7y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_7y_old_coindays_destroyed".to_string(), + ), + _8y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_8y_old_coindays_destroyed".to_string(), + ), + _10y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10y_old_coindays_destroyed".to_string(), + ), + _12y: AverageBlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_12y_old_coindays_destroyed".to_string(), + ), } } } @@ -15359,11 +23527,26 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Epoch { impl SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Epoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0: AverageBlockCumulativeSumPattern::new(client.clone(), "epoch_0_coindays_destroyed".to_string()), - _1: AverageBlockCumulativeSumPattern::new(client.clone(), "epoch_1_coindays_destroyed".to_string()), - _2: AverageBlockCumulativeSumPattern::new(client.clone(), "epoch_2_coindays_destroyed".to_string()), - _3: AverageBlockCumulativeSumPattern::new(client.clone(), "epoch_3_coindays_destroyed".to_string()), - _4: AverageBlockCumulativeSumPattern::new(client.clone(), "epoch_4_coindays_destroyed".to_string()), + _0: AverageBlockCumulativeSumPattern::new( + client.clone(), + "epoch_0_coindays_destroyed".to_string(), + ), + _1: AverageBlockCumulativeSumPattern::new( + client.clone(), + "epoch_1_coindays_destroyed".to_string(), + ), + _2: AverageBlockCumulativeSumPattern::new( + client.clone(), + "epoch_2_coindays_destroyed".to_string(), + ), + _3: AverageBlockCumulativeSumPattern::new( + client.clone(), + "epoch_3_coindays_destroyed".to_string(), + ), + _4: AverageBlockCumulativeSumPattern::new( + client.clone(), + "epoch_4_coindays_destroyed".to_string(), + ), } } } @@ -15393,24 +23576,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Class { impl SeriesTree_Cohorts_Cohorts_Activity_CoindaysDestroyed_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2009_coindays_destroyed".to_string()), - _2010: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2010_coindays_destroyed".to_string()), - _2011: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2011_coindays_destroyed".to_string()), - _2012: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2012_coindays_destroyed".to_string()), - _2013: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2013_coindays_destroyed".to_string()), - _2014: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2014_coindays_destroyed".to_string()), - _2015: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2015_coindays_destroyed".to_string()), - _2016: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2016_coindays_destroyed".to_string()), - _2017: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2017_coindays_destroyed".to_string()), - _2018: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2018_coindays_destroyed".to_string()), - _2019: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2019_coindays_destroyed".to_string()), - _2020: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2020_coindays_destroyed".to_string()), - _2021: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2021_coindays_destroyed".to_string()), - _2022: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2022_coindays_destroyed".to_string()), - _2023: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2023_coindays_destroyed".to_string()), - _2024: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2024_coindays_destroyed".to_string()), - _2025: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2025_coindays_destroyed".to_string()), - _2026: AverageBlockCumulativeSumPattern::new(client.clone(), "class_2026_coindays_destroyed".to_string()), + _2009: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2009_coindays_destroyed".to_string(), + ), + _2010: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2010_coindays_destroyed".to_string(), + ), + _2011: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2011_coindays_destroyed".to_string(), + ), + _2012: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2012_coindays_destroyed".to_string(), + ), + _2013: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2013_coindays_destroyed".to_string(), + ), + _2014: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2014_coindays_destroyed".to_string(), + ), + _2015: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2015_coindays_destroyed".to_string(), + ), + _2016: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2016_coindays_destroyed".to_string(), + ), + _2017: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2017_coindays_destroyed".to_string(), + ), + _2018: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2018_coindays_destroyed".to_string(), + ), + _2019: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2019_coindays_destroyed".to_string(), + ), + _2020: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2020_coindays_destroyed".to_string(), + ), + _2021: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2021_coindays_destroyed".to_string(), + ), + _2022: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2022_coindays_destroyed".to_string(), + ), + _2023: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2023_coindays_destroyed".to_string(), + ), + _2024: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2024_coindays_destroyed".to_string(), + ), + _2025: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2025_coindays_destroyed".to_string(), + ), + _2026: AverageBlockCumulativeSumPattern::new( + client.clone(), + "class_2026_coindays_destroyed".to_string(), + ), } } } @@ -15473,23 +23710,72 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized { impl SeriesTree_Cohorts_Cohorts_Realized { pub fn new(client: Arc, base_path: String) -> Self { Self { - cap: SeriesTree_Cohorts_Cohorts_Realized_Cap::new(client.clone(), format!("{base_path}_cap")), - price: SeriesTree_Cohorts_Cohorts_Realized_Price::new(client.clone(), format!("{base_path}_price")), - profit: SeriesTree_Cohorts_Cohorts_Realized_Profit::new(client.clone(), format!("{base_path}_profit")), - loss: SeriesTree_Cohorts_Cohorts_Realized_Loss::new(client.clone(), format!("{base_path}_loss")), - net_pnl: SeriesTree_Cohorts_Cohorts_Realized_NetPnl::new(client.clone(), format!("{base_path}_net_pnl")), - sopr: SeriesTree_Cohorts_Cohorts_Realized_Sopr::new(client.clone(), format!("{base_path}_sopr")), - adjusted_sopr: SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr::new(client.clone(), format!("{base_path}_adjusted_sopr")), - gross_pnl: SeriesTree_Cohorts_Cohorts_Realized_GrossPnl::new(client.clone(), format!("{base_path}_gross_pnl")), - capitalized_price: SeriesTree_Cohorts_Cohorts_Realized_CapitalizedPrice::new(client.clone(), format!("{base_path}_capitalized_price")), + cap: SeriesTree_Cohorts_Cohorts_Realized_Cap::new( + client.clone(), + format!("{base_path}_cap"), + ), + price: SeriesTree_Cohorts_Cohorts_Realized_Price::new( + client.clone(), + format!("{base_path}_price"), + ), + profit: SeriesTree_Cohorts_Cohorts_Realized_Profit::new( + client.clone(), + format!("{base_path}_profit"), + ), + loss: SeriesTree_Cohorts_Cohorts_Realized_Loss::new( + client.clone(), + format!("{base_path}_loss"), + ), + net_pnl: SeriesTree_Cohorts_Cohorts_Realized_NetPnl::new( + client.clone(), + format!("{base_path}_net_pnl"), + ), + sopr: SeriesTree_Cohorts_Cohorts_Realized_Sopr::new( + client.clone(), + format!("{base_path}_sopr"), + ), + adjusted_sopr: SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr::new( + client.clone(), + format!("{base_path}_adjusted_sopr"), + ), + gross_pnl: SeriesTree_Cohorts_Cohorts_Realized_GrossPnl::new( + client.clone(), + format!("{base_path}_gross_pnl"), + ), + capitalized_price: SeriesTree_Cohorts_Cohorts_Realized_CapitalizedPrice::new( + client.clone(), + format!("{base_path}_capitalized_price"), + ), cap_raw: MatrixPattern::new(client.clone(), "cap_raw_by_term".to_string()), - capitalized_cap_raw: MatrixPattern::new(client.clone(), "capitalized_cap_raw_by_term".to_string()), - peak_regret: SeriesTree_Cohorts_Cohorts_Realized_PeakRegret::new(client.clone(), format!("{base_path}_peak_regret")), - net_pnl_change_1m_to_rcap: SeriesTree_Cohorts_Cohorts_Realized_NetPnlChange1mToRcap::new(client.clone(), format!("{base_path}_net_pnl_change_1m_to_rcap")), - sell_side_risk_ratio: SeriesTree_Cohorts_Cohorts_Realized_SellSideRiskRatio::new(client.clone(), format!("{base_path}_sell_side_risk_ratio")), - sopr_ratio_extended: SeriesTree_Cohorts_Cohorts_Realized_SoprRatioExtended::new(client.clone(), format!("{base_path}_sopr_ratio_extended")), - profit_to_loss_ratio: SeriesTree_Cohorts_Cohorts_Realized_ProfitToLossRatio::new(client.clone(), format!("{base_path}_profit_to_loss_ratio")), - mvrv: SeriesTree_Cohorts_Cohorts_Realized_Mvrv::new(client.clone(), format!("{base_path}_mvrv")), + capitalized_cap_raw: MatrixPattern::new( + client.clone(), + "capitalized_cap_raw_by_term".to_string(), + ), + peak_regret: SeriesTree_Cohorts_Cohorts_Realized_PeakRegret::new( + client.clone(), + format!("{base_path}_peak_regret"), + ), + net_pnl_change_1m_to_rcap: + SeriesTree_Cohorts_Cohorts_Realized_NetPnlChange1mToRcap::new( + client.clone(), + format!("{base_path}_net_pnl_change_1m_to_rcap"), + ), + sell_side_risk_ratio: SeriesTree_Cohorts_Cohorts_Realized_SellSideRiskRatio::new( + client.clone(), + format!("{base_path}_sell_side_risk_ratio"), + ), + sopr_ratio_extended: SeriesTree_Cohorts_Cohorts_Realized_SoprRatioExtended::new( + client.clone(), + format!("{base_path}_sopr_ratio_extended"), + ), + profit_to_loss_ratio: SeriesTree_Cohorts_Cohorts_Realized_ProfitToLossRatio::new( + client.clone(), + format!("{base_path}_profit_to_loss_ratio"), + ), + mvrv: SeriesTree_Cohorts_Cohorts_Realized_Mvrv::new( + client.clone(), + format!("{base_path}_mvrv"), + ), } } } @@ -15518,21 +23804,66 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Cap { pub fn new(client: Arc, base_path: String) -> Self { Self { all: CentsDeltaUsdPattern::new(client.clone(), "realized_cap".to_string()), - age: SeriesTree_Cohorts_Cohorts_Realized_Cap_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Realized_Cap_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Realized_Cap_Class::new(client.clone(), format!("{base_path}_class")), - entry: SeriesTree_Cohorts_Cohorts_Realized_Cap_Entry::new(client.clone(), format!("{base_path}_entry")), - utxo_amount: SeriesTree_Cohorts_Cohorts_Realized_Cap_UtxoAmount::new(client.clone(), format!("{base_path}_utxo_amount")), - term: SeriesTree_Cohorts_Cohorts_Realized_Cap_Term::new(client.clone(), format!("{base_path}_term")), - type_: SeriesTree_Cohorts_Cohorts_Realized_Cap_Type::new(client.clone(), format!("{base_path}_type")), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_cap_cents_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "realized_cap_cents_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "realized_cap_cents_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "realized_cap_cents_by_entry".to_string()), - type_matrix: SeriesPattern18::new(client.clone(), "realized_cap_cents_by_type".to_string()), - amount_range_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_cap_cents_by_amount_range".to_string()), - addr_balance: SeriesTree_Cohorts_Cohorts_Realized_Cap_AddrBalance::new(client.clone(), format!("{base_path}_addr_balance")), - to_own_mcap: AllLthSthPattern5::new(client.clone(), "realized_cap_to_own_mcap".to_string()), + age: SeriesTree_Cohorts_Cohorts_Realized_Cap_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Realized_Cap_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Realized_Cap_Class::new( + client.clone(), + format!("{base_path}_class"), + ), + entry: SeriesTree_Cohorts_Cohorts_Realized_Cap_Entry::new( + client.clone(), + format!("{base_path}_entry"), + ), + utxo_amount: SeriesTree_Cohorts_Cohorts_Realized_Cap_UtxoAmount::new( + client.clone(), + format!("{base_path}_utxo_amount"), + ), + term: SeriesTree_Cohorts_Cohorts_Realized_Cap_Term::new( + client.clone(), + format!("{base_path}_term"), + ), + type_: SeriesTree_Cohorts_Cohorts_Realized_Cap_Type::new( + client.clone(), + format!("{base_path}_type"), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_cap_cents_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "realized_cap_cents_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "realized_cap_cents_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "realized_cap_cents_by_entry".to_string(), + ), + type_matrix: SeriesPattern18::new( + client.clone(), + "realized_cap_cents_by_type".to_string(), + ), + amount_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_cap_cents_by_amount_range".to_string(), + ), + addr_balance: SeriesTree_Cohorts_Cohorts_Realized_Cap_AddrBalance::new( + client.clone(), + format!("{base_path}_addr_balance"), + ), + to_own_mcap: AllLthSthPattern5::new( + client.clone(), + "realized_cap_to_own_mcap".to_string(), + ), } } } @@ -15547,9 +23878,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Cap_Age { impl SeriesTree_Cohorts_Cohorts_Realized_Cap_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -15584,29 +23924,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_1h_old_realized_cap".to_string()), - _1h_to_1d: CentsDeltaUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_realized_cap".to_string()), - _1d_to_1w: CentsDeltaUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_realized_cap".to_string()), - _1w_to_1m: CentsDeltaUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_realized_cap".to_string()), - _1m_to_2m: CentsDeltaUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_realized_cap".to_string()), - _2m_to_3m: CentsDeltaUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_realized_cap".to_string()), - _3m_to_4m: CentsDeltaUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_realized_cap".to_string()), - _4m_to_5m: CentsDeltaUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_realized_cap".to_string()), - _5m_to_6m: CentsDeltaUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_realized_cap".to_string()), - _6m_to_9m: CentsDeltaUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_realized_cap".to_string()), - _9m_to_1y: CentsDeltaUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_realized_cap".to_string()), - _1y_to_18m: CentsDeltaUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_realized_cap".to_string()), - _18m_to_2y: CentsDeltaUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_realized_cap".to_string()), - _2y_to_3y: CentsDeltaUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_realized_cap".to_string()), - _3y_to_4y: CentsDeltaUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_realized_cap".to_string()), - _4y_to_5y: CentsDeltaUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_realized_cap".to_string()), - _5y_to_6y: CentsDeltaUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_realized_cap".to_string()), - _6y_to_7y: CentsDeltaUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_realized_cap".to_string()), - _7y_to_8y: CentsDeltaUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_realized_cap".to_string()), - _8y_to_10y: CentsDeltaUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_realized_cap".to_string()), - _10y_to_12y: CentsDeltaUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_realized_cap".to_string()), - _12y_to_15y: CentsDeltaUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_realized_cap".to_string()), - over_15y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_15y_old_realized_cap".to_string()), + under_1h: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_1h_old_realized_cap".to_string(), + ), + _1h_to_1d: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_realized_cap".to_string(), + ), + _1d_to_1w: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_realized_cap".to_string(), + ), + _1w_to_1m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_realized_cap".to_string(), + ), + _1m_to_2m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_realized_cap".to_string(), + ), + _2m_to_3m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_realized_cap".to_string(), + ), + _3m_to_4m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_realized_cap".to_string(), + ), + _4m_to_5m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_realized_cap".to_string(), + ), + _5m_to_6m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_realized_cap".to_string(), + ), + _6m_to_9m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_realized_cap".to_string(), + ), + _9m_to_1y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_realized_cap".to_string(), + ), + _1y_to_18m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_realized_cap".to_string(), + ), + _18m_to_2y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_realized_cap".to_string(), + ), + _2y_to_3y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_realized_cap".to_string(), + ), + _3y_to_4y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_realized_cap".to_string(), + ), + _4y_to_5y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_realized_cap".to_string(), + ), + _5y_to_6y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_realized_cap".to_string(), + ), + _6y_to_7y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_realized_cap".to_string(), + ), + _7y_to_8y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_realized_cap".to_string(), + ), + _8y_to_10y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_realized_cap".to_string(), + ), + _10y_to_12y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_realized_cap".to_string(), + ), + _12y_to_15y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_realized_cap".to_string(), + ), + over_15y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_15y_old_realized_cap".to_string(), + ), } } } @@ -15638,26 +24047,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_1w_old_realized_cap".to_string()), - _1m: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_1m_old_realized_cap".to_string()), - _2m: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_2m_old_realized_cap".to_string()), - _3m: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_3m_old_realized_cap".to_string()), - _4m: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_4m_old_realized_cap".to_string()), - _5m: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_5m_old_realized_cap".to_string()), - _6m: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_6m_old_realized_cap".to_string()), - _9m: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_9m_old_realized_cap".to_string()), - _1y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_1y_old_realized_cap".to_string()), - _18m: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_18m_old_realized_cap".to_string()), - _2y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_2y_old_realized_cap".to_string()), - _3y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_3y_old_realized_cap".to_string()), - _4y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_4y_old_realized_cap".to_string()), - _5y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_5y_old_realized_cap".to_string()), - _6y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_6y_old_realized_cap".to_string()), - _7y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_7y_old_realized_cap".to_string()), - _8y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_8y_old_realized_cap".to_string()), - _10y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_10y_old_realized_cap".to_string()), - _12y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_12y_old_realized_cap".to_string()), - _15y: CentsDeltaUsdPattern::new(client.clone(), "utxos_under_15y_old_realized_cap".to_string()), + _1w: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_1w_old_realized_cap".to_string(), + ), + _1m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_1m_old_realized_cap".to_string(), + ), + _2m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_2m_old_realized_cap".to_string(), + ), + _3m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_3m_old_realized_cap".to_string(), + ), + _4m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_4m_old_realized_cap".to_string(), + ), + _5m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_5m_old_realized_cap".to_string(), + ), + _6m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_6m_old_realized_cap".to_string(), + ), + _9m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_9m_old_realized_cap".to_string(), + ), + _1y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_1y_old_realized_cap".to_string(), + ), + _18m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_18m_old_realized_cap".to_string(), + ), + _2y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_2y_old_realized_cap".to_string(), + ), + _3y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_3y_old_realized_cap".to_string(), + ), + _4y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_4y_old_realized_cap".to_string(), + ), + _5y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_5y_old_realized_cap".to_string(), + ), + _6y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_6y_old_realized_cap".to_string(), + ), + _7y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_7y_old_realized_cap".to_string(), + ), + _8y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_8y_old_realized_cap".to_string(), + ), + _10y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_10y_old_realized_cap".to_string(), + ), + _12y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_12y_old_realized_cap".to_string(), + ), + _15y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_under_15y_old_realized_cap".to_string(), + ), } } } @@ -15689,26 +24158,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Cap_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_1d_old_realized_cap".to_string()), - _1w: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_1w_old_realized_cap".to_string()), - _1m: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_1m_old_realized_cap".to_string()), - _2m: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_2m_old_realized_cap".to_string()), - _3m: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_3m_old_realized_cap".to_string()), - _4m: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_4m_old_realized_cap".to_string()), - _5m: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_5m_old_realized_cap".to_string()), - _6m: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_6m_old_realized_cap".to_string()), - _9m: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_9m_old_realized_cap".to_string()), - _1y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_1y_old_realized_cap".to_string()), - _18m: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_18m_old_realized_cap".to_string()), - _2y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_2y_old_realized_cap".to_string()), - _3y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_3y_old_realized_cap".to_string()), - _4y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_4y_old_realized_cap".to_string()), - _5y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_5y_old_realized_cap".to_string()), - _6y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_6y_old_realized_cap".to_string()), - _7y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_7y_old_realized_cap".to_string()), - _8y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_8y_old_realized_cap".to_string()), - _10y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_10y_old_realized_cap".to_string()), - _12y: CentsDeltaUsdPattern::new(client.clone(), "utxos_over_12y_old_realized_cap".to_string()), + _1d: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_1d_old_realized_cap".to_string(), + ), + _1w: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_1w_old_realized_cap".to_string(), + ), + _1m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_1m_old_realized_cap".to_string(), + ), + _2m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_2m_old_realized_cap".to_string(), + ), + _3m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_3m_old_realized_cap".to_string(), + ), + _4m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_4m_old_realized_cap".to_string(), + ), + _5m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_5m_old_realized_cap".to_string(), + ), + _6m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_6m_old_realized_cap".to_string(), + ), + _9m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_9m_old_realized_cap".to_string(), + ), + _1y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_1y_old_realized_cap".to_string(), + ), + _18m: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_18m_old_realized_cap".to_string(), + ), + _2y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_2y_old_realized_cap".to_string(), + ), + _3y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_3y_old_realized_cap".to_string(), + ), + _4y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_4y_old_realized_cap".to_string(), + ), + _5y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_5y_old_realized_cap".to_string(), + ), + _6y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_6y_old_realized_cap".to_string(), + ), + _7y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_7y_old_realized_cap".to_string(), + ), + _8y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_8y_old_realized_cap".to_string(), + ), + _10y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_10y_old_realized_cap".to_string(), + ), + _12y: CentsDeltaUsdPattern::new( + client.clone(), + "utxos_over_12y_old_realized_cap".to_string(), + ), } } } @@ -15806,9 +24335,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Cap_UtxoAmount { impl SeriesTree_Cohorts_Cohorts_Realized_Cap_UtxoAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern4::new(client.clone(), "utxos".to_string()), - under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern4::new(client.clone(), "utxos_under".to_string()), - over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern4::new(client.clone(), "utxos_over".to_string()), + range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern4::new( + client.clone(), + "utxos".to_string(), + ), + under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern4::new( + client.clone(), + "utxos_under".to_string(), + ), + over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern4::new( + client.clone(), + "utxos_over".to_string(), + ), } } } @@ -15855,8 +24393,14 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Cap_Type { p2wsh: CentsDeltaUsdPattern::new(client.clone(), "p2wsh_realized_cap".to_string()), p2tr: CentsDeltaUsdPattern::new(client.clone(), "p2tr_realized_cap".to_string()), p2a: CentsDeltaUsdPattern::new(client.clone(), "p2a_realized_cap".to_string()), - unknown: CentsDeltaUsdPattern::new(client.clone(), "unknown_outputs_realized_cap".to_string()), - empty: CentsDeltaUsdPattern::new(client.clone(), "empty_outputs_realized_cap".to_string()), + unknown: CentsDeltaUsdPattern::new( + client.clone(), + "unknown_outputs_realized_cap".to_string(), + ), + empty: CentsDeltaUsdPattern::new( + client.clone(), + "empty_outputs_realized_cap".to_string(), + ), } } } @@ -15872,10 +24416,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Cap_AddrBalance { impl SeriesTree_Cohorts_Cohorts_Realized_Cap_AddrBalance { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern4::new(client.clone(), "addrs".to_string()), - under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern4::new(client.clone(), "addrs_under".to_string()), - over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern4::new(client.clone(), "addrs_over".to_string()), - matrix: SeriesPattern18::new(client.clone(), "addrs_realized_cap_cents_by_balance_range".to_string()), + range: _0sats100btc100k100sats10btc10k10m10sats1btc1k1m1satOverPattern4::new( + client.clone(), + "addrs".to_string(), + ), + under: _100btc100k100sats10btc10k10m10sats1btc1k1mPattern4::new( + client.clone(), + "addrs_under".to_string(), + ), + over: _100btc100k100sats10btc10k10m10sats1btc1k1m1satPattern4::new( + client.clone(), + "addrs_over".to_string(), + ), + matrix: SeriesPattern18::new( + client.clone(), + "addrs_realized_cap_cents_by_balance_range".to_string(), + ), } } } @@ -15907,24 +24463,78 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Price { pub fn new(client: Arc, base_path: String) -> Self { Self { all: CentsPpmRatioSatsUsdPattern::new(client.clone(), "realized_price".to_string()), - age: SeriesTree_Cohorts_Cohorts_Realized_Price_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Realized_Price_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Realized_Price_Class::new(client.clone(), format!("{base_path}_class")), - entry: SeriesTree_Cohorts_Cohorts_Realized_Price_Entry::new(client.clone(), format!("{base_path}_entry")), - utxo_amount: SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount::new(client.clone(), format!("{base_path}_utxo_amount")), - term: SeriesTree_Cohorts_Cohorts_Realized_Price_Term::new(client.clone(), format!("{base_path}_term")), - type_: SeriesTree_Cohorts_Cohorts_Realized_Price_Type::new(client.clone(), format!("{base_path}_type")), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_price_cents_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "realized_price_cents_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "realized_price_cents_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "realized_price_cents_by_entry".to_string()), - type_matrix: SeriesPattern18::new(client.clone(), "realized_price_cents_by_type".to_string()), - amount_range_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_price_cents_by_amount_range".to_string()), - aggregate_matrix: SeriesPattern18::new(client.clone(), "realized_price_cents_by_aggregate".to_string()), - under_age_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_price_cents_by_under_age".to_string()), - over_age_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_price_cents_by_over_age".to_string()), - under_amount_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_price_cents_by_under_amount".to_string()), - over_amount_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_price_cents_by_over_amount".to_string()), + age: SeriesTree_Cohorts_Cohorts_Realized_Price_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Realized_Price_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Realized_Price_Class::new( + client.clone(), + format!("{base_path}_class"), + ), + entry: SeriesTree_Cohorts_Cohorts_Realized_Price_Entry::new( + client.clone(), + format!("{base_path}_entry"), + ), + utxo_amount: SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount::new( + client.clone(), + format!("{base_path}_utxo_amount"), + ), + term: SeriesTree_Cohorts_Cohorts_Realized_Price_Term::new( + client.clone(), + format!("{base_path}_term"), + ), + type_: SeriesTree_Cohorts_Cohorts_Realized_Price_Type::new( + client.clone(), + format!("{base_path}_type"), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_price_cents_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "realized_price_cents_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "realized_price_cents_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "realized_price_cents_by_entry".to_string(), + ), + type_matrix: SeriesPattern18::new( + client.clone(), + "realized_price_cents_by_type".to_string(), + ), + amount_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_price_cents_by_amount_range".to_string(), + ), + aggregate_matrix: SeriesPattern18::new( + client.clone(), + "realized_price_cents_by_aggregate".to_string(), + ), + under_age_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_price_cents_by_under_age".to_string(), + ), + over_age_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_price_cents_by_over_age".to_string(), + ), + under_amount_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_price_cents_by_under_amount".to_string(), + ), + over_amount_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_price_cents_by_over_amount".to_string(), + ), } } } @@ -15939,9 +24549,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_Age { impl SeriesTree_Cohorts_Cohorts_Realized_Price_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -15976,29 +24595,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_1h_old_realized_price".to_string()), - _1h_to_1d: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_realized_price".to_string()), - _1d_to_1w: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_realized_price".to_string()), - _1w_to_1m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_realized_price".to_string()), - _1m_to_2m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_realized_price".to_string()), - _2m_to_3m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_realized_price".to_string()), - _3m_to_4m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_realized_price".to_string()), - _4m_to_5m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_realized_price".to_string()), - _5m_to_6m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_realized_price".to_string()), - _6m_to_9m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_realized_price".to_string()), - _9m_to_1y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_realized_price".to_string()), - _1y_to_18m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_realized_price".to_string()), - _18m_to_2y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_realized_price".to_string()), - _2y_to_3y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_realized_price".to_string()), - _3y_to_4y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_realized_price".to_string()), - _4y_to_5y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_realized_price".to_string()), - _5y_to_6y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_realized_price".to_string()), - _6y_to_7y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_realized_price".to_string()), - _7y_to_8y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_realized_price".to_string()), - _8y_to_10y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_realized_price".to_string()), - _10y_to_12y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_realized_price".to_string()), - _12y_to_15y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_realized_price".to_string()), - over_15y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_15y_old_realized_price".to_string()), + under_1h: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_1h_old_realized_price".to_string(), + ), + _1h_to_1d: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_realized_price".to_string(), + ), + _1d_to_1w: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_realized_price".to_string(), + ), + _1w_to_1m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_realized_price".to_string(), + ), + _1m_to_2m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_realized_price".to_string(), + ), + _2m_to_3m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_realized_price".to_string(), + ), + _3m_to_4m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_realized_price".to_string(), + ), + _4m_to_5m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_realized_price".to_string(), + ), + _5m_to_6m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_realized_price".to_string(), + ), + _6m_to_9m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_realized_price".to_string(), + ), + _9m_to_1y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_realized_price".to_string(), + ), + _1y_to_18m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_realized_price".to_string(), + ), + _18m_to_2y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_realized_price".to_string(), + ), + _2y_to_3y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_realized_price".to_string(), + ), + _3y_to_4y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_realized_price".to_string(), + ), + _4y_to_5y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_realized_price".to_string(), + ), + _5y_to_6y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_realized_price".to_string(), + ), + _6y_to_7y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_realized_price".to_string(), + ), + _7y_to_8y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_realized_price".to_string(), + ), + _8y_to_10y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_realized_price".to_string(), + ), + _10y_to_12y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_realized_price".to_string(), + ), + _12y_to_15y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_realized_price".to_string(), + ), + over_15y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_15y_old_realized_price".to_string(), + ), } } } @@ -16030,26 +24718,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_1w_old_realized_price".to_string()), - _1m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_1m_old_realized_price".to_string()), - _2m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_2m_old_realized_price".to_string()), - _3m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_3m_old_realized_price".to_string()), - _4m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_4m_old_realized_price".to_string()), - _5m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_5m_old_realized_price".to_string()), - _6m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_6m_old_realized_price".to_string()), - _9m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_9m_old_realized_price".to_string()), - _1y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_1y_old_realized_price".to_string()), - _18m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_18m_old_realized_price".to_string()), - _2y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_2y_old_realized_price".to_string()), - _3y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_3y_old_realized_price".to_string()), - _4y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_4y_old_realized_price".to_string()), - _5y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_5y_old_realized_price".to_string()), - _6y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_6y_old_realized_price".to_string()), - _7y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_7y_old_realized_price".to_string()), - _8y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_8y_old_realized_price".to_string()), - _10y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_10y_old_realized_price".to_string()), - _12y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_12y_old_realized_price".to_string()), - _15y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_15y_old_realized_price".to_string()), + _1w: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_1w_old_realized_price".to_string(), + ), + _1m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_1m_old_realized_price".to_string(), + ), + _2m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_2m_old_realized_price".to_string(), + ), + _3m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_3m_old_realized_price".to_string(), + ), + _4m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_4m_old_realized_price".to_string(), + ), + _5m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_5m_old_realized_price".to_string(), + ), + _6m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_6m_old_realized_price".to_string(), + ), + _9m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_9m_old_realized_price".to_string(), + ), + _1y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_1y_old_realized_price".to_string(), + ), + _18m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_18m_old_realized_price".to_string(), + ), + _2y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_2y_old_realized_price".to_string(), + ), + _3y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_3y_old_realized_price".to_string(), + ), + _4y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_4y_old_realized_price".to_string(), + ), + _5y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_5y_old_realized_price".to_string(), + ), + _6y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_6y_old_realized_price".to_string(), + ), + _7y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_7y_old_realized_price".to_string(), + ), + _8y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_8y_old_realized_price".to_string(), + ), + _10y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_10y_old_realized_price".to_string(), + ), + _12y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_12y_old_realized_price".to_string(), + ), + _15y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_15y_old_realized_price".to_string(), + ), } } } @@ -16081,26 +24829,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Price_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_1d_old_realized_price".to_string()), - _1w: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_1w_old_realized_price".to_string()), - _1m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_1m_old_realized_price".to_string()), - _2m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_2m_old_realized_price".to_string()), - _3m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_3m_old_realized_price".to_string()), - _4m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_4m_old_realized_price".to_string()), - _5m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_5m_old_realized_price".to_string()), - _6m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_6m_old_realized_price".to_string()), - _9m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_9m_old_realized_price".to_string()), - _1y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_1y_old_realized_price".to_string()), - _18m: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_18m_old_realized_price".to_string()), - _2y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_2y_old_realized_price".to_string()), - _3y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_3y_old_realized_price".to_string()), - _4y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_4y_old_realized_price".to_string()), - _5y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_5y_old_realized_price".to_string()), - _6y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_6y_old_realized_price".to_string()), - _7y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_7y_old_realized_price".to_string()), - _8y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_8y_old_realized_price".to_string()), - _10y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_10y_old_realized_price".to_string()), - _12y: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_12y_old_realized_price".to_string()), + _1d: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_1d_old_realized_price".to_string(), + ), + _1w: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_1w_old_realized_price".to_string(), + ), + _1m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_1m_old_realized_price".to_string(), + ), + _2m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_2m_old_realized_price".to_string(), + ), + _3m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_3m_old_realized_price".to_string(), + ), + _4m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_4m_old_realized_price".to_string(), + ), + _5m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_5m_old_realized_price".to_string(), + ), + _6m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_6m_old_realized_price".to_string(), + ), + _9m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_9m_old_realized_price".to_string(), + ), + _1y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_1y_old_realized_price".to_string(), + ), + _18m: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_18m_old_realized_price".to_string(), + ), + _2y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_2y_old_realized_price".to_string(), + ), + _3y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_3y_old_realized_price".to_string(), + ), + _4y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_4y_old_realized_price".to_string(), + ), + _5y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_5y_old_realized_price".to_string(), + ), + _6y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_6y_old_realized_price".to_string(), + ), + _7y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_7y_old_realized_price".to_string(), + ), + _8y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_8y_old_realized_price".to_string(), + ), + _10y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_10y_old_realized_price".to_string(), + ), + _12y: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_12y_old_realized_price".to_string(), + ), } } } @@ -16117,11 +24925,26 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_Epoch { impl SeriesTree_Cohorts_Cohorts_Realized_Price_Epoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0: CentsPpmRatioSatsUsdPattern::new(client.clone(), "epoch_0_realized_price".to_string()), - _1: CentsPpmRatioSatsUsdPattern::new(client.clone(), "epoch_1_realized_price".to_string()), - _2: CentsPpmRatioSatsUsdPattern::new(client.clone(), "epoch_2_realized_price".to_string()), - _3: CentsPpmRatioSatsUsdPattern::new(client.clone(), "epoch_3_realized_price".to_string()), - _4: CentsPpmRatioSatsUsdPattern::new(client.clone(), "epoch_4_realized_price".to_string()), + _0: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "epoch_0_realized_price".to_string(), + ), + _1: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "epoch_1_realized_price".to_string(), + ), + _2: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "epoch_2_realized_price".to_string(), + ), + _3: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "epoch_3_realized_price".to_string(), + ), + _4: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "epoch_4_realized_price".to_string(), + ), } } } @@ -16151,24 +24974,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_Class { impl SeriesTree_Cohorts_Cohorts_Realized_Price_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2009_realized_price".to_string()), - _2010: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2010_realized_price".to_string()), - _2011: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2011_realized_price".to_string()), - _2012: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2012_realized_price".to_string()), - _2013: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2013_realized_price".to_string()), - _2014: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2014_realized_price".to_string()), - _2015: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2015_realized_price".to_string()), - _2016: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2016_realized_price".to_string()), - _2017: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2017_realized_price".to_string()), - _2018: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2018_realized_price".to_string()), - _2019: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2019_realized_price".to_string()), - _2020: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2020_realized_price".to_string()), - _2021: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2021_realized_price".to_string()), - _2022: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2022_realized_price".to_string()), - _2023: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2023_realized_price".to_string()), - _2024: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2024_realized_price".to_string()), - _2025: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2025_realized_price".to_string()), - _2026: CentsPpmRatioSatsUsdPattern::new(client.clone(), "class_2026_realized_price".to_string()), + _2009: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2009_realized_price".to_string(), + ), + _2010: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2010_realized_price".to_string(), + ), + _2011: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2011_realized_price".to_string(), + ), + _2012: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2012_realized_price".to_string(), + ), + _2013: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2013_realized_price".to_string(), + ), + _2014: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2014_realized_price".to_string(), + ), + _2015: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2015_realized_price".to_string(), + ), + _2016: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2016_realized_price".to_string(), + ), + _2017: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2017_realized_price".to_string(), + ), + _2018: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2018_realized_price".to_string(), + ), + _2019: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2019_realized_price".to_string(), + ), + _2020: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2020_realized_price".to_string(), + ), + _2021: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2021_realized_price".to_string(), + ), + _2022: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2022_realized_price".to_string(), + ), + _2023: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2023_realized_price".to_string(), + ), + _2024: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2024_realized_price".to_string(), + ), + _2025: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2025_realized_price".to_string(), + ), + _2026: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "class_2026_realized_price".to_string(), + ), } } } @@ -16182,8 +25059,14 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_Entry { impl SeriesTree_Cohorts_Cohorts_Realized_Price_Entry { pub fn new(client: Arc, base_path: String) -> Self { Self { - discount: CentsPpmRatioSatsUsdPattern::new(client.clone(), "veteran_realized_price".to_string()), - premium: CentsPpmRatioSatsUsdPattern::new(client.clone(), "rookie_realized_price".to_string()), + discount: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "veteran_realized_price".to_string(), + ), + premium: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "rookie_realized_price".to_string(), + ), } } } @@ -16198,9 +25081,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount { impl SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -16227,21 +25119,66 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_0sats_realized_price".to_string()), - _1sat_to_10sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_1sat_to_10sats_realized_price".to_string()), - _10sats_to_100sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_10sats_to_100sats_realized_price".to_string()), - _100sats_to_1k_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_100sats_to_1k_sats_realized_price".to_string()), - _1k_sats_to_10k_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_1k_sats_to_10k_sats_realized_price".to_string()), - _10k_sats_to_100k_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_10k_sats_to_100k_sats_realized_price".to_string()), - _100k_sats_to_1m_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_100k_sats_to_1m_sats_realized_price".to_string()), - _1m_sats_to_10m_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_1m_sats_to_10m_sats_realized_price".to_string()), - _10m_sats_to_1btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_10m_sats_to_1btc_realized_price".to_string()), - _1btc_to_10btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_1btc_to_10btc_realized_price".to_string()), - _10btc_to_100btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_10btc_to_100btc_realized_price".to_string()), - _100btc_to_1k_btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_100btc_to_1k_btc_realized_price".to_string()), - _1k_btc_to_10k_btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_1k_btc_to_10k_btc_realized_price".to_string()), - _10k_btc_to_100k_btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_10k_btc_to_100k_btc_realized_price".to_string()), - over_100k_btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_100k_btc_realized_price".to_string()), + _0sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_0sats_realized_price".to_string(), + ), + _1sat_to_10sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_1sat_to_10sats_realized_price".to_string(), + ), + _10sats_to_100sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_10sats_to_100sats_realized_price".to_string(), + ), + _100sats_to_1k_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_100sats_to_1k_sats_realized_price".to_string(), + ), + _1k_sats_to_10k_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_1k_sats_to_10k_sats_realized_price".to_string(), + ), + _10k_sats_to_100k_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_10k_sats_to_100k_sats_realized_price".to_string(), + ), + _100k_sats_to_1m_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_100k_sats_to_1m_sats_realized_price".to_string(), + ), + _1m_sats_to_10m_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_1m_sats_to_10m_sats_realized_price".to_string(), + ), + _10m_sats_to_1btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_10m_sats_to_1btc_realized_price".to_string(), + ), + _1btc_to_10btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_1btc_to_10btc_realized_price".to_string(), + ), + _10btc_to_100btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_10btc_to_100btc_realized_price".to_string(), + ), + _100btc_to_1k_btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_100btc_to_1k_btc_realized_price".to_string(), + ), + _1k_btc_to_10k_btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_1k_btc_to_10k_btc_realized_price".to_string(), + ), + _10k_btc_to_100k_btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_10k_btc_to_100k_btc_realized_price".to_string(), + ), + over_100k_btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_100k_btc_realized_price".to_string(), + ), } } } @@ -16266,19 +25203,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _10sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_10sats_realized_price".to_string()), - _100sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_100sats_realized_price".to_string()), - _1k_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_1k_sats_realized_price".to_string()), - _10k_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_10k_sats_realized_price".to_string()), - _100k_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_100k_sats_realized_price".to_string()), - _1m_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_1m_sats_realized_price".to_string()), - _10m_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_10m_sats_realized_price".to_string()), - _1btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_1btc_realized_price".to_string()), - _10btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_10btc_realized_price".to_string()), - _100btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_100btc_realized_price".to_string()), - _1k_btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_1k_btc_realized_price".to_string()), - _10k_btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_10k_btc_realized_price".to_string()), - _100k_btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_under_100k_btc_realized_price".to_string()), + _10sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_10sats_realized_price".to_string(), + ), + _100sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_100sats_realized_price".to_string(), + ), + _1k_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_1k_sats_realized_price".to_string(), + ), + _10k_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_10k_sats_realized_price".to_string(), + ), + _100k_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_100k_sats_realized_price".to_string(), + ), + _1m_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_1m_sats_realized_price".to_string(), + ), + _10m_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_10m_sats_realized_price".to_string(), + ), + _1btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_1btc_realized_price".to_string(), + ), + _10btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_10btc_realized_price".to_string(), + ), + _100btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_100btc_realized_price".to_string(), + ), + _1k_btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_1k_btc_realized_price".to_string(), + ), + _10k_btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_10k_btc_realized_price".to_string(), + ), + _100k_btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_under_100k_btc_realized_price".to_string(), + ), } } } @@ -16303,19 +25279,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Price_UtxoAmount_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1sat: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_1sat_realized_price".to_string()), - _10sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_10sats_realized_price".to_string()), - _100sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_100sats_realized_price".to_string()), - _1k_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_1k_sats_realized_price".to_string()), - _10k_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_10k_sats_realized_price".to_string()), - _100k_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_100k_sats_realized_price".to_string()), - _1m_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_1m_sats_realized_price".to_string()), - _10m_sats: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_10m_sats_realized_price".to_string()), - _1btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_1btc_realized_price".to_string()), - _10btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_10btc_realized_price".to_string()), - _100btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_100btc_realized_price".to_string()), - _1k_btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_1k_btc_realized_price".to_string()), - _10k_btc: CentsPpmRatioSatsUsdPattern::new(client.clone(), "utxos_over_10k_btc_realized_price".to_string()), + _1sat: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_1sat_realized_price".to_string(), + ), + _10sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_10sats_realized_price".to_string(), + ), + _100sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_100sats_realized_price".to_string(), + ), + _1k_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_1k_sats_realized_price".to_string(), + ), + _10k_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_10k_sats_realized_price".to_string(), + ), + _100k_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_100k_sats_realized_price".to_string(), + ), + _1m_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_1m_sats_realized_price".to_string(), + ), + _10m_sats: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_10m_sats_realized_price".to_string(), + ), + _1btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_1btc_realized_price".to_string(), + ), + _10btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_10btc_realized_price".to_string(), + ), + _100btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_100btc_realized_price".to_string(), + ), + _1k_btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_1k_btc_realized_price".to_string(), + ), + _10k_btc: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "utxos_over_10k_btc_realized_price".to_string(), + ), } } } @@ -16329,8 +25344,14 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_Term { impl SeriesTree_Cohorts_Cohorts_Realized_Price_Term { pub fn new(client: Arc, base_path: String) -> Self { Self { - short: CentsPpmRatioSatsUsdPattern::new(client.clone(), "sth_realized_price".to_string()), - long: CentsPpmRatioSatsUsdPattern::new(client.clone(), "lth_realized_price".to_string()), + short: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "sth_realized_price".to_string(), + ), + long: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "lth_realized_price".to_string(), + ), } } } @@ -16353,17 +25374,47 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Price_Type { impl SeriesTree_Cohorts_Cohorts_Realized_Price_Type { pub fn new(client: Arc, base_path: String) -> Self { Self { - p2pk65: CentsPpmRatioSatsUsdPattern::new(client.clone(), "p2pk65_realized_price".to_string()), - p2pk33: CentsPpmRatioSatsUsdPattern::new(client.clone(), "p2pk33_realized_price".to_string()), - p2pkh: CentsPpmRatioSatsUsdPattern::new(client.clone(), "p2pkh_realized_price".to_string()), - p2ms: CentsPpmRatioSatsUsdPattern::new(client.clone(), "p2ms_realized_price".to_string()), - p2sh: CentsPpmRatioSatsUsdPattern::new(client.clone(), "p2sh_realized_price".to_string()), - p2wpkh: CentsPpmRatioSatsUsdPattern::new(client.clone(), "p2wpkh_realized_price".to_string()), - p2wsh: CentsPpmRatioSatsUsdPattern::new(client.clone(), "p2wsh_realized_price".to_string()), - p2tr: CentsPpmRatioSatsUsdPattern::new(client.clone(), "p2tr_realized_price".to_string()), + p2pk65: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "p2pk65_realized_price".to_string(), + ), + p2pk33: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "p2pk33_realized_price".to_string(), + ), + p2pkh: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "p2pkh_realized_price".to_string(), + ), + p2ms: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "p2ms_realized_price".to_string(), + ), + p2sh: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "p2sh_realized_price".to_string(), + ), + p2wpkh: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "p2wpkh_realized_price".to_string(), + ), + p2wsh: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "p2wsh_realized_price".to_string(), + ), + p2tr: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "p2tr_realized_price".to_string(), + ), p2a: CentsPpmRatioSatsUsdPattern::new(client.clone(), "p2a_realized_price".to_string()), - unknown: CentsPpmRatioSatsUsdPattern::new(client.clone(), "unknown_outputs_realized_price".to_string()), - empty: CentsPpmRatioSatsUsdPattern::new(client.clone(), "empty_outputs_realized_price".to_string()), + unknown: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "unknown_outputs_realized_price".to_string(), + ), + empty: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "empty_outputs_realized_price".to_string(), + ), } } } @@ -16391,20 +25442,56 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Profit { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BlockCumulativeSumPattern::new(client.clone(), "realized_profit".to_string()), - age: SeriesTree_Cohorts_Cohorts_Realized_Profit_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Realized_Profit_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Realized_Profit_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Realized_Profit_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Realized_Profit_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Realized_Profit_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern5::new(client.clone(), "realized_profit".to_string()), - utxo_amount: SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount::new(client.clone(), format!("{base_path}_utxo_amount")), + utxo_amount: SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount::new( + client.clone(), + format!("{base_path}_utxo_amount"), + ), term: LongShortPattern6::new(client.clone(), "realized_profit".to_string()), - type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern5::new(client.clone(), "realized_profit".to_string()), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_profit_cumulative_cents_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "realized_profit_cumulative_cents_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "realized_profit_cumulative_cents_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "realized_profit_cumulative_cents_by_entry".to_string()), - type_matrix: SeriesPattern18::new(client.clone(), "realized_profit_cumulative_cents_by_type".to_string()), - amount_range_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_profit_cumulative_cents_by_amount_range".to_string()), - addr_balance: SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance::new(client.clone(), format!("{base_path}_addr_balance")), + type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern5::new( + client.clone(), + "realized_profit".to_string(), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_profit_cumulative_cents_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "realized_profit_cumulative_cents_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "realized_profit_cumulative_cents_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "realized_profit_cumulative_cents_by_entry".to_string(), + ), + type_matrix: SeriesPattern18::new( + client.clone(), + "realized_profit_cumulative_cents_by_type".to_string(), + ), + amount_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_profit_cumulative_cents_by_amount_range".to_string(), + ), + addr_balance: SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance::new( + client.clone(), + format!("{base_path}_addr_balance"), + ), } } } @@ -16419,9 +25506,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_Age { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -16456,29 +25552,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1h_old_realized_profit".to_string()), - _1h_to_1d: BlockCumulativeSumPattern::new(client.clone(), "utxos_1h_to_1d_old_realized_profit".to_string()), - _1d_to_1w: BlockCumulativeSumPattern::new(client.clone(), "utxos_1d_to_1w_old_realized_profit".to_string()), - _1w_to_1m: BlockCumulativeSumPattern::new(client.clone(), "utxos_1w_to_1m_old_realized_profit".to_string()), - _1m_to_2m: BlockCumulativeSumPattern::new(client.clone(), "utxos_1m_to_2m_old_realized_profit".to_string()), - _2m_to_3m: BlockCumulativeSumPattern::new(client.clone(), "utxos_2m_to_3m_old_realized_profit".to_string()), - _3m_to_4m: BlockCumulativeSumPattern::new(client.clone(), "utxos_3m_to_4m_old_realized_profit".to_string()), - _4m_to_5m: BlockCumulativeSumPattern::new(client.clone(), "utxos_4m_to_5m_old_realized_profit".to_string()), - _5m_to_6m: BlockCumulativeSumPattern::new(client.clone(), "utxos_5m_to_6m_old_realized_profit".to_string()), - _6m_to_9m: BlockCumulativeSumPattern::new(client.clone(), "utxos_6m_to_9m_old_realized_profit".to_string()), - _9m_to_1y: BlockCumulativeSumPattern::new(client.clone(), "utxos_9m_to_1y_old_realized_profit".to_string()), - _1y_to_18m: BlockCumulativeSumPattern::new(client.clone(), "utxos_1y_to_18m_old_realized_profit".to_string()), - _18m_to_2y: BlockCumulativeSumPattern::new(client.clone(), "utxos_18m_to_2y_old_realized_profit".to_string()), - _2y_to_3y: BlockCumulativeSumPattern::new(client.clone(), "utxos_2y_to_3y_old_realized_profit".to_string()), - _3y_to_4y: BlockCumulativeSumPattern::new(client.clone(), "utxos_3y_to_4y_old_realized_profit".to_string()), - _4y_to_5y: BlockCumulativeSumPattern::new(client.clone(), "utxos_4y_to_5y_old_realized_profit".to_string()), - _5y_to_6y: BlockCumulativeSumPattern::new(client.clone(), "utxos_5y_to_6y_old_realized_profit".to_string()), - _6y_to_7y: BlockCumulativeSumPattern::new(client.clone(), "utxos_6y_to_7y_old_realized_profit".to_string()), - _7y_to_8y: BlockCumulativeSumPattern::new(client.clone(), "utxos_7y_to_8y_old_realized_profit".to_string()), - _8y_to_10y: BlockCumulativeSumPattern::new(client.clone(), "utxos_8y_to_10y_old_realized_profit".to_string()), - _10y_to_12y: BlockCumulativeSumPattern::new(client.clone(), "utxos_10y_to_12y_old_realized_profit".to_string()), - _12y_to_15y: BlockCumulativeSumPattern::new(client.clone(), "utxos_12y_to_15y_old_realized_profit".to_string()), - over_15y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_15y_old_realized_profit".to_string()), + under_1h: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1h_old_realized_profit".to_string(), + ), + _1h_to_1d: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1h_to_1d_old_realized_profit".to_string(), + ), + _1d_to_1w: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1d_to_1w_old_realized_profit".to_string(), + ), + _1w_to_1m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1w_to_1m_old_realized_profit".to_string(), + ), + _1m_to_2m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_to_2m_old_realized_profit".to_string(), + ), + _2m_to_3m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_2m_to_3m_old_realized_profit".to_string(), + ), + _3m_to_4m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_3m_to_4m_old_realized_profit".to_string(), + ), + _4m_to_5m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_4m_to_5m_old_realized_profit".to_string(), + ), + _5m_to_6m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_5m_to_6m_old_realized_profit".to_string(), + ), + _6m_to_9m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_6m_to_9m_old_realized_profit".to_string(), + ), + _9m_to_1y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_9m_to_1y_old_realized_profit".to_string(), + ), + _1y_to_18m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1y_to_18m_old_realized_profit".to_string(), + ), + _18m_to_2y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_18m_to_2y_old_realized_profit".to_string(), + ), + _2y_to_3y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_2y_to_3y_old_realized_profit".to_string(), + ), + _3y_to_4y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_3y_to_4y_old_realized_profit".to_string(), + ), + _4y_to_5y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_4y_to_5y_old_realized_profit".to_string(), + ), + _5y_to_6y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_5y_to_6y_old_realized_profit".to_string(), + ), + _6y_to_7y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_6y_to_7y_old_realized_profit".to_string(), + ), + _7y_to_8y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_7y_to_8y_old_realized_profit".to_string(), + ), + _8y_to_10y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_8y_to_10y_old_realized_profit".to_string(), + ), + _10y_to_12y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10y_to_12y_old_realized_profit".to_string(), + ), + _12y_to_15y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_12y_to_15y_old_realized_profit".to_string(), + ), + over_15y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_15y_old_realized_profit".to_string(), + ), } } } @@ -16510,26 +25675,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1w_old_realized_profit".to_string()), - _1m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1m_old_realized_profit".to_string()), - _2m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_2m_old_realized_profit".to_string()), - _3m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_3m_old_realized_profit".to_string()), - _4m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_4m_old_realized_profit".to_string()), - _5m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_5m_old_realized_profit".to_string()), - _6m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_6m_old_realized_profit".to_string()), - _9m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_9m_old_realized_profit".to_string()), - _1y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1y_old_realized_profit".to_string()), - _18m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_18m_old_realized_profit".to_string()), - _2y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_2y_old_realized_profit".to_string()), - _3y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_3y_old_realized_profit".to_string()), - _4y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_4y_old_realized_profit".to_string()), - _5y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_5y_old_realized_profit".to_string()), - _6y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_6y_old_realized_profit".to_string()), - _7y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_7y_old_realized_profit".to_string()), - _8y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_8y_old_realized_profit".to_string()), - _10y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10y_old_realized_profit".to_string()), - _12y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_12y_old_realized_profit".to_string()), - _15y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_15y_old_realized_profit".to_string()), + _1w: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1w_old_realized_profit".to_string(), + ), + _1m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1m_old_realized_profit".to_string(), + ), + _2m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_2m_old_realized_profit".to_string(), + ), + _3m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_3m_old_realized_profit".to_string(), + ), + _4m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_4m_old_realized_profit".to_string(), + ), + _5m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_5m_old_realized_profit".to_string(), + ), + _6m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_6m_old_realized_profit".to_string(), + ), + _9m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_9m_old_realized_profit".to_string(), + ), + _1y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1y_old_realized_profit".to_string(), + ), + _18m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_18m_old_realized_profit".to_string(), + ), + _2y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_2y_old_realized_profit".to_string(), + ), + _3y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_3y_old_realized_profit".to_string(), + ), + _4y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_4y_old_realized_profit".to_string(), + ), + _5y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_5y_old_realized_profit".to_string(), + ), + _6y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_6y_old_realized_profit".to_string(), + ), + _7y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_7y_old_realized_profit".to_string(), + ), + _8y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_8y_old_realized_profit".to_string(), + ), + _10y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10y_old_realized_profit".to_string(), + ), + _12y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_12y_old_realized_profit".to_string(), + ), + _15y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_15y_old_realized_profit".to_string(), + ), } } } @@ -16561,26 +25786,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1d_old_realized_profit".to_string()), - _1w: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1w_old_realized_profit".to_string()), - _1m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1m_old_realized_profit".to_string()), - _2m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_2m_old_realized_profit".to_string()), - _3m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_3m_old_realized_profit".to_string()), - _4m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_4m_old_realized_profit".to_string()), - _5m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_5m_old_realized_profit".to_string()), - _6m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_6m_old_realized_profit".to_string()), - _9m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_9m_old_realized_profit".to_string()), - _1y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1y_old_realized_profit".to_string()), - _18m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_18m_old_realized_profit".to_string()), - _2y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_2y_old_realized_profit".to_string()), - _3y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_3y_old_realized_profit".to_string()), - _4y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_4y_old_realized_profit".to_string()), - _5y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_5y_old_realized_profit".to_string()), - _6y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_6y_old_realized_profit".to_string()), - _7y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_7y_old_realized_profit".to_string()), - _8y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_8y_old_realized_profit".to_string()), - _10y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10y_old_realized_profit".to_string()), - _12y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_12y_old_realized_profit".to_string()), + _1d: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1d_old_realized_profit".to_string(), + ), + _1w: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1w_old_realized_profit".to_string(), + ), + _1m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1m_old_realized_profit".to_string(), + ), + _2m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_2m_old_realized_profit".to_string(), + ), + _3m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_3m_old_realized_profit".to_string(), + ), + _4m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_4m_old_realized_profit".to_string(), + ), + _5m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_5m_old_realized_profit".to_string(), + ), + _6m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_6m_old_realized_profit".to_string(), + ), + _9m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_9m_old_realized_profit".to_string(), + ), + _1y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1y_old_realized_profit".to_string(), + ), + _18m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_18m_old_realized_profit".to_string(), + ), + _2y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_2y_old_realized_profit".to_string(), + ), + _3y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_3y_old_realized_profit".to_string(), + ), + _4y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_4y_old_realized_profit".to_string(), + ), + _5y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_5y_old_realized_profit".to_string(), + ), + _6y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_6y_old_realized_profit".to_string(), + ), + _7y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_7y_old_realized_profit".to_string(), + ), + _8y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_8y_old_realized_profit".to_string(), + ), + _10y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10y_old_realized_profit".to_string(), + ), + _12y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_12y_old_realized_profit".to_string(), + ), } } } @@ -16597,11 +25882,26 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_Epoch { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_Epoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0: BlockCumulativeSumPattern::new(client.clone(), "epoch_0_realized_profit".to_string()), - _1: BlockCumulativeSumPattern::new(client.clone(), "epoch_1_realized_profit".to_string()), - _2: BlockCumulativeSumPattern::new(client.clone(), "epoch_2_realized_profit".to_string()), - _3: BlockCumulativeSumPattern::new(client.clone(), "epoch_3_realized_profit".to_string()), - _4: BlockCumulativeSumPattern::new(client.clone(), "epoch_4_realized_profit".to_string()), + _0: BlockCumulativeSumPattern::new( + client.clone(), + "epoch_0_realized_profit".to_string(), + ), + _1: BlockCumulativeSumPattern::new( + client.clone(), + "epoch_1_realized_profit".to_string(), + ), + _2: BlockCumulativeSumPattern::new( + client.clone(), + "epoch_2_realized_profit".to_string(), + ), + _3: BlockCumulativeSumPattern::new( + client.clone(), + "epoch_3_realized_profit".to_string(), + ), + _4: BlockCumulativeSumPattern::new( + client.clone(), + "epoch_4_realized_profit".to_string(), + ), } } } @@ -16631,24 +25931,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_Class { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: BlockCumulativeSumPattern::new(client.clone(), "class_2009_realized_profit".to_string()), - _2010: BlockCumulativeSumPattern::new(client.clone(), "class_2010_realized_profit".to_string()), - _2011: BlockCumulativeSumPattern::new(client.clone(), "class_2011_realized_profit".to_string()), - _2012: BlockCumulativeSumPattern::new(client.clone(), "class_2012_realized_profit".to_string()), - _2013: BlockCumulativeSumPattern::new(client.clone(), "class_2013_realized_profit".to_string()), - _2014: BlockCumulativeSumPattern::new(client.clone(), "class_2014_realized_profit".to_string()), - _2015: BlockCumulativeSumPattern::new(client.clone(), "class_2015_realized_profit".to_string()), - _2016: BlockCumulativeSumPattern::new(client.clone(), "class_2016_realized_profit".to_string()), - _2017: BlockCumulativeSumPattern::new(client.clone(), "class_2017_realized_profit".to_string()), - _2018: BlockCumulativeSumPattern::new(client.clone(), "class_2018_realized_profit".to_string()), - _2019: BlockCumulativeSumPattern::new(client.clone(), "class_2019_realized_profit".to_string()), - _2020: BlockCumulativeSumPattern::new(client.clone(), "class_2020_realized_profit".to_string()), - _2021: BlockCumulativeSumPattern::new(client.clone(), "class_2021_realized_profit".to_string()), - _2022: BlockCumulativeSumPattern::new(client.clone(), "class_2022_realized_profit".to_string()), - _2023: BlockCumulativeSumPattern::new(client.clone(), "class_2023_realized_profit".to_string()), - _2024: BlockCumulativeSumPattern::new(client.clone(), "class_2024_realized_profit".to_string()), - _2025: BlockCumulativeSumPattern::new(client.clone(), "class_2025_realized_profit".to_string()), - _2026: BlockCumulativeSumPattern::new(client.clone(), "class_2026_realized_profit".to_string()), + _2009: BlockCumulativeSumPattern::new( + client.clone(), + "class_2009_realized_profit".to_string(), + ), + _2010: BlockCumulativeSumPattern::new( + client.clone(), + "class_2010_realized_profit".to_string(), + ), + _2011: BlockCumulativeSumPattern::new( + client.clone(), + "class_2011_realized_profit".to_string(), + ), + _2012: BlockCumulativeSumPattern::new( + client.clone(), + "class_2012_realized_profit".to_string(), + ), + _2013: BlockCumulativeSumPattern::new( + client.clone(), + "class_2013_realized_profit".to_string(), + ), + _2014: BlockCumulativeSumPattern::new( + client.clone(), + "class_2014_realized_profit".to_string(), + ), + _2015: BlockCumulativeSumPattern::new( + client.clone(), + "class_2015_realized_profit".to_string(), + ), + _2016: BlockCumulativeSumPattern::new( + client.clone(), + "class_2016_realized_profit".to_string(), + ), + _2017: BlockCumulativeSumPattern::new( + client.clone(), + "class_2017_realized_profit".to_string(), + ), + _2018: BlockCumulativeSumPattern::new( + client.clone(), + "class_2018_realized_profit".to_string(), + ), + _2019: BlockCumulativeSumPattern::new( + client.clone(), + "class_2019_realized_profit".to_string(), + ), + _2020: BlockCumulativeSumPattern::new( + client.clone(), + "class_2020_realized_profit".to_string(), + ), + _2021: BlockCumulativeSumPattern::new( + client.clone(), + "class_2021_realized_profit".to_string(), + ), + _2022: BlockCumulativeSumPattern::new( + client.clone(), + "class_2022_realized_profit".to_string(), + ), + _2023: BlockCumulativeSumPattern::new( + client.clone(), + "class_2023_realized_profit".to_string(), + ), + _2024: BlockCumulativeSumPattern::new( + client.clone(), + "class_2024_realized_profit".to_string(), + ), + _2025: BlockCumulativeSumPattern::new( + client.clone(), + "class_2025_realized_profit".to_string(), + ), + _2026: BlockCumulativeSumPattern::new( + client.clone(), + "class_2026_realized_profit".to_string(), + ), } } } @@ -16663,9 +26017,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -16692,21 +26055,66 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_0sats_realized_profit".to_string()), - _1sat_to_10sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_1sat_to_10sats_realized_profit".to_string()), - _10sats_to_100sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_10sats_to_100sats_realized_profit".to_string()), - _100sats_to_1k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_100sats_to_1k_sats_realized_profit".to_string()), - _1k_sats_to_10k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_1k_sats_to_10k_sats_realized_profit".to_string()), - _10k_sats_to_100k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_10k_sats_to_100k_sats_realized_profit".to_string()), - _100k_sats_to_1m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_100k_sats_to_1m_sats_realized_profit".to_string()), - _1m_sats_to_10m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_1m_sats_to_10m_sats_realized_profit".to_string()), - _10m_sats_to_1btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_10m_sats_to_1btc_realized_profit".to_string()), - _1btc_to_10btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_1btc_to_10btc_realized_profit".to_string()), - _10btc_to_100btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_10btc_to_100btc_realized_profit".to_string()), - _100btc_to_1k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_100btc_to_1k_btc_realized_profit".to_string()), - _1k_btc_to_10k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_1k_btc_to_10k_btc_realized_profit".to_string()), - _10k_btc_to_100k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_10k_btc_to_100k_btc_realized_profit".to_string()), - over_100k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_100k_btc_realized_profit".to_string()), + _0sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_0sats_realized_profit".to_string(), + ), + _1sat_to_10sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1sat_to_10sats_realized_profit".to_string(), + ), + _10sats_to_100sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10sats_to_100sats_realized_profit".to_string(), + ), + _100sats_to_1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_100sats_to_1k_sats_realized_profit".to_string(), + ), + _1k_sats_to_10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1k_sats_to_10k_sats_realized_profit".to_string(), + ), + _10k_sats_to_100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10k_sats_to_100k_sats_realized_profit".to_string(), + ), + _100k_sats_to_1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_100k_sats_to_1m_sats_realized_profit".to_string(), + ), + _1m_sats_to_10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_sats_to_10m_sats_realized_profit".to_string(), + ), + _10m_sats_to_1btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10m_sats_to_1btc_realized_profit".to_string(), + ), + _1btc_to_10btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1btc_to_10btc_realized_profit".to_string(), + ), + _10btc_to_100btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10btc_to_100btc_realized_profit".to_string(), + ), + _100btc_to_1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_100btc_to_1k_btc_realized_profit".to_string(), + ), + _1k_btc_to_10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1k_btc_to_10k_btc_realized_profit".to_string(), + ), + _10k_btc_to_100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10k_btc_to_100k_btc_realized_profit".to_string(), + ), + over_100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100k_btc_realized_profit".to_string(), + ), } } } @@ -16731,19 +26139,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _10sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10sats_realized_profit".to_string()), - _100sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_100sats_realized_profit".to_string()), - _1k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1k_sats_realized_profit".to_string()), - _10k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10k_sats_realized_profit".to_string()), - _100k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_100k_sats_realized_profit".to_string()), - _1m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1m_sats_realized_profit".to_string()), - _10m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10m_sats_realized_profit".to_string()), - _1btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1btc_realized_profit".to_string()), - _10btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10btc_realized_profit".to_string()), - _100btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_100btc_realized_profit".to_string()), - _1k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1k_btc_realized_profit".to_string()), - _10k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10k_btc_realized_profit".to_string()), - _100k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_100k_btc_realized_profit".to_string()), + _10sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10sats_realized_profit".to_string(), + ), + _100sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100sats_realized_profit".to_string(), + ), + _1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1k_sats_realized_profit".to_string(), + ), + _10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10k_sats_realized_profit".to_string(), + ), + _100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100k_sats_realized_profit".to_string(), + ), + _1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1m_sats_realized_profit".to_string(), + ), + _10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10m_sats_realized_profit".to_string(), + ), + _1btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1btc_realized_profit".to_string(), + ), + _10btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10btc_realized_profit".to_string(), + ), + _100btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100btc_realized_profit".to_string(), + ), + _1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1k_btc_realized_profit".to_string(), + ), + _10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10k_btc_realized_profit".to_string(), + ), + _100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100k_btc_realized_profit".to_string(), + ), } } } @@ -16768,19 +26215,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_UtxoAmount_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1sat: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1sat_realized_profit".to_string()), - _10sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10sats_realized_profit".to_string()), - _100sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_100sats_realized_profit".to_string()), - _1k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1k_sats_realized_profit".to_string()), - _10k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10k_sats_realized_profit".to_string()), - _100k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_100k_sats_realized_profit".to_string()), - _1m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1m_sats_realized_profit".to_string()), - _10m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10m_sats_realized_profit".to_string()), - _1btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1btc_realized_profit".to_string()), - _10btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10btc_realized_profit".to_string()), - _100btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_100btc_realized_profit".to_string()), - _1k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1k_btc_realized_profit".to_string()), - _10k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10k_btc_realized_profit".to_string()), + _1sat: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1sat_realized_profit".to_string(), + ), + _10sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10sats_realized_profit".to_string(), + ), + _100sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100sats_realized_profit".to_string(), + ), + _1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1k_sats_realized_profit".to_string(), + ), + _10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10k_sats_realized_profit".to_string(), + ), + _100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100k_sats_realized_profit".to_string(), + ), + _1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1m_sats_realized_profit".to_string(), + ), + _10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10m_sats_realized_profit".to_string(), + ), + _1btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1btc_realized_profit".to_string(), + ), + _10btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10btc_realized_profit".to_string(), + ), + _100btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100btc_realized_profit".to_string(), + ), + _1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1k_btc_realized_profit".to_string(), + ), + _10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10k_btc_realized_profit".to_string(), + ), } } } @@ -16796,10 +26282,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Over::new(client.clone(), format!("{base_path}_over")), - matrix: SeriesPattern18::new(client.clone(), "addrs_realized_profit_cumulative_cents_by_balance_range".to_string()), + range: SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Over::new( + client.clone(), + format!("{base_path}_over"), + ), + matrix: SeriesPattern18::new( + client.clone(), + "addrs_realized_profit_cumulative_cents_by_balance_range".to_string(), + ), } } } @@ -16826,21 +26324,66 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_0sats_realized_profit".to_string()), - _1sat_to_10sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_1sat_to_10sats_realized_profit".to_string()), - _10sats_to_100sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_10sats_to_100sats_realized_profit".to_string()), - _100sats_to_1k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_100sats_to_1k_sats_realized_profit".to_string()), - _1k_sats_to_10k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_1k_sats_to_10k_sats_realized_profit".to_string()), - _10k_sats_to_100k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_10k_sats_to_100k_sats_realized_profit".to_string()), - _100k_sats_to_1m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_100k_sats_to_1m_sats_realized_profit".to_string()), - _1m_sats_to_10m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_1m_sats_to_10m_sats_realized_profit".to_string()), - _10m_sats_to_1btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_10m_sats_to_1btc_realized_profit".to_string()), - _1btc_to_10btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_1btc_to_10btc_realized_profit".to_string()), - _10btc_to_100btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_10btc_to_100btc_realized_profit".to_string()), - _100btc_to_1k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_100btc_to_1k_btc_realized_profit".to_string()), - _1k_btc_to_10k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_1k_btc_to_10k_btc_realized_profit".to_string()), - _10k_btc_to_100k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_10k_btc_to_100k_btc_realized_profit".to_string()), - over_100k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_100k_btc_realized_profit".to_string()), + _0sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_0sats_realized_profit".to_string(), + ), + _1sat_to_10sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_1sat_to_10sats_realized_profit".to_string(), + ), + _10sats_to_100sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_10sats_to_100sats_realized_profit".to_string(), + ), + _100sats_to_1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_100sats_to_1k_sats_realized_profit".to_string(), + ), + _1k_sats_to_10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_1k_sats_to_10k_sats_realized_profit".to_string(), + ), + _10k_sats_to_100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_10k_sats_to_100k_sats_realized_profit".to_string(), + ), + _100k_sats_to_1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_100k_sats_to_1m_sats_realized_profit".to_string(), + ), + _1m_sats_to_10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_1m_sats_to_10m_sats_realized_profit".to_string(), + ), + _10m_sats_to_1btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_10m_sats_to_1btc_realized_profit".to_string(), + ), + _1btc_to_10btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_1btc_to_10btc_realized_profit".to_string(), + ), + _10btc_to_100btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_10btc_to_100btc_realized_profit".to_string(), + ), + _100btc_to_1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_100btc_to_1k_btc_realized_profit".to_string(), + ), + _1k_btc_to_10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_1k_btc_to_10k_btc_realized_profit".to_string(), + ), + _10k_btc_to_100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_10k_btc_to_100k_btc_realized_profit".to_string(), + ), + over_100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_100k_btc_realized_profit".to_string(), + ), } } } @@ -16865,19 +26408,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _10sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_10sats_realized_profit".to_string()), - _100sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_100sats_realized_profit".to_string()), - _1k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_1k_sats_realized_profit".to_string()), - _10k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_10k_sats_realized_profit".to_string()), - _100k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_100k_sats_realized_profit".to_string()), - _1m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_1m_sats_realized_profit".to_string()), - _10m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_10m_sats_realized_profit".to_string()), - _1btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_1btc_realized_profit".to_string()), - _10btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_10btc_realized_profit".to_string()), - _100btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_100btc_realized_profit".to_string()), - _1k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_1k_btc_realized_profit".to_string()), - _10k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_10k_btc_realized_profit".to_string()), - _100k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_100k_btc_realized_profit".to_string()), + _10sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_10sats_realized_profit".to_string(), + ), + _100sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_100sats_realized_profit".to_string(), + ), + _1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_1k_sats_realized_profit".to_string(), + ), + _10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_10k_sats_realized_profit".to_string(), + ), + _100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_100k_sats_realized_profit".to_string(), + ), + _1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_1m_sats_realized_profit".to_string(), + ), + _10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_10m_sats_realized_profit".to_string(), + ), + _1btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_1btc_realized_profit".to_string(), + ), + _10btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_10btc_realized_profit".to_string(), + ), + _100btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_100btc_realized_profit".to_string(), + ), + _1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_1k_btc_realized_profit".to_string(), + ), + _10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_10k_btc_realized_profit".to_string(), + ), + _100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_100k_btc_realized_profit".to_string(), + ), } } } @@ -16902,19 +26484,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Profit_AddrBalance_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1sat: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_1sat_realized_profit".to_string()), - _10sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_10sats_realized_profit".to_string()), - _100sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_100sats_realized_profit".to_string()), - _1k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_1k_sats_realized_profit".to_string()), - _10k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_10k_sats_realized_profit".to_string()), - _100k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_100k_sats_realized_profit".to_string()), - _1m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_1m_sats_realized_profit".to_string()), - _10m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_10m_sats_realized_profit".to_string()), - _1btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_1btc_realized_profit".to_string()), - _10btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_10btc_realized_profit".to_string()), - _100btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_100btc_realized_profit".to_string()), - _1k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_1k_btc_realized_profit".to_string()), - _10k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_10k_btc_realized_profit".to_string()), + _1sat: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_1sat_realized_profit".to_string(), + ), + _10sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_10sats_realized_profit".to_string(), + ), + _100sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_100sats_realized_profit".to_string(), + ), + _1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_1k_sats_realized_profit".to_string(), + ), + _10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_10k_sats_realized_profit".to_string(), + ), + _100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_100k_sats_realized_profit".to_string(), + ), + _1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_1m_sats_realized_profit".to_string(), + ), + _10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_10m_sats_realized_profit".to_string(), + ), + _1btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_1btc_realized_profit".to_string(), + ), + _10btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_10btc_realized_profit".to_string(), + ), + _100btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_100btc_realized_profit".to_string(), + ), + _1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_1k_btc_realized_profit".to_string(), + ), + _10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_10k_btc_realized_profit".to_string(), + ), } } } @@ -16943,21 +26564,60 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Loss { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BlockCumulativeSumPattern::new(client.clone(), "realized_loss".to_string()), - age: SeriesTree_Cohorts_Cohorts_Realized_Loss_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Realized_Loss_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Realized_Loss_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Realized_Loss_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Realized_Loss_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Realized_Loss_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern5::new(client.clone(), "realized_loss".to_string()), - utxo_amount: SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount::new(client.clone(), format!("{base_path}_utxo_amount")), + utxo_amount: SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount::new( + client.clone(), + format!("{base_path}_utxo_amount"), + ), term: LongShortPattern6::new(client.clone(), "realized_loss".to_string()), - type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern5::new(client.clone(), "realized_loss".to_string()), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_loss_cumulative_cents_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "realized_loss_cumulative_cents_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "realized_loss_cumulative_cents_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "realized_loss_cumulative_cents_by_entry".to_string()), - type_matrix: SeriesPattern18::new(client.clone(), "realized_loss_cumulative_cents_by_type".to_string()), - amount_range_matrix: SeriesPattern18::new(client.clone(), "utxos_realized_loss_cumulative_cents_by_amount_range".to_string()), - addr_balance: SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance::new(client.clone(), format!("{base_path}_addr_balance")), - negative: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative::new(client.clone(), format!("{base_path}_negative")), + type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern5::new( + client.clone(), + "realized_loss".to_string(), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_loss_cumulative_cents_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "realized_loss_cumulative_cents_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "realized_loss_cumulative_cents_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "realized_loss_cumulative_cents_by_entry".to_string(), + ), + type_matrix: SeriesPattern18::new( + client.clone(), + "realized_loss_cumulative_cents_by_type".to_string(), + ), + amount_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_realized_loss_cumulative_cents_by_amount_range".to_string(), + ), + addr_balance: SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance::new( + client.clone(), + format!("{base_path}_addr_balance"), + ), + negative: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative::new( + client.clone(), + format!("{base_path}_negative"), + ), } } } @@ -16972,9 +26632,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_Age { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -17009,29 +26678,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1h_old_realized_loss".to_string()), - _1h_to_1d: BlockCumulativeSumPattern::new(client.clone(), "utxos_1h_to_1d_old_realized_loss".to_string()), - _1d_to_1w: BlockCumulativeSumPattern::new(client.clone(), "utxos_1d_to_1w_old_realized_loss".to_string()), - _1w_to_1m: BlockCumulativeSumPattern::new(client.clone(), "utxos_1w_to_1m_old_realized_loss".to_string()), - _1m_to_2m: BlockCumulativeSumPattern::new(client.clone(), "utxos_1m_to_2m_old_realized_loss".to_string()), - _2m_to_3m: BlockCumulativeSumPattern::new(client.clone(), "utxos_2m_to_3m_old_realized_loss".to_string()), - _3m_to_4m: BlockCumulativeSumPattern::new(client.clone(), "utxos_3m_to_4m_old_realized_loss".to_string()), - _4m_to_5m: BlockCumulativeSumPattern::new(client.clone(), "utxos_4m_to_5m_old_realized_loss".to_string()), - _5m_to_6m: BlockCumulativeSumPattern::new(client.clone(), "utxos_5m_to_6m_old_realized_loss".to_string()), - _6m_to_9m: BlockCumulativeSumPattern::new(client.clone(), "utxos_6m_to_9m_old_realized_loss".to_string()), - _9m_to_1y: BlockCumulativeSumPattern::new(client.clone(), "utxos_9m_to_1y_old_realized_loss".to_string()), - _1y_to_18m: BlockCumulativeSumPattern::new(client.clone(), "utxos_1y_to_18m_old_realized_loss".to_string()), - _18m_to_2y: BlockCumulativeSumPattern::new(client.clone(), "utxos_18m_to_2y_old_realized_loss".to_string()), - _2y_to_3y: BlockCumulativeSumPattern::new(client.clone(), "utxos_2y_to_3y_old_realized_loss".to_string()), - _3y_to_4y: BlockCumulativeSumPattern::new(client.clone(), "utxos_3y_to_4y_old_realized_loss".to_string()), - _4y_to_5y: BlockCumulativeSumPattern::new(client.clone(), "utxos_4y_to_5y_old_realized_loss".to_string()), - _5y_to_6y: BlockCumulativeSumPattern::new(client.clone(), "utxos_5y_to_6y_old_realized_loss".to_string()), - _6y_to_7y: BlockCumulativeSumPattern::new(client.clone(), "utxos_6y_to_7y_old_realized_loss".to_string()), - _7y_to_8y: BlockCumulativeSumPattern::new(client.clone(), "utxos_7y_to_8y_old_realized_loss".to_string()), - _8y_to_10y: BlockCumulativeSumPattern::new(client.clone(), "utxos_8y_to_10y_old_realized_loss".to_string()), - _10y_to_12y: BlockCumulativeSumPattern::new(client.clone(), "utxos_10y_to_12y_old_realized_loss".to_string()), - _12y_to_15y: BlockCumulativeSumPattern::new(client.clone(), "utxos_12y_to_15y_old_realized_loss".to_string()), - over_15y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_15y_old_realized_loss".to_string()), + under_1h: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1h_old_realized_loss".to_string(), + ), + _1h_to_1d: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1h_to_1d_old_realized_loss".to_string(), + ), + _1d_to_1w: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1d_to_1w_old_realized_loss".to_string(), + ), + _1w_to_1m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1w_to_1m_old_realized_loss".to_string(), + ), + _1m_to_2m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_to_2m_old_realized_loss".to_string(), + ), + _2m_to_3m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_2m_to_3m_old_realized_loss".to_string(), + ), + _3m_to_4m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_3m_to_4m_old_realized_loss".to_string(), + ), + _4m_to_5m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_4m_to_5m_old_realized_loss".to_string(), + ), + _5m_to_6m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_5m_to_6m_old_realized_loss".to_string(), + ), + _6m_to_9m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_6m_to_9m_old_realized_loss".to_string(), + ), + _9m_to_1y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_9m_to_1y_old_realized_loss".to_string(), + ), + _1y_to_18m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1y_to_18m_old_realized_loss".to_string(), + ), + _18m_to_2y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_18m_to_2y_old_realized_loss".to_string(), + ), + _2y_to_3y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_2y_to_3y_old_realized_loss".to_string(), + ), + _3y_to_4y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_3y_to_4y_old_realized_loss".to_string(), + ), + _4y_to_5y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_4y_to_5y_old_realized_loss".to_string(), + ), + _5y_to_6y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_5y_to_6y_old_realized_loss".to_string(), + ), + _6y_to_7y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_6y_to_7y_old_realized_loss".to_string(), + ), + _7y_to_8y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_7y_to_8y_old_realized_loss".to_string(), + ), + _8y_to_10y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_8y_to_10y_old_realized_loss".to_string(), + ), + _10y_to_12y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10y_to_12y_old_realized_loss".to_string(), + ), + _12y_to_15y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_12y_to_15y_old_realized_loss".to_string(), + ), + over_15y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_15y_old_realized_loss".to_string(), + ), } } } @@ -17063,26 +26801,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1w_old_realized_loss".to_string()), - _1m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1m_old_realized_loss".to_string()), - _2m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_2m_old_realized_loss".to_string()), - _3m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_3m_old_realized_loss".to_string()), - _4m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_4m_old_realized_loss".to_string()), - _5m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_5m_old_realized_loss".to_string()), - _6m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_6m_old_realized_loss".to_string()), - _9m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_9m_old_realized_loss".to_string()), - _1y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1y_old_realized_loss".to_string()), - _18m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_18m_old_realized_loss".to_string()), - _2y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_2y_old_realized_loss".to_string()), - _3y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_3y_old_realized_loss".to_string()), - _4y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_4y_old_realized_loss".to_string()), - _5y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_5y_old_realized_loss".to_string()), - _6y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_6y_old_realized_loss".to_string()), - _7y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_7y_old_realized_loss".to_string()), - _8y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_8y_old_realized_loss".to_string()), - _10y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10y_old_realized_loss".to_string()), - _12y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_12y_old_realized_loss".to_string()), - _15y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_15y_old_realized_loss".to_string()), + _1w: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1w_old_realized_loss".to_string(), + ), + _1m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1m_old_realized_loss".to_string(), + ), + _2m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_2m_old_realized_loss".to_string(), + ), + _3m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_3m_old_realized_loss".to_string(), + ), + _4m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_4m_old_realized_loss".to_string(), + ), + _5m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_5m_old_realized_loss".to_string(), + ), + _6m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_6m_old_realized_loss".to_string(), + ), + _9m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_9m_old_realized_loss".to_string(), + ), + _1y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1y_old_realized_loss".to_string(), + ), + _18m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_18m_old_realized_loss".to_string(), + ), + _2y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_2y_old_realized_loss".to_string(), + ), + _3y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_3y_old_realized_loss".to_string(), + ), + _4y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_4y_old_realized_loss".to_string(), + ), + _5y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_5y_old_realized_loss".to_string(), + ), + _6y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_6y_old_realized_loss".to_string(), + ), + _7y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_7y_old_realized_loss".to_string(), + ), + _8y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_8y_old_realized_loss".to_string(), + ), + _10y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10y_old_realized_loss".to_string(), + ), + _12y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_12y_old_realized_loss".to_string(), + ), + _15y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_15y_old_realized_loss".to_string(), + ), } } } @@ -17114,26 +26912,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1d_old_realized_loss".to_string()), - _1w: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1w_old_realized_loss".to_string()), - _1m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1m_old_realized_loss".to_string()), - _2m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_2m_old_realized_loss".to_string()), - _3m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_3m_old_realized_loss".to_string()), - _4m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_4m_old_realized_loss".to_string()), - _5m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_5m_old_realized_loss".to_string()), - _6m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_6m_old_realized_loss".to_string()), - _9m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_9m_old_realized_loss".to_string()), - _1y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1y_old_realized_loss".to_string()), - _18m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_18m_old_realized_loss".to_string()), - _2y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_2y_old_realized_loss".to_string()), - _3y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_3y_old_realized_loss".to_string()), - _4y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_4y_old_realized_loss".to_string()), - _5y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_5y_old_realized_loss".to_string()), - _6y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_6y_old_realized_loss".to_string()), - _7y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_7y_old_realized_loss".to_string()), - _8y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_8y_old_realized_loss".to_string()), - _10y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10y_old_realized_loss".to_string()), - _12y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_12y_old_realized_loss".to_string()), + _1d: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1d_old_realized_loss".to_string(), + ), + _1w: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1w_old_realized_loss".to_string(), + ), + _1m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1m_old_realized_loss".to_string(), + ), + _2m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_2m_old_realized_loss".to_string(), + ), + _3m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_3m_old_realized_loss".to_string(), + ), + _4m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_4m_old_realized_loss".to_string(), + ), + _5m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_5m_old_realized_loss".to_string(), + ), + _6m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_6m_old_realized_loss".to_string(), + ), + _9m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_9m_old_realized_loss".to_string(), + ), + _1y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1y_old_realized_loss".to_string(), + ), + _18m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_18m_old_realized_loss".to_string(), + ), + _2y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_2y_old_realized_loss".to_string(), + ), + _3y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_3y_old_realized_loss".to_string(), + ), + _4y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_4y_old_realized_loss".to_string(), + ), + _5y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_5y_old_realized_loss".to_string(), + ), + _6y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_6y_old_realized_loss".to_string(), + ), + _7y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_7y_old_realized_loss".to_string(), + ), + _8y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_8y_old_realized_loss".to_string(), + ), + _10y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10y_old_realized_loss".to_string(), + ), + _12y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_12y_old_realized_loss".to_string(), + ), } } } @@ -17184,24 +27042,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_Class { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: BlockCumulativeSumPattern::new(client.clone(), "class_2009_realized_loss".to_string()), - _2010: BlockCumulativeSumPattern::new(client.clone(), "class_2010_realized_loss".to_string()), - _2011: BlockCumulativeSumPattern::new(client.clone(), "class_2011_realized_loss".to_string()), - _2012: BlockCumulativeSumPattern::new(client.clone(), "class_2012_realized_loss".to_string()), - _2013: BlockCumulativeSumPattern::new(client.clone(), "class_2013_realized_loss".to_string()), - _2014: BlockCumulativeSumPattern::new(client.clone(), "class_2014_realized_loss".to_string()), - _2015: BlockCumulativeSumPattern::new(client.clone(), "class_2015_realized_loss".to_string()), - _2016: BlockCumulativeSumPattern::new(client.clone(), "class_2016_realized_loss".to_string()), - _2017: BlockCumulativeSumPattern::new(client.clone(), "class_2017_realized_loss".to_string()), - _2018: BlockCumulativeSumPattern::new(client.clone(), "class_2018_realized_loss".to_string()), - _2019: BlockCumulativeSumPattern::new(client.clone(), "class_2019_realized_loss".to_string()), - _2020: BlockCumulativeSumPattern::new(client.clone(), "class_2020_realized_loss".to_string()), - _2021: BlockCumulativeSumPattern::new(client.clone(), "class_2021_realized_loss".to_string()), - _2022: BlockCumulativeSumPattern::new(client.clone(), "class_2022_realized_loss".to_string()), - _2023: BlockCumulativeSumPattern::new(client.clone(), "class_2023_realized_loss".to_string()), - _2024: BlockCumulativeSumPattern::new(client.clone(), "class_2024_realized_loss".to_string()), - _2025: BlockCumulativeSumPattern::new(client.clone(), "class_2025_realized_loss".to_string()), - _2026: BlockCumulativeSumPattern::new(client.clone(), "class_2026_realized_loss".to_string()), + _2009: BlockCumulativeSumPattern::new( + client.clone(), + "class_2009_realized_loss".to_string(), + ), + _2010: BlockCumulativeSumPattern::new( + client.clone(), + "class_2010_realized_loss".to_string(), + ), + _2011: BlockCumulativeSumPattern::new( + client.clone(), + "class_2011_realized_loss".to_string(), + ), + _2012: BlockCumulativeSumPattern::new( + client.clone(), + "class_2012_realized_loss".to_string(), + ), + _2013: BlockCumulativeSumPattern::new( + client.clone(), + "class_2013_realized_loss".to_string(), + ), + _2014: BlockCumulativeSumPattern::new( + client.clone(), + "class_2014_realized_loss".to_string(), + ), + _2015: BlockCumulativeSumPattern::new( + client.clone(), + "class_2015_realized_loss".to_string(), + ), + _2016: BlockCumulativeSumPattern::new( + client.clone(), + "class_2016_realized_loss".to_string(), + ), + _2017: BlockCumulativeSumPattern::new( + client.clone(), + "class_2017_realized_loss".to_string(), + ), + _2018: BlockCumulativeSumPattern::new( + client.clone(), + "class_2018_realized_loss".to_string(), + ), + _2019: BlockCumulativeSumPattern::new( + client.clone(), + "class_2019_realized_loss".to_string(), + ), + _2020: BlockCumulativeSumPattern::new( + client.clone(), + "class_2020_realized_loss".to_string(), + ), + _2021: BlockCumulativeSumPattern::new( + client.clone(), + "class_2021_realized_loss".to_string(), + ), + _2022: BlockCumulativeSumPattern::new( + client.clone(), + "class_2022_realized_loss".to_string(), + ), + _2023: BlockCumulativeSumPattern::new( + client.clone(), + "class_2023_realized_loss".to_string(), + ), + _2024: BlockCumulativeSumPattern::new( + client.clone(), + "class_2024_realized_loss".to_string(), + ), + _2025: BlockCumulativeSumPattern::new( + client.clone(), + "class_2025_realized_loss".to_string(), + ), + _2026: BlockCumulativeSumPattern::new( + client.clone(), + "class_2026_realized_loss".to_string(), + ), } } } @@ -17216,9 +27128,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -17245,21 +27166,66 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_0sats_realized_loss".to_string()), - _1sat_to_10sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_1sat_to_10sats_realized_loss".to_string()), - _10sats_to_100sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_10sats_to_100sats_realized_loss".to_string()), - _100sats_to_1k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_100sats_to_1k_sats_realized_loss".to_string()), - _1k_sats_to_10k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_1k_sats_to_10k_sats_realized_loss".to_string()), - _10k_sats_to_100k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_10k_sats_to_100k_sats_realized_loss".to_string()), - _100k_sats_to_1m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_100k_sats_to_1m_sats_realized_loss".to_string()), - _1m_sats_to_10m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_1m_sats_to_10m_sats_realized_loss".to_string()), - _10m_sats_to_1btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_10m_sats_to_1btc_realized_loss".to_string()), - _1btc_to_10btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_1btc_to_10btc_realized_loss".to_string()), - _10btc_to_100btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_10btc_to_100btc_realized_loss".to_string()), - _100btc_to_1k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_100btc_to_1k_btc_realized_loss".to_string()), - _1k_btc_to_10k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_1k_btc_to_10k_btc_realized_loss".to_string()), - _10k_btc_to_100k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_10k_btc_to_100k_btc_realized_loss".to_string()), - over_100k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_100k_btc_realized_loss".to_string()), + _0sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_0sats_realized_loss".to_string(), + ), + _1sat_to_10sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1sat_to_10sats_realized_loss".to_string(), + ), + _10sats_to_100sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10sats_to_100sats_realized_loss".to_string(), + ), + _100sats_to_1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_100sats_to_1k_sats_realized_loss".to_string(), + ), + _1k_sats_to_10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1k_sats_to_10k_sats_realized_loss".to_string(), + ), + _10k_sats_to_100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10k_sats_to_100k_sats_realized_loss".to_string(), + ), + _100k_sats_to_1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_100k_sats_to_1m_sats_realized_loss".to_string(), + ), + _1m_sats_to_10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_sats_to_10m_sats_realized_loss".to_string(), + ), + _10m_sats_to_1btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10m_sats_to_1btc_realized_loss".to_string(), + ), + _1btc_to_10btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1btc_to_10btc_realized_loss".to_string(), + ), + _10btc_to_100btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10btc_to_100btc_realized_loss".to_string(), + ), + _100btc_to_1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_100btc_to_1k_btc_realized_loss".to_string(), + ), + _1k_btc_to_10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1k_btc_to_10k_btc_realized_loss".to_string(), + ), + _10k_btc_to_100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10k_btc_to_100k_btc_realized_loss".to_string(), + ), + over_100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100k_btc_realized_loss".to_string(), + ), } } } @@ -17284,19 +27250,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _10sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10sats_realized_loss".to_string()), - _100sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_100sats_realized_loss".to_string()), - _1k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1k_sats_realized_loss".to_string()), - _10k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10k_sats_realized_loss".to_string()), - _100k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_100k_sats_realized_loss".to_string()), - _1m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1m_sats_realized_loss".to_string()), - _10m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10m_sats_realized_loss".to_string()), - _1btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1btc_realized_loss".to_string()), - _10btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10btc_realized_loss".to_string()), - _100btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_100btc_realized_loss".to_string()), - _1k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1k_btc_realized_loss".to_string()), - _10k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10k_btc_realized_loss".to_string()), - _100k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_100k_btc_realized_loss".to_string()), + _10sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10sats_realized_loss".to_string(), + ), + _100sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100sats_realized_loss".to_string(), + ), + _1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1k_sats_realized_loss".to_string(), + ), + _10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10k_sats_realized_loss".to_string(), + ), + _100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100k_sats_realized_loss".to_string(), + ), + _1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1m_sats_realized_loss".to_string(), + ), + _10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10m_sats_realized_loss".to_string(), + ), + _1btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1btc_realized_loss".to_string(), + ), + _10btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10btc_realized_loss".to_string(), + ), + _100btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100btc_realized_loss".to_string(), + ), + _1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1k_btc_realized_loss".to_string(), + ), + _10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10k_btc_realized_loss".to_string(), + ), + _100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_100k_btc_realized_loss".to_string(), + ), } } } @@ -17321,19 +27326,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_UtxoAmount_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1sat: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1sat_realized_loss".to_string()), - _10sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10sats_realized_loss".to_string()), - _100sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_100sats_realized_loss".to_string()), - _1k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1k_sats_realized_loss".to_string()), - _10k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10k_sats_realized_loss".to_string()), - _100k_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_100k_sats_realized_loss".to_string()), - _1m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1m_sats_realized_loss".to_string()), - _10m_sats: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10m_sats_realized_loss".to_string()), - _1btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1btc_realized_loss".to_string()), - _10btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10btc_realized_loss".to_string()), - _100btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_100btc_realized_loss".to_string()), - _1k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1k_btc_realized_loss".to_string()), - _10k_btc: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10k_btc_realized_loss".to_string()), + _1sat: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1sat_realized_loss".to_string(), + ), + _10sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10sats_realized_loss".to_string(), + ), + _100sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100sats_realized_loss".to_string(), + ), + _1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1k_sats_realized_loss".to_string(), + ), + _10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10k_sats_realized_loss".to_string(), + ), + _100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100k_sats_realized_loss".to_string(), + ), + _1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1m_sats_realized_loss".to_string(), + ), + _10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10m_sats_realized_loss".to_string(), + ), + _1btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1btc_realized_loss".to_string(), + ), + _10btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10btc_realized_loss".to_string(), + ), + _100btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_100btc_realized_loss".to_string(), + ), + _1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1k_btc_realized_loss".to_string(), + ), + _10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10k_btc_realized_loss".to_string(), + ), } } } @@ -17349,10 +27393,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Over::new(client.clone(), format!("{base_path}_over")), - matrix: SeriesPattern18::new(client.clone(), "addrs_realized_loss_cumulative_cents_by_balance_range".to_string()), + range: SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Over::new( + client.clone(), + format!("{base_path}_over"), + ), + matrix: SeriesPattern18::new( + client.clone(), + "addrs_realized_loss_cumulative_cents_by_balance_range".to_string(), + ), } } } @@ -17379,21 +27435,66 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_0sats_realized_loss".to_string()), - _1sat_to_10sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_1sat_to_10sats_realized_loss".to_string()), - _10sats_to_100sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_10sats_to_100sats_realized_loss".to_string()), - _100sats_to_1k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_100sats_to_1k_sats_realized_loss".to_string()), - _1k_sats_to_10k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_1k_sats_to_10k_sats_realized_loss".to_string()), - _10k_sats_to_100k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_10k_sats_to_100k_sats_realized_loss".to_string()), - _100k_sats_to_1m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_100k_sats_to_1m_sats_realized_loss".to_string()), - _1m_sats_to_10m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_1m_sats_to_10m_sats_realized_loss".to_string()), - _10m_sats_to_1btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_10m_sats_to_1btc_realized_loss".to_string()), - _1btc_to_10btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_1btc_to_10btc_realized_loss".to_string()), - _10btc_to_100btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_10btc_to_100btc_realized_loss".to_string()), - _100btc_to_1k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_100btc_to_1k_btc_realized_loss".to_string()), - _1k_btc_to_10k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_1k_btc_to_10k_btc_realized_loss".to_string()), - _10k_btc_to_100k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_10k_btc_to_100k_btc_realized_loss".to_string()), - over_100k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_100k_btc_realized_loss".to_string()), + _0sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_0sats_realized_loss".to_string(), + ), + _1sat_to_10sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_1sat_to_10sats_realized_loss".to_string(), + ), + _10sats_to_100sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_10sats_to_100sats_realized_loss".to_string(), + ), + _100sats_to_1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_100sats_to_1k_sats_realized_loss".to_string(), + ), + _1k_sats_to_10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_1k_sats_to_10k_sats_realized_loss".to_string(), + ), + _10k_sats_to_100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_10k_sats_to_100k_sats_realized_loss".to_string(), + ), + _100k_sats_to_1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_100k_sats_to_1m_sats_realized_loss".to_string(), + ), + _1m_sats_to_10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_1m_sats_to_10m_sats_realized_loss".to_string(), + ), + _10m_sats_to_1btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_10m_sats_to_1btc_realized_loss".to_string(), + ), + _1btc_to_10btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_1btc_to_10btc_realized_loss".to_string(), + ), + _10btc_to_100btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_10btc_to_100btc_realized_loss".to_string(), + ), + _100btc_to_1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_100btc_to_1k_btc_realized_loss".to_string(), + ), + _1k_btc_to_10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_1k_btc_to_10k_btc_realized_loss".to_string(), + ), + _10k_btc_to_100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_10k_btc_to_100k_btc_realized_loss".to_string(), + ), + over_100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_100k_btc_realized_loss".to_string(), + ), } } } @@ -17418,19 +27519,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _10sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_10sats_realized_loss".to_string()), - _100sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_100sats_realized_loss".to_string()), - _1k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_1k_sats_realized_loss".to_string()), - _10k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_10k_sats_realized_loss".to_string()), - _100k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_100k_sats_realized_loss".to_string()), - _1m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_1m_sats_realized_loss".to_string()), - _10m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_10m_sats_realized_loss".to_string()), - _1btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_1btc_realized_loss".to_string()), - _10btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_10btc_realized_loss".to_string()), - _100btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_100btc_realized_loss".to_string()), - _1k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_1k_btc_realized_loss".to_string()), - _10k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_10k_btc_realized_loss".to_string()), - _100k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_under_100k_btc_realized_loss".to_string()), + _10sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_10sats_realized_loss".to_string(), + ), + _100sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_100sats_realized_loss".to_string(), + ), + _1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_1k_sats_realized_loss".to_string(), + ), + _10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_10k_sats_realized_loss".to_string(), + ), + _100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_100k_sats_realized_loss".to_string(), + ), + _1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_1m_sats_realized_loss".to_string(), + ), + _10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_10m_sats_realized_loss".to_string(), + ), + _1btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_1btc_realized_loss".to_string(), + ), + _10btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_10btc_realized_loss".to_string(), + ), + _100btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_100btc_realized_loss".to_string(), + ), + _1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_1k_btc_realized_loss".to_string(), + ), + _10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_10k_btc_realized_loss".to_string(), + ), + _100k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_under_100k_btc_realized_loss".to_string(), + ), } } } @@ -17455,19 +27595,58 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_AddrBalance_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1sat: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_1sat_realized_loss".to_string()), - _10sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_10sats_realized_loss".to_string()), - _100sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_100sats_realized_loss".to_string()), - _1k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_1k_sats_realized_loss".to_string()), - _10k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_10k_sats_realized_loss".to_string()), - _100k_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_100k_sats_realized_loss".to_string()), - _1m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_1m_sats_realized_loss".to_string()), - _10m_sats: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_10m_sats_realized_loss".to_string()), - _1btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_1btc_realized_loss".to_string()), - _10btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_10btc_realized_loss".to_string()), - _100btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_100btc_realized_loss".to_string()), - _1k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_1k_btc_realized_loss".to_string()), - _10k_btc: BlockCumulativeSumPattern::new(client.clone(), "addrs_over_10k_btc_realized_loss".to_string()), + _1sat: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_1sat_realized_loss".to_string(), + ), + _10sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_10sats_realized_loss".to_string(), + ), + _100sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_100sats_realized_loss".to_string(), + ), + _1k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_1k_sats_realized_loss".to_string(), + ), + _10k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_10k_sats_realized_loss".to_string(), + ), + _100k_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_100k_sats_realized_loss".to_string(), + ), + _1m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_1m_sats_realized_loss".to_string(), + ), + _10m_sats: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_10m_sats_realized_loss".to_string(), + ), + _1btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_1btc_realized_loss".to_string(), + ), + _10btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_10btc_realized_loss".to_string(), + ), + _100btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_100btc_realized_loss".to_string(), + ), + _1k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_1k_btc_realized_loss".to_string(), + ), + _10k_btc: BlockCumulativeSumPattern::new( + client.clone(), + "addrs_over_10k_btc_realized_loss".to_string(), + ), } } } @@ -17486,11 +27665,26 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BaseSumPattern::new(client.clone(), "realized_loss_neg".to_string()), - age: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Class::new(client.clone(), format!("{base_path}_class")), - entry: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Entry::new(client.clone(), format!("{base_path}_entry")), - term: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Term::new(client.clone(), format!("{base_path}_term")), + age: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Class::new( + client.clone(), + format!("{base_path}_class"), + ), + entry: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Entry::new( + client.clone(), + format!("{base_path}_entry"), + ), + term: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Term::new( + client.clone(), + format!("{base_path}_term"), + ), } } } @@ -17505,9 +27699,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -17542,29 +27745,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BaseSumPattern::new(client.clone(), "utxos_under_1h_old_realized_loss_neg".to_string()), - _1h_to_1d: BaseSumPattern::new(client.clone(), "utxos_1h_to_1d_old_realized_loss_neg".to_string()), - _1d_to_1w: BaseSumPattern::new(client.clone(), "utxos_1d_to_1w_old_realized_loss_neg".to_string()), - _1w_to_1m: BaseSumPattern::new(client.clone(), "utxos_1w_to_1m_old_realized_loss_neg".to_string()), - _1m_to_2m: BaseSumPattern::new(client.clone(), "utxos_1m_to_2m_old_realized_loss_neg".to_string()), - _2m_to_3m: BaseSumPattern::new(client.clone(), "utxos_2m_to_3m_old_realized_loss_neg".to_string()), - _3m_to_4m: BaseSumPattern::new(client.clone(), "utxos_3m_to_4m_old_realized_loss_neg".to_string()), - _4m_to_5m: BaseSumPattern::new(client.clone(), "utxos_4m_to_5m_old_realized_loss_neg".to_string()), - _5m_to_6m: BaseSumPattern::new(client.clone(), "utxos_5m_to_6m_old_realized_loss_neg".to_string()), - _6m_to_9m: BaseSumPattern::new(client.clone(), "utxos_6m_to_9m_old_realized_loss_neg".to_string()), - _9m_to_1y: BaseSumPattern::new(client.clone(), "utxos_9m_to_1y_old_realized_loss_neg".to_string()), - _1y_to_18m: BaseSumPattern::new(client.clone(), "utxos_1y_to_18m_old_realized_loss_neg".to_string()), - _18m_to_2y: BaseSumPattern::new(client.clone(), "utxos_18m_to_2y_old_realized_loss_neg".to_string()), - _2y_to_3y: BaseSumPattern::new(client.clone(), "utxos_2y_to_3y_old_realized_loss_neg".to_string()), - _3y_to_4y: BaseSumPattern::new(client.clone(), "utxos_3y_to_4y_old_realized_loss_neg".to_string()), - _4y_to_5y: BaseSumPattern::new(client.clone(), "utxos_4y_to_5y_old_realized_loss_neg".to_string()), - _5y_to_6y: BaseSumPattern::new(client.clone(), "utxos_5y_to_6y_old_realized_loss_neg".to_string()), - _6y_to_7y: BaseSumPattern::new(client.clone(), "utxos_6y_to_7y_old_realized_loss_neg".to_string()), - _7y_to_8y: BaseSumPattern::new(client.clone(), "utxos_7y_to_8y_old_realized_loss_neg".to_string()), - _8y_to_10y: BaseSumPattern::new(client.clone(), "utxos_8y_to_10y_old_realized_loss_neg".to_string()), - _10y_to_12y: BaseSumPattern::new(client.clone(), "utxos_10y_to_12y_old_realized_loss_neg".to_string()), - _12y_to_15y: BaseSumPattern::new(client.clone(), "utxos_12y_to_15y_old_realized_loss_neg".to_string()), - over_15y: BaseSumPattern::new(client.clone(), "utxos_over_15y_old_realized_loss_neg".to_string()), + under_1h: BaseSumPattern::new( + client.clone(), + "utxos_under_1h_old_realized_loss_neg".to_string(), + ), + _1h_to_1d: BaseSumPattern::new( + client.clone(), + "utxos_1h_to_1d_old_realized_loss_neg".to_string(), + ), + _1d_to_1w: BaseSumPattern::new( + client.clone(), + "utxos_1d_to_1w_old_realized_loss_neg".to_string(), + ), + _1w_to_1m: BaseSumPattern::new( + client.clone(), + "utxos_1w_to_1m_old_realized_loss_neg".to_string(), + ), + _1m_to_2m: BaseSumPattern::new( + client.clone(), + "utxos_1m_to_2m_old_realized_loss_neg".to_string(), + ), + _2m_to_3m: BaseSumPattern::new( + client.clone(), + "utxos_2m_to_3m_old_realized_loss_neg".to_string(), + ), + _3m_to_4m: BaseSumPattern::new( + client.clone(), + "utxos_3m_to_4m_old_realized_loss_neg".to_string(), + ), + _4m_to_5m: BaseSumPattern::new( + client.clone(), + "utxos_4m_to_5m_old_realized_loss_neg".to_string(), + ), + _5m_to_6m: BaseSumPattern::new( + client.clone(), + "utxos_5m_to_6m_old_realized_loss_neg".to_string(), + ), + _6m_to_9m: BaseSumPattern::new( + client.clone(), + "utxos_6m_to_9m_old_realized_loss_neg".to_string(), + ), + _9m_to_1y: BaseSumPattern::new( + client.clone(), + "utxos_9m_to_1y_old_realized_loss_neg".to_string(), + ), + _1y_to_18m: BaseSumPattern::new( + client.clone(), + "utxos_1y_to_18m_old_realized_loss_neg".to_string(), + ), + _18m_to_2y: BaseSumPattern::new( + client.clone(), + "utxos_18m_to_2y_old_realized_loss_neg".to_string(), + ), + _2y_to_3y: BaseSumPattern::new( + client.clone(), + "utxos_2y_to_3y_old_realized_loss_neg".to_string(), + ), + _3y_to_4y: BaseSumPattern::new( + client.clone(), + "utxos_3y_to_4y_old_realized_loss_neg".to_string(), + ), + _4y_to_5y: BaseSumPattern::new( + client.clone(), + "utxos_4y_to_5y_old_realized_loss_neg".to_string(), + ), + _5y_to_6y: BaseSumPattern::new( + client.clone(), + "utxos_5y_to_6y_old_realized_loss_neg".to_string(), + ), + _6y_to_7y: BaseSumPattern::new( + client.clone(), + "utxos_6y_to_7y_old_realized_loss_neg".to_string(), + ), + _7y_to_8y: BaseSumPattern::new( + client.clone(), + "utxos_7y_to_8y_old_realized_loss_neg".to_string(), + ), + _8y_to_10y: BaseSumPattern::new( + client.clone(), + "utxos_8y_to_10y_old_realized_loss_neg".to_string(), + ), + _10y_to_12y: BaseSumPattern::new( + client.clone(), + "utxos_10y_to_12y_old_realized_loss_neg".to_string(), + ), + _12y_to_15y: BaseSumPattern::new( + client.clone(), + "utxos_12y_to_15y_old_realized_loss_neg".to_string(), + ), + over_15y: BaseSumPattern::new( + client.clone(), + "utxos_over_15y_old_realized_loss_neg".to_string(), + ), } } } @@ -17596,26 +27868,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: BaseSumPattern::new(client.clone(), "utxos_under_1w_old_realized_loss_neg".to_string()), - _1m: BaseSumPattern::new(client.clone(), "utxos_under_1m_old_realized_loss_neg".to_string()), - _2m: BaseSumPattern::new(client.clone(), "utxos_under_2m_old_realized_loss_neg".to_string()), - _3m: BaseSumPattern::new(client.clone(), "utxos_under_3m_old_realized_loss_neg".to_string()), - _4m: BaseSumPattern::new(client.clone(), "utxos_under_4m_old_realized_loss_neg".to_string()), - _5m: BaseSumPattern::new(client.clone(), "utxos_under_5m_old_realized_loss_neg".to_string()), - _6m: BaseSumPattern::new(client.clone(), "utxos_under_6m_old_realized_loss_neg".to_string()), - _9m: BaseSumPattern::new(client.clone(), "utxos_under_9m_old_realized_loss_neg".to_string()), - _1y: BaseSumPattern::new(client.clone(), "utxos_under_1y_old_realized_loss_neg".to_string()), - _18m: BaseSumPattern::new(client.clone(), "utxos_under_18m_old_realized_loss_neg".to_string()), - _2y: BaseSumPattern::new(client.clone(), "utxos_under_2y_old_realized_loss_neg".to_string()), - _3y: BaseSumPattern::new(client.clone(), "utxos_under_3y_old_realized_loss_neg".to_string()), - _4y: BaseSumPattern::new(client.clone(), "utxos_under_4y_old_realized_loss_neg".to_string()), - _5y: BaseSumPattern::new(client.clone(), "utxos_under_5y_old_realized_loss_neg".to_string()), - _6y: BaseSumPattern::new(client.clone(), "utxos_under_6y_old_realized_loss_neg".to_string()), - _7y: BaseSumPattern::new(client.clone(), "utxos_under_7y_old_realized_loss_neg".to_string()), - _8y: BaseSumPattern::new(client.clone(), "utxos_under_8y_old_realized_loss_neg".to_string()), - _10y: BaseSumPattern::new(client.clone(), "utxos_under_10y_old_realized_loss_neg".to_string()), - _12y: BaseSumPattern::new(client.clone(), "utxos_under_12y_old_realized_loss_neg".to_string()), - _15y: BaseSumPattern::new(client.clone(), "utxos_under_15y_old_realized_loss_neg".to_string()), + _1w: BaseSumPattern::new( + client.clone(), + "utxos_under_1w_old_realized_loss_neg".to_string(), + ), + _1m: BaseSumPattern::new( + client.clone(), + "utxos_under_1m_old_realized_loss_neg".to_string(), + ), + _2m: BaseSumPattern::new( + client.clone(), + "utxos_under_2m_old_realized_loss_neg".to_string(), + ), + _3m: BaseSumPattern::new( + client.clone(), + "utxos_under_3m_old_realized_loss_neg".to_string(), + ), + _4m: BaseSumPattern::new( + client.clone(), + "utxos_under_4m_old_realized_loss_neg".to_string(), + ), + _5m: BaseSumPattern::new( + client.clone(), + "utxos_under_5m_old_realized_loss_neg".to_string(), + ), + _6m: BaseSumPattern::new( + client.clone(), + "utxos_under_6m_old_realized_loss_neg".to_string(), + ), + _9m: BaseSumPattern::new( + client.clone(), + "utxos_under_9m_old_realized_loss_neg".to_string(), + ), + _1y: BaseSumPattern::new( + client.clone(), + "utxos_under_1y_old_realized_loss_neg".to_string(), + ), + _18m: BaseSumPattern::new( + client.clone(), + "utxos_under_18m_old_realized_loss_neg".to_string(), + ), + _2y: BaseSumPattern::new( + client.clone(), + "utxos_under_2y_old_realized_loss_neg".to_string(), + ), + _3y: BaseSumPattern::new( + client.clone(), + "utxos_under_3y_old_realized_loss_neg".to_string(), + ), + _4y: BaseSumPattern::new( + client.clone(), + "utxos_under_4y_old_realized_loss_neg".to_string(), + ), + _5y: BaseSumPattern::new( + client.clone(), + "utxos_under_5y_old_realized_loss_neg".to_string(), + ), + _6y: BaseSumPattern::new( + client.clone(), + "utxos_under_6y_old_realized_loss_neg".to_string(), + ), + _7y: BaseSumPattern::new( + client.clone(), + "utxos_under_7y_old_realized_loss_neg".to_string(), + ), + _8y: BaseSumPattern::new( + client.clone(), + "utxos_under_8y_old_realized_loss_neg".to_string(), + ), + _10y: BaseSumPattern::new( + client.clone(), + "utxos_under_10y_old_realized_loss_neg".to_string(), + ), + _12y: BaseSumPattern::new( + client.clone(), + "utxos_under_12y_old_realized_loss_neg".to_string(), + ), + _15y: BaseSumPattern::new( + client.clone(), + "utxos_under_15y_old_realized_loss_neg".to_string(), + ), } } } @@ -17647,26 +27979,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Loss_Negative_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: BaseSumPattern::new(client.clone(), "utxos_over_1d_old_realized_loss_neg".to_string()), - _1w: BaseSumPattern::new(client.clone(), "utxos_over_1w_old_realized_loss_neg".to_string()), - _1m: BaseSumPattern::new(client.clone(), "utxos_over_1m_old_realized_loss_neg".to_string()), - _2m: BaseSumPattern::new(client.clone(), "utxos_over_2m_old_realized_loss_neg".to_string()), - _3m: BaseSumPattern::new(client.clone(), "utxos_over_3m_old_realized_loss_neg".to_string()), - _4m: BaseSumPattern::new(client.clone(), "utxos_over_4m_old_realized_loss_neg".to_string()), - _5m: BaseSumPattern::new(client.clone(), "utxos_over_5m_old_realized_loss_neg".to_string()), - _6m: BaseSumPattern::new(client.clone(), "utxos_over_6m_old_realized_loss_neg".to_string()), - _9m: BaseSumPattern::new(client.clone(), "utxos_over_9m_old_realized_loss_neg".to_string()), - _1y: BaseSumPattern::new(client.clone(), "utxos_over_1y_old_realized_loss_neg".to_string()), - _18m: BaseSumPattern::new(client.clone(), "utxos_over_18m_old_realized_loss_neg".to_string()), - _2y: BaseSumPattern::new(client.clone(), "utxos_over_2y_old_realized_loss_neg".to_string()), - _3y: BaseSumPattern::new(client.clone(), "utxos_over_3y_old_realized_loss_neg".to_string()), - _4y: BaseSumPattern::new(client.clone(), "utxos_over_4y_old_realized_loss_neg".to_string()), - _5y: BaseSumPattern::new(client.clone(), "utxos_over_5y_old_realized_loss_neg".to_string()), - _6y: BaseSumPattern::new(client.clone(), "utxos_over_6y_old_realized_loss_neg".to_string()), - _7y: BaseSumPattern::new(client.clone(), "utxos_over_7y_old_realized_loss_neg".to_string()), - _8y: BaseSumPattern::new(client.clone(), "utxos_over_8y_old_realized_loss_neg".to_string()), - _10y: BaseSumPattern::new(client.clone(), "utxos_over_10y_old_realized_loss_neg".to_string()), - _12y: BaseSumPattern::new(client.clone(), "utxos_over_12y_old_realized_loss_neg".to_string()), + _1d: BaseSumPattern::new( + client.clone(), + "utxos_over_1d_old_realized_loss_neg".to_string(), + ), + _1w: BaseSumPattern::new( + client.clone(), + "utxos_over_1w_old_realized_loss_neg".to_string(), + ), + _1m: BaseSumPattern::new( + client.clone(), + "utxos_over_1m_old_realized_loss_neg".to_string(), + ), + _2m: BaseSumPattern::new( + client.clone(), + "utxos_over_2m_old_realized_loss_neg".to_string(), + ), + _3m: BaseSumPattern::new( + client.clone(), + "utxos_over_3m_old_realized_loss_neg".to_string(), + ), + _4m: BaseSumPattern::new( + client.clone(), + "utxos_over_4m_old_realized_loss_neg".to_string(), + ), + _5m: BaseSumPattern::new( + client.clone(), + "utxos_over_5m_old_realized_loss_neg".to_string(), + ), + _6m: BaseSumPattern::new( + client.clone(), + "utxos_over_6m_old_realized_loss_neg".to_string(), + ), + _9m: BaseSumPattern::new( + client.clone(), + "utxos_over_9m_old_realized_loss_neg".to_string(), + ), + _1y: BaseSumPattern::new( + client.clone(), + "utxos_over_1y_old_realized_loss_neg".to_string(), + ), + _18m: BaseSumPattern::new( + client.clone(), + "utxos_over_18m_old_realized_loss_neg".to_string(), + ), + _2y: BaseSumPattern::new( + client.clone(), + "utxos_over_2y_old_realized_loss_neg".to_string(), + ), + _3y: BaseSumPattern::new( + client.clone(), + "utxos_over_3y_old_realized_loss_neg".to_string(), + ), + _4y: BaseSumPattern::new( + client.clone(), + "utxos_over_4y_old_realized_loss_neg".to_string(), + ), + _5y: BaseSumPattern::new( + client.clone(), + "utxos_over_5y_old_realized_loss_neg".to_string(), + ), + _6y: BaseSumPattern::new( + client.clone(), + "utxos_over_6y_old_realized_loss_neg".to_string(), + ), + _7y: BaseSumPattern::new( + client.clone(), + "utxos_over_7y_old_realized_loss_neg".to_string(), + ), + _8y: BaseSumPattern::new( + client.clone(), + "utxos_over_8y_old_realized_loss_neg".to_string(), + ), + _10y: BaseSumPattern::new( + client.clone(), + "utxos_over_10y_old_realized_loss_neg".to_string(), + ), + _12y: BaseSumPattern::new( + client.clone(), + "utxos_over_12y_old_realized_loss_neg".to_string(), + ), } } } @@ -17787,17 +28179,50 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: BlockCumulativeDeltaSumPattern::new(client.clone(), "net_realized_pnl".to_string()), - age: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Class::new(client.clone(), format!("{base_path}_class")), - entry: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Entry::new(client.clone(), format!("{base_path}_entry")), - term: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Term::new(client.clone(), format!("{base_path}_term")), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_net_realized_pnl_cumulative_cents_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "net_realized_pnl_cumulative_cents_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "net_realized_pnl_cumulative_cents_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "net_realized_pnl_cumulative_cents_by_entry".to_string()), - change_1m: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Change1m::new(client.clone(), format!("{base_path}_change_1m")), + all: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "net_realized_pnl".to_string(), + ), + age: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Class::new( + client.clone(), + format!("{base_path}_class"), + ), + entry: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Entry::new( + client.clone(), + format!("{base_path}_entry"), + ), + term: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Term::new( + client.clone(), + format!("{base_path}_term"), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_net_realized_pnl_cumulative_cents_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "net_realized_pnl_cumulative_cents_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "net_realized_pnl_cumulative_cents_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "net_realized_pnl_cumulative_cents_by_entry".to_string(), + ), + change_1m: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Change1m::new( + client.clone(), + format!("{base_path}_change_1m"), + ), } } } @@ -17812,9 +28237,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -17849,29 +28283,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Range { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_1h_old_net_realized_pnl".to_string()), - _1h_to_1d: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_1h_to_1d_old_net_realized_pnl".to_string()), - _1d_to_1w: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_1d_to_1w_old_net_realized_pnl".to_string()), - _1w_to_1m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_1w_to_1m_old_net_realized_pnl".to_string()), - _1m_to_2m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_1m_to_2m_old_net_realized_pnl".to_string()), - _2m_to_3m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_2m_to_3m_old_net_realized_pnl".to_string()), - _3m_to_4m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_3m_to_4m_old_net_realized_pnl".to_string()), - _4m_to_5m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_4m_to_5m_old_net_realized_pnl".to_string()), - _5m_to_6m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_5m_to_6m_old_net_realized_pnl".to_string()), - _6m_to_9m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_6m_to_9m_old_net_realized_pnl".to_string()), - _9m_to_1y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_9m_to_1y_old_net_realized_pnl".to_string()), - _1y_to_18m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_1y_to_18m_old_net_realized_pnl".to_string()), - _18m_to_2y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_18m_to_2y_old_net_realized_pnl".to_string()), - _2y_to_3y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_2y_to_3y_old_net_realized_pnl".to_string()), - _3y_to_4y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_3y_to_4y_old_net_realized_pnl".to_string()), - _4y_to_5y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_4y_to_5y_old_net_realized_pnl".to_string()), - _5y_to_6y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_5y_to_6y_old_net_realized_pnl".to_string()), - _6y_to_7y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_6y_to_7y_old_net_realized_pnl".to_string()), - _7y_to_8y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_7y_to_8y_old_net_realized_pnl".to_string()), - _8y_to_10y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_8y_to_10y_old_net_realized_pnl".to_string()), - _10y_to_12y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_10y_to_12y_old_net_realized_pnl".to_string()), - _12y_to_15y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_12y_to_15y_old_net_realized_pnl".to_string()), - over_15y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_15y_old_net_realized_pnl".to_string()), + under_1h: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_1h_old_net_realized_pnl".to_string(), + ), + _1h_to_1d: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_1h_to_1d_old_net_realized_pnl".to_string(), + ), + _1d_to_1w: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_1d_to_1w_old_net_realized_pnl".to_string(), + ), + _1w_to_1m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_1w_to_1m_old_net_realized_pnl".to_string(), + ), + _1m_to_2m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_1m_to_2m_old_net_realized_pnl".to_string(), + ), + _2m_to_3m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_2m_to_3m_old_net_realized_pnl".to_string(), + ), + _3m_to_4m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_3m_to_4m_old_net_realized_pnl".to_string(), + ), + _4m_to_5m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_4m_to_5m_old_net_realized_pnl".to_string(), + ), + _5m_to_6m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_5m_to_6m_old_net_realized_pnl".to_string(), + ), + _6m_to_9m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_6m_to_9m_old_net_realized_pnl".to_string(), + ), + _9m_to_1y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_9m_to_1y_old_net_realized_pnl".to_string(), + ), + _1y_to_18m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_1y_to_18m_old_net_realized_pnl".to_string(), + ), + _18m_to_2y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_18m_to_2y_old_net_realized_pnl".to_string(), + ), + _2y_to_3y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_2y_to_3y_old_net_realized_pnl".to_string(), + ), + _3y_to_4y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_3y_to_4y_old_net_realized_pnl".to_string(), + ), + _4y_to_5y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_4y_to_5y_old_net_realized_pnl".to_string(), + ), + _5y_to_6y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_5y_to_6y_old_net_realized_pnl".to_string(), + ), + _6y_to_7y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_6y_to_7y_old_net_realized_pnl".to_string(), + ), + _7y_to_8y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_7y_to_8y_old_net_realized_pnl".to_string(), + ), + _8y_to_10y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_8y_to_10y_old_net_realized_pnl".to_string(), + ), + _10y_to_12y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_10y_to_12y_old_net_realized_pnl".to_string(), + ), + _12y_to_15y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_12y_to_15y_old_net_realized_pnl".to_string(), + ), + over_15y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_15y_old_net_realized_pnl".to_string(), + ), } } } @@ -17903,26 +28406,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Under { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_1w_old_net_realized_pnl".to_string()), - _1m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_1m_old_net_realized_pnl".to_string()), - _2m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_2m_old_net_realized_pnl".to_string()), - _3m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_3m_old_net_realized_pnl".to_string()), - _4m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_4m_old_net_realized_pnl".to_string()), - _5m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_5m_old_net_realized_pnl".to_string()), - _6m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_6m_old_net_realized_pnl".to_string()), - _9m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_9m_old_net_realized_pnl".to_string()), - _1y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_1y_old_net_realized_pnl".to_string()), - _18m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_18m_old_net_realized_pnl".to_string()), - _2y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_2y_old_net_realized_pnl".to_string()), - _3y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_3y_old_net_realized_pnl".to_string()), - _4y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_4y_old_net_realized_pnl".to_string()), - _5y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_5y_old_net_realized_pnl".to_string()), - _6y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_6y_old_net_realized_pnl".to_string()), - _7y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_7y_old_net_realized_pnl".to_string()), - _8y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_8y_old_net_realized_pnl".to_string()), - _10y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_10y_old_net_realized_pnl".to_string()), - _12y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_12y_old_net_realized_pnl".to_string()), - _15y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_under_15y_old_net_realized_pnl".to_string()), + _1w: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_1w_old_net_realized_pnl".to_string(), + ), + _1m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_1m_old_net_realized_pnl".to_string(), + ), + _2m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_2m_old_net_realized_pnl".to_string(), + ), + _3m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_3m_old_net_realized_pnl".to_string(), + ), + _4m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_4m_old_net_realized_pnl".to_string(), + ), + _5m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_5m_old_net_realized_pnl".to_string(), + ), + _6m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_6m_old_net_realized_pnl".to_string(), + ), + _9m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_9m_old_net_realized_pnl".to_string(), + ), + _1y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_1y_old_net_realized_pnl".to_string(), + ), + _18m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_18m_old_net_realized_pnl".to_string(), + ), + _2y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_2y_old_net_realized_pnl".to_string(), + ), + _3y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_3y_old_net_realized_pnl".to_string(), + ), + _4y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_4y_old_net_realized_pnl".to_string(), + ), + _5y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_5y_old_net_realized_pnl".to_string(), + ), + _6y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_6y_old_net_realized_pnl".to_string(), + ), + _7y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_7y_old_net_realized_pnl".to_string(), + ), + _8y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_8y_old_net_realized_pnl".to_string(), + ), + _10y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_10y_old_net_realized_pnl".to_string(), + ), + _12y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_12y_old_net_realized_pnl".to_string(), + ), + _15y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_under_15y_old_net_realized_pnl".to_string(), + ), } } } @@ -17954,26 +28517,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Over { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_1d_old_net_realized_pnl".to_string()), - _1w: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_1w_old_net_realized_pnl".to_string()), - _1m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_1m_old_net_realized_pnl".to_string()), - _2m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_2m_old_net_realized_pnl".to_string()), - _3m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_3m_old_net_realized_pnl".to_string()), - _4m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_4m_old_net_realized_pnl".to_string()), - _5m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_5m_old_net_realized_pnl".to_string()), - _6m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_6m_old_net_realized_pnl".to_string()), - _9m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_9m_old_net_realized_pnl".to_string()), - _1y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_1y_old_net_realized_pnl".to_string()), - _18m: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_18m_old_net_realized_pnl".to_string()), - _2y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_2y_old_net_realized_pnl".to_string()), - _3y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_3y_old_net_realized_pnl".to_string()), - _4y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_4y_old_net_realized_pnl".to_string()), - _5y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_5y_old_net_realized_pnl".to_string()), - _6y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_6y_old_net_realized_pnl".to_string()), - _7y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_7y_old_net_realized_pnl".to_string()), - _8y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_8y_old_net_realized_pnl".to_string()), - _10y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_10y_old_net_realized_pnl".to_string()), - _12y: BlockCumulativeDeltaSumPattern::new(client.clone(), "utxos_over_12y_old_net_realized_pnl".to_string()), + _1d: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_1d_old_net_realized_pnl".to_string(), + ), + _1w: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_1w_old_net_realized_pnl".to_string(), + ), + _1m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_1m_old_net_realized_pnl".to_string(), + ), + _2m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_2m_old_net_realized_pnl".to_string(), + ), + _3m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_3m_old_net_realized_pnl".to_string(), + ), + _4m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_4m_old_net_realized_pnl".to_string(), + ), + _5m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_5m_old_net_realized_pnl".to_string(), + ), + _6m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_6m_old_net_realized_pnl".to_string(), + ), + _9m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_9m_old_net_realized_pnl".to_string(), + ), + _1y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_1y_old_net_realized_pnl".to_string(), + ), + _18m: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_18m_old_net_realized_pnl".to_string(), + ), + _2y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_2y_old_net_realized_pnl".to_string(), + ), + _3y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_3y_old_net_realized_pnl".to_string(), + ), + _4y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_4y_old_net_realized_pnl".to_string(), + ), + _5y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_5y_old_net_realized_pnl".to_string(), + ), + _6y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_6y_old_net_realized_pnl".to_string(), + ), + _7y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_7y_old_net_realized_pnl".to_string(), + ), + _8y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_8y_old_net_realized_pnl".to_string(), + ), + _10y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_10y_old_net_realized_pnl".to_string(), + ), + _12y: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "utxos_over_12y_old_net_realized_pnl".to_string(), + ), } } } @@ -17990,11 +28613,26 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Epoch { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Epoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0: BlockCumulativeDeltaSumPattern::new(client.clone(), "epoch_0_net_realized_pnl".to_string()), - _1: BlockCumulativeDeltaSumPattern::new(client.clone(), "epoch_1_net_realized_pnl".to_string()), - _2: BlockCumulativeDeltaSumPattern::new(client.clone(), "epoch_2_net_realized_pnl".to_string()), - _3: BlockCumulativeDeltaSumPattern::new(client.clone(), "epoch_3_net_realized_pnl".to_string()), - _4: BlockCumulativeDeltaSumPattern::new(client.clone(), "epoch_4_net_realized_pnl".to_string()), + _0: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "epoch_0_net_realized_pnl".to_string(), + ), + _1: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "epoch_1_net_realized_pnl".to_string(), + ), + _2: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "epoch_2_net_realized_pnl".to_string(), + ), + _3: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "epoch_3_net_realized_pnl".to_string(), + ), + _4: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "epoch_4_net_realized_pnl".to_string(), + ), } } } @@ -18024,24 +28662,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Class { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2009_net_realized_pnl".to_string()), - _2010: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2010_net_realized_pnl".to_string()), - _2011: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2011_net_realized_pnl".to_string()), - _2012: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2012_net_realized_pnl".to_string()), - _2013: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2013_net_realized_pnl".to_string()), - _2014: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2014_net_realized_pnl".to_string()), - _2015: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2015_net_realized_pnl".to_string()), - _2016: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2016_net_realized_pnl".to_string()), - _2017: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2017_net_realized_pnl".to_string()), - _2018: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2018_net_realized_pnl".to_string()), - _2019: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2019_net_realized_pnl".to_string()), - _2020: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2020_net_realized_pnl".to_string()), - _2021: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2021_net_realized_pnl".to_string()), - _2022: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2022_net_realized_pnl".to_string()), - _2023: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2023_net_realized_pnl".to_string()), - _2024: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2024_net_realized_pnl".to_string()), - _2025: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2025_net_realized_pnl".to_string()), - _2026: BlockCumulativeDeltaSumPattern::new(client.clone(), "class_2026_net_realized_pnl".to_string()), + _2009: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2009_net_realized_pnl".to_string(), + ), + _2010: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2010_net_realized_pnl".to_string(), + ), + _2011: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2011_net_realized_pnl".to_string(), + ), + _2012: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2012_net_realized_pnl".to_string(), + ), + _2013: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2013_net_realized_pnl".to_string(), + ), + _2014: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2014_net_realized_pnl".to_string(), + ), + _2015: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2015_net_realized_pnl".to_string(), + ), + _2016: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2016_net_realized_pnl".to_string(), + ), + _2017: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2017_net_realized_pnl".to_string(), + ), + _2018: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2018_net_realized_pnl".to_string(), + ), + _2019: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2019_net_realized_pnl".to_string(), + ), + _2020: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2020_net_realized_pnl".to_string(), + ), + _2021: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2021_net_realized_pnl".to_string(), + ), + _2022: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2022_net_realized_pnl".to_string(), + ), + _2023: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2023_net_realized_pnl".to_string(), + ), + _2024: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2024_net_realized_pnl".to_string(), + ), + _2025: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2025_net_realized_pnl".to_string(), + ), + _2026: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "class_2026_net_realized_pnl".to_string(), + ), } } } @@ -18055,8 +28747,14 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Entry { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Entry { pub fn new(client: Arc, base_path: String) -> Self { Self { - discount: BlockCumulativeDeltaSumPattern::new(client.clone(), "veteran_net_realized_pnl".to_string()), - premium: BlockCumulativeDeltaSumPattern::new(client.clone(), "rookie_net_realized_pnl".to_string()), + discount: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "veteran_net_realized_pnl".to_string(), + ), + premium: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "rookie_net_realized_pnl".to_string(), + ), } } } @@ -18070,8 +28768,14 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Term { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Term { pub fn new(client: Arc, base_path: String) -> Self { Self { - short: BlockCumulativeDeltaSumPattern::new(client.clone(), "sth_net_realized_pnl".to_string()), - long: BlockCumulativeDeltaSumPattern::new(client.clone(), "lth_net_realized_pnl".to_string()), + short: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "sth_net_realized_pnl".to_string(), + ), + long: BlockCumulativeDeltaSumPattern::new( + client.clone(), + "lth_net_realized_pnl".to_string(), + ), } } } @@ -18084,7 +28788,10 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Change1m { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Change1m { pub fn new(client: Arc, base_path: String) -> Self { Self { - to_mcap: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Change1m_ToMcap::new(client.clone(), format!("{base_path}_to_mcap")), + to_mcap: SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Change1m_ToMcap::new( + client.clone(), + format!("{base_path}_to_mcap"), + ), } } } @@ -18099,9 +28806,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Change1m_ToMcap { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnl_Change1m_ToMcap { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: PercentPpmRatioPattern::new(client.clone(), "all_net_pnl_change_1m_to_mcap".to_string()), - sth: PercentPpmRatioPattern::new(client.clone(), "sth_net_pnl_change_1m_to_mcap".to_string()), - lth: PercentPpmRatioPattern::new(client.clone(), "lth_net_pnl_change_1m_to_mcap".to_string()), + all: PercentPpmRatioPattern::new( + client.clone(), + "all_net_pnl_change_1m_to_mcap".to_string(), + ), + sth: PercentPpmRatioPattern::new( + client.clone(), + "sth_net_pnl_change_1m_to_mcap".to_string(), + ), + lth: PercentPpmRatioPattern::new( + client.clone(), + "lth_net_pnl_change_1m_to_mcap".to_string(), + ), } } } @@ -18127,20 +28843,53 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr { pub fn new(client: Arc, base_path: String) -> Self { Self { - value_destroyed: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed::new(client.clone(), format!("{base_path}_value_destroyed")), + value_destroyed: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed::new( + client.clone(), + format!("{base_path}_value_destroyed"), + ), all: SeriesPattern1::new(client.clone(), "sopr_24h".to_string()), - age: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern7::new(client.clone(), "sopr_24h".to_string()), term: LongShortPattern7::new(client.clone(), "sopr_24h".to_string()), - aggregate_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_AggregateMatrix::new(client.clone(), format!("{base_path}_aggregate_matrix")), - age_range_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_AgeRangeMatrix::new(client.clone(), format!("{base_path}_age_range_matrix")), - under_age_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_UnderAgeMatrix::new(client.clone(), format!("{base_path}_under_age_matrix")), - over_age_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_OverAgeMatrix::new(client.clone(), format!("{base_path}_over_age_matrix")), - epoch_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_EpochMatrix::new(client.clone(), format!("{base_path}_epoch_matrix")), - class_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ClassMatrix::new(client.clone(), format!("{base_path}_class_matrix")), - entry_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_EntryMatrix::new(client.clone(), format!("{base_path}_entry_matrix")), + aggregate_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_AggregateMatrix::new( + client.clone(), + format!("{base_path}_aggregate_matrix"), + ), + age_range_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_AgeRangeMatrix::new( + client.clone(), + format!("{base_path}_age_range_matrix"), + ), + under_age_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_UnderAgeMatrix::new( + client.clone(), + format!("{base_path}_under_age_matrix"), + ), + over_age_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_OverAgeMatrix::new( + client.clone(), + format!("{base_path}_over_age_matrix"), + ), + epoch_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_EpochMatrix::new( + client.clone(), + format!("{base_path}_epoch_matrix"), + ), + class_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ClassMatrix::new( + client.clone(), + format!("{base_path}_class_matrix"), + ), + entry_matrix: SeriesTree_Cohorts_Cohorts_Realized_Sopr_EntryMatrix::new( + client.clone(), + format!("{base_path}_entry_matrix"), + ), } } } @@ -18163,15 +28912,36 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed { pub fn new(client: Arc, base_path: String) -> Self { Self { all: BlockCumulativeSumPattern::new(client.clone(), "value_destroyed".to_string()), - age: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern5::new(client.clone(), "value_destroyed".to_string()), term: LongShortPattern6::new(client.clone(), "value_destroyed".to_string()), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_value_destroyed_cumulative_cents_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "value_destroyed_cumulative_cents_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "value_destroyed_cumulative_cents_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "value_destroyed_cumulative_cents_by_entry".to_string()), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_value_destroyed_cumulative_cents_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "value_destroyed_cumulative_cents_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "value_destroyed_cumulative_cents_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "value_destroyed_cumulative_cents_by_entry".to_string(), + ), } } } @@ -18186,9 +28956,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -18223,29 +29002,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1h_old_value_destroyed".to_string()), - _1h_to_1d: BlockCumulativeSumPattern::new(client.clone(), "utxos_1h_to_1d_old_value_destroyed".to_string()), - _1d_to_1w: BlockCumulativeSumPattern::new(client.clone(), "utxos_1d_to_1w_old_value_destroyed".to_string()), - _1w_to_1m: BlockCumulativeSumPattern::new(client.clone(), "utxos_1w_to_1m_old_value_destroyed".to_string()), - _1m_to_2m: BlockCumulativeSumPattern::new(client.clone(), "utxos_1m_to_2m_old_value_destroyed".to_string()), - _2m_to_3m: BlockCumulativeSumPattern::new(client.clone(), "utxos_2m_to_3m_old_value_destroyed".to_string()), - _3m_to_4m: BlockCumulativeSumPattern::new(client.clone(), "utxos_3m_to_4m_old_value_destroyed".to_string()), - _4m_to_5m: BlockCumulativeSumPattern::new(client.clone(), "utxos_4m_to_5m_old_value_destroyed".to_string()), - _5m_to_6m: BlockCumulativeSumPattern::new(client.clone(), "utxos_5m_to_6m_old_value_destroyed".to_string()), - _6m_to_9m: BlockCumulativeSumPattern::new(client.clone(), "utxos_6m_to_9m_old_value_destroyed".to_string()), - _9m_to_1y: BlockCumulativeSumPattern::new(client.clone(), "utxos_9m_to_1y_old_value_destroyed".to_string()), - _1y_to_18m: BlockCumulativeSumPattern::new(client.clone(), "utxos_1y_to_18m_old_value_destroyed".to_string()), - _18m_to_2y: BlockCumulativeSumPattern::new(client.clone(), "utxos_18m_to_2y_old_value_destroyed".to_string()), - _2y_to_3y: BlockCumulativeSumPattern::new(client.clone(), "utxos_2y_to_3y_old_value_destroyed".to_string()), - _3y_to_4y: BlockCumulativeSumPattern::new(client.clone(), "utxos_3y_to_4y_old_value_destroyed".to_string()), - _4y_to_5y: BlockCumulativeSumPattern::new(client.clone(), "utxos_4y_to_5y_old_value_destroyed".to_string()), - _5y_to_6y: BlockCumulativeSumPattern::new(client.clone(), "utxos_5y_to_6y_old_value_destroyed".to_string()), - _6y_to_7y: BlockCumulativeSumPattern::new(client.clone(), "utxos_6y_to_7y_old_value_destroyed".to_string()), - _7y_to_8y: BlockCumulativeSumPattern::new(client.clone(), "utxos_7y_to_8y_old_value_destroyed".to_string()), - _8y_to_10y: BlockCumulativeSumPattern::new(client.clone(), "utxos_8y_to_10y_old_value_destroyed".to_string()), - _10y_to_12y: BlockCumulativeSumPattern::new(client.clone(), "utxos_10y_to_12y_old_value_destroyed".to_string()), - _12y_to_15y: BlockCumulativeSumPattern::new(client.clone(), "utxos_12y_to_15y_old_value_destroyed".to_string()), - over_15y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_15y_old_value_destroyed".to_string()), + under_1h: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1h_old_value_destroyed".to_string(), + ), + _1h_to_1d: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1h_to_1d_old_value_destroyed".to_string(), + ), + _1d_to_1w: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1d_to_1w_old_value_destroyed".to_string(), + ), + _1w_to_1m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1w_to_1m_old_value_destroyed".to_string(), + ), + _1m_to_2m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1m_to_2m_old_value_destroyed".to_string(), + ), + _2m_to_3m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_2m_to_3m_old_value_destroyed".to_string(), + ), + _3m_to_4m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_3m_to_4m_old_value_destroyed".to_string(), + ), + _4m_to_5m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_4m_to_5m_old_value_destroyed".to_string(), + ), + _5m_to_6m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_5m_to_6m_old_value_destroyed".to_string(), + ), + _6m_to_9m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_6m_to_9m_old_value_destroyed".to_string(), + ), + _9m_to_1y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_9m_to_1y_old_value_destroyed".to_string(), + ), + _1y_to_18m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_1y_to_18m_old_value_destroyed".to_string(), + ), + _18m_to_2y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_18m_to_2y_old_value_destroyed".to_string(), + ), + _2y_to_3y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_2y_to_3y_old_value_destroyed".to_string(), + ), + _3y_to_4y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_3y_to_4y_old_value_destroyed".to_string(), + ), + _4y_to_5y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_4y_to_5y_old_value_destroyed".to_string(), + ), + _5y_to_6y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_5y_to_6y_old_value_destroyed".to_string(), + ), + _6y_to_7y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_6y_to_7y_old_value_destroyed".to_string(), + ), + _7y_to_8y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_7y_to_8y_old_value_destroyed".to_string(), + ), + _8y_to_10y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_8y_to_10y_old_value_destroyed".to_string(), + ), + _10y_to_12y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_10y_to_12y_old_value_destroyed".to_string(), + ), + _12y_to_15y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_12y_to_15y_old_value_destroyed".to_string(), + ), + over_15y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_15y_old_value_destroyed".to_string(), + ), } } } @@ -18277,26 +29125,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Under { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1w_old_value_destroyed".to_string()), - _1m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1m_old_value_destroyed".to_string()), - _2m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_2m_old_value_destroyed".to_string()), - _3m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_3m_old_value_destroyed".to_string()), - _4m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_4m_old_value_destroyed".to_string()), - _5m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_5m_old_value_destroyed".to_string()), - _6m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_6m_old_value_destroyed".to_string()), - _9m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_9m_old_value_destroyed".to_string()), - _1y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_1y_old_value_destroyed".to_string()), - _18m: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_18m_old_value_destroyed".to_string()), - _2y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_2y_old_value_destroyed".to_string()), - _3y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_3y_old_value_destroyed".to_string()), - _4y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_4y_old_value_destroyed".to_string()), - _5y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_5y_old_value_destroyed".to_string()), - _6y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_6y_old_value_destroyed".to_string()), - _7y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_7y_old_value_destroyed".to_string()), - _8y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_8y_old_value_destroyed".to_string()), - _10y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_10y_old_value_destroyed".to_string()), - _12y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_12y_old_value_destroyed".to_string()), - _15y: BlockCumulativeSumPattern::new(client.clone(), "utxos_under_15y_old_value_destroyed".to_string()), + _1w: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1w_old_value_destroyed".to_string(), + ), + _1m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1m_old_value_destroyed".to_string(), + ), + _2m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_2m_old_value_destroyed".to_string(), + ), + _3m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_3m_old_value_destroyed".to_string(), + ), + _4m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_4m_old_value_destroyed".to_string(), + ), + _5m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_5m_old_value_destroyed".to_string(), + ), + _6m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_6m_old_value_destroyed".to_string(), + ), + _9m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_9m_old_value_destroyed".to_string(), + ), + _1y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_1y_old_value_destroyed".to_string(), + ), + _18m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_18m_old_value_destroyed".to_string(), + ), + _2y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_2y_old_value_destroyed".to_string(), + ), + _3y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_3y_old_value_destroyed".to_string(), + ), + _4y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_4y_old_value_destroyed".to_string(), + ), + _5y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_5y_old_value_destroyed".to_string(), + ), + _6y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_6y_old_value_destroyed".to_string(), + ), + _7y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_7y_old_value_destroyed".to_string(), + ), + _8y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_8y_old_value_destroyed".to_string(), + ), + _10y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_10y_old_value_destroyed".to_string(), + ), + _12y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_12y_old_value_destroyed".to_string(), + ), + _15y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_under_15y_old_value_destroyed".to_string(), + ), } } } @@ -18328,26 +29236,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Over { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1d_old_value_destroyed".to_string()), - _1w: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1w_old_value_destroyed".to_string()), - _1m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1m_old_value_destroyed".to_string()), - _2m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_2m_old_value_destroyed".to_string()), - _3m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_3m_old_value_destroyed".to_string()), - _4m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_4m_old_value_destroyed".to_string()), - _5m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_5m_old_value_destroyed".to_string()), - _6m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_6m_old_value_destroyed".to_string()), - _9m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_9m_old_value_destroyed".to_string()), - _1y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_1y_old_value_destroyed".to_string()), - _18m: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_18m_old_value_destroyed".to_string()), - _2y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_2y_old_value_destroyed".to_string()), - _3y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_3y_old_value_destroyed".to_string()), - _4y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_4y_old_value_destroyed".to_string()), - _5y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_5y_old_value_destroyed".to_string()), - _6y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_6y_old_value_destroyed".to_string()), - _7y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_7y_old_value_destroyed".to_string()), - _8y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_8y_old_value_destroyed".to_string()), - _10y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_10y_old_value_destroyed".to_string()), - _12y: BlockCumulativeSumPattern::new(client.clone(), "utxos_over_12y_old_value_destroyed".to_string()), + _1d: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1d_old_value_destroyed".to_string(), + ), + _1w: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1w_old_value_destroyed".to_string(), + ), + _1m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1m_old_value_destroyed".to_string(), + ), + _2m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_2m_old_value_destroyed".to_string(), + ), + _3m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_3m_old_value_destroyed".to_string(), + ), + _4m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_4m_old_value_destroyed".to_string(), + ), + _5m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_5m_old_value_destroyed".to_string(), + ), + _6m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_6m_old_value_destroyed".to_string(), + ), + _9m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_9m_old_value_destroyed".to_string(), + ), + _1y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_1y_old_value_destroyed".to_string(), + ), + _18m: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_18m_old_value_destroyed".to_string(), + ), + _2y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_2y_old_value_destroyed".to_string(), + ), + _3y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_3y_old_value_destroyed".to_string(), + ), + _4y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_4y_old_value_destroyed".to_string(), + ), + _5y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_5y_old_value_destroyed".to_string(), + ), + _6y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_6y_old_value_destroyed".to_string(), + ), + _7y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_7y_old_value_destroyed".to_string(), + ), + _8y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_8y_old_value_destroyed".to_string(), + ), + _10y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_10y_old_value_destroyed".to_string(), + ), + _12y: BlockCumulativeSumPattern::new( + client.clone(), + "utxos_over_12y_old_value_destroyed".to_string(), + ), } } } @@ -18364,11 +29332,26 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Epoch { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Epoch { pub fn new(client: Arc, base_path: String) -> Self { Self { - _0: BlockCumulativeSumPattern::new(client.clone(), "epoch_0_value_destroyed".to_string()), - _1: BlockCumulativeSumPattern::new(client.clone(), "epoch_1_value_destroyed".to_string()), - _2: BlockCumulativeSumPattern::new(client.clone(), "epoch_2_value_destroyed".to_string()), - _3: BlockCumulativeSumPattern::new(client.clone(), "epoch_3_value_destroyed".to_string()), - _4: BlockCumulativeSumPattern::new(client.clone(), "epoch_4_value_destroyed".to_string()), + _0: BlockCumulativeSumPattern::new( + client.clone(), + "epoch_0_value_destroyed".to_string(), + ), + _1: BlockCumulativeSumPattern::new( + client.clone(), + "epoch_1_value_destroyed".to_string(), + ), + _2: BlockCumulativeSumPattern::new( + client.clone(), + "epoch_2_value_destroyed".to_string(), + ), + _3: BlockCumulativeSumPattern::new( + client.clone(), + "epoch_3_value_destroyed".to_string(), + ), + _4: BlockCumulativeSumPattern::new( + client.clone(), + "epoch_4_value_destroyed".to_string(), + ), } } } @@ -18398,24 +29381,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Class { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_ValueDestroyed_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: BlockCumulativeSumPattern::new(client.clone(), "class_2009_value_destroyed".to_string()), - _2010: BlockCumulativeSumPattern::new(client.clone(), "class_2010_value_destroyed".to_string()), - _2011: BlockCumulativeSumPattern::new(client.clone(), "class_2011_value_destroyed".to_string()), - _2012: BlockCumulativeSumPattern::new(client.clone(), "class_2012_value_destroyed".to_string()), - _2013: BlockCumulativeSumPattern::new(client.clone(), "class_2013_value_destroyed".to_string()), - _2014: BlockCumulativeSumPattern::new(client.clone(), "class_2014_value_destroyed".to_string()), - _2015: BlockCumulativeSumPattern::new(client.clone(), "class_2015_value_destroyed".to_string()), - _2016: BlockCumulativeSumPattern::new(client.clone(), "class_2016_value_destroyed".to_string()), - _2017: BlockCumulativeSumPattern::new(client.clone(), "class_2017_value_destroyed".to_string()), - _2018: BlockCumulativeSumPattern::new(client.clone(), "class_2018_value_destroyed".to_string()), - _2019: BlockCumulativeSumPattern::new(client.clone(), "class_2019_value_destroyed".to_string()), - _2020: BlockCumulativeSumPattern::new(client.clone(), "class_2020_value_destroyed".to_string()), - _2021: BlockCumulativeSumPattern::new(client.clone(), "class_2021_value_destroyed".to_string()), - _2022: BlockCumulativeSumPattern::new(client.clone(), "class_2022_value_destroyed".to_string()), - _2023: BlockCumulativeSumPattern::new(client.clone(), "class_2023_value_destroyed".to_string()), - _2024: BlockCumulativeSumPattern::new(client.clone(), "class_2024_value_destroyed".to_string()), - _2025: BlockCumulativeSumPattern::new(client.clone(), "class_2025_value_destroyed".to_string()), - _2026: BlockCumulativeSumPattern::new(client.clone(), "class_2026_value_destroyed".to_string()), + _2009: BlockCumulativeSumPattern::new( + client.clone(), + "class_2009_value_destroyed".to_string(), + ), + _2010: BlockCumulativeSumPattern::new( + client.clone(), + "class_2010_value_destroyed".to_string(), + ), + _2011: BlockCumulativeSumPattern::new( + client.clone(), + "class_2011_value_destroyed".to_string(), + ), + _2012: BlockCumulativeSumPattern::new( + client.clone(), + "class_2012_value_destroyed".to_string(), + ), + _2013: BlockCumulativeSumPattern::new( + client.clone(), + "class_2013_value_destroyed".to_string(), + ), + _2014: BlockCumulativeSumPattern::new( + client.clone(), + "class_2014_value_destroyed".to_string(), + ), + _2015: BlockCumulativeSumPattern::new( + client.clone(), + "class_2015_value_destroyed".to_string(), + ), + _2016: BlockCumulativeSumPattern::new( + client.clone(), + "class_2016_value_destroyed".to_string(), + ), + _2017: BlockCumulativeSumPattern::new( + client.clone(), + "class_2017_value_destroyed".to_string(), + ), + _2018: BlockCumulativeSumPattern::new( + client.clone(), + "class_2018_value_destroyed".to_string(), + ), + _2019: BlockCumulativeSumPattern::new( + client.clone(), + "class_2019_value_destroyed".to_string(), + ), + _2020: BlockCumulativeSumPattern::new( + client.clone(), + "class_2020_value_destroyed".to_string(), + ), + _2021: BlockCumulativeSumPattern::new( + client.clone(), + "class_2021_value_destroyed".to_string(), + ), + _2022: BlockCumulativeSumPattern::new( + client.clone(), + "class_2022_value_destroyed".to_string(), + ), + _2023: BlockCumulativeSumPattern::new( + client.clone(), + "class_2023_value_destroyed".to_string(), + ), + _2024: BlockCumulativeSumPattern::new( + client.clone(), + "class_2024_value_destroyed".to_string(), + ), + _2025: BlockCumulativeSumPattern::new( + client.clone(), + "class_2025_value_destroyed".to_string(), + ), + _2026: BlockCumulativeSumPattern::new( + client.clone(), + "class_2026_value_destroyed".to_string(), + ), } } } @@ -18430,9 +29467,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -18467,29 +29513,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age_Range { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: SeriesPattern1::new(client.clone(), "utxos_under_1h_old_sopr_24h".to_string()), - _1h_to_1d: SeriesPattern1::new(client.clone(), "utxos_1h_to_1d_old_sopr_24h".to_string()), - _1d_to_1w: SeriesPattern1::new(client.clone(), "utxos_1d_to_1w_old_sopr_24h".to_string()), - _1w_to_1m: SeriesPattern1::new(client.clone(), "utxos_1w_to_1m_old_sopr_24h".to_string()), - _1m_to_2m: SeriesPattern1::new(client.clone(), "utxos_1m_to_2m_old_sopr_24h".to_string()), - _2m_to_3m: SeriesPattern1::new(client.clone(), "utxos_2m_to_3m_old_sopr_24h".to_string()), - _3m_to_4m: SeriesPattern1::new(client.clone(), "utxos_3m_to_4m_old_sopr_24h".to_string()), - _4m_to_5m: SeriesPattern1::new(client.clone(), "utxos_4m_to_5m_old_sopr_24h".to_string()), - _5m_to_6m: SeriesPattern1::new(client.clone(), "utxos_5m_to_6m_old_sopr_24h".to_string()), - _6m_to_9m: SeriesPattern1::new(client.clone(), "utxos_6m_to_9m_old_sopr_24h".to_string()), - _9m_to_1y: SeriesPattern1::new(client.clone(), "utxos_9m_to_1y_old_sopr_24h".to_string()), - _1y_to_18m: SeriesPattern1::new(client.clone(), "utxos_1y_to_18m_old_sopr_24h".to_string()), - _18m_to_2y: SeriesPattern1::new(client.clone(), "utxos_18m_to_2y_old_sopr_24h".to_string()), - _2y_to_3y: SeriesPattern1::new(client.clone(), "utxos_2y_to_3y_old_sopr_24h".to_string()), - _3y_to_4y: SeriesPattern1::new(client.clone(), "utxos_3y_to_4y_old_sopr_24h".to_string()), - _4y_to_5y: SeriesPattern1::new(client.clone(), "utxos_4y_to_5y_old_sopr_24h".to_string()), - _5y_to_6y: SeriesPattern1::new(client.clone(), "utxos_5y_to_6y_old_sopr_24h".to_string()), - _6y_to_7y: SeriesPattern1::new(client.clone(), "utxos_6y_to_7y_old_sopr_24h".to_string()), - _7y_to_8y: SeriesPattern1::new(client.clone(), "utxos_7y_to_8y_old_sopr_24h".to_string()), - _8y_to_10y: SeriesPattern1::new(client.clone(), "utxos_8y_to_10y_old_sopr_24h".to_string()), - _10y_to_12y: SeriesPattern1::new(client.clone(), "utxos_10y_to_12y_old_sopr_24h".to_string()), - _12y_to_15y: SeriesPattern1::new(client.clone(), "utxos_12y_to_15y_old_sopr_24h".to_string()), - over_15y: SeriesPattern1::new(client.clone(), "utxos_over_15y_old_sopr_24h".to_string()), + under_1h: SeriesPattern1::new( + client.clone(), + "utxos_under_1h_old_sopr_24h".to_string(), + ), + _1h_to_1d: SeriesPattern1::new( + client.clone(), + "utxos_1h_to_1d_old_sopr_24h".to_string(), + ), + _1d_to_1w: SeriesPattern1::new( + client.clone(), + "utxos_1d_to_1w_old_sopr_24h".to_string(), + ), + _1w_to_1m: SeriesPattern1::new( + client.clone(), + "utxos_1w_to_1m_old_sopr_24h".to_string(), + ), + _1m_to_2m: SeriesPattern1::new( + client.clone(), + "utxos_1m_to_2m_old_sopr_24h".to_string(), + ), + _2m_to_3m: SeriesPattern1::new( + client.clone(), + "utxos_2m_to_3m_old_sopr_24h".to_string(), + ), + _3m_to_4m: SeriesPattern1::new( + client.clone(), + "utxos_3m_to_4m_old_sopr_24h".to_string(), + ), + _4m_to_5m: SeriesPattern1::new( + client.clone(), + "utxos_4m_to_5m_old_sopr_24h".to_string(), + ), + _5m_to_6m: SeriesPattern1::new( + client.clone(), + "utxos_5m_to_6m_old_sopr_24h".to_string(), + ), + _6m_to_9m: SeriesPattern1::new( + client.clone(), + "utxos_6m_to_9m_old_sopr_24h".to_string(), + ), + _9m_to_1y: SeriesPattern1::new( + client.clone(), + "utxos_9m_to_1y_old_sopr_24h".to_string(), + ), + _1y_to_18m: SeriesPattern1::new( + client.clone(), + "utxos_1y_to_18m_old_sopr_24h".to_string(), + ), + _18m_to_2y: SeriesPattern1::new( + client.clone(), + "utxos_18m_to_2y_old_sopr_24h".to_string(), + ), + _2y_to_3y: SeriesPattern1::new( + client.clone(), + "utxos_2y_to_3y_old_sopr_24h".to_string(), + ), + _3y_to_4y: SeriesPattern1::new( + client.clone(), + "utxos_3y_to_4y_old_sopr_24h".to_string(), + ), + _4y_to_5y: SeriesPattern1::new( + client.clone(), + "utxos_4y_to_5y_old_sopr_24h".to_string(), + ), + _5y_to_6y: SeriesPattern1::new( + client.clone(), + "utxos_5y_to_6y_old_sopr_24h".to_string(), + ), + _6y_to_7y: SeriesPattern1::new( + client.clone(), + "utxos_6y_to_7y_old_sopr_24h".to_string(), + ), + _7y_to_8y: SeriesPattern1::new( + client.clone(), + "utxos_7y_to_8y_old_sopr_24h".to_string(), + ), + _8y_to_10y: SeriesPattern1::new( + client.clone(), + "utxos_8y_to_10y_old_sopr_24h".to_string(), + ), + _10y_to_12y: SeriesPattern1::new( + client.clone(), + "utxos_10y_to_12y_old_sopr_24h".to_string(), + ), + _12y_to_15y: SeriesPattern1::new( + client.clone(), + "utxos_12y_to_15y_old_sopr_24h".to_string(), + ), + over_15y: SeriesPattern1::new( + client.clone(), + "utxos_over_15y_old_sopr_24h".to_string(), + ), } } } @@ -18714,29 +29829,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_AgeRangeMatrix { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_AgeRangeMatrix { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_0".to_string()), - _1h_to_1d: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_1".to_string()), - _1d_to_1w: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_2".to_string()), - _1w_to_1m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_3".to_string()), - _1m_to_2m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_4".to_string()), - _2m_to_3m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_5".to_string()), - _3m_to_4m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_6".to_string()), - _4m_to_5m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_7".to_string()), - _5m_to_6m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_8".to_string()), - _6m_to_9m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_9".to_string()), - _9m_to_1y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_10".to_string()), - _1y_to_18m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_11".to_string()), - _18m_to_2y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_12".to_string()), - _2y_to_3y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_13".to_string()), - _3y_to_4y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_14".to_string()), - _4y_to_5y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_15".to_string()), - _5y_to_6y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_16".to_string()), - _6y_to_7y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_17".to_string()), - _7y_to_8y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_18".to_string()), - _8y_to_10y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_19".to_string()), - _10y_to_12y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_20".to_string()), - _12y_to_15y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_21".to_string()), - over_15y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_age_range_column_22".to_string()), + under_1h: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_0".to_string(), + ), + _1h_to_1d: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_1".to_string(), + ), + _1d_to_1w: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_2".to_string(), + ), + _1w_to_1m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_3".to_string(), + ), + _1m_to_2m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_4".to_string(), + ), + _2m_to_3m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_5".to_string(), + ), + _3m_to_4m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_6".to_string(), + ), + _4m_to_5m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_7".to_string(), + ), + _5m_to_6m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_8".to_string(), + ), + _6m_to_9m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_9".to_string(), + ), + _9m_to_1y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_10".to_string(), + ), + _1y_to_18m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_11".to_string(), + ), + _18m_to_2y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_12".to_string(), + ), + _2y_to_3y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_13".to_string(), + ), + _3y_to_4y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_14".to_string(), + ), + _4y_to_5y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_15".to_string(), + ), + _5y_to_6y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_16".to_string(), + ), + _6y_to_7y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_17".to_string(), + ), + _7y_to_8y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_18".to_string(), + ), + _8y_to_10y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_19".to_string(), + ), + _10y_to_12y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_20".to_string(), + ), + _12y_to_15y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_21".to_string(), + ), + over_15y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_age_range_column_22".to_string(), + ), height: SeriesPattern18::new(client.clone(), "utxos_sopr_24h_by_age_range".to_string()), } } @@ -18770,26 +29954,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_UnderAgeMatrix { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_UnderAgeMatrix { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_0".to_string()), - _1m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_1".to_string()), - _2m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_2".to_string()), - _3m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_3".to_string()), - _4m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_4".to_string()), - _5m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_5".to_string()), - _6m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_6".to_string()), - _9m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_7".to_string()), - _1y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_8".to_string()), - _18m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_9".to_string()), - _2y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_10".to_string()), - _3y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_11".to_string()), - _4y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_12".to_string()), - _5y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_13".to_string()), - _6y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_14".to_string()), - _7y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_15".to_string()), - _8y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_16".to_string()), - _10y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_17".to_string()), - _12y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_18".to_string()), - _15y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_under_age_column_19".to_string()), + _1w: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_0".to_string(), + ), + _1m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_1".to_string(), + ), + _2m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_2".to_string(), + ), + _3m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_3".to_string(), + ), + _4m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_4".to_string(), + ), + _5m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_5".to_string(), + ), + _6m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_6".to_string(), + ), + _9m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_7".to_string(), + ), + _1y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_8".to_string(), + ), + _18m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_9".to_string(), + ), + _2y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_10".to_string(), + ), + _3y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_11".to_string(), + ), + _4y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_12".to_string(), + ), + _5y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_13".to_string(), + ), + _6y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_14".to_string(), + ), + _7y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_15".to_string(), + ), + _8y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_16".to_string(), + ), + _10y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_17".to_string(), + ), + _12y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_18".to_string(), + ), + _15y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_under_age_column_19".to_string(), + ), height: SeriesPattern18::new(client.clone(), "utxos_sopr_24h_by_under_age".to_string()), } } @@ -18823,26 +30067,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Sopr_OverAgeMatrix { impl SeriesTree_Cohorts_Cohorts_Realized_Sopr_OverAgeMatrix { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_0".to_string()), - _1w: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_1".to_string()), - _1m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_2".to_string()), - _2m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_3".to_string()), - _3m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_4".to_string()), - _4m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_5".to_string()), - _5m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_6".to_string()), - _6m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_7".to_string()), - _9m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_8".to_string()), - _1y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_9".to_string()), - _18m: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_10".to_string()), - _2y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_11".to_string()), - _3y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_12".to_string()), - _4y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_13".to_string()), - _5y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_14".to_string()), - _6y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_15".to_string()), - _7y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_16".to_string()), - _8y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_17".to_string()), - _10y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_18".to_string()), - _12y: SeriesPattern1::new(client.clone(), "utxos_sopr_24h_by_over_age_column_19".to_string()), + _1d: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_0".to_string(), + ), + _1w: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_1".to_string(), + ), + _1m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_2".to_string(), + ), + _2m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_3".to_string(), + ), + _3m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_4".to_string(), + ), + _4m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_5".to_string(), + ), + _5m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_6".to_string(), + ), + _6m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_7".to_string(), + ), + _9m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_8".to_string(), + ), + _1y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_9".to_string(), + ), + _18m: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_10".to_string(), + ), + _2y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_11".to_string(), + ), + _3y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_12".to_string(), + ), + _4y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_13".to_string(), + ), + _5y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_14".to_string(), + ), + _6y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_15".to_string(), + ), + _7y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_16".to_string(), + ), + _8y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_17".to_string(), + ), + _10y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_18".to_string(), + ), + _12y: SeriesPattern1::new( + client.clone(), + "utxos_sopr_24h_by_over_age_column_19".to_string(), + ), height: SeriesPattern18::new(client.clone(), "utxos_sopr_24h_by_over_age".to_string()), } } @@ -18947,9 +30251,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr { impl SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr { pub fn new(client: Arc, base_path: String) -> Self { Self { - ratio: SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr_Ratio::new(client.clone(), format!("{base_path}_ratio")), - transfer_volume: SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr_TransferVolume::new(client.clone(), format!("{base_path}_transfer_volume")), - value_destroyed: SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr_ValueDestroyed::new(client.clone(), format!("{base_path}_value_destroyed")), + ratio: SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr_Ratio::new( + client.clone(), + format!("{base_path}_ratio"), + ), + transfer_volume: SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr_TransferVolume::new( + client.clone(), + format!("{base_path}_transfer_volume"), + ), + value_destroyed: SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr_ValueDestroyed::new( + client.clone(), + format!("{base_path}_value_destroyed"), + ), } } } @@ -18979,9 +30292,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr_TransferVolume { impl SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr_TransferVolume { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "adj_value_created".to_string()), - sth: AverageBlockCumulativeSumPattern::new(client.clone(), "sth_adj_value_created".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "adjusted_sopr_transfer_volume_cumulative_by_cohort".to_string()), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "adj_value_created".to_string(), + ), + sth: AverageBlockCumulativeSumPattern::new( + client.clone(), + "sth_adj_value_created".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "adjusted_sopr_transfer_volume_cumulative_by_cohort".to_string(), + ), } } } @@ -18996,9 +30318,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr_ValueDestroyed { impl SeriesTree_Cohorts_Cohorts_Realized_AdjustedSopr_ValueDestroyed { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBlockCumulativeSumPattern::new(client.clone(), "adj_value_destroyed".to_string()), - sth: AverageBlockCumulativeSumPattern::new(client.clone(), "sth_adj_value_destroyed".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "adjusted_sopr_value_destroyed_cumulative_by_cohort".to_string()), + all: AverageBlockCumulativeSumPattern::new( + client.clone(), + "adj_value_destroyed".to_string(), + ), + sth: AverageBlockCumulativeSumPattern::new( + client.clone(), + "sth_adj_value_destroyed".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "adjusted_sopr_value_destroyed_cumulative_by_cohort".to_string(), + ), } } } @@ -19014,10 +30345,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_GrossPnl { impl SeriesTree_Cohorts_Cohorts_Realized_GrossPnl { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: BlockCumulativeSumPattern::new(client.clone(), "all_realized_gross_pnl".to_string()), - sth: BlockCumulativeSumPattern::new(client.clone(), "sth_realized_gross_pnl".to_string()), - lth: BlockCumulativeSumPattern::new(client.clone(), "lth_realized_gross_pnl".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "realized_gross_pnl_cumulative_cents_by_term".to_string()), + all: BlockCumulativeSumPattern::new( + client.clone(), + "all_realized_gross_pnl".to_string(), + ), + sth: BlockCumulativeSumPattern::new( + client.clone(), + "sth_realized_gross_pnl".to_string(), + ), + lth: BlockCumulativeSumPattern::new( + client.clone(), + "lth_realized_gross_pnl".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "realized_gross_pnl_cumulative_cents_by_term".to_string(), + ), } } } @@ -19033,10 +30376,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_CapitalizedPrice { impl SeriesTree_Cohorts_Cohorts_Realized_CapitalizedPrice { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: CentsPpmRatioSatsUsdPattern::new(client.clone(), "all_capitalized_price".to_string()), - sth: CentsPpmRatioSatsUsdPattern::new(client.clone(), "sth_capitalized_price".to_string()), - lth: CentsPpmRatioSatsUsdPattern::new(client.clone(), "lth_capitalized_price".to_string()), - height: SeriesPattern18::new(client.clone(), "capitalized_price_cents_by_aggregate".to_string()), + all: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "all_capitalized_price".to_string(), + ), + sth: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "sth_capitalized_price".to_string(), + ), + lth: CentsPpmRatioSatsUsdPattern::new( + client.clone(), + "lth_capitalized_price".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "capitalized_price_cents_by_aggregate".to_string(), + ), } } } @@ -19052,10 +30407,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_PeakRegret { impl SeriesTree_Cohorts_Cohorts_Realized_PeakRegret { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: BlockCumulativeSumPattern::new(client.clone(), "all_realized_peak_regret".to_string()), - sth: BlockCumulativeSumPattern::new(client.clone(), "sth_realized_peak_regret".to_string()), - lth: BlockCumulativeSumPattern::new(client.clone(), "lth_realized_peak_regret".to_string()), - cumulative: SeriesPattern18::new(client.clone(), "realized_peak_regret_cumulative_cents_by_term".to_string()), + all: BlockCumulativeSumPattern::new( + client.clone(), + "all_realized_peak_regret".to_string(), + ), + sth: BlockCumulativeSumPattern::new( + client.clone(), + "sth_realized_peak_regret".to_string(), + ), + lth: BlockCumulativeSumPattern::new( + client.clone(), + "lth_realized_peak_regret".to_string(), + ), + cumulative: SeriesPattern18::new( + client.clone(), + "realized_peak_regret_cumulative_cents_by_term".to_string(), + ), } } } @@ -19071,10 +30438,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_NetPnlChange1mToRcap { impl SeriesTree_Cohorts_Cohorts_Realized_NetPnlChange1mToRcap { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: PercentPpmRatioPattern::new(client.clone(), "all_net_pnl_change_1m_to_rcap".to_string()), - sth: PercentPpmRatioPattern::new(client.clone(), "sth_net_pnl_change_1m_to_rcap".to_string()), - lth: PercentPpmRatioPattern::new(client.clone(), "lth_net_pnl_change_1m_to_rcap".to_string()), - height: SeriesPattern18::new(client.clone(), "net_pnl_change_1m_to_rcap_ppm_by_aggregate".to_string()), + all: PercentPpmRatioPattern::new( + client.clone(), + "all_net_pnl_change_1m_to_rcap".to_string(), + ), + sth: PercentPpmRatioPattern::new( + client.clone(), + "sth_net_pnl_change_1m_to_rcap".to_string(), + ), + lth: PercentPpmRatioPattern::new( + client.clone(), + "lth_net_pnl_change_1m_to_rcap".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "net_pnl_change_1m_to_rcap_ppm_by_aggregate".to_string(), + ), } } } @@ -19089,9 +30468,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_SellSideRiskRatio { impl SeriesTree_Cohorts_Cohorts_Realized_SellSideRiskRatio { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: _1m1w1y24hHeightPattern3::new(client.clone(), "all_sell_side_risk_ratio".to_string()), - sth: _1m1w1y24hHeightPattern3::new(client.clone(), "sth_sell_side_risk_ratio".to_string()), - lth: _1m1w1y24hHeightPattern3::new(client.clone(), "lth_sell_side_risk_ratio".to_string()), + all: _1m1w1y24hHeightPattern3::new( + client.clone(), + "all_sell_side_risk_ratio".to_string(), + ), + sth: _1m1w1y24hHeightPattern3::new( + client.clone(), + "sth_sell_side_risk_ratio".to_string(), + ), + lth: _1m1w1y24hHeightPattern3::new( + client.clone(), + "lth_sell_side_risk_ratio".to_string(), + ), } } } @@ -19123,9 +30511,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_ProfitToLossRatio { impl SeriesTree_Cohorts_Cohorts_Realized_ProfitToLossRatio { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: _1m1w1y24hHeightPattern2::new(client.clone(), "all_realized_profit_to_loss_ratio".to_string()), - sth: _1m1w1y24hHeightPattern2::new(client.clone(), "sth_realized_profit_to_loss_ratio".to_string()), - lth: _1m1w1y24hHeightPattern2::new(client.clone(), "lth_realized_profit_to_loss_ratio".to_string()), + all: _1m1w1y24hHeightPattern2::new( + client.clone(), + "all_realized_profit_to_loss_ratio".to_string(), + ), + sth: _1m1w1y24hHeightPattern2::new( + client.clone(), + "sth_realized_profit_to_loss_ratio".to_string(), + ), + lth: _1m1w1y24hHeightPattern2::new( + client.clone(), + "lth_realized_profit_to_loss_ratio".to_string(), + ), } } } @@ -19146,13 +30543,28 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Mvrv { pub fn new(client: Arc, base_path: String) -> Self { Self { all: SeriesPattern1::new(client.clone(), "mvrv".to_string()), - age: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern7::new(client.clone(), "mvrv".to_string()), - utxo_amount: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount::new(client.clone(), format!("{base_path}_utxo_amount")), + utxo_amount: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount::new( + client.clone(), + format!("{base_path}_utxo_amount"), + ), term: LongShortPattern7::new(client.clone(), "mvrv".to_string()), - type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern6::new(client.clone(), "mvrv".to_string()), + type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern6::new( + client.clone(), + "mvrv".to_string(), + ), } } } @@ -19167,9 +30579,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age { impl SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -19224,8 +30645,14 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Mvrv_Age_Range { _6y_to_7y: SeriesPattern1::new(client.clone(), "utxos_6y_to_7y_old_mvrv".to_string()), _7y_to_8y: SeriesPattern1::new(client.clone(), "utxos_7y_to_8y_old_mvrv".to_string()), _8y_to_10y: SeriesPattern1::new(client.clone(), "utxos_8y_to_10y_old_mvrv".to_string()), - _10y_to_12y: SeriesPattern1::new(client.clone(), "utxos_10y_to_12y_old_mvrv".to_string()), - _12y_to_15y: SeriesPattern1::new(client.clone(), "utxos_12y_to_15y_old_mvrv".to_string()), + _10y_to_12y: SeriesPattern1::new( + client.clone(), + "utxos_10y_to_12y_old_mvrv".to_string(), + ), + _12y_to_15y: SeriesPattern1::new( + client.clone(), + "utxos_12y_to_15y_old_mvrv".to_string(), + ), over_15y: SeriesPattern1::new(client.clone(), "utxos_over_15y_old_mvrv".to_string()), } } @@ -19411,9 +30838,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount { impl SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -19441,20 +30877,62 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { _0sats: SeriesPattern1::new(client.clone(), "utxos_0sats_mvrv".to_string()), - _1sat_to_10sats: SeriesPattern1::new(client.clone(), "utxos_1sat_to_10sats_mvrv".to_string()), - _10sats_to_100sats: SeriesPattern1::new(client.clone(), "utxos_10sats_to_100sats_mvrv".to_string()), - _100sats_to_1k_sats: SeriesPattern1::new(client.clone(), "utxos_100sats_to_1k_sats_mvrv".to_string()), - _1k_sats_to_10k_sats: SeriesPattern1::new(client.clone(), "utxos_1k_sats_to_10k_sats_mvrv".to_string()), - _10k_sats_to_100k_sats: SeriesPattern1::new(client.clone(), "utxos_10k_sats_to_100k_sats_mvrv".to_string()), - _100k_sats_to_1m_sats: SeriesPattern1::new(client.clone(), "utxos_100k_sats_to_1m_sats_mvrv".to_string()), - _1m_sats_to_10m_sats: SeriesPattern1::new(client.clone(), "utxos_1m_sats_to_10m_sats_mvrv".to_string()), - _10m_sats_to_1btc: SeriesPattern1::new(client.clone(), "utxos_10m_sats_to_1btc_mvrv".to_string()), - _1btc_to_10btc: SeriesPattern1::new(client.clone(), "utxos_1btc_to_10btc_mvrv".to_string()), - _10btc_to_100btc: SeriesPattern1::new(client.clone(), "utxos_10btc_to_100btc_mvrv".to_string()), - _100btc_to_1k_btc: SeriesPattern1::new(client.clone(), "utxos_100btc_to_1k_btc_mvrv".to_string()), - _1k_btc_to_10k_btc: SeriesPattern1::new(client.clone(), "utxos_1k_btc_to_10k_btc_mvrv".to_string()), - _10k_btc_to_100k_btc: SeriesPattern1::new(client.clone(), "utxos_10k_btc_to_100k_btc_mvrv".to_string()), - over_100k_btc: SeriesPattern1::new(client.clone(), "utxos_over_100k_btc_mvrv".to_string()), + _1sat_to_10sats: SeriesPattern1::new( + client.clone(), + "utxos_1sat_to_10sats_mvrv".to_string(), + ), + _10sats_to_100sats: SeriesPattern1::new( + client.clone(), + "utxos_10sats_to_100sats_mvrv".to_string(), + ), + _100sats_to_1k_sats: SeriesPattern1::new( + client.clone(), + "utxos_100sats_to_1k_sats_mvrv".to_string(), + ), + _1k_sats_to_10k_sats: SeriesPattern1::new( + client.clone(), + "utxos_1k_sats_to_10k_sats_mvrv".to_string(), + ), + _10k_sats_to_100k_sats: SeriesPattern1::new( + client.clone(), + "utxos_10k_sats_to_100k_sats_mvrv".to_string(), + ), + _100k_sats_to_1m_sats: SeriesPattern1::new( + client.clone(), + "utxos_100k_sats_to_1m_sats_mvrv".to_string(), + ), + _1m_sats_to_10m_sats: SeriesPattern1::new( + client.clone(), + "utxos_1m_sats_to_10m_sats_mvrv".to_string(), + ), + _10m_sats_to_1btc: SeriesPattern1::new( + client.clone(), + "utxos_10m_sats_to_1btc_mvrv".to_string(), + ), + _1btc_to_10btc: SeriesPattern1::new( + client.clone(), + "utxos_1btc_to_10btc_mvrv".to_string(), + ), + _10btc_to_100btc: SeriesPattern1::new( + client.clone(), + "utxos_10btc_to_100btc_mvrv".to_string(), + ), + _100btc_to_1k_btc: SeriesPattern1::new( + client.clone(), + "utxos_100btc_to_1k_btc_mvrv".to_string(), + ), + _1k_btc_to_10k_btc: SeriesPattern1::new( + client.clone(), + "utxos_1k_btc_to_10k_btc_mvrv".to_string(), + ), + _10k_btc_to_100k_btc: SeriesPattern1::new( + client.clone(), + "utxos_10k_btc_to_100k_btc_mvrv".to_string(), + ), + over_100k_btc: SeriesPattern1::new( + client.clone(), + "utxos_over_100k_btc_mvrv".to_string(), + ), } } } @@ -19483,7 +30961,10 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount_Under { _100sats: SeriesPattern1::new(client.clone(), "utxos_under_100sats_mvrv".to_string()), _1k_sats: SeriesPattern1::new(client.clone(), "utxos_under_1k_sats_mvrv".to_string()), _10k_sats: SeriesPattern1::new(client.clone(), "utxos_under_10k_sats_mvrv".to_string()), - _100k_sats: SeriesPattern1::new(client.clone(), "utxos_under_100k_sats_mvrv".to_string()), + _100k_sats: SeriesPattern1::new( + client.clone(), + "utxos_under_100k_sats_mvrv".to_string(), + ), _1m_sats: SeriesPattern1::new(client.clone(), "utxos_under_1m_sats_mvrv".to_string()), _10m_sats: SeriesPattern1::new(client.clone(), "utxos_under_10m_sats_mvrv".to_string()), _1btc: SeriesPattern1::new(client.clone(), "utxos_under_1btc_mvrv".to_string()), @@ -19521,7 +31002,10 @@ impl SeriesTree_Cohorts_Cohorts_Realized_Mvrv_UtxoAmount_Over { _100sats: SeriesPattern1::new(client.clone(), "utxos_over_100sats_mvrv".to_string()), _1k_sats: SeriesPattern1::new(client.clone(), "utxos_over_1k_sats_mvrv".to_string()), _10k_sats: SeriesPattern1::new(client.clone(), "utxos_over_10k_sats_mvrv".to_string()), - _100k_sats: SeriesPattern1::new(client.clone(), "utxos_over_100k_sats_mvrv".to_string()), + _100k_sats: SeriesPattern1::new( + client.clone(), + "utxos_over_100k_sats_mvrv".to_string(), + ), _1m_sats: SeriesPattern1::new(client.clone(), "utxos_over_1m_sats_mvrv".to_string()), _10m_sats: SeriesPattern1::new(client.clone(), "utxos_over_10m_sats_mvrv".to_string()), _1btc: SeriesPattern1::new(client.clone(), "utxos_over_1btc_mvrv".to_string()), @@ -19552,18 +31036,56 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized { impl SeriesTree_Cohorts_Cohorts_Unrealized { pub fn new(client: Arc, base_path: String) -> Self { Self { - profit: SeriesTree_Cohorts_Cohorts_Unrealized_Profit::new(client.clone(), format!("{base_path}_profit")), - loss: SeriesTree_Cohorts_Cohorts_Unrealized_Loss::new(client.clone(), format!("{base_path}_loss")), - net_pnl: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl::new(client.clone(), format!("{base_path}_net_pnl")), - gross_pnl: SeriesTree_Cohorts_Cohorts_Unrealized_GrossPnl::new(client.clone(), format!("{base_path}_gross_pnl")), - invested_capital_in_profit: SeriesTree_Cohorts_Cohorts_Unrealized_InvestedCapitalInProfit::new(client.clone(), format!("{base_path}_invested_capital_in_profit")), - invested_capital_in_loss: SeriesTree_Cohorts_Cohorts_Unrealized_InvestedCapitalInLoss::new(client.clone(), format!("{base_path}_invested_capital_in_loss")), - capitalized_cap_in_profit_raw: MatrixPattern::new(client.clone(), "capitalized_cap_in_profit_raw_by_term".to_string()), - capitalized_cap_in_loss_raw: MatrixPattern::new(client.clone(), "capitalized_cap_in_loss_raw_by_term".to_string()), - pain_index: SeriesTree_Cohorts_Cohorts_Unrealized_PainIndex::new(client.clone(), format!("{base_path}_pain_index")), - greed_index: SeriesTree_Cohorts_Cohorts_Unrealized_GreedIndex::new(client.clone(), format!("{base_path}_greed_index")), - net_sentiment: SeriesTree_Cohorts_Cohorts_Unrealized_NetSentiment::new(client.clone(), format!("{base_path}_net_sentiment")), - nupl: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl::new(client.clone(), format!("{base_path}_nupl")), + profit: SeriesTree_Cohorts_Cohorts_Unrealized_Profit::new( + client.clone(), + format!("{base_path}_profit"), + ), + loss: SeriesTree_Cohorts_Cohorts_Unrealized_Loss::new( + client.clone(), + format!("{base_path}_loss"), + ), + net_pnl: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl::new( + client.clone(), + format!("{base_path}_net_pnl"), + ), + gross_pnl: SeriesTree_Cohorts_Cohorts_Unrealized_GrossPnl::new( + client.clone(), + format!("{base_path}_gross_pnl"), + ), + invested_capital_in_profit: + SeriesTree_Cohorts_Cohorts_Unrealized_InvestedCapitalInProfit::new( + client.clone(), + format!("{base_path}_invested_capital_in_profit"), + ), + invested_capital_in_loss: + SeriesTree_Cohorts_Cohorts_Unrealized_InvestedCapitalInLoss::new( + client.clone(), + format!("{base_path}_invested_capital_in_loss"), + ), + capitalized_cap_in_profit_raw: MatrixPattern::new( + client.clone(), + "capitalized_cap_in_profit_raw_by_term".to_string(), + ), + capitalized_cap_in_loss_raw: MatrixPattern::new( + client.clone(), + "capitalized_cap_in_loss_raw_by_term".to_string(), + ), + pain_index: SeriesTree_Cohorts_Cohorts_Unrealized_PainIndex::new( + client.clone(), + format!("{base_path}_pain_index"), + ), + greed_index: SeriesTree_Cohorts_Cohorts_Unrealized_GreedIndex::new( + client.clone(), + format!("{base_path}_greed_index"), + ), + net_sentiment: SeriesTree_Cohorts_Cohorts_Unrealized_NetSentiment::new( + client.clone(), + format!("{base_path}_net_sentiment"), + ), + nupl: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl::new( + client.clone(), + format!("{base_path}_nupl"), + ), } } } @@ -19588,17 +31110,44 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_Profit { pub fn new(client: Arc, base_path: String) -> Self { Self { all: CentsUsdPattern3::new(client.clone(), "unrealized_profit".to_string()), - age: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern13::new(client.clone(), "unrealized_profit".to_string()), term: LongShortPattern14::new(client.clone(), "unrealized_profit".to_string()), - type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern11::new(client.clone(), "unrealized_profit".to_string()), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_unrealized_profit_cents_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "unrealized_profit_cents_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "unrealized_profit_cents_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "unrealized_profit_cents_by_entry".to_string()), - type_matrix: SeriesPattern18::new(client.clone(), "unrealized_profit_cents_by_type".to_string()), + type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern11::new( + client.clone(), + "unrealized_profit".to_string(), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_unrealized_profit_cents_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "unrealized_profit_cents_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "unrealized_profit_cents_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "unrealized_profit_cents_by_entry".to_string(), + ), + type_matrix: SeriesPattern18::new( + client.clone(), + "unrealized_profit_cents_by_type".to_string(), + ), } } } @@ -19613,9 +31162,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age { impl SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -19650,29 +31208,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Range { impl SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: CentsUsdPattern3::new(client.clone(), "utxos_under_1h_old_unrealized_profit".to_string()), - _1h_to_1d: CentsUsdPattern3::new(client.clone(), "utxos_1h_to_1d_old_unrealized_profit".to_string()), - _1d_to_1w: CentsUsdPattern3::new(client.clone(), "utxos_1d_to_1w_old_unrealized_profit".to_string()), - _1w_to_1m: CentsUsdPattern3::new(client.clone(), "utxos_1w_to_1m_old_unrealized_profit".to_string()), - _1m_to_2m: CentsUsdPattern3::new(client.clone(), "utxos_1m_to_2m_old_unrealized_profit".to_string()), - _2m_to_3m: CentsUsdPattern3::new(client.clone(), "utxos_2m_to_3m_old_unrealized_profit".to_string()), - _3m_to_4m: CentsUsdPattern3::new(client.clone(), "utxos_3m_to_4m_old_unrealized_profit".to_string()), - _4m_to_5m: CentsUsdPattern3::new(client.clone(), "utxos_4m_to_5m_old_unrealized_profit".to_string()), - _5m_to_6m: CentsUsdPattern3::new(client.clone(), "utxos_5m_to_6m_old_unrealized_profit".to_string()), - _6m_to_9m: CentsUsdPattern3::new(client.clone(), "utxos_6m_to_9m_old_unrealized_profit".to_string()), - _9m_to_1y: CentsUsdPattern3::new(client.clone(), "utxos_9m_to_1y_old_unrealized_profit".to_string()), - _1y_to_18m: CentsUsdPattern3::new(client.clone(), "utxos_1y_to_18m_old_unrealized_profit".to_string()), - _18m_to_2y: CentsUsdPattern3::new(client.clone(), "utxos_18m_to_2y_old_unrealized_profit".to_string()), - _2y_to_3y: CentsUsdPattern3::new(client.clone(), "utxos_2y_to_3y_old_unrealized_profit".to_string()), - _3y_to_4y: CentsUsdPattern3::new(client.clone(), "utxos_3y_to_4y_old_unrealized_profit".to_string()), - _4y_to_5y: CentsUsdPattern3::new(client.clone(), "utxos_4y_to_5y_old_unrealized_profit".to_string()), - _5y_to_6y: CentsUsdPattern3::new(client.clone(), "utxos_5y_to_6y_old_unrealized_profit".to_string()), - _6y_to_7y: CentsUsdPattern3::new(client.clone(), "utxos_6y_to_7y_old_unrealized_profit".to_string()), - _7y_to_8y: CentsUsdPattern3::new(client.clone(), "utxos_7y_to_8y_old_unrealized_profit".to_string()), - _8y_to_10y: CentsUsdPattern3::new(client.clone(), "utxos_8y_to_10y_old_unrealized_profit".to_string()), - _10y_to_12y: CentsUsdPattern3::new(client.clone(), "utxos_10y_to_12y_old_unrealized_profit".to_string()), - _12y_to_15y: CentsUsdPattern3::new(client.clone(), "utxos_12y_to_15y_old_unrealized_profit".to_string()), - over_15y: CentsUsdPattern3::new(client.clone(), "utxos_over_15y_old_unrealized_profit".to_string()), + under_1h: CentsUsdPattern3::new( + client.clone(), + "utxos_under_1h_old_unrealized_profit".to_string(), + ), + _1h_to_1d: CentsUsdPattern3::new( + client.clone(), + "utxos_1h_to_1d_old_unrealized_profit".to_string(), + ), + _1d_to_1w: CentsUsdPattern3::new( + client.clone(), + "utxos_1d_to_1w_old_unrealized_profit".to_string(), + ), + _1w_to_1m: CentsUsdPattern3::new( + client.clone(), + "utxos_1w_to_1m_old_unrealized_profit".to_string(), + ), + _1m_to_2m: CentsUsdPattern3::new( + client.clone(), + "utxos_1m_to_2m_old_unrealized_profit".to_string(), + ), + _2m_to_3m: CentsUsdPattern3::new( + client.clone(), + "utxos_2m_to_3m_old_unrealized_profit".to_string(), + ), + _3m_to_4m: CentsUsdPattern3::new( + client.clone(), + "utxos_3m_to_4m_old_unrealized_profit".to_string(), + ), + _4m_to_5m: CentsUsdPattern3::new( + client.clone(), + "utxos_4m_to_5m_old_unrealized_profit".to_string(), + ), + _5m_to_6m: CentsUsdPattern3::new( + client.clone(), + "utxos_5m_to_6m_old_unrealized_profit".to_string(), + ), + _6m_to_9m: CentsUsdPattern3::new( + client.clone(), + "utxos_6m_to_9m_old_unrealized_profit".to_string(), + ), + _9m_to_1y: CentsUsdPattern3::new( + client.clone(), + "utxos_9m_to_1y_old_unrealized_profit".to_string(), + ), + _1y_to_18m: CentsUsdPattern3::new( + client.clone(), + "utxos_1y_to_18m_old_unrealized_profit".to_string(), + ), + _18m_to_2y: CentsUsdPattern3::new( + client.clone(), + "utxos_18m_to_2y_old_unrealized_profit".to_string(), + ), + _2y_to_3y: CentsUsdPattern3::new( + client.clone(), + "utxos_2y_to_3y_old_unrealized_profit".to_string(), + ), + _3y_to_4y: CentsUsdPattern3::new( + client.clone(), + "utxos_3y_to_4y_old_unrealized_profit".to_string(), + ), + _4y_to_5y: CentsUsdPattern3::new( + client.clone(), + "utxos_4y_to_5y_old_unrealized_profit".to_string(), + ), + _5y_to_6y: CentsUsdPattern3::new( + client.clone(), + "utxos_5y_to_6y_old_unrealized_profit".to_string(), + ), + _6y_to_7y: CentsUsdPattern3::new( + client.clone(), + "utxos_6y_to_7y_old_unrealized_profit".to_string(), + ), + _7y_to_8y: CentsUsdPattern3::new( + client.clone(), + "utxos_7y_to_8y_old_unrealized_profit".to_string(), + ), + _8y_to_10y: CentsUsdPattern3::new( + client.clone(), + "utxos_8y_to_10y_old_unrealized_profit".to_string(), + ), + _10y_to_12y: CentsUsdPattern3::new( + client.clone(), + "utxos_10y_to_12y_old_unrealized_profit".to_string(), + ), + _12y_to_15y: CentsUsdPattern3::new( + client.clone(), + "utxos_12y_to_15y_old_unrealized_profit".to_string(), + ), + over_15y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_15y_old_unrealized_profit".to_string(), + ), } } } @@ -19704,26 +31331,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Under { impl SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: CentsUsdPattern3::new(client.clone(), "utxos_under_1w_old_unrealized_profit".to_string()), - _1m: CentsUsdPattern3::new(client.clone(), "utxos_under_1m_old_unrealized_profit".to_string()), - _2m: CentsUsdPattern3::new(client.clone(), "utxos_under_2m_old_unrealized_profit".to_string()), - _3m: CentsUsdPattern3::new(client.clone(), "utxos_under_3m_old_unrealized_profit".to_string()), - _4m: CentsUsdPattern3::new(client.clone(), "utxos_under_4m_old_unrealized_profit".to_string()), - _5m: CentsUsdPattern3::new(client.clone(), "utxos_under_5m_old_unrealized_profit".to_string()), - _6m: CentsUsdPattern3::new(client.clone(), "utxos_under_6m_old_unrealized_profit".to_string()), - _9m: CentsUsdPattern3::new(client.clone(), "utxos_under_9m_old_unrealized_profit".to_string()), - _1y: CentsUsdPattern3::new(client.clone(), "utxos_under_1y_old_unrealized_profit".to_string()), - _18m: CentsUsdPattern3::new(client.clone(), "utxos_under_18m_old_unrealized_profit".to_string()), - _2y: CentsUsdPattern3::new(client.clone(), "utxos_under_2y_old_unrealized_profit".to_string()), - _3y: CentsUsdPattern3::new(client.clone(), "utxos_under_3y_old_unrealized_profit".to_string()), - _4y: CentsUsdPattern3::new(client.clone(), "utxos_under_4y_old_unrealized_profit".to_string()), - _5y: CentsUsdPattern3::new(client.clone(), "utxos_under_5y_old_unrealized_profit".to_string()), - _6y: CentsUsdPattern3::new(client.clone(), "utxos_under_6y_old_unrealized_profit".to_string()), - _7y: CentsUsdPattern3::new(client.clone(), "utxos_under_7y_old_unrealized_profit".to_string()), - _8y: CentsUsdPattern3::new(client.clone(), "utxos_under_8y_old_unrealized_profit".to_string()), - _10y: CentsUsdPattern3::new(client.clone(), "utxos_under_10y_old_unrealized_profit".to_string()), - _12y: CentsUsdPattern3::new(client.clone(), "utxos_under_12y_old_unrealized_profit".to_string()), - _15y: CentsUsdPattern3::new(client.clone(), "utxos_under_15y_old_unrealized_profit".to_string()), + _1w: CentsUsdPattern3::new( + client.clone(), + "utxos_under_1w_old_unrealized_profit".to_string(), + ), + _1m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_1m_old_unrealized_profit".to_string(), + ), + _2m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_2m_old_unrealized_profit".to_string(), + ), + _3m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_3m_old_unrealized_profit".to_string(), + ), + _4m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_4m_old_unrealized_profit".to_string(), + ), + _5m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_5m_old_unrealized_profit".to_string(), + ), + _6m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_6m_old_unrealized_profit".to_string(), + ), + _9m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_9m_old_unrealized_profit".to_string(), + ), + _1y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_1y_old_unrealized_profit".to_string(), + ), + _18m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_18m_old_unrealized_profit".to_string(), + ), + _2y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_2y_old_unrealized_profit".to_string(), + ), + _3y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_3y_old_unrealized_profit".to_string(), + ), + _4y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_4y_old_unrealized_profit".to_string(), + ), + _5y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_5y_old_unrealized_profit".to_string(), + ), + _6y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_6y_old_unrealized_profit".to_string(), + ), + _7y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_7y_old_unrealized_profit".to_string(), + ), + _8y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_8y_old_unrealized_profit".to_string(), + ), + _10y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_10y_old_unrealized_profit".to_string(), + ), + _12y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_12y_old_unrealized_profit".to_string(), + ), + _15y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_15y_old_unrealized_profit".to_string(), + ), } } } @@ -19755,26 +31442,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Over { impl SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: CentsUsdPattern3::new(client.clone(), "utxos_over_1d_old_unrealized_profit".to_string()), - _1w: CentsUsdPattern3::new(client.clone(), "utxos_over_1w_old_unrealized_profit".to_string()), - _1m: CentsUsdPattern3::new(client.clone(), "utxos_over_1m_old_unrealized_profit".to_string()), - _2m: CentsUsdPattern3::new(client.clone(), "utxos_over_2m_old_unrealized_profit".to_string()), - _3m: CentsUsdPattern3::new(client.clone(), "utxos_over_3m_old_unrealized_profit".to_string()), - _4m: CentsUsdPattern3::new(client.clone(), "utxos_over_4m_old_unrealized_profit".to_string()), - _5m: CentsUsdPattern3::new(client.clone(), "utxos_over_5m_old_unrealized_profit".to_string()), - _6m: CentsUsdPattern3::new(client.clone(), "utxos_over_6m_old_unrealized_profit".to_string()), - _9m: CentsUsdPattern3::new(client.clone(), "utxos_over_9m_old_unrealized_profit".to_string()), - _1y: CentsUsdPattern3::new(client.clone(), "utxos_over_1y_old_unrealized_profit".to_string()), - _18m: CentsUsdPattern3::new(client.clone(), "utxos_over_18m_old_unrealized_profit".to_string()), - _2y: CentsUsdPattern3::new(client.clone(), "utxos_over_2y_old_unrealized_profit".to_string()), - _3y: CentsUsdPattern3::new(client.clone(), "utxos_over_3y_old_unrealized_profit".to_string()), - _4y: CentsUsdPattern3::new(client.clone(), "utxos_over_4y_old_unrealized_profit".to_string()), - _5y: CentsUsdPattern3::new(client.clone(), "utxos_over_5y_old_unrealized_profit".to_string()), - _6y: CentsUsdPattern3::new(client.clone(), "utxos_over_6y_old_unrealized_profit".to_string()), - _7y: CentsUsdPattern3::new(client.clone(), "utxos_over_7y_old_unrealized_profit".to_string()), - _8y: CentsUsdPattern3::new(client.clone(), "utxos_over_8y_old_unrealized_profit".to_string()), - _10y: CentsUsdPattern3::new(client.clone(), "utxos_over_10y_old_unrealized_profit".to_string()), - _12y: CentsUsdPattern3::new(client.clone(), "utxos_over_12y_old_unrealized_profit".to_string()), + _1d: CentsUsdPattern3::new( + client.clone(), + "utxos_over_1d_old_unrealized_profit".to_string(), + ), + _1w: CentsUsdPattern3::new( + client.clone(), + "utxos_over_1w_old_unrealized_profit".to_string(), + ), + _1m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_1m_old_unrealized_profit".to_string(), + ), + _2m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_2m_old_unrealized_profit".to_string(), + ), + _3m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_3m_old_unrealized_profit".to_string(), + ), + _4m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_4m_old_unrealized_profit".to_string(), + ), + _5m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_5m_old_unrealized_profit".to_string(), + ), + _6m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_6m_old_unrealized_profit".to_string(), + ), + _9m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_9m_old_unrealized_profit".to_string(), + ), + _1y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_1y_old_unrealized_profit".to_string(), + ), + _18m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_18m_old_unrealized_profit".to_string(), + ), + _2y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_2y_old_unrealized_profit".to_string(), + ), + _3y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_3y_old_unrealized_profit".to_string(), + ), + _4y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_4y_old_unrealized_profit".to_string(), + ), + _5y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_5y_old_unrealized_profit".to_string(), + ), + _6y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_6y_old_unrealized_profit".to_string(), + ), + _7y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_7y_old_unrealized_profit".to_string(), + ), + _8y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_8y_old_unrealized_profit".to_string(), + ), + _10y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_10y_old_unrealized_profit".to_string(), + ), + _12y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_12y_old_unrealized_profit".to_string(), + ), } } } @@ -19825,24 +31572,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Class { impl SeriesTree_Cohorts_Cohorts_Unrealized_Profit_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: CentsUsdPattern3::new(client.clone(), "class_2009_unrealized_profit".to_string()), - _2010: CentsUsdPattern3::new(client.clone(), "class_2010_unrealized_profit".to_string()), - _2011: CentsUsdPattern3::new(client.clone(), "class_2011_unrealized_profit".to_string()), - _2012: CentsUsdPattern3::new(client.clone(), "class_2012_unrealized_profit".to_string()), - _2013: CentsUsdPattern3::new(client.clone(), "class_2013_unrealized_profit".to_string()), - _2014: CentsUsdPattern3::new(client.clone(), "class_2014_unrealized_profit".to_string()), - _2015: CentsUsdPattern3::new(client.clone(), "class_2015_unrealized_profit".to_string()), - _2016: CentsUsdPattern3::new(client.clone(), "class_2016_unrealized_profit".to_string()), - _2017: CentsUsdPattern3::new(client.clone(), "class_2017_unrealized_profit".to_string()), - _2018: CentsUsdPattern3::new(client.clone(), "class_2018_unrealized_profit".to_string()), - _2019: CentsUsdPattern3::new(client.clone(), "class_2019_unrealized_profit".to_string()), - _2020: CentsUsdPattern3::new(client.clone(), "class_2020_unrealized_profit".to_string()), - _2021: CentsUsdPattern3::new(client.clone(), "class_2021_unrealized_profit".to_string()), - _2022: CentsUsdPattern3::new(client.clone(), "class_2022_unrealized_profit".to_string()), - _2023: CentsUsdPattern3::new(client.clone(), "class_2023_unrealized_profit".to_string()), - _2024: CentsUsdPattern3::new(client.clone(), "class_2024_unrealized_profit".to_string()), - _2025: CentsUsdPattern3::new(client.clone(), "class_2025_unrealized_profit".to_string()), - _2026: CentsUsdPattern3::new(client.clone(), "class_2026_unrealized_profit".to_string()), + _2009: CentsUsdPattern3::new( + client.clone(), + "class_2009_unrealized_profit".to_string(), + ), + _2010: CentsUsdPattern3::new( + client.clone(), + "class_2010_unrealized_profit".to_string(), + ), + _2011: CentsUsdPattern3::new( + client.clone(), + "class_2011_unrealized_profit".to_string(), + ), + _2012: CentsUsdPattern3::new( + client.clone(), + "class_2012_unrealized_profit".to_string(), + ), + _2013: CentsUsdPattern3::new( + client.clone(), + "class_2013_unrealized_profit".to_string(), + ), + _2014: CentsUsdPattern3::new( + client.clone(), + "class_2014_unrealized_profit".to_string(), + ), + _2015: CentsUsdPattern3::new( + client.clone(), + "class_2015_unrealized_profit".to_string(), + ), + _2016: CentsUsdPattern3::new( + client.clone(), + "class_2016_unrealized_profit".to_string(), + ), + _2017: CentsUsdPattern3::new( + client.clone(), + "class_2017_unrealized_profit".to_string(), + ), + _2018: CentsUsdPattern3::new( + client.clone(), + "class_2018_unrealized_profit".to_string(), + ), + _2019: CentsUsdPattern3::new( + client.clone(), + "class_2019_unrealized_profit".to_string(), + ), + _2020: CentsUsdPattern3::new( + client.clone(), + "class_2020_unrealized_profit".to_string(), + ), + _2021: CentsUsdPattern3::new( + client.clone(), + "class_2021_unrealized_profit".to_string(), + ), + _2022: CentsUsdPattern3::new( + client.clone(), + "class_2022_unrealized_profit".to_string(), + ), + _2023: CentsUsdPattern3::new( + client.clone(), + "class_2023_unrealized_profit".to_string(), + ), + _2024: CentsUsdPattern3::new( + client.clone(), + "class_2024_unrealized_profit".to_string(), + ), + _2025: CentsUsdPattern3::new( + client.clone(), + "class_2025_unrealized_profit".to_string(), + ), + _2026: CentsUsdPattern3::new( + client.clone(), + "class_2026_unrealized_profit".to_string(), + ), } } } @@ -19868,18 +31669,48 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss { pub fn new(client: Arc, base_path: String) -> Self { Self { all: CentsUsdPattern3::new(client.clone(), "unrealized_loss".to_string()), - age: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern13::new(client.clone(), "unrealized_loss".to_string()), term: LongShortPattern14::new(client.clone(), "unrealized_loss".to_string()), - type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern11::new(client.clone(), "unrealized_loss".to_string()), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_unrealized_loss_cents_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "unrealized_loss_cents_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "unrealized_loss_cents_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "unrealized_loss_cents_by_entry".to_string()), - type_matrix: SeriesPattern18::new(client.clone(), "unrealized_loss_cents_by_type".to_string()), - negative: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative::new(client.clone(), format!("{base_path}_negative")), + type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern11::new( + client.clone(), + "unrealized_loss".to_string(), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_unrealized_loss_cents_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "unrealized_loss_cents_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "unrealized_loss_cents_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "unrealized_loss_cents_by_entry".to_string(), + ), + type_matrix: SeriesPattern18::new( + client.clone(), + "unrealized_loss_cents_by_type".to_string(), + ), + negative: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative::new( + client.clone(), + format!("{base_path}_negative"), + ), } } } @@ -19894,9 +31725,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age { impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -19931,29 +31771,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Range { impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: CentsUsdPattern3::new(client.clone(), "utxos_under_1h_old_unrealized_loss".to_string()), - _1h_to_1d: CentsUsdPattern3::new(client.clone(), "utxos_1h_to_1d_old_unrealized_loss".to_string()), - _1d_to_1w: CentsUsdPattern3::new(client.clone(), "utxos_1d_to_1w_old_unrealized_loss".to_string()), - _1w_to_1m: CentsUsdPattern3::new(client.clone(), "utxos_1w_to_1m_old_unrealized_loss".to_string()), - _1m_to_2m: CentsUsdPattern3::new(client.clone(), "utxos_1m_to_2m_old_unrealized_loss".to_string()), - _2m_to_3m: CentsUsdPattern3::new(client.clone(), "utxos_2m_to_3m_old_unrealized_loss".to_string()), - _3m_to_4m: CentsUsdPattern3::new(client.clone(), "utxos_3m_to_4m_old_unrealized_loss".to_string()), - _4m_to_5m: CentsUsdPattern3::new(client.clone(), "utxos_4m_to_5m_old_unrealized_loss".to_string()), - _5m_to_6m: CentsUsdPattern3::new(client.clone(), "utxos_5m_to_6m_old_unrealized_loss".to_string()), - _6m_to_9m: CentsUsdPattern3::new(client.clone(), "utxos_6m_to_9m_old_unrealized_loss".to_string()), - _9m_to_1y: CentsUsdPattern3::new(client.clone(), "utxos_9m_to_1y_old_unrealized_loss".to_string()), - _1y_to_18m: CentsUsdPattern3::new(client.clone(), "utxos_1y_to_18m_old_unrealized_loss".to_string()), - _18m_to_2y: CentsUsdPattern3::new(client.clone(), "utxos_18m_to_2y_old_unrealized_loss".to_string()), - _2y_to_3y: CentsUsdPattern3::new(client.clone(), "utxos_2y_to_3y_old_unrealized_loss".to_string()), - _3y_to_4y: CentsUsdPattern3::new(client.clone(), "utxos_3y_to_4y_old_unrealized_loss".to_string()), - _4y_to_5y: CentsUsdPattern3::new(client.clone(), "utxos_4y_to_5y_old_unrealized_loss".to_string()), - _5y_to_6y: CentsUsdPattern3::new(client.clone(), "utxos_5y_to_6y_old_unrealized_loss".to_string()), - _6y_to_7y: CentsUsdPattern3::new(client.clone(), "utxos_6y_to_7y_old_unrealized_loss".to_string()), - _7y_to_8y: CentsUsdPattern3::new(client.clone(), "utxos_7y_to_8y_old_unrealized_loss".to_string()), - _8y_to_10y: CentsUsdPattern3::new(client.clone(), "utxos_8y_to_10y_old_unrealized_loss".to_string()), - _10y_to_12y: CentsUsdPattern3::new(client.clone(), "utxos_10y_to_12y_old_unrealized_loss".to_string()), - _12y_to_15y: CentsUsdPattern3::new(client.clone(), "utxos_12y_to_15y_old_unrealized_loss".to_string()), - over_15y: CentsUsdPattern3::new(client.clone(), "utxos_over_15y_old_unrealized_loss".to_string()), + under_1h: CentsUsdPattern3::new( + client.clone(), + "utxos_under_1h_old_unrealized_loss".to_string(), + ), + _1h_to_1d: CentsUsdPattern3::new( + client.clone(), + "utxos_1h_to_1d_old_unrealized_loss".to_string(), + ), + _1d_to_1w: CentsUsdPattern3::new( + client.clone(), + "utxos_1d_to_1w_old_unrealized_loss".to_string(), + ), + _1w_to_1m: CentsUsdPattern3::new( + client.clone(), + "utxos_1w_to_1m_old_unrealized_loss".to_string(), + ), + _1m_to_2m: CentsUsdPattern3::new( + client.clone(), + "utxos_1m_to_2m_old_unrealized_loss".to_string(), + ), + _2m_to_3m: CentsUsdPattern3::new( + client.clone(), + "utxos_2m_to_3m_old_unrealized_loss".to_string(), + ), + _3m_to_4m: CentsUsdPattern3::new( + client.clone(), + "utxos_3m_to_4m_old_unrealized_loss".to_string(), + ), + _4m_to_5m: CentsUsdPattern3::new( + client.clone(), + "utxos_4m_to_5m_old_unrealized_loss".to_string(), + ), + _5m_to_6m: CentsUsdPattern3::new( + client.clone(), + "utxos_5m_to_6m_old_unrealized_loss".to_string(), + ), + _6m_to_9m: CentsUsdPattern3::new( + client.clone(), + "utxos_6m_to_9m_old_unrealized_loss".to_string(), + ), + _9m_to_1y: CentsUsdPattern3::new( + client.clone(), + "utxos_9m_to_1y_old_unrealized_loss".to_string(), + ), + _1y_to_18m: CentsUsdPattern3::new( + client.clone(), + "utxos_1y_to_18m_old_unrealized_loss".to_string(), + ), + _18m_to_2y: CentsUsdPattern3::new( + client.clone(), + "utxos_18m_to_2y_old_unrealized_loss".to_string(), + ), + _2y_to_3y: CentsUsdPattern3::new( + client.clone(), + "utxos_2y_to_3y_old_unrealized_loss".to_string(), + ), + _3y_to_4y: CentsUsdPattern3::new( + client.clone(), + "utxos_3y_to_4y_old_unrealized_loss".to_string(), + ), + _4y_to_5y: CentsUsdPattern3::new( + client.clone(), + "utxos_4y_to_5y_old_unrealized_loss".to_string(), + ), + _5y_to_6y: CentsUsdPattern3::new( + client.clone(), + "utxos_5y_to_6y_old_unrealized_loss".to_string(), + ), + _6y_to_7y: CentsUsdPattern3::new( + client.clone(), + "utxos_6y_to_7y_old_unrealized_loss".to_string(), + ), + _7y_to_8y: CentsUsdPattern3::new( + client.clone(), + "utxos_7y_to_8y_old_unrealized_loss".to_string(), + ), + _8y_to_10y: CentsUsdPattern3::new( + client.clone(), + "utxos_8y_to_10y_old_unrealized_loss".to_string(), + ), + _10y_to_12y: CentsUsdPattern3::new( + client.clone(), + "utxos_10y_to_12y_old_unrealized_loss".to_string(), + ), + _12y_to_15y: CentsUsdPattern3::new( + client.clone(), + "utxos_12y_to_15y_old_unrealized_loss".to_string(), + ), + over_15y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_15y_old_unrealized_loss".to_string(), + ), } } } @@ -19985,26 +31894,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Under { impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: CentsUsdPattern3::new(client.clone(), "utxos_under_1w_old_unrealized_loss".to_string()), - _1m: CentsUsdPattern3::new(client.clone(), "utxos_under_1m_old_unrealized_loss".to_string()), - _2m: CentsUsdPattern3::new(client.clone(), "utxos_under_2m_old_unrealized_loss".to_string()), - _3m: CentsUsdPattern3::new(client.clone(), "utxos_under_3m_old_unrealized_loss".to_string()), - _4m: CentsUsdPattern3::new(client.clone(), "utxos_under_4m_old_unrealized_loss".to_string()), - _5m: CentsUsdPattern3::new(client.clone(), "utxos_under_5m_old_unrealized_loss".to_string()), - _6m: CentsUsdPattern3::new(client.clone(), "utxos_under_6m_old_unrealized_loss".to_string()), - _9m: CentsUsdPattern3::new(client.clone(), "utxos_under_9m_old_unrealized_loss".to_string()), - _1y: CentsUsdPattern3::new(client.clone(), "utxos_under_1y_old_unrealized_loss".to_string()), - _18m: CentsUsdPattern3::new(client.clone(), "utxos_under_18m_old_unrealized_loss".to_string()), - _2y: CentsUsdPattern3::new(client.clone(), "utxos_under_2y_old_unrealized_loss".to_string()), - _3y: CentsUsdPattern3::new(client.clone(), "utxos_under_3y_old_unrealized_loss".to_string()), - _4y: CentsUsdPattern3::new(client.clone(), "utxos_under_4y_old_unrealized_loss".to_string()), - _5y: CentsUsdPattern3::new(client.clone(), "utxos_under_5y_old_unrealized_loss".to_string()), - _6y: CentsUsdPattern3::new(client.clone(), "utxos_under_6y_old_unrealized_loss".to_string()), - _7y: CentsUsdPattern3::new(client.clone(), "utxos_under_7y_old_unrealized_loss".to_string()), - _8y: CentsUsdPattern3::new(client.clone(), "utxos_under_8y_old_unrealized_loss".to_string()), - _10y: CentsUsdPattern3::new(client.clone(), "utxos_under_10y_old_unrealized_loss".to_string()), - _12y: CentsUsdPattern3::new(client.clone(), "utxos_under_12y_old_unrealized_loss".to_string()), - _15y: CentsUsdPattern3::new(client.clone(), "utxos_under_15y_old_unrealized_loss".to_string()), + _1w: CentsUsdPattern3::new( + client.clone(), + "utxos_under_1w_old_unrealized_loss".to_string(), + ), + _1m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_1m_old_unrealized_loss".to_string(), + ), + _2m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_2m_old_unrealized_loss".to_string(), + ), + _3m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_3m_old_unrealized_loss".to_string(), + ), + _4m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_4m_old_unrealized_loss".to_string(), + ), + _5m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_5m_old_unrealized_loss".to_string(), + ), + _6m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_6m_old_unrealized_loss".to_string(), + ), + _9m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_9m_old_unrealized_loss".to_string(), + ), + _1y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_1y_old_unrealized_loss".to_string(), + ), + _18m: CentsUsdPattern3::new( + client.clone(), + "utxos_under_18m_old_unrealized_loss".to_string(), + ), + _2y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_2y_old_unrealized_loss".to_string(), + ), + _3y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_3y_old_unrealized_loss".to_string(), + ), + _4y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_4y_old_unrealized_loss".to_string(), + ), + _5y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_5y_old_unrealized_loss".to_string(), + ), + _6y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_6y_old_unrealized_loss".to_string(), + ), + _7y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_7y_old_unrealized_loss".to_string(), + ), + _8y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_8y_old_unrealized_loss".to_string(), + ), + _10y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_10y_old_unrealized_loss".to_string(), + ), + _12y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_12y_old_unrealized_loss".to_string(), + ), + _15y: CentsUsdPattern3::new( + client.clone(), + "utxos_under_15y_old_unrealized_loss".to_string(), + ), } } } @@ -20036,26 +32005,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Over { impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: CentsUsdPattern3::new(client.clone(), "utxos_over_1d_old_unrealized_loss".to_string()), - _1w: CentsUsdPattern3::new(client.clone(), "utxos_over_1w_old_unrealized_loss".to_string()), - _1m: CentsUsdPattern3::new(client.clone(), "utxos_over_1m_old_unrealized_loss".to_string()), - _2m: CentsUsdPattern3::new(client.clone(), "utxos_over_2m_old_unrealized_loss".to_string()), - _3m: CentsUsdPattern3::new(client.clone(), "utxos_over_3m_old_unrealized_loss".to_string()), - _4m: CentsUsdPattern3::new(client.clone(), "utxos_over_4m_old_unrealized_loss".to_string()), - _5m: CentsUsdPattern3::new(client.clone(), "utxos_over_5m_old_unrealized_loss".to_string()), - _6m: CentsUsdPattern3::new(client.clone(), "utxos_over_6m_old_unrealized_loss".to_string()), - _9m: CentsUsdPattern3::new(client.clone(), "utxos_over_9m_old_unrealized_loss".to_string()), - _1y: CentsUsdPattern3::new(client.clone(), "utxos_over_1y_old_unrealized_loss".to_string()), - _18m: CentsUsdPattern3::new(client.clone(), "utxos_over_18m_old_unrealized_loss".to_string()), - _2y: CentsUsdPattern3::new(client.clone(), "utxos_over_2y_old_unrealized_loss".to_string()), - _3y: CentsUsdPattern3::new(client.clone(), "utxos_over_3y_old_unrealized_loss".to_string()), - _4y: CentsUsdPattern3::new(client.clone(), "utxos_over_4y_old_unrealized_loss".to_string()), - _5y: CentsUsdPattern3::new(client.clone(), "utxos_over_5y_old_unrealized_loss".to_string()), - _6y: CentsUsdPattern3::new(client.clone(), "utxos_over_6y_old_unrealized_loss".to_string()), - _7y: CentsUsdPattern3::new(client.clone(), "utxos_over_7y_old_unrealized_loss".to_string()), - _8y: CentsUsdPattern3::new(client.clone(), "utxos_over_8y_old_unrealized_loss".to_string()), - _10y: CentsUsdPattern3::new(client.clone(), "utxos_over_10y_old_unrealized_loss".to_string()), - _12y: CentsUsdPattern3::new(client.clone(), "utxos_over_12y_old_unrealized_loss".to_string()), + _1d: CentsUsdPattern3::new( + client.clone(), + "utxos_over_1d_old_unrealized_loss".to_string(), + ), + _1w: CentsUsdPattern3::new( + client.clone(), + "utxos_over_1w_old_unrealized_loss".to_string(), + ), + _1m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_1m_old_unrealized_loss".to_string(), + ), + _2m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_2m_old_unrealized_loss".to_string(), + ), + _3m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_3m_old_unrealized_loss".to_string(), + ), + _4m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_4m_old_unrealized_loss".to_string(), + ), + _5m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_5m_old_unrealized_loss".to_string(), + ), + _6m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_6m_old_unrealized_loss".to_string(), + ), + _9m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_9m_old_unrealized_loss".to_string(), + ), + _1y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_1y_old_unrealized_loss".to_string(), + ), + _18m: CentsUsdPattern3::new( + client.clone(), + "utxos_over_18m_old_unrealized_loss".to_string(), + ), + _2y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_2y_old_unrealized_loss".to_string(), + ), + _3y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_3y_old_unrealized_loss".to_string(), + ), + _4y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_4y_old_unrealized_loss".to_string(), + ), + _5y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_5y_old_unrealized_loss".to_string(), + ), + _6y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_6y_old_unrealized_loss".to_string(), + ), + _7y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_7y_old_unrealized_loss".to_string(), + ), + _8y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_8y_old_unrealized_loss".to_string(), + ), + _10y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_10y_old_unrealized_loss".to_string(), + ), + _12y: CentsUsdPattern3::new( + client.clone(), + "utxos_over_12y_old_unrealized_loss".to_string(), + ), } } } @@ -20143,12 +32172,24 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative { pub fn new(client: Arc, base_path: String) -> Self { Self { all: SeriesPattern1::new(client.clone(), "unrealized_loss_neg".to_string()), - age: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Class::new(client.clone(), format!("{base_path}_class")), + age: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Class::new( + client.clone(), + format!("{base_path}_class"), + ), entry: DiscountPremiumPattern7::new(client.clone(), "unrealized_loss_neg".to_string()), term: LongShortPattern7::new(client.clone(), "unrealized_loss_neg".to_string()), - type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern6::new(client.clone(), "unrealized_loss_neg".to_string()), + type_: EmptyP2aP2msP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshUnknownPattern6::new( + client.clone(), + "unrealized_loss_neg".to_string(), + ), } } } @@ -20163,9 +32204,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age { impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -20200,29 +32250,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Range { impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: SeriesPattern1::new(client.clone(), "utxos_under_1h_old_unrealized_loss_neg".to_string()), - _1h_to_1d: SeriesPattern1::new(client.clone(), "utxos_1h_to_1d_old_unrealized_loss_neg".to_string()), - _1d_to_1w: SeriesPattern1::new(client.clone(), "utxos_1d_to_1w_old_unrealized_loss_neg".to_string()), - _1w_to_1m: SeriesPattern1::new(client.clone(), "utxos_1w_to_1m_old_unrealized_loss_neg".to_string()), - _1m_to_2m: SeriesPattern1::new(client.clone(), "utxos_1m_to_2m_old_unrealized_loss_neg".to_string()), - _2m_to_3m: SeriesPattern1::new(client.clone(), "utxos_2m_to_3m_old_unrealized_loss_neg".to_string()), - _3m_to_4m: SeriesPattern1::new(client.clone(), "utxos_3m_to_4m_old_unrealized_loss_neg".to_string()), - _4m_to_5m: SeriesPattern1::new(client.clone(), "utxos_4m_to_5m_old_unrealized_loss_neg".to_string()), - _5m_to_6m: SeriesPattern1::new(client.clone(), "utxos_5m_to_6m_old_unrealized_loss_neg".to_string()), - _6m_to_9m: SeriesPattern1::new(client.clone(), "utxos_6m_to_9m_old_unrealized_loss_neg".to_string()), - _9m_to_1y: SeriesPattern1::new(client.clone(), "utxos_9m_to_1y_old_unrealized_loss_neg".to_string()), - _1y_to_18m: SeriesPattern1::new(client.clone(), "utxos_1y_to_18m_old_unrealized_loss_neg".to_string()), - _18m_to_2y: SeriesPattern1::new(client.clone(), "utxos_18m_to_2y_old_unrealized_loss_neg".to_string()), - _2y_to_3y: SeriesPattern1::new(client.clone(), "utxos_2y_to_3y_old_unrealized_loss_neg".to_string()), - _3y_to_4y: SeriesPattern1::new(client.clone(), "utxos_3y_to_4y_old_unrealized_loss_neg".to_string()), - _4y_to_5y: SeriesPattern1::new(client.clone(), "utxos_4y_to_5y_old_unrealized_loss_neg".to_string()), - _5y_to_6y: SeriesPattern1::new(client.clone(), "utxos_5y_to_6y_old_unrealized_loss_neg".to_string()), - _6y_to_7y: SeriesPattern1::new(client.clone(), "utxos_6y_to_7y_old_unrealized_loss_neg".to_string()), - _7y_to_8y: SeriesPattern1::new(client.clone(), "utxos_7y_to_8y_old_unrealized_loss_neg".to_string()), - _8y_to_10y: SeriesPattern1::new(client.clone(), "utxos_8y_to_10y_old_unrealized_loss_neg".to_string()), - _10y_to_12y: SeriesPattern1::new(client.clone(), "utxos_10y_to_12y_old_unrealized_loss_neg".to_string()), - _12y_to_15y: SeriesPattern1::new(client.clone(), "utxos_12y_to_15y_old_unrealized_loss_neg".to_string()), - over_15y: SeriesPattern1::new(client.clone(), "utxos_over_15y_old_unrealized_loss_neg".to_string()), + under_1h: SeriesPattern1::new( + client.clone(), + "utxos_under_1h_old_unrealized_loss_neg".to_string(), + ), + _1h_to_1d: SeriesPattern1::new( + client.clone(), + "utxos_1h_to_1d_old_unrealized_loss_neg".to_string(), + ), + _1d_to_1w: SeriesPattern1::new( + client.clone(), + "utxos_1d_to_1w_old_unrealized_loss_neg".to_string(), + ), + _1w_to_1m: SeriesPattern1::new( + client.clone(), + "utxos_1w_to_1m_old_unrealized_loss_neg".to_string(), + ), + _1m_to_2m: SeriesPattern1::new( + client.clone(), + "utxos_1m_to_2m_old_unrealized_loss_neg".to_string(), + ), + _2m_to_3m: SeriesPattern1::new( + client.clone(), + "utxos_2m_to_3m_old_unrealized_loss_neg".to_string(), + ), + _3m_to_4m: SeriesPattern1::new( + client.clone(), + "utxos_3m_to_4m_old_unrealized_loss_neg".to_string(), + ), + _4m_to_5m: SeriesPattern1::new( + client.clone(), + "utxos_4m_to_5m_old_unrealized_loss_neg".to_string(), + ), + _5m_to_6m: SeriesPattern1::new( + client.clone(), + "utxos_5m_to_6m_old_unrealized_loss_neg".to_string(), + ), + _6m_to_9m: SeriesPattern1::new( + client.clone(), + "utxos_6m_to_9m_old_unrealized_loss_neg".to_string(), + ), + _9m_to_1y: SeriesPattern1::new( + client.clone(), + "utxos_9m_to_1y_old_unrealized_loss_neg".to_string(), + ), + _1y_to_18m: SeriesPattern1::new( + client.clone(), + "utxos_1y_to_18m_old_unrealized_loss_neg".to_string(), + ), + _18m_to_2y: SeriesPattern1::new( + client.clone(), + "utxos_18m_to_2y_old_unrealized_loss_neg".to_string(), + ), + _2y_to_3y: SeriesPattern1::new( + client.clone(), + "utxos_2y_to_3y_old_unrealized_loss_neg".to_string(), + ), + _3y_to_4y: SeriesPattern1::new( + client.clone(), + "utxos_3y_to_4y_old_unrealized_loss_neg".to_string(), + ), + _4y_to_5y: SeriesPattern1::new( + client.clone(), + "utxos_4y_to_5y_old_unrealized_loss_neg".to_string(), + ), + _5y_to_6y: SeriesPattern1::new( + client.clone(), + "utxos_5y_to_6y_old_unrealized_loss_neg".to_string(), + ), + _6y_to_7y: SeriesPattern1::new( + client.clone(), + "utxos_6y_to_7y_old_unrealized_loss_neg".to_string(), + ), + _7y_to_8y: SeriesPattern1::new( + client.clone(), + "utxos_7y_to_8y_old_unrealized_loss_neg".to_string(), + ), + _8y_to_10y: SeriesPattern1::new( + client.clone(), + "utxos_8y_to_10y_old_unrealized_loss_neg".to_string(), + ), + _10y_to_12y: SeriesPattern1::new( + client.clone(), + "utxos_10y_to_12y_old_unrealized_loss_neg".to_string(), + ), + _12y_to_15y: SeriesPattern1::new( + client.clone(), + "utxos_12y_to_15y_old_unrealized_loss_neg".to_string(), + ), + over_15y: SeriesPattern1::new( + client.clone(), + "utxos_over_15y_old_unrealized_loss_neg".to_string(), + ), } } } @@ -20254,26 +32373,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Under { impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: SeriesPattern1::new(client.clone(), "utxos_under_1w_old_unrealized_loss_neg".to_string()), - _1m: SeriesPattern1::new(client.clone(), "utxos_under_1m_old_unrealized_loss_neg".to_string()), - _2m: SeriesPattern1::new(client.clone(), "utxos_under_2m_old_unrealized_loss_neg".to_string()), - _3m: SeriesPattern1::new(client.clone(), "utxos_under_3m_old_unrealized_loss_neg".to_string()), - _4m: SeriesPattern1::new(client.clone(), "utxos_under_4m_old_unrealized_loss_neg".to_string()), - _5m: SeriesPattern1::new(client.clone(), "utxos_under_5m_old_unrealized_loss_neg".to_string()), - _6m: SeriesPattern1::new(client.clone(), "utxos_under_6m_old_unrealized_loss_neg".to_string()), - _9m: SeriesPattern1::new(client.clone(), "utxos_under_9m_old_unrealized_loss_neg".to_string()), - _1y: SeriesPattern1::new(client.clone(), "utxos_under_1y_old_unrealized_loss_neg".to_string()), - _18m: SeriesPattern1::new(client.clone(), "utxos_under_18m_old_unrealized_loss_neg".to_string()), - _2y: SeriesPattern1::new(client.clone(), "utxos_under_2y_old_unrealized_loss_neg".to_string()), - _3y: SeriesPattern1::new(client.clone(), "utxos_under_3y_old_unrealized_loss_neg".to_string()), - _4y: SeriesPattern1::new(client.clone(), "utxos_under_4y_old_unrealized_loss_neg".to_string()), - _5y: SeriesPattern1::new(client.clone(), "utxos_under_5y_old_unrealized_loss_neg".to_string()), - _6y: SeriesPattern1::new(client.clone(), "utxos_under_6y_old_unrealized_loss_neg".to_string()), - _7y: SeriesPattern1::new(client.clone(), "utxos_under_7y_old_unrealized_loss_neg".to_string()), - _8y: SeriesPattern1::new(client.clone(), "utxos_under_8y_old_unrealized_loss_neg".to_string()), - _10y: SeriesPattern1::new(client.clone(), "utxos_under_10y_old_unrealized_loss_neg".to_string()), - _12y: SeriesPattern1::new(client.clone(), "utxos_under_12y_old_unrealized_loss_neg".to_string()), - _15y: SeriesPattern1::new(client.clone(), "utxos_under_15y_old_unrealized_loss_neg".to_string()), + _1w: SeriesPattern1::new( + client.clone(), + "utxos_under_1w_old_unrealized_loss_neg".to_string(), + ), + _1m: SeriesPattern1::new( + client.clone(), + "utxos_under_1m_old_unrealized_loss_neg".to_string(), + ), + _2m: SeriesPattern1::new( + client.clone(), + "utxos_under_2m_old_unrealized_loss_neg".to_string(), + ), + _3m: SeriesPattern1::new( + client.clone(), + "utxos_under_3m_old_unrealized_loss_neg".to_string(), + ), + _4m: SeriesPattern1::new( + client.clone(), + "utxos_under_4m_old_unrealized_loss_neg".to_string(), + ), + _5m: SeriesPattern1::new( + client.clone(), + "utxos_under_5m_old_unrealized_loss_neg".to_string(), + ), + _6m: SeriesPattern1::new( + client.clone(), + "utxos_under_6m_old_unrealized_loss_neg".to_string(), + ), + _9m: SeriesPattern1::new( + client.clone(), + "utxos_under_9m_old_unrealized_loss_neg".to_string(), + ), + _1y: SeriesPattern1::new( + client.clone(), + "utxos_under_1y_old_unrealized_loss_neg".to_string(), + ), + _18m: SeriesPattern1::new( + client.clone(), + "utxos_under_18m_old_unrealized_loss_neg".to_string(), + ), + _2y: SeriesPattern1::new( + client.clone(), + "utxos_under_2y_old_unrealized_loss_neg".to_string(), + ), + _3y: SeriesPattern1::new( + client.clone(), + "utxos_under_3y_old_unrealized_loss_neg".to_string(), + ), + _4y: SeriesPattern1::new( + client.clone(), + "utxos_under_4y_old_unrealized_loss_neg".to_string(), + ), + _5y: SeriesPattern1::new( + client.clone(), + "utxos_under_5y_old_unrealized_loss_neg".to_string(), + ), + _6y: SeriesPattern1::new( + client.clone(), + "utxos_under_6y_old_unrealized_loss_neg".to_string(), + ), + _7y: SeriesPattern1::new( + client.clone(), + "utxos_under_7y_old_unrealized_loss_neg".to_string(), + ), + _8y: SeriesPattern1::new( + client.clone(), + "utxos_under_8y_old_unrealized_loss_neg".to_string(), + ), + _10y: SeriesPattern1::new( + client.clone(), + "utxos_under_10y_old_unrealized_loss_neg".to_string(), + ), + _12y: SeriesPattern1::new( + client.clone(), + "utxos_under_12y_old_unrealized_loss_neg".to_string(), + ), + _15y: SeriesPattern1::new( + client.clone(), + "utxos_under_15y_old_unrealized_loss_neg".to_string(), + ), } } } @@ -20305,26 +32484,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Over { impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: SeriesPattern1::new(client.clone(), "utxos_over_1d_old_unrealized_loss_neg".to_string()), - _1w: SeriesPattern1::new(client.clone(), "utxos_over_1w_old_unrealized_loss_neg".to_string()), - _1m: SeriesPattern1::new(client.clone(), "utxos_over_1m_old_unrealized_loss_neg".to_string()), - _2m: SeriesPattern1::new(client.clone(), "utxos_over_2m_old_unrealized_loss_neg".to_string()), - _3m: SeriesPattern1::new(client.clone(), "utxos_over_3m_old_unrealized_loss_neg".to_string()), - _4m: SeriesPattern1::new(client.clone(), "utxos_over_4m_old_unrealized_loss_neg".to_string()), - _5m: SeriesPattern1::new(client.clone(), "utxos_over_5m_old_unrealized_loss_neg".to_string()), - _6m: SeriesPattern1::new(client.clone(), "utxos_over_6m_old_unrealized_loss_neg".to_string()), - _9m: SeriesPattern1::new(client.clone(), "utxos_over_9m_old_unrealized_loss_neg".to_string()), - _1y: SeriesPattern1::new(client.clone(), "utxos_over_1y_old_unrealized_loss_neg".to_string()), - _18m: SeriesPattern1::new(client.clone(), "utxos_over_18m_old_unrealized_loss_neg".to_string()), - _2y: SeriesPattern1::new(client.clone(), "utxos_over_2y_old_unrealized_loss_neg".to_string()), - _3y: SeriesPattern1::new(client.clone(), "utxos_over_3y_old_unrealized_loss_neg".to_string()), - _4y: SeriesPattern1::new(client.clone(), "utxos_over_4y_old_unrealized_loss_neg".to_string()), - _5y: SeriesPattern1::new(client.clone(), "utxos_over_5y_old_unrealized_loss_neg".to_string()), - _6y: SeriesPattern1::new(client.clone(), "utxos_over_6y_old_unrealized_loss_neg".to_string()), - _7y: SeriesPattern1::new(client.clone(), "utxos_over_7y_old_unrealized_loss_neg".to_string()), - _8y: SeriesPattern1::new(client.clone(), "utxos_over_8y_old_unrealized_loss_neg".to_string()), - _10y: SeriesPattern1::new(client.clone(), "utxos_over_10y_old_unrealized_loss_neg".to_string()), - _12y: SeriesPattern1::new(client.clone(), "utxos_over_12y_old_unrealized_loss_neg".to_string()), + _1d: SeriesPattern1::new( + client.clone(), + "utxos_over_1d_old_unrealized_loss_neg".to_string(), + ), + _1w: SeriesPattern1::new( + client.clone(), + "utxos_over_1w_old_unrealized_loss_neg".to_string(), + ), + _1m: SeriesPattern1::new( + client.clone(), + "utxos_over_1m_old_unrealized_loss_neg".to_string(), + ), + _2m: SeriesPattern1::new( + client.clone(), + "utxos_over_2m_old_unrealized_loss_neg".to_string(), + ), + _3m: SeriesPattern1::new( + client.clone(), + "utxos_over_3m_old_unrealized_loss_neg".to_string(), + ), + _4m: SeriesPattern1::new( + client.clone(), + "utxos_over_4m_old_unrealized_loss_neg".to_string(), + ), + _5m: SeriesPattern1::new( + client.clone(), + "utxos_over_5m_old_unrealized_loss_neg".to_string(), + ), + _6m: SeriesPattern1::new( + client.clone(), + "utxos_over_6m_old_unrealized_loss_neg".to_string(), + ), + _9m: SeriesPattern1::new( + client.clone(), + "utxos_over_9m_old_unrealized_loss_neg".to_string(), + ), + _1y: SeriesPattern1::new( + client.clone(), + "utxos_over_1y_old_unrealized_loss_neg".to_string(), + ), + _18m: SeriesPattern1::new( + client.clone(), + "utxos_over_18m_old_unrealized_loss_neg".to_string(), + ), + _2y: SeriesPattern1::new( + client.clone(), + "utxos_over_2y_old_unrealized_loss_neg".to_string(), + ), + _3y: SeriesPattern1::new( + client.clone(), + "utxos_over_3y_old_unrealized_loss_neg".to_string(), + ), + _4y: SeriesPattern1::new( + client.clone(), + "utxos_over_4y_old_unrealized_loss_neg".to_string(), + ), + _5y: SeriesPattern1::new( + client.clone(), + "utxos_over_5y_old_unrealized_loss_neg".to_string(), + ), + _6y: SeriesPattern1::new( + client.clone(), + "utxos_over_6y_old_unrealized_loss_neg".to_string(), + ), + _7y: SeriesPattern1::new( + client.clone(), + "utxos_over_7y_old_unrealized_loss_neg".to_string(), + ), + _8y: SeriesPattern1::new( + client.clone(), + "utxos_over_8y_old_unrealized_loss_neg".to_string(), + ), + _10y: SeriesPattern1::new( + client.clone(), + "utxos_over_10y_old_unrealized_loss_neg".to_string(), + ), + _12y: SeriesPattern1::new( + client.clone(), + "utxos_over_12y_old_unrealized_loss_neg".to_string(), + ), } } } @@ -20375,24 +32614,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Class { impl SeriesTree_Cohorts_Cohorts_Unrealized_Loss_Negative_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: SeriesPattern1::new(client.clone(), "class_2009_unrealized_loss_neg".to_string()), - _2010: SeriesPattern1::new(client.clone(), "class_2010_unrealized_loss_neg".to_string()), - _2011: SeriesPattern1::new(client.clone(), "class_2011_unrealized_loss_neg".to_string()), - _2012: SeriesPattern1::new(client.clone(), "class_2012_unrealized_loss_neg".to_string()), - _2013: SeriesPattern1::new(client.clone(), "class_2013_unrealized_loss_neg".to_string()), - _2014: SeriesPattern1::new(client.clone(), "class_2014_unrealized_loss_neg".to_string()), - _2015: SeriesPattern1::new(client.clone(), "class_2015_unrealized_loss_neg".to_string()), - _2016: SeriesPattern1::new(client.clone(), "class_2016_unrealized_loss_neg".to_string()), - _2017: SeriesPattern1::new(client.clone(), "class_2017_unrealized_loss_neg".to_string()), - _2018: SeriesPattern1::new(client.clone(), "class_2018_unrealized_loss_neg".to_string()), - _2019: SeriesPattern1::new(client.clone(), "class_2019_unrealized_loss_neg".to_string()), - _2020: SeriesPattern1::new(client.clone(), "class_2020_unrealized_loss_neg".to_string()), - _2021: SeriesPattern1::new(client.clone(), "class_2021_unrealized_loss_neg".to_string()), - _2022: SeriesPattern1::new(client.clone(), "class_2022_unrealized_loss_neg".to_string()), - _2023: SeriesPattern1::new(client.clone(), "class_2023_unrealized_loss_neg".to_string()), - _2024: SeriesPattern1::new(client.clone(), "class_2024_unrealized_loss_neg".to_string()), - _2025: SeriesPattern1::new(client.clone(), "class_2025_unrealized_loss_neg".to_string()), - _2026: SeriesPattern1::new(client.clone(), "class_2026_unrealized_loss_neg".to_string()), + _2009: SeriesPattern1::new( + client.clone(), + "class_2009_unrealized_loss_neg".to_string(), + ), + _2010: SeriesPattern1::new( + client.clone(), + "class_2010_unrealized_loss_neg".to_string(), + ), + _2011: SeriesPattern1::new( + client.clone(), + "class_2011_unrealized_loss_neg".to_string(), + ), + _2012: SeriesPattern1::new( + client.clone(), + "class_2012_unrealized_loss_neg".to_string(), + ), + _2013: SeriesPattern1::new( + client.clone(), + "class_2013_unrealized_loss_neg".to_string(), + ), + _2014: SeriesPattern1::new( + client.clone(), + "class_2014_unrealized_loss_neg".to_string(), + ), + _2015: SeriesPattern1::new( + client.clone(), + "class_2015_unrealized_loss_neg".to_string(), + ), + _2016: SeriesPattern1::new( + client.clone(), + "class_2016_unrealized_loss_neg".to_string(), + ), + _2017: SeriesPattern1::new( + client.clone(), + "class_2017_unrealized_loss_neg".to_string(), + ), + _2018: SeriesPattern1::new( + client.clone(), + "class_2018_unrealized_loss_neg".to_string(), + ), + _2019: SeriesPattern1::new( + client.clone(), + "class_2019_unrealized_loss_neg".to_string(), + ), + _2020: SeriesPattern1::new( + client.clone(), + "class_2020_unrealized_loss_neg".to_string(), + ), + _2021: SeriesPattern1::new( + client.clone(), + "class_2021_unrealized_loss_neg".to_string(), + ), + _2022: SeriesPattern1::new( + client.clone(), + "class_2022_unrealized_loss_neg".to_string(), + ), + _2023: SeriesPattern1::new( + client.clone(), + "class_2023_unrealized_loss_neg".to_string(), + ), + _2024: SeriesPattern1::new( + client.clone(), + "class_2024_unrealized_loss_neg".to_string(), + ), + _2025: SeriesPattern1::new( + client.clone(), + "class_2025_unrealized_loss_neg".to_string(), + ), + _2026: SeriesPattern1::new( + client.clone(), + "class_2026_unrealized_loss_neg".to_string(), + ), } } } @@ -20415,15 +32708,42 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl { pub fn new(client: Arc, base_path: String) -> Self { Self { all: CentsUsdPattern::new(client.clone(), "net_unrealized_pnl".to_string()), - age: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Class::new(client.clone(), format!("{base_path}_class")), - entry: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Entry::new(client.clone(), format!("{base_path}_entry")), - term: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Term::new(client.clone(), format!("{base_path}_term")), - age_range_matrix: SeriesPattern18::new(client.clone(), "utxos_net_unrealized_pnl_cents_by_age_range".to_string()), - epoch_matrix: SeriesPattern18::new(client.clone(), "net_unrealized_pnl_cents_by_epoch".to_string()), - class_matrix: SeriesPattern18::new(client.clone(), "net_unrealized_pnl_cents_by_class".to_string()), - entry_matrix: SeriesPattern18::new(client.clone(), "net_unrealized_pnl_cents_by_entry".to_string()), + age: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Class::new( + client.clone(), + format!("{base_path}_class"), + ), + entry: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Entry::new( + client.clone(), + format!("{base_path}_entry"), + ), + term: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Term::new( + client.clone(), + format!("{base_path}_term"), + ), + age_range_matrix: SeriesPattern18::new( + client.clone(), + "utxos_net_unrealized_pnl_cents_by_age_range".to_string(), + ), + epoch_matrix: SeriesPattern18::new( + client.clone(), + "net_unrealized_pnl_cents_by_epoch".to_string(), + ), + class_matrix: SeriesPattern18::new( + client.clone(), + "net_unrealized_pnl_cents_by_class".to_string(), + ), + entry_matrix: SeriesPattern18::new( + client.clone(), + "net_unrealized_pnl_cents_by_entry".to_string(), + ), } } } @@ -20438,9 +32758,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age { impl SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -20475,29 +32804,98 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Range { impl SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: CentsUsdPattern::new(client.clone(), "utxos_under_1h_old_net_unrealized_pnl".to_string()), - _1h_to_1d: CentsUsdPattern::new(client.clone(), "utxos_1h_to_1d_old_net_unrealized_pnl".to_string()), - _1d_to_1w: CentsUsdPattern::new(client.clone(), "utxos_1d_to_1w_old_net_unrealized_pnl".to_string()), - _1w_to_1m: CentsUsdPattern::new(client.clone(), "utxos_1w_to_1m_old_net_unrealized_pnl".to_string()), - _1m_to_2m: CentsUsdPattern::new(client.clone(), "utxos_1m_to_2m_old_net_unrealized_pnl".to_string()), - _2m_to_3m: CentsUsdPattern::new(client.clone(), "utxos_2m_to_3m_old_net_unrealized_pnl".to_string()), - _3m_to_4m: CentsUsdPattern::new(client.clone(), "utxos_3m_to_4m_old_net_unrealized_pnl".to_string()), - _4m_to_5m: CentsUsdPattern::new(client.clone(), "utxos_4m_to_5m_old_net_unrealized_pnl".to_string()), - _5m_to_6m: CentsUsdPattern::new(client.clone(), "utxos_5m_to_6m_old_net_unrealized_pnl".to_string()), - _6m_to_9m: CentsUsdPattern::new(client.clone(), "utxos_6m_to_9m_old_net_unrealized_pnl".to_string()), - _9m_to_1y: CentsUsdPattern::new(client.clone(), "utxos_9m_to_1y_old_net_unrealized_pnl".to_string()), - _1y_to_18m: CentsUsdPattern::new(client.clone(), "utxos_1y_to_18m_old_net_unrealized_pnl".to_string()), - _18m_to_2y: CentsUsdPattern::new(client.clone(), "utxos_18m_to_2y_old_net_unrealized_pnl".to_string()), - _2y_to_3y: CentsUsdPattern::new(client.clone(), "utxos_2y_to_3y_old_net_unrealized_pnl".to_string()), - _3y_to_4y: CentsUsdPattern::new(client.clone(), "utxos_3y_to_4y_old_net_unrealized_pnl".to_string()), - _4y_to_5y: CentsUsdPattern::new(client.clone(), "utxos_4y_to_5y_old_net_unrealized_pnl".to_string()), - _5y_to_6y: CentsUsdPattern::new(client.clone(), "utxos_5y_to_6y_old_net_unrealized_pnl".to_string()), - _6y_to_7y: CentsUsdPattern::new(client.clone(), "utxos_6y_to_7y_old_net_unrealized_pnl".to_string()), - _7y_to_8y: CentsUsdPattern::new(client.clone(), "utxos_7y_to_8y_old_net_unrealized_pnl".to_string()), - _8y_to_10y: CentsUsdPattern::new(client.clone(), "utxos_8y_to_10y_old_net_unrealized_pnl".to_string()), - _10y_to_12y: CentsUsdPattern::new(client.clone(), "utxos_10y_to_12y_old_net_unrealized_pnl".to_string()), - _12y_to_15y: CentsUsdPattern::new(client.clone(), "utxos_12y_to_15y_old_net_unrealized_pnl".to_string()), - over_15y: CentsUsdPattern::new(client.clone(), "utxos_over_15y_old_net_unrealized_pnl".to_string()), + under_1h: CentsUsdPattern::new( + client.clone(), + "utxos_under_1h_old_net_unrealized_pnl".to_string(), + ), + _1h_to_1d: CentsUsdPattern::new( + client.clone(), + "utxos_1h_to_1d_old_net_unrealized_pnl".to_string(), + ), + _1d_to_1w: CentsUsdPattern::new( + client.clone(), + "utxos_1d_to_1w_old_net_unrealized_pnl".to_string(), + ), + _1w_to_1m: CentsUsdPattern::new( + client.clone(), + "utxos_1w_to_1m_old_net_unrealized_pnl".to_string(), + ), + _1m_to_2m: CentsUsdPattern::new( + client.clone(), + "utxos_1m_to_2m_old_net_unrealized_pnl".to_string(), + ), + _2m_to_3m: CentsUsdPattern::new( + client.clone(), + "utxos_2m_to_3m_old_net_unrealized_pnl".to_string(), + ), + _3m_to_4m: CentsUsdPattern::new( + client.clone(), + "utxos_3m_to_4m_old_net_unrealized_pnl".to_string(), + ), + _4m_to_5m: CentsUsdPattern::new( + client.clone(), + "utxos_4m_to_5m_old_net_unrealized_pnl".to_string(), + ), + _5m_to_6m: CentsUsdPattern::new( + client.clone(), + "utxos_5m_to_6m_old_net_unrealized_pnl".to_string(), + ), + _6m_to_9m: CentsUsdPattern::new( + client.clone(), + "utxos_6m_to_9m_old_net_unrealized_pnl".to_string(), + ), + _9m_to_1y: CentsUsdPattern::new( + client.clone(), + "utxos_9m_to_1y_old_net_unrealized_pnl".to_string(), + ), + _1y_to_18m: CentsUsdPattern::new( + client.clone(), + "utxos_1y_to_18m_old_net_unrealized_pnl".to_string(), + ), + _18m_to_2y: CentsUsdPattern::new( + client.clone(), + "utxos_18m_to_2y_old_net_unrealized_pnl".to_string(), + ), + _2y_to_3y: CentsUsdPattern::new( + client.clone(), + "utxos_2y_to_3y_old_net_unrealized_pnl".to_string(), + ), + _3y_to_4y: CentsUsdPattern::new( + client.clone(), + "utxos_3y_to_4y_old_net_unrealized_pnl".to_string(), + ), + _4y_to_5y: CentsUsdPattern::new( + client.clone(), + "utxos_4y_to_5y_old_net_unrealized_pnl".to_string(), + ), + _5y_to_6y: CentsUsdPattern::new( + client.clone(), + "utxos_5y_to_6y_old_net_unrealized_pnl".to_string(), + ), + _6y_to_7y: CentsUsdPattern::new( + client.clone(), + "utxos_6y_to_7y_old_net_unrealized_pnl".to_string(), + ), + _7y_to_8y: CentsUsdPattern::new( + client.clone(), + "utxos_7y_to_8y_old_net_unrealized_pnl".to_string(), + ), + _8y_to_10y: CentsUsdPattern::new( + client.clone(), + "utxos_8y_to_10y_old_net_unrealized_pnl".to_string(), + ), + _10y_to_12y: CentsUsdPattern::new( + client.clone(), + "utxos_10y_to_12y_old_net_unrealized_pnl".to_string(), + ), + _12y_to_15y: CentsUsdPattern::new( + client.clone(), + "utxos_12y_to_15y_old_net_unrealized_pnl".to_string(), + ), + over_15y: CentsUsdPattern::new( + client.clone(), + "utxos_over_15y_old_net_unrealized_pnl".to_string(), + ), } } } @@ -20529,26 +32927,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Under { impl SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Under { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1w: CentsUsdPattern::new(client.clone(), "utxos_under_1w_old_net_unrealized_pnl".to_string()), - _1m: CentsUsdPattern::new(client.clone(), "utxos_under_1m_old_net_unrealized_pnl".to_string()), - _2m: CentsUsdPattern::new(client.clone(), "utxos_under_2m_old_net_unrealized_pnl".to_string()), - _3m: CentsUsdPattern::new(client.clone(), "utxos_under_3m_old_net_unrealized_pnl".to_string()), - _4m: CentsUsdPattern::new(client.clone(), "utxos_under_4m_old_net_unrealized_pnl".to_string()), - _5m: CentsUsdPattern::new(client.clone(), "utxos_under_5m_old_net_unrealized_pnl".to_string()), - _6m: CentsUsdPattern::new(client.clone(), "utxos_under_6m_old_net_unrealized_pnl".to_string()), - _9m: CentsUsdPattern::new(client.clone(), "utxos_under_9m_old_net_unrealized_pnl".to_string()), - _1y: CentsUsdPattern::new(client.clone(), "utxos_under_1y_old_net_unrealized_pnl".to_string()), - _18m: CentsUsdPattern::new(client.clone(), "utxos_under_18m_old_net_unrealized_pnl".to_string()), - _2y: CentsUsdPattern::new(client.clone(), "utxos_under_2y_old_net_unrealized_pnl".to_string()), - _3y: CentsUsdPattern::new(client.clone(), "utxos_under_3y_old_net_unrealized_pnl".to_string()), - _4y: CentsUsdPattern::new(client.clone(), "utxos_under_4y_old_net_unrealized_pnl".to_string()), - _5y: CentsUsdPattern::new(client.clone(), "utxos_under_5y_old_net_unrealized_pnl".to_string()), - _6y: CentsUsdPattern::new(client.clone(), "utxos_under_6y_old_net_unrealized_pnl".to_string()), - _7y: CentsUsdPattern::new(client.clone(), "utxos_under_7y_old_net_unrealized_pnl".to_string()), - _8y: CentsUsdPattern::new(client.clone(), "utxos_under_8y_old_net_unrealized_pnl".to_string()), - _10y: CentsUsdPattern::new(client.clone(), "utxos_under_10y_old_net_unrealized_pnl".to_string()), - _12y: CentsUsdPattern::new(client.clone(), "utxos_under_12y_old_net_unrealized_pnl".to_string()), - _15y: CentsUsdPattern::new(client.clone(), "utxos_under_15y_old_net_unrealized_pnl".to_string()), + _1w: CentsUsdPattern::new( + client.clone(), + "utxos_under_1w_old_net_unrealized_pnl".to_string(), + ), + _1m: CentsUsdPattern::new( + client.clone(), + "utxos_under_1m_old_net_unrealized_pnl".to_string(), + ), + _2m: CentsUsdPattern::new( + client.clone(), + "utxos_under_2m_old_net_unrealized_pnl".to_string(), + ), + _3m: CentsUsdPattern::new( + client.clone(), + "utxos_under_3m_old_net_unrealized_pnl".to_string(), + ), + _4m: CentsUsdPattern::new( + client.clone(), + "utxos_under_4m_old_net_unrealized_pnl".to_string(), + ), + _5m: CentsUsdPattern::new( + client.clone(), + "utxos_under_5m_old_net_unrealized_pnl".to_string(), + ), + _6m: CentsUsdPattern::new( + client.clone(), + "utxos_under_6m_old_net_unrealized_pnl".to_string(), + ), + _9m: CentsUsdPattern::new( + client.clone(), + "utxos_under_9m_old_net_unrealized_pnl".to_string(), + ), + _1y: CentsUsdPattern::new( + client.clone(), + "utxos_under_1y_old_net_unrealized_pnl".to_string(), + ), + _18m: CentsUsdPattern::new( + client.clone(), + "utxos_under_18m_old_net_unrealized_pnl".to_string(), + ), + _2y: CentsUsdPattern::new( + client.clone(), + "utxos_under_2y_old_net_unrealized_pnl".to_string(), + ), + _3y: CentsUsdPattern::new( + client.clone(), + "utxos_under_3y_old_net_unrealized_pnl".to_string(), + ), + _4y: CentsUsdPattern::new( + client.clone(), + "utxos_under_4y_old_net_unrealized_pnl".to_string(), + ), + _5y: CentsUsdPattern::new( + client.clone(), + "utxos_under_5y_old_net_unrealized_pnl".to_string(), + ), + _6y: CentsUsdPattern::new( + client.clone(), + "utxos_under_6y_old_net_unrealized_pnl".to_string(), + ), + _7y: CentsUsdPattern::new( + client.clone(), + "utxos_under_7y_old_net_unrealized_pnl".to_string(), + ), + _8y: CentsUsdPattern::new( + client.clone(), + "utxos_under_8y_old_net_unrealized_pnl".to_string(), + ), + _10y: CentsUsdPattern::new( + client.clone(), + "utxos_under_10y_old_net_unrealized_pnl".to_string(), + ), + _12y: CentsUsdPattern::new( + client.clone(), + "utxos_under_12y_old_net_unrealized_pnl".to_string(), + ), + _15y: CentsUsdPattern::new( + client.clone(), + "utxos_under_15y_old_net_unrealized_pnl".to_string(), + ), } } } @@ -20580,26 +33038,86 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Over { impl SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Age_Over { pub fn new(client: Arc, base_path: String) -> Self { Self { - _1d: CentsUsdPattern::new(client.clone(), "utxos_over_1d_old_net_unrealized_pnl".to_string()), - _1w: CentsUsdPattern::new(client.clone(), "utxos_over_1w_old_net_unrealized_pnl".to_string()), - _1m: CentsUsdPattern::new(client.clone(), "utxos_over_1m_old_net_unrealized_pnl".to_string()), - _2m: CentsUsdPattern::new(client.clone(), "utxos_over_2m_old_net_unrealized_pnl".to_string()), - _3m: CentsUsdPattern::new(client.clone(), "utxos_over_3m_old_net_unrealized_pnl".to_string()), - _4m: CentsUsdPattern::new(client.clone(), "utxos_over_4m_old_net_unrealized_pnl".to_string()), - _5m: CentsUsdPattern::new(client.clone(), "utxos_over_5m_old_net_unrealized_pnl".to_string()), - _6m: CentsUsdPattern::new(client.clone(), "utxos_over_6m_old_net_unrealized_pnl".to_string()), - _9m: CentsUsdPattern::new(client.clone(), "utxos_over_9m_old_net_unrealized_pnl".to_string()), - _1y: CentsUsdPattern::new(client.clone(), "utxos_over_1y_old_net_unrealized_pnl".to_string()), - _18m: CentsUsdPattern::new(client.clone(), "utxos_over_18m_old_net_unrealized_pnl".to_string()), - _2y: CentsUsdPattern::new(client.clone(), "utxos_over_2y_old_net_unrealized_pnl".to_string()), - _3y: CentsUsdPattern::new(client.clone(), "utxos_over_3y_old_net_unrealized_pnl".to_string()), - _4y: CentsUsdPattern::new(client.clone(), "utxos_over_4y_old_net_unrealized_pnl".to_string()), - _5y: CentsUsdPattern::new(client.clone(), "utxos_over_5y_old_net_unrealized_pnl".to_string()), - _6y: CentsUsdPattern::new(client.clone(), "utxos_over_6y_old_net_unrealized_pnl".to_string()), - _7y: CentsUsdPattern::new(client.clone(), "utxos_over_7y_old_net_unrealized_pnl".to_string()), - _8y: CentsUsdPattern::new(client.clone(), "utxos_over_8y_old_net_unrealized_pnl".to_string()), - _10y: CentsUsdPattern::new(client.clone(), "utxos_over_10y_old_net_unrealized_pnl".to_string()), - _12y: CentsUsdPattern::new(client.clone(), "utxos_over_12y_old_net_unrealized_pnl".to_string()), + _1d: CentsUsdPattern::new( + client.clone(), + "utxos_over_1d_old_net_unrealized_pnl".to_string(), + ), + _1w: CentsUsdPattern::new( + client.clone(), + "utxos_over_1w_old_net_unrealized_pnl".to_string(), + ), + _1m: CentsUsdPattern::new( + client.clone(), + "utxos_over_1m_old_net_unrealized_pnl".to_string(), + ), + _2m: CentsUsdPattern::new( + client.clone(), + "utxos_over_2m_old_net_unrealized_pnl".to_string(), + ), + _3m: CentsUsdPattern::new( + client.clone(), + "utxos_over_3m_old_net_unrealized_pnl".to_string(), + ), + _4m: CentsUsdPattern::new( + client.clone(), + "utxos_over_4m_old_net_unrealized_pnl".to_string(), + ), + _5m: CentsUsdPattern::new( + client.clone(), + "utxos_over_5m_old_net_unrealized_pnl".to_string(), + ), + _6m: CentsUsdPattern::new( + client.clone(), + "utxos_over_6m_old_net_unrealized_pnl".to_string(), + ), + _9m: CentsUsdPattern::new( + client.clone(), + "utxos_over_9m_old_net_unrealized_pnl".to_string(), + ), + _1y: CentsUsdPattern::new( + client.clone(), + "utxos_over_1y_old_net_unrealized_pnl".to_string(), + ), + _18m: CentsUsdPattern::new( + client.clone(), + "utxos_over_18m_old_net_unrealized_pnl".to_string(), + ), + _2y: CentsUsdPattern::new( + client.clone(), + "utxos_over_2y_old_net_unrealized_pnl".to_string(), + ), + _3y: CentsUsdPattern::new( + client.clone(), + "utxos_over_3y_old_net_unrealized_pnl".to_string(), + ), + _4y: CentsUsdPattern::new( + client.clone(), + "utxos_over_4y_old_net_unrealized_pnl".to_string(), + ), + _5y: CentsUsdPattern::new( + client.clone(), + "utxos_over_5y_old_net_unrealized_pnl".to_string(), + ), + _6y: CentsUsdPattern::new( + client.clone(), + "utxos_over_6y_old_net_unrealized_pnl".to_string(), + ), + _7y: CentsUsdPattern::new( + client.clone(), + "utxos_over_7y_old_net_unrealized_pnl".to_string(), + ), + _8y: CentsUsdPattern::new( + client.clone(), + "utxos_over_8y_old_net_unrealized_pnl".to_string(), + ), + _10y: CentsUsdPattern::new( + client.clone(), + "utxos_over_10y_old_net_unrealized_pnl".to_string(), + ), + _12y: CentsUsdPattern::new( + client.clone(), + "utxos_over_12y_old_net_unrealized_pnl".to_string(), + ), } } } @@ -20650,24 +33168,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Class { impl SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Class { pub fn new(client: Arc, base_path: String) -> Self { Self { - _2009: CentsUsdPattern::new(client.clone(), "class_2009_net_unrealized_pnl".to_string()), - _2010: CentsUsdPattern::new(client.clone(), "class_2010_net_unrealized_pnl".to_string()), - _2011: CentsUsdPattern::new(client.clone(), "class_2011_net_unrealized_pnl".to_string()), - _2012: CentsUsdPattern::new(client.clone(), "class_2012_net_unrealized_pnl".to_string()), - _2013: CentsUsdPattern::new(client.clone(), "class_2013_net_unrealized_pnl".to_string()), - _2014: CentsUsdPattern::new(client.clone(), "class_2014_net_unrealized_pnl".to_string()), - _2015: CentsUsdPattern::new(client.clone(), "class_2015_net_unrealized_pnl".to_string()), - _2016: CentsUsdPattern::new(client.clone(), "class_2016_net_unrealized_pnl".to_string()), - _2017: CentsUsdPattern::new(client.clone(), "class_2017_net_unrealized_pnl".to_string()), - _2018: CentsUsdPattern::new(client.clone(), "class_2018_net_unrealized_pnl".to_string()), - _2019: CentsUsdPattern::new(client.clone(), "class_2019_net_unrealized_pnl".to_string()), - _2020: CentsUsdPattern::new(client.clone(), "class_2020_net_unrealized_pnl".to_string()), - _2021: CentsUsdPattern::new(client.clone(), "class_2021_net_unrealized_pnl".to_string()), - _2022: CentsUsdPattern::new(client.clone(), "class_2022_net_unrealized_pnl".to_string()), - _2023: CentsUsdPattern::new(client.clone(), "class_2023_net_unrealized_pnl".to_string()), - _2024: CentsUsdPattern::new(client.clone(), "class_2024_net_unrealized_pnl".to_string()), - _2025: CentsUsdPattern::new(client.clone(), "class_2025_net_unrealized_pnl".to_string()), - _2026: CentsUsdPattern::new(client.clone(), "class_2026_net_unrealized_pnl".to_string()), + _2009: CentsUsdPattern::new( + client.clone(), + "class_2009_net_unrealized_pnl".to_string(), + ), + _2010: CentsUsdPattern::new( + client.clone(), + "class_2010_net_unrealized_pnl".to_string(), + ), + _2011: CentsUsdPattern::new( + client.clone(), + "class_2011_net_unrealized_pnl".to_string(), + ), + _2012: CentsUsdPattern::new( + client.clone(), + "class_2012_net_unrealized_pnl".to_string(), + ), + _2013: CentsUsdPattern::new( + client.clone(), + "class_2013_net_unrealized_pnl".to_string(), + ), + _2014: CentsUsdPattern::new( + client.clone(), + "class_2014_net_unrealized_pnl".to_string(), + ), + _2015: CentsUsdPattern::new( + client.clone(), + "class_2015_net_unrealized_pnl".to_string(), + ), + _2016: CentsUsdPattern::new( + client.clone(), + "class_2016_net_unrealized_pnl".to_string(), + ), + _2017: CentsUsdPattern::new( + client.clone(), + "class_2017_net_unrealized_pnl".to_string(), + ), + _2018: CentsUsdPattern::new( + client.clone(), + "class_2018_net_unrealized_pnl".to_string(), + ), + _2019: CentsUsdPattern::new( + client.clone(), + "class_2019_net_unrealized_pnl".to_string(), + ), + _2020: CentsUsdPattern::new( + client.clone(), + "class_2020_net_unrealized_pnl".to_string(), + ), + _2021: CentsUsdPattern::new( + client.clone(), + "class_2021_net_unrealized_pnl".to_string(), + ), + _2022: CentsUsdPattern::new( + client.clone(), + "class_2022_net_unrealized_pnl".to_string(), + ), + _2023: CentsUsdPattern::new( + client.clone(), + "class_2023_net_unrealized_pnl".to_string(), + ), + _2024: CentsUsdPattern::new( + client.clone(), + "class_2024_net_unrealized_pnl".to_string(), + ), + _2025: CentsUsdPattern::new( + client.clone(), + "class_2025_net_unrealized_pnl".to_string(), + ), + _2026: CentsUsdPattern::new( + client.clone(), + "class_2026_net_unrealized_pnl".to_string(), + ), } } } @@ -20681,7 +33253,10 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Entry { impl SeriesTree_Cohorts_Cohorts_Unrealized_NetPnl_Entry { pub fn new(client: Arc, base_path: String) -> Self { Self { - discount: CentsUsdPattern::new(client.clone(), "veteran_net_unrealized_pnl".to_string()), + discount: CentsUsdPattern::new( + client.clone(), + "veteran_net_unrealized_pnl".to_string(), + ), premium: CentsUsdPattern::new(client.clone(), "rookie_net_unrealized_pnl".to_string()), } } @@ -20716,7 +33291,10 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_GrossPnl { all: CentsUsdPattern3::new(client.clone(), "all_unrealized_gross_pnl".to_string()), sth: CentsUsdPattern3::new(client.clone(), "sth_unrealized_gross_pnl".to_string()), lth: CentsUsdPattern3::new(client.clone(), "lth_unrealized_gross_pnl".to_string()), - height: SeriesPattern18::new(client.clone(), "unrealized_gross_pnl_cents_by_term".to_string()), + height: SeriesPattern18::new( + client.clone(), + "unrealized_gross_pnl_cents_by_term".to_string(), + ), } } } @@ -20732,10 +33310,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_InvestedCapitalInProfit { impl SeriesTree_Cohorts_Cohorts_Unrealized_InvestedCapitalInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: CentsUsdPattern3::new(client.clone(), "all_invested_capital_in_profit".to_string()), - sth: CentsUsdPattern3::new(client.clone(), "sth_invested_capital_in_profit".to_string()), - lth: CentsUsdPattern3::new(client.clone(), "lth_invested_capital_in_profit".to_string()), - height: SeriesPattern18::new(client.clone(), "invested_capital_in_profit_cents_by_term".to_string()), + all: CentsUsdPattern3::new( + client.clone(), + "all_invested_capital_in_profit".to_string(), + ), + sth: CentsUsdPattern3::new( + client.clone(), + "sth_invested_capital_in_profit".to_string(), + ), + lth: CentsUsdPattern3::new( + client.clone(), + "lth_invested_capital_in_profit".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "invested_capital_in_profit_cents_by_term".to_string(), + ), } } } @@ -20754,7 +33344,10 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_InvestedCapitalInLoss { all: CentsUsdPattern3::new(client.clone(), "all_invested_capital_in_loss".to_string()), sth: CentsUsdPattern3::new(client.clone(), "sth_invested_capital_in_loss".to_string()), lth: CentsUsdPattern3::new(client.clone(), "lth_invested_capital_in_loss".to_string()), - height: SeriesPattern18::new(client.clone(), "invested_capital_in_loss_cents_by_term".to_string()), + height: SeriesPattern18::new( + client.clone(), + "invested_capital_in_loss_cents_by_term".to_string(), + ), } } } @@ -20773,7 +33366,10 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_PainIndex { all: CentsUsdPattern3::new(client.clone(), "all_pain_index".to_string()), sth: CentsUsdPattern3::new(client.clone(), "sth_pain_index".to_string()), lth: CentsUsdPattern3::new(client.clone(), "lth_pain_index".to_string()), - height: SeriesPattern18::new(client.clone(), "pain_index_cents_by_aggregate".to_string()), + height: SeriesPattern18::new( + client.clone(), + "pain_index_cents_by_aggregate".to_string(), + ), } } } @@ -20792,7 +33388,10 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_GreedIndex { all: CentsUsdPattern3::new(client.clone(), "all_greed_index".to_string()), sth: CentsUsdPattern3::new(client.clone(), "sth_greed_index".to_string()), lth: CentsUsdPattern3::new(client.clone(), "lth_greed_index".to_string()), - height: SeriesPattern18::new(client.clone(), "greed_index_cents_by_aggregate".to_string()), + height: SeriesPattern18::new( + client.clone(), + "greed_index_cents_by_aggregate".to_string(), + ), } } } @@ -20811,7 +33410,10 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_NetSentiment { all: CentsUsdPattern::new(client.clone(), "all_net_sentiment".to_string()), sth: CentsUsdPattern::new(client.clone(), "sth_net_sentiment".to_string()), lth: CentsUsdPattern::new(client.clone(), "lth_net_sentiment".to_string()), - height: SeriesPattern18::new(client.clone(), "net_sentiment_cents_by_aggregate".to_string()), + height: SeriesPattern18::new( + client.clone(), + "net_sentiment_cents_by_aggregate".to_string(), + ), } } } @@ -20832,13 +33434,34 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_Nupl { pub fn new(client: Arc, base_path: String) -> Self { Self { all: PpmRatioPattern::new(client.clone(), "nupl".to_string()), - age: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age::new(client.clone(), format!("{base_path}_age")), - epoch: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Epoch::new(client.clone(), format!("{base_path}_epoch")), - class: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Class::new(client.clone(), format!("{base_path}_class")), - entry: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Entry::new(client.clone(), format!("{base_path}_entry")), - utxo_amount: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount::new(client.clone(), format!("{base_path}_utxo_amount")), - term: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Term::new(client.clone(), format!("{base_path}_term")), - type_: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Type::new(client.clone(), format!("{base_path}_type")), + age: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age::new( + client.clone(), + format!("{base_path}_age"), + ), + epoch: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Epoch::new( + client.clone(), + format!("{base_path}_epoch"), + ), + class: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Class::new( + client.clone(), + format!("{base_path}_class"), + ), + entry: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Entry::new( + client.clone(), + format!("{base_path}_entry"), + ), + utxo_amount: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount::new( + client.clone(), + format!("{base_path}_utxo_amount"), + ), + term: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Term::new( + client.clone(), + format!("{base_path}_term"), + ), + type_: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Type::new( + client.clone(), + format!("{base_path}_type"), + ), } } } @@ -20853,9 +33476,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age { impl SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -20901,17 +33533,32 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_Age_Range { _5m_to_6m: PpmRatioPattern::new(client.clone(), "utxos_5m_to_6m_old_nupl".to_string()), _6m_to_9m: PpmRatioPattern::new(client.clone(), "utxos_6m_to_9m_old_nupl".to_string()), _9m_to_1y: PpmRatioPattern::new(client.clone(), "utxos_9m_to_1y_old_nupl".to_string()), - _1y_to_18m: PpmRatioPattern::new(client.clone(), "utxos_1y_to_18m_old_nupl".to_string()), - _18m_to_2y: PpmRatioPattern::new(client.clone(), "utxos_18m_to_2y_old_nupl".to_string()), + _1y_to_18m: PpmRatioPattern::new( + client.clone(), + "utxos_1y_to_18m_old_nupl".to_string(), + ), + _18m_to_2y: PpmRatioPattern::new( + client.clone(), + "utxos_18m_to_2y_old_nupl".to_string(), + ), _2y_to_3y: PpmRatioPattern::new(client.clone(), "utxos_2y_to_3y_old_nupl".to_string()), _3y_to_4y: PpmRatioPattern::new(client.clone(), "utxos_3y_to_4y_old_nupl".to_string()), _4y_to_5y: PpmRatioPattern::new(client.clone(), "utxos_4y_to_5y_old_nupl".to_string()), _5y_to_6y: PpmRatioPattern::new(client.clone(), "utxos_5y_to_6y_old_nupl".to_string()), _6y_to_7y: PpmRatioPattern::new(client.clone(), "utxos_6y_to_7y_old_nupl".to_string()), _7y_to_8y: PpmRatioPattern::new(client.clone(), "utxos_7y_to_8y_old_nupl".to_string()), - _8y_to_10y: PpmRatioPattern::new(client.clone(), "utxos_8y_to_10y_old_nupl".to_string()), - _10y_to_12y: PpmRatioPattern::new(client.clone(), "utxos_10y_to_12y_old_nupl".to_string()), - _12y_to_15y: PpmRatioPattern::new(client.clone(), "utxos_12y_to_15y_old_nupl".to_string()), + _8y_to_10y: PpmRatioPattern::new( + client.clone(), + "utxos_8y_to_10y_old_nupl".to_string(), + ), + _10y_to_12y: PpmRatioPattern::new( + client.clone(), + "utxos_10y_to_12y_old_nupl".to_string(), + ), + _12y_to_15y: PpmRatioPattern::new( + client.clone(), + "utxos_12y_to_15y_old_nupl".to_string(), + ), over_15y: PpmRatioPattern::new(client.clone(), "utxos_over_15y_old_nupl".to_string()), } } @@ -21112,9 +33759,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount { impl SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount_Range::new(client.clone(), format!("{base_path}_range")), - under: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount_Under::new(client.clone(), format!("{base_path}_under")), - over: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount_Over::new(client.clone(), format!("{base_path}_over")), + range: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + under: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount_Under::new( + client.clone(), + format!("{base_path}_under"), + ), + over: SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount_Over::new( + client.clone(), + format!("{base_path}_over"), + ), } } } @@ -21142,20 +33798,62 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { _0sats: PpmRatioPattern::new(client.clone(), "utxos_0sats_nupl".to_string()), - _1sat_to_10sats: PpmRatioPattern::new(client.clone(), "utxos_1sat_to_10sats_nupl".to_string()), - _10sats_to_100sats: PpmRatioPattern::new(client.clone(), "utxos_10sats_to_100sats_nupl".to_string()), - _100sats_to_1k_sats: PpmRatioPattern::new(client.clone(), "utxos_100sats_to_1k_sats_nupl".to_string()), - _1k_sats_to_10k_sats: PpmRatioPattern::new(client.clone(), "utxos_1k_sats_to_10k_sats_nupl".to_string()), - _10k_sats_to_100k_sats: PpmRatioPattern::new(client.clone(), "utxos_10k_sats_to_100k_sats_nupl".to_string()), - _100k_sats_to_1m_sats: PpmRatioPattern::new(client.clone(), "utxos_100k_sats_to_1m_sats_nupl".to_string()), - _1m_sats_to_10m_sats: PpmRatioPattern::new(client.clone(), "utxos_1m_sats_to_10m_sats_nupl".to_string()), - _10m_sats_to_1btc: PpmRatioPattern::new(client.clone(), "utxos_10m_sats_to_1btc_nupl".to_string()), - _1btc_to_10btc: PpmRatioPattern::new(client.clone(), "utxos_1btc_to_10btc_nupl".to_string()), - _10btc_to_100btc: PpmRatioPattern::new(client.clone(), "utxos_10btc_to_100btc_nupl".to_string()), - _100btc_to_1k_btc: PpmRatioPattern::new(client.clone(), "utxos_100btc_to_1k_btc_nupl".to_string()), - _1k_btc_to_10k_btc: PpmRatioPattern::new(client.clone(), "utxos_1k_btc_to_10k_btc_nupl".to_string()), - _10k_btc_to_100k_btc: PpmRatioPattern::new(client.clone(), "utxos_10k_btc_to_100k_btc_nupl".to_string()), - over_100k_btc: PpmRatioPattern::new(client.clone(), "utxos_over_100k_btc_nupl".to_string()), + _1sat_to_10sats: PpmRatioPattern::new( + client.clone(), + "utxos_1sat_to_10sats_nupl".to_string(), + ), + _10sats_to_100sats: PpmRatioPattern::new( + client.clone(), + "utxos_10sats_to_100sats_nupl".to_string(), + ), + _100sats_to_1k_sats: PpmRatioPattern::new( + client.clone(), + "utxos_100sats_to_1k_sats_nupl".to_string(), + ), + _1k_sats_to_10k_sats: PpmRatioPattern::new( + client.clone(), + "utxos_1k_sats_to_10k_sats_nupl".to_string(), + ), + _10k_sats_to_100k_sats: PpmRatioPattern::new( + client.clone(), + "utxos_10k_sats_to_100k_sats_nupl".to_string(), + ), + _100k_sats_to_1m_sats: PpmRatioPattern::new( + client.clone(), + "utxos_100k_sats_to_1m_sats_nupl".to_string(), + ), + _1m_sats_to_10m_sats: PpmRatioPattern::new( + client.clone(), + "utxos_1m_sats_to_10m_sats_nupl".to_string(), + ), + _10m_sats_to_1btc: PpmRatioPattern::new( + client.clone(), + "utxos_10m_sats_to_1btc_nupl".to_string(), + ), + _1btc_to_10btc: PpmRatioPattern::new( + client.clone(), + "utxos_1btc_to_10btc_nupl".to_string(), + ), + _10btc_to_100btc: PpmRatioPattern::new( + client.clone(), + "utxos_10btc_to_100btc_nupl".to_string(), + ), + _100btc_to_1k_btc: PpmRatioPattern::new( + client.clone(), + "utxos_100btc_to_1k_btc_nupl".to_string(), + ), + _1k_btc_to_10k_btc: PpmRatioPattern::new( + client.clone(), + "utxos_1k_btc_to_10k_btc_nupl".to_string(), + ), + _10k_btc_to_100k_btc: PpmRatioPattern::new( + client.clone(), + "utxos_10k_btc_to_100k_btc_nupl".to_string(), + ), + over_100k_btc: PpmRatioPattern::new( + client.clone(), + "utxos_over_100k_btc_nupl".to_string(), + ), } } } @@ -21183,16 +33881,28 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount_Under { _10sats: PpmRatioPattern::new(client.clone(), "utxos_under_10sats_nupl".to_string()), _100sats: PpmRatioPattern::new(client.clone(), "utxos_under_100sats_nupl".to_string()), _1k_sats: PpmRatioPattern::new(client.clone(), "utxos_under_1k_sats_nupl".to_string()), - _10k_sats: PpmRatioPattern::new(client.clone(), "utxos_under_10k_sats_nupl".to_string()), - _100k_sats: PpmRatioPattern::new(client.clone(), "utxos_under_100k_sats_nupl".to_string()), + _10k_sats: PpmRatioPattern::new( + client.clone(), + "utxos_under_10k_sats_nupl".to_string(), + ), + _100k_sats: PpmRatioPattern::new( + client.clone(), + "utxos_under_100k_sats_nupl".to_string(), + ), _1m_sats: PpmRatioPattern::new(client.clone(), "utxos_under_1m_sats_nupl".to_string()), - _10m_sats: PpmRatioPattern::new(client.clone(), "utxos_under_10m_sats_nupl".to_string()), + _10m_sats: PpmRatioPattern::new( + client.clone(), + "utxos_under_10m_sats_nupl".to_string(), + ), _1btc: PpmRatioPattern::new(client.clone(), "utxos_under_1btc_nupl".to_string()), _10btc: PpmRatioPattern::new(client.clone(), "utxos_under_10btc_nupl".to_string()), _100btc: PpmRatioPattern::new(client.clone(), "utxos_under_100btc_nupl".to_string()), _1k_btc: PpmRatioPattern::new(client.clone(), "utxos_under_1k_btc_nupl".to_string()), _10k_btc: PpmRatioPattern::new(client.clone(), "utxos_under_10k_btc_nupl".to_string()), - _100k_btc: PpmRatioPattern::new(client.clone(), "utxos_under_100k_btc_nupl".to_string()), + _100k_btc: PpmRatioPattern::new( + client.clone(), + "utxos_under_100k_btc_nupl".to_string(), + ), } } } @@ -21222,7 +33932,10 @@ impl SeriesTree_Cohorts_Cohorts_Unrealized_Nupl_UtxoAmount_Over { _100sats: PpmRatioPattern::new(client.clone(), "utxos_over_100sats_nupl".to_string()), _1k_sats: PpmRatioPattern::new(client.clone(), "utxos_over_1k_sats_nupl".to_string()), _10k_sats: PpmRatioPattern::new(client.clone(), "utxos_over_10k_sats_nupl".to_string()), - _100k_sats: PpmRatioPattern::new(client.clone(), "utxos_over_100k_sats_nupl".to_string()), + _100k_sats: PpmRatioPattern::new( + client.clone(), + "utxos_over_100k_sats_nupl".to_string(), + ), _1m_sats: PpmRatioPattern::new(client.clone(), "utxos_over_1m_sats_nupl".to_string()), _10m_sats: PpmRatioPattern::new(client.clone(), "utxos_over_10m_sats_nupl".to_string()), _1btc: PpmRatioPattern::new(client.clone(), "utxos_over_1btc_nupl".to_string()), @@ -21309,9 +34022,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative { impl SeriesTree_Cohorts_Cohorts_Relative { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: SeriesTree_Cohorts_Cohorts_Relative_Supply::new(client.clone(), format!("{base_path}_supply")), - unrealized: SeriesTree_Cohorts_Cohorts_Relative_Unrealized::new(client.clone(), format!("{base_path}_unrealized")), - invested_capital: SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital::new(client.clone(), format!("{base_path}_invested_capital")), + supply: SeriesTree_Cohorts_Cohorts_Relative_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), + unrealized: SeriesTree_Cohorts_Cohorts_Relative_Unrealized::new( + client.clone(), + format!("{base_path}_unrealized"), + ), + invested_capital: SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital::new( + client.clone(), + format!("{base_path}_invested_capital"), + ), } } } @@ -21341,9 +34063,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_Unrealized { impl SeriesTree_Cohorts_Cohorts_Relative_Unrealized { pub fn new(client: Arc, base_path: String) -> Self { Self { - profit: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Profit::new(client.clone(), format!("{base_path}_profit")), - loss: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Loss::new(client.clone(), format!("{base_path}_loss")), - net_pnl: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl::new(client.clone(), format!("{base_path}_net_pnl")), + profit: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Profit::new( + client.clone(), + format!("{base_path}_profit"), + ), + loss: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Loss::new( + client.clone(), + format!("{base_path}_loss"), + ), + net_pnl: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl::new( + client.clone(), + format!("{base_path}_net_pnl"), + ), } } } @@ -21358,9 +34089,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Profit { impl SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Profit { pub fn new(client: Arc, base_path: String) -> Self { Self { - to_mcap: AllLthSthPattern5::new(client.clone(), "unrealized_profit_to_mcap".to_string()), - to_own_mcap: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Profit_ToOwnMcap::new(client.clone(), format!("{base_path}_to_own_mcap")), - to_own_gross_pnl: AllLthSthPattern5::new(client.clone(), "unrealized_profit_to_own_gross_pnl".to_string()), + to_mcap: AllLthSthPattern5::new( + client.clone(), + "unrealized_profit_to_mcap".to_string(), + ), + to_own_mcap: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Profit_ToOwnMcap::new( + client.clone(), + format!("{base_path}_to_own_mcap"), + ), + to_own_gross_pnl: AllLthSthPattern5::new( + client.clone(), + "unrealized_profit_to_own_gross_pnl".to_string(), + ), } } } @@ -21375,9 +34115,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Profit_ToOwnMcap { impl SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Profit_ToOwnMcap { pub fn new(client: Arc, base_path: String) -> Self { Self { - short: PercentPpmRatioPattern2::new(client.clone(), "sth_unrealized_profit_to_own_mcap".to_string()), - long: PercentPpmRatioPattern2::new(client.clone(), "lth_unrealized_profit_to_own_mcap".to_string()), - height: SeriesPattern18::new(client.clone(), "unrealized_profit_to_own_mcap_ppm_by_term".to_string()), + short: PercentPpmRatioPattern2::new( + client.clone(), + "sth_unrealized_profit_to_own_mcap".to_string(), + ), + long: PercentPpmRatioPattern2::new( + client.clone(), + "lth_unrealized_profit_to_own_mcap".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "unrealized_profit_to_own_mcap_ppm_by_term".to_string(), + ), } } } @@ -21393,8 +34142,14 @@ impl SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Loss { pub fn new(client: Arc, base_path: String) -> Self { Self { to_mcap: AllLthSthPattern5::new(client.clone(), "unrealized_loss_to_mcap".to_string()), - to_own_mcap: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Loss_ToOwnMcap::new(client.clone(), format!("{base_path}_to_own_mcap")), - to_own_gross_pnl: AllLthSthPattern5::new(client.clone(), "unrealized_loss_to_own_gross_pnl".to_string()), + to_own_mcap: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Loss_ToOwnMcap::new( + client.clone(), + format!("{base_path}_to_own_mcap"), + ), + to_own_gross_pnl: AllLthSthPattern5::new( + client.clone(), + "unrealized_loss_to_own_gross_pnl".to_string(), + ), } } } @@ -21409,9 +34164,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Loss_ToOwnMcap { impl SeriesTree_Cohorts_Cohorts_Relative_Unrealized_Loss_ToOwnMcap { pub fn new(client: Arc, base_path: String) -> Self { Self { - short: PercentPpmRatioPattern2::new(client.clone(), "sth_unrealized_loss_to_own_mcap".to_string()), - long: PercentPpmRatioPattern2::new(client.clone(), "lth_unrealized_loss_to_own_mcap".to_string()), - height: SeriesPattern18::new(client.clone(), "unrealized_loss_to_own_mcap_ppm_by_term".to_string()), + short: PercentPpmRatioPattern2::new( + client.clone(), + "sth_unrealized_loss_to_own_mcap".to_string(), + ), + long: PercentPpmRatioPattern2::new( + client.clone(), + "lth_unrealized_loss_to_own_mcap".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "unrealized_loss_to_own_mcap_ppm_by_term".to_string(), + ), } } } @@ -21425,8 +34189,15 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl { impl SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl { pub fn new(client: Arc, base_path: String) -> Self { Self { - to_own_mcap: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl_ToOwnMcap::new(client.clone(), format!("{base_path}_to_own_mcap")), - to_own_gross_pnl: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl_ToOwnGrossPnl::new(client.clone(), format!("{base_path}_to_own_gross_pnl")), + to_own_mcap: SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl_ToOwnMcap::new( + client.clone(), + format!("{base_path}_to_own_mcap"), + ), + to_own_gross_pnl: + SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl_ToOwnGrossPnl::new( + client.clone(), + format!("{base_path}_to_own_gross_pnl"), + ), } } } @@ -21440,8 +34211,14 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl_ToOwnMcap { impl SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl_ToOwnMcap { pub fn new(client: Arc, base_path: String) -> Self { Self { - short: PercentPpmRatioPattern3::new(client.clone(), "sth_net_unrealized_pnl_to_own_mcap".to_string()), - long: PercentPpmRatioPattern3::new(client.clone(), "lth_net_unrealized_pnl_to_own_mcap".to_string()), + short: PercentPpmRatioPattern3::new( + client.clone(), + "sth_net_unrealized_pnl_to_own_mcap".to_string(), + ), + long: PercentPpmRatioPattern3::new( + client.clone(), + "lth_net_unrealized_pnl_to_own_mcap".to_string(), + ), } } } @@ -21456,9 +34233,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl_ToOwnGrossPnl { impl SeriesTree_Cohorts_Cohorts_Relative_Unrealized_NetPnl_ToOwnGrossPnl { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: PercentPpmRatioPattern3::new(client.clone(), "all_net_unrealized_pnl_to_own_gross_pnl".to_string()), - sth: PercentPpmRatioPattern3::new(client.clone(), "sth_net_unrealized_pnl_to_own_gross_pnl".to_string()), - lth: PercentPpmRatioPattern3::new(client.clone(), "lth_net_unrealized_pnl_to_own_gross_pnl".to_string()), + all: PercentPpmRatioPattern3::new( + client.clone(), + "all_net_unrealized_pnl_to_own_gross_pnl".to_string(), + ), + sth: PercentPpmRatioPattern3::new( + client.clone(), + "sth_net_unrealized_pnl_to_own_gross_pnl".to_string(), + ), + lth: PercentPpmRatioPattern3::new( + client.clone(), + "lth_net_unrealized_pnl_to_own_gross_pnl".to_string(), + ), } } } @@ -21472,8 +34258,14 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital { impl SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital { pub fn new(client: Arc, base_path: String) -> Self { Self { - in_profit: SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InProfit::new(client.clone(), format!("{base_path}_in_profit")), - in_loss: SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InLoss::new(client.clone(), format!("{base_path}_in_loss")), + in_profit: SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InProfit::new( + client.clone(), + format!("{base_path}_in_profit"), + ), + in_loss: SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InLoss::new( + client.clone(), + format!("{base_path}_in_loss"), + ), } } } @@ -21486,7 +34278,10 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InProfit { impl SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - share: SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InProfit_Share::new(client.clone(), format!("{base_path}_share")), + share: SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InProfit_Share::new( + client.clone(), + format!("{base_path}_share"), + ), } } } @@ -21502,10 +34297,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InProfit_Share { impl SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InProfit_Share { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: PercentPpmRatioPattern2::new(client.clone(), "all_invested_capital_in_profit_share".to_string()), - sth: PercentPpmRatioPattern2::new(client.clone(), "sth_invested_capital_in_profit_share".to_string()), - lth: PercentPpmRatioPattern2::new(client.clone(), "lth_invested_capital_in_profit_share".to_string()), - height: SeriesPattern18::new(client.clone(), "invested_capital_in_profit_share_ppm_by_aggregate".to_string()), + all: PercentPpmRatioPattern2::new( + client.clone(), + "all_invested_capital_in_profit_share".to_string(), + ), + sth: PercentPpmRatioPattern2::new( + client.clone(), + "sth_invested_capital_in_profit_share".to_string(), + ), + lth: PercentPpmRatioPattern2::new( + client.clone(), + "lth_invested_capital_in_profit_share".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "invested_capital_in_profit_share_ppm_by_aggregate".to_string(), + ), } } } @@ -21518,7 +34325,10 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InLoss { impl SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - share: SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InLoss_Share::new(client.clone(), format!("{base_path}_share")), + share: SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InLoss_Share::new( + client.clone(), + format!("{base_path}_share"), + ), } } } @@ -21534,10 +34344,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InLoss_Share { impl SeriesTree_Cohorts_Cohorts_Relative_InvestedCapital_InLoss_Share { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: PercentPpmRatioPattern2::new(client.clone(), "all_invested_capital_in_loss_share".to_string()), - sth: PercentPpmRatioPattern2::new(client.clone(), "sth_invested_capital_in_loss_share".to_string()), - lth: PercentPpmRatioPattern2::new(client.clone(), "lth_invested_capital_in_loss_share".to_string()), - height: SeriesPattern18::new(client.clone(), "invested_capital_in_loss_share_ppm_by_aggregate".to_string()), + all: PercentPpmRatioPattern2::new( + client.clone(), + "all_invested_capital_in_loss_share".to_string(), + ), + sth: PercentPpmRatioPattern2::new( + client.clone(), + "sth_invested_capital_in_loss_share".to_string(), + ), + lth: PercentPpmRatioPattern2::new( + client.clone(), + "lth_invested_capital_in_loss_share".to_string(), + ), + height: SeriesPattern18::new( + client.clone(), + "invested_capital_in_loss_share_ppm_by_aggregate".to_string(), + ), } } } @@ -21553,10 +34375,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability { impl SeriesTree_Cohorts_Cohorts_Profitability { pub fn new(client: Arc, base_path: String) -> Self { Self { - supply: SeriesTree_Cohorts_Cohorts_Profitability_Supply::new(client.clone(), format!("{base_path}_supply")), - realized_cap: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap::new(client.clone(), format!("{base_path}_realized_cap")), - unrealized_pnl: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl::new(client.clone(), format!("{base_path}_unrealized_pnl")), - nupl: SeriesTree_Cohorts_Cohorts_Profitability_Nupl::new(client.clone(), format!("{base_path}_nupl")), + supply: SeriesTree_Cohorts_Cohorts_Profitability_Supply::new( + client.clone(), + format!("{base_path}_supply"), + ), + realized_cap: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap::new( + client.clone(), + format!("{base_path}_realized_cap"), + ), + unrealized_pnl: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl::new( + client.clone(), + format!("{base_path}_unrealized_pnl"), + ), + nupl: SeriesTree_Cohorts_Cohorts_Profitability_Nupl::new( + client.clone(), + format!("{base_path}_nupl"), + ), } } } @@ -21572,10 +34406,22 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_Supply { impl SeriesTree_Cohorts_Cohorts_Profitability_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Profitability_Supply_Range::new(client.clone(), format!("{base_path}_range")), - profit: SeriesTree_Cohorts_Cohorts_Profitability_Supply_Profit::new(client.clone(), format!("{base_path}_profit")), - loss: SeriesTree_Cohorts_Cohorts_Profitability_Supply_Loss::new(client.clone(), format!("{base_path}_loss")), - height: SeriesPattern18::new(client.clone(), "profitability_supply_sats_by_term_and_range".to_string()), + range: SeriesTree_Cohorts_Cohorts_Profitability_Supply_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + profit: SeriesTree_Cohorts_Cohorts_Profitability_Supply_Profit::new( + client.clone(), + format!("{base_path}_profit"), + ), + loss: SeriesTree_Cohorts_Cohorts_Profitability_Supply_Loss::new( + client.clone(), + format!("{base_path}_loss"), + ), + height: SeriesPattern18::new( + client.clone(), + "profitability_supply_sats_by_term_and_range".to_string(), + ), } } } @@ -21612,31 +34458,106 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_Supply_Range { impl SeriesTree_Cohorts_Cohorts_Profitability_Supply_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - over_1000pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_over_1000pct_in_profit".to_string()), - _500pct_to_1000pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_500pct_to_1000pct_in_profit".to_string()), - _300pct_to_500pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_300pct_to_500pct_in_profit".to_string()), - _200pct_to_300pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_200pct_to_300pct_in_profit".to_string()), - _100pct_to_200pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_100pct_to_200pct_in_profit".to_string()), - _90pct_to_100pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_90pct_to_100pct_in_profit".to_string()), - _80pct_to_90pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_80pct_to_90pct_in_profit".to_string()), - _70pct_to_80pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_70pct_to_80pct_in_profit".to_string()), - _60pct_to_70pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_60pct_to_70pct_in_profit".to_string()), - _50pct_to_60pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_50pct_to_60pct_in_profit".to_string()), - _40pct_to_50pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_40pct_to_50pct_in_profit".to_string()), - _30pct_to_40pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_30pct_to_40pct_in_profit".to_string()), - _20pct_to_30pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_20pct_to_30pct_in_profit".to_string()), - _10pct_to_20pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_10pct_to_20pct_in_profit".to_string()), - _0pct_to_10pct_in_profit: AllLthSthPattern4::new(client.clone(), "utxos_0pct_to_10pct_in_profit".to_string()), - _0pct_to_10pct_in_loss: AllLthSthPattern4::new(client.clone(), "utxos_0pct_to_10pct_in_loss".to_string()), - _10pct_to_20pct_in_loss: AllLthSthPattern4::new(client.clone(), "utxos_10pct_to_20pct_in_loss".to_string()), - _20pct_to_30pct_in_loss: AllLthSthPattern4::new(client.clone(), "utxos_20pct_to_30pct_in_loss".to_string()), - _30pct_to_40pct_in_loss: AllLthSthPattern4::new(client.clone(), "utxos_30pct_to_40pct_in_loss".to_string()), - _40pct_to_50pct_in_loss: AllLthSthPattern4::new(client.clone(), "utxos_40pct_to_50pct_in_loss".to_string()), - _50pct_to_60pct_in_loss: AllLthSthPattern4::new(client.clone(), "utxos_50pct_to_60pct_in_loss".to_string()), - _60pct_to_70pct_in_loss: AllLthSthPattern4::new(client.clone(), "utxos_60pct_to_70pct_in_loss".to_string()), - _70pct_to_80pct_in_loss: AllLthSthPattern4::new(client.clone(), "utxos_70pct_to_80pct_in_loss".to_string()), - _80pct_to_90pct_in_loss: AllLthSthPattern4::new(client.clone(), "utxos_80pct_to_90pct_in_loss".to_string()), - _90pct_to_100pct_in_loss: AllLthSthPattern4::new(client.clone(), "utxos_90pct_to_100pct_in_loss".to_string()), + over_1000pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_over_1000pct_in_profit".to_string(), + ), + _500pct_to_1000pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_500pct_to_1000pct_in_profit".to_string(), + ), + _300pct_to_500pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_300pct_to_500pct_in_profit".to_string(), + ), + _200pct_to_300pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_200pct_to_300pct_in_profit".to_string(), + ), + _100pct_to_200pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_100pct_to_200pct_in_profit".to_string(), + ), + _90pct_to_100pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_90pct_to_100pct_in_profit".to_string(), + ), + _80pct_to_90pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_80pct_to_90pct_in_profit".to_string(), + ), + _70pct_to_80pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_70pct_to_80pct_in_profit".to_string(), + ), + _60pct_to_70pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_60pct_to_70pct_in_profit".to_string(), + ), + _50pct_to_60pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_50pct_to_60pct_in_profit".to_string(), + ), + _40pct_to_50pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_40pct_to_50pct_in_profit".to_string(), + ), + _30pct_to_40pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_30pct_to_40pct_in_profit".to_string(), + ), + _20pct_to_30pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_20pct_to_30pct_in_profit".to_string(), + ), + _10pct_to_20pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_10pct_to_20pct_in_profit".to_string(), + ), + _0pct_to_10pct_in_profit: AllLthSthPattern4::new( + client.clone(), + "utxos_0pct_to_10pct_in_profit".to_string(), + ), + _0pct_to_10pct_in_loss: AllLthSthPattern4::new( + client.clone(), + "utxos_0pct_to_10pct_in_loss".to_string(), + ), + _10pct_to_20pct_in_loss: AllLthSthPattern4::new( + client.clone(), + "utxos_10pct_to_20pct_in_loss".to_string(), + ), + _20pct_to_30pct_in_loss: AllLthSthPattern4::new( + client.clone(), + "utxos_20pct_to_30pct_in_loss".to_string(), + ), + _30pct_to_40pct_in_loss: AllLthSthPattern4::new( + client.clone(), + "utxos_30pct_to_40pct_in_loss".to_string(), + ), + _40pct_to_50pct_in_loss: AllLthSthPattern4::new( + client.clone(), + "utxos_40pct_to_50pct_in_loss".to_string(), + ), + _50pct_to_60pct_in_loss: AllLthSthPattern4::new( + client.clone(), + "utxos_50pct_to_60pct_in_loss".to_string(), + ), + _60pct_to_70pct_in_loss: AllLthSthPattern4::new( + client.clone(), + "utxos_60pct_to_70pct_in_loss".to_string(), + ), + _70pct_to_80pct_in_loss: AllLthSthPattern4::new( + client.clone(), + "utxos_70pct_to_80pct_in_loss".to_string(), + ), + _80pct_to_90pct_in_loss: AllLthSthPattern4::new( + client.clone(), + "utxos_80pct_to_90pct_in_loss".to_string(), + ), + _90pct_to_100pct_in_loss: AllLthSthPattern4::new( + client.clone(), + "utxos_90pct_to_100pct_in_loss".to_string(), + ), } } } @@ -21663,19 +34584,58 @@ impl SeriesTree_Cohorts_Cohorts_Profitability_Supply_Profit { pub fn new(client: Arc, base_path: String) -> Self { Self { all: AllLthSthPattern4::new(client.clone(), "utxos_in_profit".to_string()), - _10pct: AllLthSthPattern4::new(client.clone(), "utxos_over_10pct_in_profit".to_string()), - _20pct: AllLthSthPattern4::new(client.clone(), "utxos_over_20pct_in_profit".to_string()), - _30pct: AllLthSthPattern4::new(client.clone(), "utxos_over_30pct_in_profit".to_string()), - _40pct: AllLthSthPattern4::new(client.clone(), "utxos_over_40pct_in_profit".to_string()), - _50pct: AllLthSthPattern4::new(client.clone(), "utxos_over_50pct_in_profit".to_string()), - _60pct: AllLthSthPattern4::new(client.clone(), "utxos_over_60pct_in_profit".to_string()), - _70pct: AllLthSthPattern4::new(client.clone(), "utxos_over_70pct_in_profit".to_string()), - _80pct: AllLthSthPattern4::new(client.clone(), "utxos_over_80pct_in_profit".to_string()), - _90pct: AllLthSthPattern4::new(client.clone(), "utxos_over_90pct_in_profit".to_string()), - _100pct: AllLthSthPattern4::new(client.clone(), "utxos_over_100pct_in_profit".to_string()), - _200pct: AllLthSthPattern4::new(client.clone(), "utxos_over_200pct_in_profit".to_string()), - _300pct: AllLthSthPattern4::new(client.clone(), "utxos_over_300pct_in_profit".to_string()), - _500pct: AllLthSthPattern4::new(client.clone(), "utxos_over_500pct_in_profit".to_string()), + _10pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_10pct_in_profit".to_string(), + ), + _20pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_20pct_in_profit".to_string(), + ), + _30pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_30pct_in_profit".to_string(), + ), + _40pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_40pct_in_profit".to_string(), + ), + _50pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_50pct_in_profit".to_string(), + ), + _60pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_60pct_in_profit".to_string(), + ), + _70pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_70pct_in_profit".to_string(), + ), + _80pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_80pct_in_profit".to_string(), + ), + _90pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_90pct_in_profit".to_string(), + ), + _100pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_100pct_in_profit".to_string(), + ), + _200pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_200pct_in_profit".to_string(), + ), + _300pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_300pct_in_profit".to_string(), + ), + _500pct: AllLthSthPattern4::new( + client.clone(), + "utxos_over_500pct_in_profit".to_string(), + ), } } } @@ -21720,41 +34680,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range::new(client.clone(), format!("{base_path}_range")), - profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit::new(client.clone(), format!("{base_path}_profit")), - loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss::new(client.clone(), format!("{base_path}_loss")), - height: SeriesPattern18::new(client.clone(), "profitability_realized_cap_by_term_and_range".to_string()), + range: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit::new( + client.clone(), + format!("{base_path}_profit"), + ), + loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss::new( + client.clone(), + format!("{base_path}_loss"), + ), + height: SeriesPattern18::new( + client.clone(), + "profitability_realized_cap_by_term_and_range".to_string(), + ), } } } /// Series tree node. pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range { - pub over_1000pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_Over1000pctInProfit, - pub _500pct_to_1000pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_500pctTo1000pctInProfit, - pub _300pct_to_500pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_300pctTo500pctInProfit, - pub _200pct_to_300pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_200pctTo300pctInProfit, - pub _100pct_to_200pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_100pctTo200pctInProfit, - pub _90pct_to_100pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_90pctTo100pctInProfit, - pub _80pct_to_90pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_80pctTo90pctInProfit, - pub _70pct_to_80pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_70pctTo80pctInProfit, - pub _60pct_to_70pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_60pctTo70pctInProfit, - pub _50pct_to_60pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_50pctTo60pctInProfit, - pub _40pct_to_50pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_40pctTo50pctInProfit, - pub _30pct_to_40pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_30pctTo40pctInProfit, - pub _20pct_to_30pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_20pctTo30pctInProfit, - pub _10pct_to_20pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_10pctTo20pctInProfit, - pub _0pct_to_10pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_0pctTo10pctInProfit, - pub _0pct_to_10pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_0pctTo10pctInLoss, - pub _10pct_to_20pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_10pctTo20pctInLoss, - pub _20pct_to_30pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_20pctTo30pctInLoss, - pub _30pct_to_40pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_30pctTo40pctInLoss, - pub _40pct_to_50pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_40pctTo50pctInLoss, - pub _50pct_to_60pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_50pctTo60pctInLoss, - pub _60pct_to_70pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_60pctTo70pctInLoss, - pub _70pct_to_80pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_70pctTo80pctInLoss, - pub _80pct_to_90pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_80pctTo90pctInLoss, - pub _90pct_to_100pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_90pctTo100pctInLoss, + pub over_1000pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_Over1000pctInProfit, + pub _500pct_to_1000pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_500pctTo1000pctInProfit, + pub _300pct_to_500pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_300pctTo500pctInProfit, + pub _200pct_to_300pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_200pctTo300pctInProfit, + pub _100pct_to_200pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_100pctTo200pctInProfit, + pub _90pct_to_100pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_90pctTo100pctInProfit, + pub _80pct_to_90pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_80pctTo90pctInProfit, + pub _70pct_to_80pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_70pctTo80pctInProfit, + pub _60pct_to_70pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_60pctTo70pctInProfit, + pub _50pct_to_60pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_50pctTo60pctInProfit, + pub _40pct_to_50pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_40pctTo50pctInProfit, + pub _30pct_to_40pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_30pctTo40pctInProfit, + pub _20pct_to_30pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_20pctTo30pctInProfit, + pub _10pct_to_20pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_10pctTo20pctInProfit, + pub _0pct_to_10pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_0pctTo10pctInProfit, + pub _0pct_to_10pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_0pctTo10pctInLoss, + pub _10pct_to_20pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_10pctTo20pctInLoss, + pub _20pct_to_30pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_20pctTo30pctInLoss, + pub _30pct_to_40pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_30pctTo40pctInLoss, + pub _40pct_to_50pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_40pctTo50pctInLoss, + pub _50pct_to_60pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_50pctTo60pctInLoss, + pub _60pct_to_70pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_60pctTo70pctInLoss, + pub _70pct_to_80pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_70pctTo80pctInLoss, + pub _80pct_to_90pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_80pctTo90pctInLoss, + pub _90pct_to_100pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_90pctTo100pctInLoss, } impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range { @@ -21799,9 +34796,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_Over1000pc impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_Over1000pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_1000pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_1000pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_1000pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_1000pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_1000pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_1000pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21816,9 +34822,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_500pctTo10 impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_500pctTo1000pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_500pct_to_1000pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_500pct_to_1000pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_500pct_to_1000pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_500pct_to_1000pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_500pct_to_1000pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_500pct_to_1000pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21833,9 +34848,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_300pctTo50 impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_300pctTo500pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_300pct_to_500pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_300pct_to_500pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_300pct_to_500pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_300pct_to_500pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_300pct_to_500pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_300pct_to_500pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21850,9 +34874,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_200pctTo30 impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_200pctTo300pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_200pct_to_300pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_200pct_to_300pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_200pct_to_300pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_200pct_to_300pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_200pct_to_300pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_200pct_to_300pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21867,9 +34900,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_100pctTo20 impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_100pctTo200pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_100pct_to_200pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_100pct_to_200pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_100pct_to_200pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_100pct_to_200pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_100pct_to_200pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_100pct_to_200pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21884,9 +34926,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_90pctTo100 impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_90pctTo100pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21901,9 +34952,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_80pctTo90p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_80pctTo90pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21918,9 +34978,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_70pctTo80p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_70pctTo80pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21935,9 +35004,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_60pctTo70p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_60pctTo70pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21952,9 +35030,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_50pctTo60p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_50pctTo60pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21969,9 +35056,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_40pctTo50p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_40pctTo50pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -21986,9 +35082,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_30pctTo40p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_30pctTo40pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22003,9 +35108,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_20pctTo30p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_20pctTo30pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22020,9 +35134,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_10pctTo20p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_10pctTo20pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22037,9 +35160,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_0pctTo10pc impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_0pctTo10pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22054,9 +35186,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_0pctTo10pc impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_0pctTo10pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22071,9 +35212,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_10pctTo20p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_10pctTo20pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22088,9 +35238,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_20pctTo30p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_20pctTo30pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22105,9 +35264,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_30pctTo40p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_30pctTo40pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22122,9 +35290,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_40pctTo50p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_40pctTo50pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22139,9 +35316,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_50pctTo60p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_50pctTo60pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22156,9 +35342,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_60pctTo70p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_60pctTo70pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22173,9 +35368,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_70pctTo80p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_70pctTo80pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22190,9 +35394,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_80pctTo90p impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_80pctTo90pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22207,9 +35420,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_90pctTo100 impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Range_90pctTo100pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22235,20 +35457,62 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_All::new(client.clone(), format!("{base_path}_all")), - _10pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_10pct::new(client.clone(), format!("{base_path}_10pct")), - _20pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_20pct::new(client.clone(), format!("{base_path}_20pct")), - _30pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_30pct::new(client.clone(), format!("{base_path}_30pct")), - _40pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_40pct::new(client.clone(), format!("{base_path}_40pct")), - _50pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_50pct::new(client.clone(), format!("{base_path}_50pct")), - _60pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_60pct::new(client.clone(), format!("{base_path}_60pct")), - _70pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_70pct::new(client.clone(), format!("{base_path}_70pct")), - _80pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_80pct::new(client.clone(), format!("{base_path}_80pct")), - _90pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_90pct::new(client.clone(), format!("{base_path}_90pct")), - _100pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_100pct::new(client.clone(), format!("{base_path}_100pct")), - _200pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_200pct::new(client.clone(), format!("{base_path}_200pct")), - _300pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_300pct::new(client.clone(), format!("{base_path}_300pct")), - _500pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_500pct::new(client.clone(), format!("{base_path}_500pct")), + all: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_All::new( + client.clone(), + format!("{base_path}_all"), + ), + _10pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_10pct::new( + client.clone(), + format!("{base_path}_10pct"), + ), + _20pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_20pct::new( + client.clone(), + format!("{base_path}_20pct"), + ), + _30pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_30pct::new( + client.clone(), + format!("{base_path}_30pct"), + ), + _40pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_40pct::new( + client.clone(), + format!("{base_path}_40pct"), + ), + _50pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_50pct::new( + client.clone(), + format!("{base_path}_50pct"), + ), + _60pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_60pct::new( + client.clone(), + format!("{base_path}_60pct"), + ), + _70pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_70pct::new( + client.clone(), + format!("{base_path}_70pct"), + ), + _80pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_80pct::new( + client.clone(), + format!("{base_path}_80pct"), + ), + _90pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_90pct::new( + client.clone(), + format!("{base_path}_90pct"), + ), + _100pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_100pct::new( + client.clone(), + format!("{base_path}_100pct"), + ), + _200pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_200pct::new( + client.clone(), + format!("{base_path}_200pct"), + ), + _300pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_300pct::new( + client.clone(), + format!("{base_path}_300pct"), + ), + _500pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_500pct::new( + client.clone(), + format!("{base_path}_500pct"), + ), } } } @@ -22264,8 +35528,14 @@ impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_All { pub fn new(client: Arc, base_path: String) -> Self { Self { all: SeriesPattern1::new(client.clone(), "utxos_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_in_profit_lth_realized_cap".to_string()), + sth: SeriesPattern1::new( + client.clone(), + "utxos_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22280,9 +35550,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_10pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_10pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22297,9 +35576,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_20pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_20pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22314,9 +35602,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_30pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_30pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22331,9 +35628,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_40pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_40pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22348,9 +35654,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_50pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_50pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22365,9 +35680,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_60pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_60pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22382,9 +35706,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_70pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_70pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22399,9 +35732,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_80pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_80pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22416,9 +35758,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_90pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_90pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_90pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_90pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_90pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_90pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_90pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_90pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22433,9 +35784,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_100pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_100pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_100pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_100pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_100pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_100pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_100pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_100pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22450,9 +35810,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_200pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_200pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_200pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_200pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_200pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_200pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_200pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_200pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22467,9 +35836,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_300pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_300pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_300pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_300pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_300pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_300pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_300pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_300pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22484,9 +35862,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_500pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Profit_500pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_500pct_in_profit_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_500pct_in_profit_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_500pct_in_profit_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_500pct_in_profit_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_500pct_in_profit_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_500pct_in_profit_lth_realized_cap".to_string(), + ), } } } @@ -22507,15 +35894,42 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_All::new(client.clone(), format!("{base_path}_all")), - _10pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_10pct::new(client.clone(), format!("{base_path}_10pct")), - _20pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_20pct::new(client.clone(), format!("{base_path}_20pct")), - _30pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_30pct::new(client.clone(), format!("{base_path}_30pct")), - _40pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_40pct::new(client.clone(), format!("{base_path}_40pct")), - _50pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_50pct::new(client.clone(), format!("{base_path}_50pct")), - _60pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_60pct::new(client.clone(), format!("{base_path}_60pct")), - _70pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_70pct::new(client.clone(), format!("{base_path}_70pct")), - _80pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_80pct::new(client.clone(), format!("{base_path}_80pct")), + all: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_All::new( + client.clone(), + format!("{base_path}_all"), + ), + _10pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_10pct::new( + client.clone(), + format!("{base_path}_10pct"), + ), + _20pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_20pct::new( + client.clone(), + format!("{base_path}_20pct"), + ), + _30pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_30pct::new( + client.clone(), + format!("{base_path}_30pct"), + ), + _40pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_40pct::new( + client.clone(), + format!("{base_path}_40pct"), + ), + _50pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_50pct::new( + client.clone(), + format!("{base_path}_50pct"), + ), + _60pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_60pct::new( + client.clone(), + format!("{base_path}_60pct"), + ), + _70pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_70pct::new( + client.clone(), + format!("{base_path}_70pct"), + ), + _80pct: SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_80pct::new( + client.clone(), + format!("{base_path}_80pct"), + ), } } } @@ -22547,9 +35961,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_10pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_10pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22564,9 +35987,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_20pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_20pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22581,9 +36013,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_30pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_30pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22598,9 +36039,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_40pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_40pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22615,9 +36065,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_50pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_50pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22632,9 +36091,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_60pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_60pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22649,9 +36117,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_70pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_70pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22666,9 +36143,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_80pct { impl SeriesTree_Cohorts_Cohorts_Profitability_RealizedCap_Loss_80pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_loss_realized_cap".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_loss_sth_realized_cap".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_loss_lth_realized_cap".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_loss_realized_cap".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_loss_sth_realized_cap".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_loss_lth_realized_cap".to_string(), + ), } } } @@ -22684,41 +36170,78 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range::new(client.clone(), format!("{base_path}_range")), - profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit::new(client.clone(), format!("{base_path}_profit")), - loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss::new(client.clone(), format!("{base_path}_loss")), - height: SeriesPattern18::new(client.clone(), "profitability_unrealized_pnl_by_term_and_range".to_string()), + range: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit::new( + client.clone(), + format!("{base_path}_profit"), + ), + loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss::new( + client.clone(), + format!("{base_path}_loss"), + ), + height: SeriesPattern18::new( + client.clone(), + "profitability_unrealized_pnl_by_term_and_range".to_string(), + ), } } } /// Series tree node. pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range { - pub over_1000pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_Over1000pctInProfit, - pub _500pct_to_1000pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_500pctTo1000pctInProfit, - pub _300pct_to_500pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_300pctTo500pctInProfit, - pub _200pct_to_300pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_200pctTo300pctInProfit, - pub _100pct_to_200pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_100pctTo200pctInProfit, - pub _90pct_to_100pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_90pctTo100pctInProfit, - pub _80pct_to_90pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_80pctTo90pctInProfit, - pub _70pct_to_80pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_70pctTo80pctInProfit, - pub _60pct_to_70pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_60pctTo70pctInProfit, - pub _50pct_to_60pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_50pctTo60pctInProfit, - pub _40pct_to_50pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_40pctTo50pctInProfit, - pub _30pct_to_40pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_30pctTo40pctInProfit, - pub _20pct_to_30pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_20pctTo30pctInProfit, - pub _10pct_to_20pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_10pctTo20pctInProfit, - pub _0pct_to_10pct_in_profit: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_0pctTo10pctInProfit, - pub _0pct_to_10pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_0pctTo10pctInLoss, - pub _10pct_to_20pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_10pctTo20pctInLoss, - pub _20pct_to_30pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_20pctTo30pctInLoss, - pub _30pct_to_40pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_30pctTo40pctInLoss, - pub _40pct_to_50pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_40pctTo50pctInLoss, - pub _50pct_to_60pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_50pctTo60pctInLoss, - pub _60pct_to_70pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_60pctTo70pctInLoss, - pub _70pct_to_80pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_70pctTo80pctInLoss, - pub _80pct_to_90pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_80pctTo90pctInLoss, - pub _90pct_to_100pct_in_loss: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_90pctTo100pctInLoss, + pub over_1000pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_Over1000pctInProfit, + pub _500pct_to_1000pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_500pctTo1000pctInProfit, + pub _300pct_to_500pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_300pctTo500pctInProfit, + pub _200pct_to_300pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_200pctTo300pctInProfit, + pub _100pct_to_200pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_100pctTo200pctInProfit, + pub _90pct_to_100pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_90pctTo100pctInProfit, + pub _80pct_to_90pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_80pctTo90pctInProfit, + pub _70pct_to_80pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_70pctTo80pctInProfit, + pub _60pct_to_70pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_60pctTo70pctInProfit, + pub _50pct_to_60pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_50pctTo60pctInProfit, + pub _40pct_to_50pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_40pctTo50pctInProfit, + pub _30pct_to_40pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_30pctTo40pctInProfit, + pub _20pct_to_30pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_20pctTo30pctInProfit, + pub _10pct_to_20pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_10pctTo20pctInProfit, + pub _0pct_to_10pct_in_profit: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_0pctTo10pctInProfit, + pub _0pct_to_10pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_0pctTo10pctInLoss, + pub _10pct_to_20pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_10pctTo20pctInLoss, + pub _20pct_to_30pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_20pctTo30pctInLoss, + pub _30pct_to_40pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_30pctTo40pctInLoss, + pub _40pct_to_50pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_40pctTo50pctInLoss, + pub _50pct_to_60pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_50pctTo60pctInLoss, + pub _60pct_to_70pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_60pctTo70pctInLoss, + pub _70pct_to_80pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_70pctTo80pctInLoss, + pub _80pct_to_90pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_80pctTo90pctInLoss, + pub _90pct_to_100pct_in_loss: + SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_90pctTo100pctInLoss, } impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range { @@ -22763,9 +36286,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_Over1000 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_Over1000pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_1000pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_1000pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_1000pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_1000pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_1000pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_1000pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22780,9 +36312,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_500pctTo impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_500pctTo1000pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_500pct_to_1000pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_500pct_to_1000pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_500pct_to_1000pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_500pct_to_1000pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_500pct_to_1000pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_500pct_to_1000pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22797,9 +36338,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_300pctTo impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_300pctTo500pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_300pct_to_500pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_300pct_to_500pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_300pct_to_500pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_300pct_to_500pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_300pct_to_500pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_300pct_to_500pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22814,9 +36364,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_200pctTo impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_200pctTo300pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_200pct_to_300pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_200pct_to_300pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_200pct_to_300pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_200pct_to_300pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_200pct_to_300pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_200pct_to_300pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22831,9 +36390,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_100pctTo impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_100pctTo200pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_100pct_to_200pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_100pct_to_200pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_100pct_to_200pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_100pct_to_200pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_100pct_to_200pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_100pct_to_200pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22848,9 +36416,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_90pctTo1 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_90pctTo100pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22865,9 +36442,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_80pctTo9 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_80pctTo90pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22882,9 +36468,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_70pctTo8 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_70pctTo80pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22899,9 +36494,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_60pctTo7 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_60pctTo70pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22916,9 +36520,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_50pctTo6 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_50pctTo60pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22933,9 +36546,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_40pctTo5 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_40pctTo50pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22950,9 +36572,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_30pctTo4 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_30pctTo40pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22967,9 +36598,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_20pctTo3 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_20pctTo30pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -22984,9 +36624,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_10pctTo2 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_10pctTo20pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23001,9 +36650,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_0pctTo10 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_0pctTo10pctInProfit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23018,9 +36676,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_0pctTo10 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_0pctTo10pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_0pct_to_10pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_0pct_to_10pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23035,9 +36702,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_10pctTo2 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_10pctTo20pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_10pct_to_20pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_10pct_to_20pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23052,9 +36728,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_20pctTo3 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_20pctTo30pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_20pct_to_30pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_20pct_to_30pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23069,9 +36754,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_30pctTo4 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_30pctTo40pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_30pct_to_40pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_30pct_to_40pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23086,9 +36780,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_40pctTo5 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_40pctTo50pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_40pct_to_50pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_40pct_to_50pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23103,9 +36806,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_50pctTo6 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_50pctTo60pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_50pct_to_60pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_50pct_to_60pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23120,9 +36832,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_60pctTo7 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_60pctTo70pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_60pct_to_70pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_60pct_to_70pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23137,9 +36858,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_70pctTo8 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_70pctTo80pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_70pct_to_80pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_70pct_to_80pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23154,9 +36884,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_80pctTo9 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_80pctTo90pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_80pct_to_90pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_80pct_to_90pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23171,9 +36910,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_90pctTo1 impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Range_90pctTo100pctInLoss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_90pct_to_100pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_90pct_to_100pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23199,20 +36947,62 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_All::new(client.clone(), format!("{base_path}_all")), - _10pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_10pct::new(client.clone(), format!("{base_path}_10pct")), - _20pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_20pct::new(client.clone(), format!("{base_path}_20pct")), - _30pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_30pct::new(client.clone(), format!("{base_path}_30pct")), - _40pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_40pct::new(client.clone(), format!("{base_path}_40pct")), - _50pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_50pct::new(client.clone(), format!("{base_path}_50pct")), - _60pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_60pct::new(client.clone(), format!("{base_path}_60pct")), - _70pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_70pct::new(client.clone(), format!("{base_path}_70pct")), - _80pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_80pct::new(client.clone(), format!("{base_path}_80pct")), - _90pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_90pct::new(client.clone(), format!("{base_path}_90pct")), - _100pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_100pct::new(client.clone(), format!("{base_path}_100pct")), - _200pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_200pct::new(client.clone(), format!("{base_path}_200pct")), - _300pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_300pct::new(client.clone(), format!("{base_path}_300pct")), - _500pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_500pct::new(client.clone(), format!("{base_path}_500pct")), + all: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_All::new( + client.clone(), + format!("{base_path}_all"), + ), + _10pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_10pct::new( + client.clone(), + format!("{base_path}_10pct"), + ), + _20pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_20pct::new( + client.clone(), + format!("{base_path}_20pct"), + ), + _30pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_30pct::new( + client.clone(), + format!("{base_path}_30pct"), + ), + _40pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_40pct::new( + client.clone(), + format!("{base_path}_40pct"), + ), + _50pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_50pct::new( + client.clone(), + format!("{base_path}_50pct"), + ), + _60pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_60pct::new( + client.clone(), + format!("{base_path}_60pct"), + ), + _70pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_70pct::new( + client.clone(), + format!("{base_path}_70pct"), + ), + _80pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_80pct::new( + client.clone(), + format!("{base_path}_80pct"), + ), + _90pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_90pct::new( + client.clone(), + format!("{base_path}_90pct"), + ), + _100pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_100pct::new( + client.clone(), + format!("{base_path}_100pct"), + ), + _200pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_200pct::new( + client.clone(), + format!("{base_path}_200pct"), + ), + _300pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_300pct::new( + client.clone(), + format!("{base_path}_300pct"), + ), + _500pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_500pct::new( + client.clone(), + format!("{base_path}_500pct"), + ), } } } @@ -23228,8 +37018,14 @@ impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_All { pub fn new(client: Arc, base_path: String) -> Self { Self { all: SeriesPattern1::new(client.clone(), "utxos_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_in_profit_lth_unrealized_pnl".to_string()), + sth: SeriesPattern1::new( + client.clone(), + "utxos_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23244,9 +37040,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_10pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_10pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23261,9 +37066,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_20pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_20pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23278,9 +37092,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_30pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_30pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23295,9 +37118,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_40pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_40pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23312,9 +37144,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_50pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_50pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23329,9 +37170,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_60pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_60pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23346,9 +37196,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_70pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_70pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23363,9 +37222,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_80pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_80pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23380,9 +37248,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_90pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_90pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_90pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_90pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_90pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_90pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_90pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_90pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23397,9 +37274,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_100pct impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_100pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_100pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_100pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_100pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_100pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_100pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_100pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23414,9 +37300,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_200pct impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_200pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_200pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_200pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_200pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_200pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_200pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_200pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23431,9 +37326,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_300pct impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_300pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_300pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_300pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_300pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_300pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_300pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_300pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23448,9 +37352,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_500pct impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Profit_500pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_500pct_in_profit_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_500pct_in_profit_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_500pct_in_profit_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_500pct_in_profit_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_500pct_in_profit_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_500pct_in_profit_lth_unrealized_pnl".to_string(), + ), } } } @@ -23471,15 +37384,42 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_All::new(client.clone(), format!("{base_path}_all")), - _10pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_10pct::new(client.clone(), format!("{base_path}_10pct")), - _20pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_20pct::new(client.clone(), format!("{base_path}_20pct")), - _30pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_30pct::new(client.clone(), format!("{base_path}_30pct")), - _40pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_40pct::new(client.clone(), format!("{base_path}_40pct")), - _50pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_50pct::new(client.clone(), format!("{base_path}_50pct")), - _60pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_60pct::new(client.clone(), format!("{base_path}_60pct")), - _70pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_70pct::new(client.clone(), format!("{base_path}_70pct")), - _80pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_80pct::new(client.clone(), format!("{base_path}_80pct")), + all: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_All::new( + client.clone(), + format!("{base_path}_all"), + ), + _10pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_10pct::new( + client.clone(), + format!("{base_path}_10pct"), + ), + _20pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_20pct::new( + client.clone(), + format!("{base_path}_20pct"), + ), + _30pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_30pct::new( + client.clone(), + format!("{base_path}_30pct"), + ), + _40pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_40pct::new( + client.clone(), + format!("{base_path}_40pct"), + ), + _50pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_50pct::new( + client.clone(), + format!("{base_path}_50pct"), + ), + _60pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_60pct::new( + client.clone(), + format!("{base_path}_60pct"), + ), + _70pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_70pct::new( + client.clone(), + format!("{base_path}_70pct"), + ), + _80pct: SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_80pct::new( + client.clone(), + format!("{base_path}_80pct"), + ), } } } @@ -23495,8 +37435,14 @@ impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_All { pub fn new(client: Arc, base_path: String) -> Self { Self { all: SeriesPattern1::new(client.clone(), "utxos_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_in_loss_lth_unrealized_pnl".to_string()), + sth: SeriesPattern1::new( + client.clone(), + "utxos_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23511,9 +37457,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_10pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_10pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_10pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_10pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23528,9 +37483,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_20pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_20pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_20pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_20pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23545,9 +37509,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_30pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_30pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_30pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_30pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23562,9 +37535,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_40pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_40pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_40pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_40pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23579,9 +37561,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_50pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_50pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_50pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_50pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23596,9 +37587,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_60pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_60pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_60pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_60pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23613,9 +37613,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_70pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_70pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_70pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_70pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23630,9 +37639,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_80pct { impl SeriesTree_Cohorts_Cohorts_Profitability_UnrealizedPnl_Loss_80pct { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_loss_unrealized_pnl".to_string()), - sth: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_loss_sth_unrealized_pnl".to_string()), - lth: SeriesPattern1::new(client.clone(), "utxos_over_80pct_in_loss_lth_unrealized_pnl".to_string()), + all: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_loss_unrealized_pnl".to_string(), + ), + sth: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_loss_sth_unrealized_pnl".to_string(), + ), + lth: SeriesPattern1::new( + client.clone(), + "utxos_over_80pct_in_loss_lth_unrealized_pnl".to_string(), + ), } } } @@ -23648,9 +37666,18 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_Nupl { impl SeriesTree_Cohorts_Cohorts_Profitability_Nupl { pub fn new(client: Arc, base_path: String) -> Self { Self { - range: SeriesTree_Cohorts_Cohorts_Profitability_Nupl_Range::new(client.clone(), format!("{base_path}_range")), - profit: SeriesTree_Cohorts_Cohorts_Profitability_Nupl_Profit::new(client.clone(), format!("{base_path}_profit")), - loss: SeriesTree_Cohorts_Cohorts_Profitability_Nupl_Loss::new(client.clone(), format!("{base_path}_loss")), + range: SeriesTree_Cohorts_Cohorts_Profitability_Nupl_Range::new( + client.clone(), + format!("{base_path}_range"), + ), + profit: SeriesTree_Cohorts_Cohorts_Profitability_Nupl_Profit::new( + client.clone(), + format!("{base_path}_profit"), + ), + loss: SeriesTree_Cohorts_Cohorts_Profitability_Nupl_Loss::new( + client.clone(), + format!("{base_path}_loss"), + ), height: SeriesPattern18::new(client.clone(), "profitability_nupl_ppm".to_string()), } } @@ -23688,31 +37715,106 @@ pub struct SeriesTree_Cohorts_Cohorts_Profitability_Nupl_Range { impl SeriesTree_Cohorts_Cohorts_Profitability_Nupl_Range { pub fn new(client: Arc, base_path: String) -> Self { Self { - over_1000pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_over_1000pct_in_profit_nupl".to_string()), - _500pct_to_1000pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_500pct_to_1000pct_in_profit_nupl".to_string()), - _300pct_to_500pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_300pct_to_500pct_in_profit_nupl".to_string()), - _200pct_to_300pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_200pct_to_300pct_in_profit_nupl".to_string()), - _100pct_to_200pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_100pct_to_200pct_in_profit_nupl".to_string()), - _90pct_to_100pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_90pct_to_100pct_in_profit_nupl".to_string()), - _80pct_to_90pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_80pct_to_90pct_in_profit_nupl".to_string()), - _70pct_to_80pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_70pct_to_80pct_in_profit_nupl".to_string()), - _60pct_to_70pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_60pct_to_70pct_in_profit_nupl".to_string()), - _50pct_to_60pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_50pct_to_60pct_in_profit_nupl".to_string()), - _40pct_to_50pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_40pct_to_50pct_in_profit_nupl".to_string()), - _30pct_to_40pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_30pct_to_40pct_in_profit_nupl".to_string()), - _20pct_to_30pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_20pct_to_30pct_in_profit_nupl".to_string()), - _10pct_to_20pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_10pct_to_20pct_in_profit_nupl".to_string()), - _0pct_to_10pct_in_profit: PpmRatioPattern::new(client.clone(), "utxos_0pct_to_10pct_in_profit_nupl".to_string()), - _0pct_to_10pct_in_loss: PpmRatioPattern::new(client.clone(), "utxos_0pct_to_10pct_in_loss_nupl".to_string()), - _10pct_to_20pct_in_loss: PpmRatioPattern::new(client.clone(), "utxos_10pct_to_20pct_in_loss_nupl".to_string()), - _20pct_to_30pct_in_loss: PpmRatioPattern::new(client.clone(), "utxos_20pct_to_30pct_in_loss_nupl".to_string()), - _30pct_to_40pct_in_loss: PpmRatioPattern::new(client.clone(), "utxos_30pct_to_40pct_in_loss_nupl".to_string()), - _40pct_to_50pct_in_loss: PpmRatioPattern::new(client.clone(), "utxos_40pct_to_50pct_in_loss_nupl".to_string()), - _50pct_to_60pct_in_loss: PpmRatioPattern::new(client.clone(), "utxos_50pct_to_60pct_in_loss_nupl".to_string()), - _60pct_to_70pct_in_loss: PpmRatioPattern::new(client.clone(), "utxos_60pct_to_70pct_in_loss_nupl".to_string()), - _70pct_to_80pct_in_loss: PpmRatioPattern::new(client.clone(), "utxos_70pct_to_80pct_in_loss_nupl".to_string()), - _80pct_to_90pct_in_loss: PpmRatioPattern::new(client.clone(), "utxos_80pct_to_90pct_in_loss_nupl".to_string()), - _90pct_to_100pct_in_loss: PpmRatioPattern::new(client.clone(), "utxos_90pct_to_100pct_in_loss_nupl".to_string()), + over_1000pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_over_1000pct_in_profit_nupl".to_string(), + ), + _500pct_to_1000pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_500pct_to_1000pct_in_profit_nupl".to_string(), + ), + _300pct_to_500pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_300pct_to_500pct_in_profit_nupl".to_string(), + ), + _200pct_to_300pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_200pct_to_300pct_in_profit_nupl".to_string(), + ), + _100pct_to_200pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_100pct_to_200pct_in_profit_nupl".to_string(), + ), + _90pct_to_100pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_90pct_to_100pct_in_profit_nupl".to_string(), + ), + _80pct_to_90pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_80pct_to_90pct_in_profit_nupl".to_string(), + ), + _70pct_to_80pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_70pct_to_80pct_in_profit_nupl".to_string(), + ), + _60pct_to_70pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_60pct_to_70pct_in_profit_nupl".to_string(), + ), + _50pct_to_60pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_50pct_to_60pct_in_profit_nupl".to_string(), + ), + _40pct_to_50pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_40pct_to_50pct_in_profit_nupl".to_string(), + ), + _30pct_to_40pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_30pct_to_40pct_in_profit_nupl".to_string(), + ), + _20pct_to_30pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_20pct_to_30pct_in_profit_nupl".to_string(), + ), + _10pct_to_20pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_10pct_to_20pct_in_profit_nupl".to_string(), + ), + _0pct_to_10pct_in_profit: PpmRatioPattern::new( + client.clone(), + "utxos_0pct_to_10pct_in_profit_nupl".to_string(), + ), + _0pct_to_10pct_in_loss: PpmRatioPattern::new( + client.clone(), + "utxos_0pct_to_10pct_in_loss_nupl".to_string(), + ), + _10pct_to_20pct_in_loss: PpmRatioPattern::new( + client.clone(), + "utxos_10pct_to_20pct_in_loss_nupl".to_string(), + ), + _20pct_to_30pct_in_loss: PpmRatioPattern::new( + client.clone(), + "utxos_20pct_to_30pct_in_loss_nupl".to_string(), + ), + _30pct_to_40pct_in_loss: PpmRatioPattern::new( + client.clone(), + "utxos_30pct_to_40pct_in_loss_nupl".to_string(), + ), + _40pct_to_50pct_in_loss: PpmRatioPattern::new( + client.clone(), + "utxos_40pct_to_50pct_in_loss_nupl".to_string(), + ), + _50pct_to_60pct_in_loss: PpmRatioPattern::new( + client.clone(), + "utxos_50pct_to_60pct_in_loss_nupl".to_string(), + ), + _60pct_to_70pct_in_loss: PpmRatioPattern::new( + client.clone(), + "utxos_60pct_to_70pct_in_loss_nupl".to_string(), + ), + _70pct_to_80pct_in_loss: PpmRatioPattern::new( + client.clone(), + "utxos_70pct_to_80pct_in_loss_nupl".to_string(), + ), + _80pct_to_90pct_in_loss: PpmRatioPattern::new( + client.clone(), + "utxos_80pct_to_90pct_in_loss_nupl".to_string(), + ), + _90pct_to_100pct_in_loss: PpmRatioPattern::new( + client.clone(), + "utxos_90pct_to_100pct_in_loss_nupl".to_string(), + ), } } } @@ -23739,19 +37841,58 @@ impl SeriesTree_Cohorts_Cohorts_Profitability_Nupl_Profit { pub fn new(client: Arc, base_path: String) -> Self { Self { all: PpmRatioPattern::new(client.clone(), "utxos_in_profit_nupl".to_string()), - _10pct: PpmRatioPattern::new(client.clone(), "utxos_over_10pct_in_profit_nupl".to_string()), - _20pct: PpmRatioPattern::new(client.clone(), "utxos_over_20pct_in_profit_nupl".to_string()), - _30pct: PpmRatioPattern::new(client.clone(), "utxos_over_30pct_in_profit_nupl".to_string()), - _40pct: PpmRatioPattern::new(client.clone(), "utxos_over_40pct_in_profit_nupl".to_string()), - _50pct: PpmRatioPattern::new(client.clone(), "utxos_over_50pct_in_profit_nupl".to_string()), - _60pct: PpmRatioPattern::new(client.clone(), "utxos_over_60pct_in_profit_nupl".to_string()), - _70pct: PpmRatioPattern::new(client.clone(), "utxos_over_70pct_in_profit_nupl".to_string()), - _80pct: PpmRatioPattern::new(client.clone(), "utxos_over_80pct_in_profit_nupl".to_string()), - _90pct: PpmRatioPattern::new(client.clone(), "utxos_over_90pct_in_profit_nupl".to_string()), - _100pct: PpmRatioPattern::new(client.clone(), "utxos_over_100pct_in_profit_nupl".to_string()), - _200pct: PpmRatioPattern::new(client.clone(), "utxos_over_200pct_in_profit_nupl".to_string()), - _300pct: PpmRatioPattern::new(client.clone(), "utxos_over_300pct_in_profit_nupl".to_string()), - _500pct: PpmRatioPattern::new(client.clone(), "utxos_over_500pct_in_profit_nupl".to_string()), + _10pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_10pct_in_profit_nupl".to_string(), + ), + _20pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_20pct_in_profit_nupl".to_string(), + ), + _30pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_30pct_in_profit_nupl".to_string(), + ), + _40pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_40pct_in_profit_nupl".to_string(), + ), + _50pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_50pct_in_profit_nupl".to_string(), + ), + _60pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_60pct_in_profit_nupl".to_string(), + ), + _70pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_70pct_in_profit_nupl".to_string(), + ), + _80pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_80pct_in_profit_nupl".to_string(), + ), + _90pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_90pct_in_profit_nupl".to_string(), + ), + _100pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_100pct_in_profit_nupl".to_string(), + ), + _200pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_200pct_in_profit_nupl".to_string(), + ), + _300pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_300pct_in_profit_nupl".to_string(), + ), + _500pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_500pct_in_profit_nupl".to_string(), + ), } } } @@ -23773,14 +37914,38 @@ impl SeriesTree_Cohorts_Cohorts_Profitability_Nupl_Loss { pub fn new(client: Arc, base_path: String) -> Self { Self { all: PpmRatioPattern::new(client.clone(), "utxos_in_loss_nupl".to_string()), - _10pct: PpmRatioPattern::new(client.clone(), "utxos_over_10pct_in_loss_nupl".to_string()), - _20pct: PpmRatioPattern::new(client.clone(), "utxos_over_20pct_in_loss_nupl".to_string()), - _30pct: PpmRatioPattern::new(client.clone(), "utxos_over_30pct_in_loss_nupl".to_string()), - _40pct: PpmRatioPattern::new(client.clone(), "utxos_over_40pct_in_loss_nupl".to_string()), - _50pct: PpmRatioPattern::new(client.clone(), "utxos_over_50pct_in_loss_nupl".to_string()), - _60pct: PpmRatioPattern::new(client.clone(), "utxos_over_60pct_in_loss_nupl".to_string()), - _70pct: PpmRatioPattern::new(client.clone(), "utxos_over_70pct_in_loss_nupl".to_string()), - _80pct: PpmRatioPattern::new(client.clone(), "utxos_over_80pct_in_loss_nupl".to_string()), + _10pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_10pct_in_loss_nupl".to_string(), + ), + _20pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_20pct_in_loss_nupl".to_string(), + ), + _30pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_30pct_in_loss_nupl".to_string(), + ), + _40pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_40pct_in_loss_nupl".to_string(), + ), + _50pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_50pct_in_loss_nupl".to_string(), + ), + _60pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_60pct_in_loss_nupl".to_string(), + ), + _70pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_70pct_in_loss_nupl".to_string(), + ), + _80pct: PpmRatioPattern::new( + client.clone(), + "utxos_over_80pct_in_loss_nupl".to_string(), + ), } } } @@ -23793,7 +37958,10 @@ pub struct SeriesTree_Cointime { impl SeriesTree_Cointime { pub fn new(client: Arc, base_path: String) -> Self { Self { - activity: SeriesTree_Cointime_Activity::new(client.clone(), format!("{base_path}_activity")), + activity: SeriesTree_Cointime_Activity::new( + client.clone(), + format!("{base_path}_activity"), + ), } } } @@ -23806,7 +37974,10 @@ pub struct SeriesTree_Cointime_Activity { impl SeriesTree_Cointime_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - coinblocks_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "coinblocks_destroyed".to_string()), + coinblocks_destroyed: AverageBlockCumulativeSumPattern::new( + client.clone(), + "coinblocks_destroyed".to_string(), + ), } } } @@ -23851,20 +38022,26 @@ impl BrkClient { /// .last(10) /// .json::()?; /// ``` - pub fn series_endpoint(&self, series: impl Into, index: Index) -> SeriesEndpoint { - SeriesEndpoint::new( - self.base.clone(), - Arc::from(series.into().as_str()), - index, - ) + pub fn series_endpoint( + &self, + series: impl Into, + index: Index, + ) -> SeriesEndpoint { + SeriesEndpoint::new(self.base.clone(), Arc::from(series.into().as_str()), index) } /// Create a dynamic date-based series endpoint builder. /// /// Returns `Err` if the index is not date-based. - pub fn date_series_endpoint(&self, series: impl Into, index: Index) -> Result> { + pub fn date_series_endpoint( + &self, + series: impl Into, + index: Index, + ) -> Result> { if !index.is_date_based() { - return Err(BrkError { message: format!("{} is not a date-based index", index.name()) }); + return Err(BrkError { + message: format!("{} is not a date-based index", index.name()), + }); } Ok(DateSeriesEndpoint::new( self.base.clone(), @@ -23889,14 +38066,23 @@ impl BrkClient { } /// Fetch address hash-prefix matches from raw payload bytes matching `addr_type` length. - pub fn get_address_payload_hash_prefix_matches(&self, addr_type: OutputType, payload: &[u8], nibbles: usize) -> Result { + pub fn get_address_payload_hash_prefix_matches( + &self, + addr_type: OutputType, + payload: &[u8], + nibbles: usize, + ) -> Result { validate_address_payload_for_type(addr_type, payload)?; let prefix = address_payload_hash_prefix(payload, nibbles)?; self.get_address_hash_prefix_matches(addr_type, &prefix) } /// Fetch address hash-prefix matches for a mainnet Bitcoin address. - pub fn get_address_hash_prefix_matches_for_address(&self, address: &str, nibbles: usize) -> Result { + pub fn get_address_hash_prefix_matches_for_address( + &self, + address: &str, + nibbles: usize, + ) -> Result { let hashed = address_hash_prefix(address, nibbles)?; self.get_address_hash_prefix_matches(hashed.addr_type, &hashed.prefix) } @@ -23971,9 +38157,17 @@ impl BrkClient { /// Endpoint: `GET /api/series/list` pub fn list_series(&self, page: Option, per_page: Option) -> Result { let mut query = Vec::new(); - if let Some(v) = page { query.push(format!("page={}", v)); } - if let Some(v) = per_page { query.push(format!("per_page={}", v)); } - let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) }; + if let Some(v) = page { + query.push(format!("page={}", v)); + } + if let Some(v) = per_page { + query.push(format!("per_page={}", v)); + } + let query_str = if query.is_empty() { + String::new() + } else { + format!("?{}", query.join("&")) + }; let path = format!("/api/series/list{}", query_str); self.base.get_json(&path) } @@ -23986,8 +38180,14 @@ impl BrkClient { pub fn search_series(&self, q: SeriesName, limit: Option) -> Result> { let mut query = Vec::new(); query.push(format!("q={}", q)); - if let Some(v) = limit { query.push(format!("limit={}", v)); } - let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) }; + if let Some(v) = limit { + query.push(format!("limit={}", v)); + } + let query_str = if query.is_empty() { + String::new() + } else { + format!("?{}", query.join("&")) + }; let path = format!("/api/series/search{}", query_str); self.base.get_json(&path) } @@ -24006,13 +38206,33 @@ impl BrkClient { /// Fetch data for a specific series at the given index. Use query parameters to filter by date range and format (json/csv). /// /// Endpoint: `GET /api/series/{series}/{index}` - pub fn get_series(&self, series: SeriesName, index: Index, start: Option, end: Option, limit: Option, format: Option) -> Result> { + pub fn get_series( + &self, + series: SeriesName, + index: Index, + start: Option, + end: Option, + limit: Option, + format: Option, + ) -> Result> { let mut query = Vec::new(); - if let Some(v) = start { query.push(format!("start={}", v)); } - if let Some(v) = end { query.push(format!("end={}", v)); } - if let Some(v) = limit { query.push(format!("limit={}", v)); } - if let Some(v) = format { query.push(format!("format={}", v)); } - let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) }; + if let Some(v) = start { + query.push(format!("start={}", v)); + } + if let Some(v) = end { + query.push(format!("end={}", v)); + } + if let Some(v) = limit { + query.push(format!("limit={}", v)); + } + if let Some(v) = format { + query.push(format!("format={}", v)); + } + let query_str = if query.is_empty() { + String::new() + } else { + format!("?{}", query.join("&")) + }; let path = format!("/api/series/{series}/{}{}", index.name(), query_str); if format == Some(Format::CSV) { self.base.get_text(&path).map(FormatResponse::Csv) @@ -24026,13 +38246,33 @@ impl BrkClient { /// Returns just the data array without the SeriesData wrapper. Supports the same range and format parameters as `GET /api/series/{series}/{index}`. /// /// Endpoint: `GET /api/series/{series}/{index}/data` - pub fn get_series_data(&self, series: SeriesName, index: Index, start: Option, end: Option, limit: Option, format: Option) -> Result>> { + pub fn get_series_data( + &self, + series: SeriesName, + index: Index, + start: Option, + end: Option, + limit: Option, + format: Option, + ) -> Result>> { let mut query = Vec::new(); - if let Some(v) = start { query.push(format!("start={}", v)); } - if let Some(v) = end { query.push(format!("end={}", v)); } - if let Some(v) = limit { query.push(format!("limit={}", v)); } - if let Some(v) = format { query.push(format!("format={}", v)); } - let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) }; + if let Some(v) = start { + query.push(format!("start={}", v)); + } + if let Some(v) = end { + query.push(format!("end={}", v)); + } + if let Some(v) = limit { + query.push(format!("limit={}", v)); + } + if let Some(v) = format { + query.push(format!("format={}", v)); + } + let query_str = if query.is_empty() { + String::new() + } else { + format!("?{}", query.join("&")) + }; let path = format!("/api/series/{series}/{}/data{}", index.name(), query_str); if format == Some(Format::CSV) { self.base.get_text(&path).map(FormatResponse::Csv) @@ -24047,7 +38287,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/series/{series}/{index}/latest` pub fn get_series_latest(&self, series: SeriesName, index: Index) -> Result { - self.base.get_json(&format!("/api/series/{series}/{}/latest", index.name())) + self.base + .get_json(&format!("/api/series/{series}/{}/latest", index.name())) } /// Get series data length @@ -24056,7 +38297,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/series/{series}/{index}/len` pub fn get_series_len(&self, series: SeriesName, index: Index) -> Result { - self.base.get_json(&format!("/api/series/{series}/{}/len", index.name())) + self.base + .get_json(&format!("/api/series/{series}/{}/len", index.name())) } /// Get series version @@ -24065,7 +38307,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/series/{series}/{index}/version` pub fn get_series_version(&self, series: SeriesName, index: Index) -> Result { - self.base.get_json(&format!("/api/series/{series}/{}/version", index.name())) + self.base + .get_json(&format!("/api/series/{series}/{}/version", index.name())) } /// Bulk series data @@ -24073,15 +38316,35 @@ impl BrkClient { /// Fetch multiple series in a single request. Supports filtering by index and date range. Returns an array of SeriesData objects. For a single series, use `get_series` instead. /// /// Endpoint: `GET /api/series/bulk` - pub fn get_series_bulk(&self, series: SeriesList, index: Index, start: Option, end: Option, limit: Option, format: Option) -> Result>> { + pub fn get_series_bulk( + &self, + series: SeriesList, + index: Index, + start: Option, + end: Option, + limit: Option, + format: Option, + ) -> Result>> { let mut query = Vec::new(); query.push(format!("series={}", series)); query.push(format!("index={}", index)); - if let Some(v) = start { query.push(format!("start={}", v)); } - if let Some(v) = end { query.push(format!("end={}", v)); } - if let Some(v) = limit { query.push(format!("limit={}", v)); } - if let Some(v) = format { query.push(format!("format={}", v)); } - let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) }; + if let Some(v) = start { + query.push(format!("start={}", v)); + } + if let Some(v) = end { + query.push(format!("end={}", v)); + } + if let Some(v) = limit { + query.push(format!("limit={}", v)); + } + if let Some(v) = format { + query.push(format!("format={}", v)); + } + let query_str = if query.is_empty() { + String::new() + } else { + format!("?{}", query.join("&")) + }; let path = format!("/api/series/bulk{}", query_str); if format == Some(Format::CSV) { self.base.get_text(&path).map(FormatResponse::Csv) @@ -24106,8 +38369,14 @@ impl BrkClient { /// Endpoint: `GET /api/urpd/{cohort}/dates` pub fn list_urpd_dates(&self, cohort: Cohort, weight: Option) -> Result> { let mut query = Vec::new(); - if let Some(v) = weight { query.push(format!("weight={}", v)); } - let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) }; + if let Some(v) = weight { + query.push(format!("weight={}", v)); + } + let query_str = if query.is_empty() { + String::new() + } else { + format!("?{}", query.join("&")) + }; let path = format!("/api/urpd/{cohort}/dates{}", query_str); self.base.get_json(&path) } @@ -24117,11 +38386,24 @@ impl BrkClient { /// URPD for the most recent available date in the cohort. The response's `date` field echoes which date was served. Returns `{ cohort, date, weight, aggregation, close, total_supply, buckets }`. `close` and each bucket's `price_floor`, `realized_cap`, and `unrealized_pnl` are USD; `total_supply` and bucket `supply` are BTC. `unrealized_pnl` can be negative. /// /// Endpoint: `GET /api/urpd/{cohort}` - pub fn get_urpd(&self, cohort: Cohort, agg: Option, weight: Option) -> Result { + pub fn get_urpd( + &self, + cohort: Cohort, + agg: Option, + weight: Option, + ) -> Result { let mut query = Vec::new(); - if let Some(v) = agg { query.push(format!("agg={}", v)); } - if let Some(v) = weight { query.push(format!("weight={}", v)); } - let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) }; + if let Some(v) = agg { + query.push(format!("agg={}", v)); + } + if let Some(v) = weight { + query.push(format!("weight={}", v)); + } + let query_str = if query.is_empty() { + String::new() + } else { + format!("?{}", query.join("&")) + }; let path = format!("/api/urpd/{cohort}{}", query_str); self.base.get_json(&path) } @@ -24131,11 +38413,25 @@ impl BrkClient { /// URPD for a (cohort, date) pair. Returns `{ cohort, date, weight, aggregation, close, total_supply, buckets }` where each bucket is `{ price_floor, supply, realized_cap, unrealized_pnl }`. `close`, `price_floor`, `realized_cap`, and `unrealized_pnl` are USD; `total_supply` and `supply` are BTC. `unrealized_pnl` can be negative. /// /// Endpoint: `GET /api/urpd/{cohort}/{date}` - pub fn get_urpd_at(&self, cohort: Cohort, date: &str, agg: Option, weight: Option) -> Result { + pub fn get_urpd_at( + &self, + cohort: Cohort, + date: &str, + agg: Option, + weight: Option, + ) -> Result { let mut query = Vec::new(); - if let Some(v) = agg { query.push(format!("agg={}", v)); } - if let Some(v) = weight { query.push(format!("weight={}", v)); } - let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) }; + if let Some(v) = agg { + query.push(format!("agg={}", v)); + } + if let Some(v) = weight { + query.push(format!("weight={}", v)); + } + let query_str = if query.is_empty() { + String::new() + } else { + format!("?{}", query.join("&")) + }; let path = format!("/api/urpd/{cohort}/{date}{}", query_str); self.base.get_json(&path) } @@ -24148,7 +38444,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/difficulty-adjustment` pub fn get_difficulty_adjustment(&self) -> Result { - self.base.get_json(&format!("/api/v1/difficulty-adjustment")) + self.base + .get_json(&format!("/api/v1/difficulty-adjustment")) } /// Current BTC price @@ -24171,8 +38468,14 @@ impl BrkClient { /// Endpoint: `GET /api/v1/historical-price` pub fn get_historical_price(&self, timestamp: Option) -> Result { let mut query = Vec::new(); - if let Some(v) = timestamp { query.push(format!("timestamp={}", v)); } - let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) }; + if let Some(v) = timestamp { + query.push(format!("timestamp={}", v)); + } + let query_str = if query.is_empty() { + String::new() + } else { + format!("?{}", query.join("&")) + }; let path = format!("/api/v1/historical-price{}", query_str); self.base.get_json(&path) } @@ -24182,8 +38485,13 @@ impl BrkClient { /// Find addresses by address type and by the first 1-16 hex nibbles of RapidHash v3 over the raw address payload bytes. Intended for privacy-preserving client-side wallet discovery without sending raw addresses or xpubs. Fetch metadata with `GET /api/address/{address}`. /// /// Endpoint: `GET /api/address/hash-prefix/{addr_type}/{prefix}` - pub fn get_address_hash_prefix_matches(&self, addr_type: OutputType, prefix: &str) -> Result { - self.base.get_json(&format!("/api/address/hash-prefix/{addr_type}/{prefix}")) + pub fn get_address_hash_prefix_matches( + &self, + addr_type: OutputType, + prefix: &str, + ) -> Result { + self.base + .get_json(&format!("/api/address/hash-prefix/{addr_type}/{prefix}")) } /// Address information @@ -24216,7 +38524,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/address/{address}/txs/chain` pub fn get_address_confirmed_txs(&self, address: Addr) -> Result> { - self.base.get_json(&format!("/api/address/{address}/txs/chain")) + self.base + .get_json(&format!("/api/address/{address}/txs/chain")) } /// Address confirmed transactions (paginated) @@ -24226,8 +38535,13 @@ impl BrkClient { /// *[Mempool.space docs](https://mempool.space/docs/api/rest#get-address-transactions-chain)* /// /// Endpoint: `GET /api/address/{address}/txs/chain/{after_txid}` - pub fn get_address_confirmed_txs_after(&self, address: Addr, after_txid: Txid) -> Result> { - self.base.get_json(&format!("/api/address/{address}/txs/chain/{after_txid}")) + pub fn get_address_confirmed_txs_after( + &self, + address: Addr, + after_txid: Txid, + ) -> Result> { + self.base + .get_json(&format!("/api/address/{address}/txs/chain/{after_txid}")) } /// Address mempool transactions @@ -24238,7 +38552,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/address/{address}/txs/mempool` pub fn get_address_mempool_txs(&self, address: Addr) -> Result> { - self.base.get_json(&format!("/api/address/{address}/txs/mempool")) + self.base + .get_json(&format!("/api/address/{address}/txs/mempool")) } /// Address UTXOs @@ -24260,7 +38575,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/validate-address/{address}` pub fn validate_address(&self, address: &str) -> Result { - self.base.get_json(&format!("/api/v1/validate-address/{address}")) + self.base + .get_json(&format!("/api/v1/validate-address/{address}")) } /// Block information @@ -24315,7 +38631,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/blocks/timestamp/{timestamp}` pub fn get_block_by_timestamp(&self, timestamp: Timestamp) -> Result { - self.base.get_json(&format!("/api/v1/mining/blocks/timestamp/{timestamp}")) + self.base + .get_json(&format!("/api/v1/mining/blocks/timestamp/{timestamp}")) } /// Raw block @@ -24370,7 +38687,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/block/{hash}/txid/{index}` pub fn get_block_txid(&self, hash: BlockHash, index: BlockTxIndex) -> Result { - self.base.get_text(&format!("/api/block/{hash}/txid/{index}")) + self.base + .get_text(&format!("/api/block/{hash}/txid/{index}")) } /// Block transaction IDs @@ -24402,8 +38720,13 @@ impl BrkClient { /// *[Mempool.space docs](https://mempool.space/docs/api/rest#get-block-transactions)* /// /// Endpoint: `GET /api/block/{hash}/txs/{start_index}` - pub fn get_block_txs_from_index(&self, hash: BlockHash, start_index: BlockTxIndex) -> Result> { - self.base.get_json(&format!("/api/block/{hash}/txs/{start_index}")) + pub fn get_block_txs_from_index( + &self, + hash: BlockHash, + start_index: BlockTxIndex, + ) -> Result> { + self.base + .get_json(&format!("/api/block/{hash}/txs/{start_index}")) } /// Recent blocks @@ -24469,7 +38792,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/pools/{time_period}` pub fn get_pool_stats(&self, time_period: TimePeriod) -> Result { - self.base.get_json(&format!("/api/v1/mining/pools/{time_period}")) + self.base + .get_json(&format!("/api/v1/mining/pools/{time_period}")) } /// Mining pool details @@ -24491,7 +38815,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/hashrate/pools` pub fn get_pools_hashrate(&self) -> Result> { - self.base.get_json(&format!("/api/v1/mining/hashrate/pools")) + self.base + .get_json(&format!("/api/v1/mining/hashrate/pools")) } /// All pools hashrate @@ -24501,8 +38826,12 @@ impl BrkClient { /// *[Mempool.space docs](https://mempool.space/docs/api/rest#get-mining-pool-hashrates)* /// /// Endpoint: `GET /api/v1/mining/hashrate/pools/{time_period}` - pub fn get_pools_hashrate_by_period(&self, time_period: TimePeriod) -> Result> { - self.base.get_json(&format!("/api/v1/mining/hashrate/pools/{time_period}")) + pub fn get_pools_hashrate_by_period( + &self, + time_period: TimePeriod, + ) -> Result> { + self.base + .get_json(&format!("/api/v1/mining/hashrate/pools/{time_period}")) } /// Mining pool hashrate @@ -24513,7 +38842,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/pool/{slug}/hashrate` pub fn get_pool_hashrate(&self, slug: PoolSlug) -> Result> { - self.base.get_json(&format!("/api/v1/mining/pool/{slug}/hashrate")) + self.base + .get_json(&format!("/api/v1/mining/pool/{slug}/hashrate")) } /// Mining pool blocks @@ -24524,7 +38854,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/pool/{slug}/blocks` pub fn get_pool_blocks(&self, slug: PoolSlug) -> Result> { - self.base.get_json(&format!("/api/v1/mining/pool/{slug}/blocks")) + self.base + .get_json(&format!("/api/v1/mining/pool/{slug}/blocks")) } /// Mining pool blocks from height @@ -24535,7 +38866,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/pool/{slug}/blocks/{height}` pub fn get_pool_blocks_from(&self, slug: PoolSlug, height: Height) -> Result> { - self.base.get_json(&format!("/api/v1/mining/pool/{slug}/blocks/{height}")) + self.base + .get_json(&format!("/api/v1/mining/pool/{slug}/blocks/{height}")) } /// Network hashrate (all time) @@ -24557,7 +38889,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/hashrate/{time_period}` pub fn get_hashrate_by_period(&self, time_period: TimePeriod) -> Result { - self.base.get_json(&format!("/api/v1/mining/hashrate/{time_period}")) + self.base + .get_json(&format!("/api/v1/mining/hashrate/{time_period}")) } /// Difficulty adjustments (all time) @@ -24568,7 +38901,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/difficulty-adjustments` pub fn get_difficulty_adjustments(&self) -> Result> { - self.base.get_json(&format!("/api/v1/mining/difficulty-adjustments")) + self.base + .get_json(&format!("/api/v1/mining/difficulty-adjustments")) } /// Difficulty adjustments @@ -24578,8 +38912,13 @@ impl BrkClient { /// *[Mempool.space docs](https://mempool.space/docs/api/rest#get-difficulty-adjustments)* /// /// Endpoint: `GET /api/v1/mining/difficulty-adjustments/{time_period}` - pub fn get_difficulty_adjustments_by_period(&self, time_period: TimePeriod) -> Result> { - self.base.get_json(&format!("/api/v1/mining/difficulty-adjustments/{time_period}")) + pub fn get_difficulty_adjustments_by_period( + &self, + time_period: TimePeriod, + ) -> Result> { + self.base.get_json(&format!( + "/api/v1/mining/difficulty-adjustments/{time_period}" + )) } /// Mining reward statistics @@ -24590,7 +38929,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/reward-stats/{block_count}` pub fn get_reward_stats(&self, block_count: i64) -> Result { - self.base.get_json(&format!("/api/v1/mining/reward-stats/{block_count}")) + self.base + .get_json(&format!("/api/v1/mining/reward-stats/{block_count}")) } /// Block fees @@ -24601,7 +38941,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/blocks/fees/{time_period}` pub fn get_block_fees(&self, time_period: TimePeriod) -> Result> { - self.base.get_json(&format!("/api/v1/mining/blocks/fees/{time_period}")) + self.base + .get_json(&format!("/api/v1/mining/blocks/fees/{time_period}")) } /// Block rewards @@ -24612,7 +38953,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/blocks/rewards/{time_period}` pub fn get_block_rewards(&self, time_period: TimePeriod) -> Result> { - self.base.get_json(&format!("/api/v1/mining/blocks/rewards/{time_period}")) + self.base + .get_json(&format!("/api/v1/mining/blocks/rewards/{time_period}")) } /// Block fee rates @@ -24623,7 +38965,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/blocks/fee-rates/{time_period}` pub fn get_block_fee_rates(&self, time_period: TimePeriod) -> Result> { - self.base.get_json(&format!("/api/v1/mining/blocks/fee-rates/{time_period}")) + self.base + .get_json(&format!("/api/v1/mining/blocks/fee-rates/{time_period}")) } /// Block sizes and weights @@ -24634,7 +38977,9 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mining/blocks/sizes-weights/{time_period}` pub fn get_block_sizes_weights(&self, time_period: TimePeriod) -> Result { - self.base.get_json(&format!("/api/v1/mining/blocks/sizes-weights/{time_period}")) + self.base.get_json(&format!( + "/api/v1/mining/blocks/sizes-weights/{time_period}" + )) } /// Projected mempool blocks @@ -24740,7 +39085,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mempool/block-template` pub fn get_block_template(&self) -> Result { - self.base.get_json(&format!("/api/v1/mempool/block-template")) + self.base + .get_json(&format!("/api/v1/mempool/block-template")) } /// Block template diff since hash @@ -24749,7 +39095,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/v1/mempool/block-template/diff/{hash}` pub fn get_block_template_diff(&self, hash: NextBlockHash) -> Result { - self.base.get_json(&format!("/api/v1/mempool/block-template/diff/{hash}")) + self.base + .get_json(&format!("/api/v1/mempool/block-template/diff/{hash}")) } /// Live BTC/USD price @@ -24776,7 +39123,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/oracle/histogram/payments/live` pub fn get_oracle_histogram_payments_live(&self) -> Result> { - self.base.get_json(&format!("/api/oracle/histogram/payments/live")) + self.base + .get_json(&format!("/api/oracle/histogram/payments/live")) } /// Payment output histogram at height or day @@ -24785,7 +39133,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/oracle/histogram/payments/{point}` pub fn get_oracle_histogram_payments(&self, point: &str) -> Result> { - self.base.get_json(&format!("/api/oracle/histogram/payments/{point}")) + self.base + .get_json(&format!("/api/oracle/histogram/payments/{point}")) } /// Live output value histogram @@ -24794,7 +39143,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/oracle/histogram/outputs/live` pub fn get_oracle_histogram_outputs_live(&self) -> Result> { - self.base.get_json(&format!("/api/oracle/histogram/outputs/live")) + self.base + .get_json(&format!("/api/oracle/histogram/outputs/live")) } /// Output value histogram at height or day @@ -24803,7 +39153,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/oracle/histogram/outputs/{point}` pub fn get_oracle_histogram_outputs(&self, point: &str) -> Result> { - self.base.get_json(&format!("/api/oracle/histogram/outputs/{point}")) + self.base + .get_json(&format!("/api/oracle/histogram/outputs/{point}")) } /// Txid by index @@ -24867,7 +39218,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/tx/{txid}/merkleblock-proof` pub fn get_tx_merkleblock_proof(&self, txid: Txid) -> Result { - self.base.get_text(&format!("/api/tx/{txid}/merkleblock-proof")) + self.base + .get_text(&format!("/api/tx/{txid}/merkleblock-proof")) } /// Transaction merkle proof @@ -24889,7 +39241,8 @@ impl BrkClient { /// /// Endpoint: `GET /api/tx/{txid}/outspend/{vout}` pub fn get_tx_outspend(&self, txid: Txid, vout: Vout) -> Result { - self.base.get_json(&format!("/api/tx/{txid}/outspend/{vout}")) + self.base + .get_json(&format!("/api/tx/{txid}/outspend/{vout}")) } /// All output spend statuses @@ -24934,8 +39287,14 @@ impl BrkClient { /// Endpoint: `GET /api/v1/transaction-times` pub fn get_transaction_times(&self, txId: &[Txid]) -> Result> { let mut query = Vec::new(); - for v in txId { query.push(format!("txId[]={}", v)); } - let query_str = if query.is_empty() { String::new() } else { format!("?{}", query.join("&")) }; + for v in txId { + query.push(format!("txId[]={}", v)); + } + let query_str = if query.is_empty() { + String::new() + } else { + format!("?{}", query.join("&")) + }; let path = format!("/api/v1/transaction-times{}", query_str); self.base.get_json(&path) } @@ -24968,5 +39327,4 @@ impl BrkClient { pub fn get_api(&self) -> Result { self.base.get_json(&format!("/api.json")) } - } diff --git a/crates/brk_cohort/src/cohort_context.rs b/crates/brk_cohort/src/cohort_context.rs index 44df505c9..671c9346a 100644 --- a/crates/brk_cohort/src/cohort_context.rs +++ b/crates/brk_cohort/src/cohort_context.rs @@ -37,4 +37,13 @@ impl CohortContext { Filter::Time(_) | Filter::Amount(_) => self.prefixed(name), } } + + pub fn metric_name(&self, filter: &Filter, cohort: &str, metric: &str) -> String { + let cohort = self.full_name(filter, cohort); + if cohort.is_empty() { + metric.to_owned() + } else { + format!("{cohort}_{metric}") + } + } } diff --git a/crates/brk_computer/src/distribution/metrics/activity/vecs/coindays_destroyed.rs b/crates/brk_computer/src/distribution/metrics/activity/vecs/coindays_destroyed.rs index 5d59da172..04bda0c68 100644 --- a/crates/brk_computer/src/distribution/metrics/activity/vecs/coindays_destroyed.rs +++ b/crates/brk_computer/src/distribution/metrics/activity/vecs/coindays_destroyed.rs @@ -1,11 +1,11 @@ -use brk_cohort::UTXOGroupsWithoutAmountOrType; +use brk_cohort::{CohortContext, UTXOGroupsWithoutAmountOrType}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{StoredF64, Version}; use vecdb::{Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{CumulativeUTXOColumnarMetricWithoutAmountOrType, utxo_metric_name}, + distribution::metrics::CumulativeUTXOColumnarMetricWithoutAmountOrType, indexes, internal::{CachedWindowStartVec, LazyPerBlockCumulativeRolling, Windows}, }; @@ -31,7 +31,7 @@ impl CoindaysDestroyedByCohort { version, )?; let cohorts = UTXOGroupsWithoutAmountOrType::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, "coindays_destroyed"); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, "coindays_destroyed"); let source = cumulative .matrices .additive_source(&filter, &format!("{name}_cumulative"), version) diff --git a/crates/brk_computer/src/distribution/metrics/activity/vecs/collection.rs b/crates/brk_computer/src/distribution/metrics/activity/vecs/collection.rs index 87542ebd6..2ebd109c5 100644 --- a/crates/brk_computer/src/distribution/metrics/activity/vecs/collection.rs +++ b/crates/brk_computer/src/distribution/metrics/activity/vecs/collection.rs @@ -1,6 +1,6 @@ use brk_cohort::{ - AmountRange, Filter, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, - UTXOAggregateId, + AmountRange, CohortContext, Filter, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, + UTXOAggregate, UTXOAggregateId, }; use brk_error::Result; use brk_traversable::Traversable; @@ -8,7 +8,7 @@ use brk_types::{Cents, Height, Sats, StoredF32, StoredF64, Version}; use vecdb::{AnyStoredVec, AnyVec, BinaryTransform, ColumnId, Database, Exit, Rw, StorageMode}; use crate::{ - distribution::metrics::{UTXORows, utxo_metric_name}, + distribution::metrics::UTXORows, indexes, internal::{ CachedWindowStartVec, ColumnarRollingWindows, Identity, LazyPerBlock, SatsToCents, Windows, @@ -23,13 +23,13 @@ use super::{ #[derive(Traversable)] pub struct ActivityVecs { pub transfer_volume: Box>, - pub coindays_destroyed: Box>, + pub coindays_destroyed: CoindaysDestroyedByCohort, #[traversable(wrap = "transfer_volume", rename = "in_profit")] pub transfer_volume_in_profit: Box>, #[traversable(wrap = "transfer_volume", rename = "in_loss")] pub transfer_volume_in_loss: Box>, - pub coinyears_destroyed: Box>>, - pub dormancy: Box>>, + pub coinyears_destroyed: UTXOAggregate>, + pub dormancy: UTXOAggregate>, } impl ActivityVecs { @@ -48,12 +48,8 @@ impl ActivityVecs { indexes, cached_starts, )?); - let coindays_destroyed = Box::new(CoindaysDestroyedByCohort::forced_import( - db, - version, - indexes, - cached_starts, - )?); + let coindays_destroyed = + CoindaysDestroyedByCohort::forced_import(db, version, indexes, cached_starts)?; let transfer_volume_in_profit = Box::new(CoreCumulativeValueByCohort::forced_import( db, "transfer_volume_in_profit", @@ -68,7 +64,7 @@ impl ActivityVecs { indexes, cached_starts, )?); - let coinyears_destroyed = Box::new(UTXOAggregate::from_fn(|id| { + let coinyears_destroyed = UTXOAggregate::from_fn(|id| { let filter = id.select(&UTXO_AGGREGATE_FILTERS); let name = Self::aggregate_metric_name(id, "coinyears_destroyed"); LazyPerBlock::from_height_source::, _>( @@ -84,15 +80,15 @@ impl ActivityVecs { .clone(), indexes, ) - })); - let dormancy = Box::new(UTXOAggregate::try_from_fn(|id| { + }); + let dormancy = UTXOAggregate::try_from_fn(|id| { ColumnarRollingWindows::forced_import( db, &Self::aggregate_metric_name(id, "dormancy"), Self::aggregate_version(aggregate_version, id), indexes, ) - })?); + })?; Ok(Self { transfer_volume, coindays_destroyed, @@ -114,7 +110,7 @@ impl ActivityVecs { } fn aggregate_metric_name(id: UTXOAggregateId, metric: &str) -> String { - utxo_metric_name( + CohortContext::Utxo.metric_name( id.select(&UTXO_AGGREGATE_FILTERS), id.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/activity/vecs/core_cumulative_value.rs b/crates/brk_computer/src/distribution/metrics/activity/vecs/core_cumulative_value.rs index c70adf4ab..4b8aa5151 100644 --- a/crates/brk_computer/src/distribution/metrics/activity/vecs/core_cumulative_value.rs +++ b/crates/brk_computer/src/distribution/metrics/activity/vecs/core_cumulative_value.rs @@ -1,13 +1,11 @@ -use brk_cohort::UTXOGroupsWithoutAmountOrType; +use brk_cohort::{CohortContext, UTXOGroupsWithoutAmountOrType}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Cents, Sats, Version}; use vecdb::{AnyStoredVec, Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{ - CumulativeUTXOValueColumnarMetricWithoutAmountOrType, UTXORows, utxo_metric_name, - }, + distribution::metrics::{CumulativeUTXOValueColumnarMetricWithoutAmountOrType, UTXORows}, indexes, internal::{CachedWindowStartVec, LazyValuePerBlockCumulativeRolling, Windows}, }; @@ -33,7 +31,7 @@ impl CoreCumulativeValueByCohort { version, )?; let cohorts = UTXOGroupsWithoutAmountOrType::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, metric); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, metric); let (sats, cents) = cumulative .sources(&filter, &name, version) .expect("supported core cumulative value cohort"); diff --git a/crates/brk_computer/src/distribution/metrics/activity/vecs/cumulative_value.rs b/crates/brk_computer/src/distribution/metrics/activity/vecs/cumulative_value.rs index e9413e3a5..498b0d0c1 100644 --- a/crates/brk_computer/src/distribution/metrics/activity/vecs/cumulative_value.rs +++ b/crates/brk_computer/src/distribution/metrics/activity/vecs/cumulative_value.rs @@ -5,9 +5,7 @@ use brk_types::{Cents, Sats, Version}; use vecdb::{AnyStoredVec, Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{ - ColumnarAmountValue, CumulativeUTXOValueColumnarMetric, UTXORows, utxo_metric_name, - }, + distribution::metrics::{ColumnarAmountValue, CumulativeUTXOValueColumnarMetric, UTXORows}, indexes, internal::{CachedWindowStartVec, LazyValuePerBlockCumulativeRolling, Windows}, }; @@ -34,7 +32,7 @@ impl CumulativeValueByCohort { version, )?; let cohorts = UTXOGroups::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, metric); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, metric); let (sats, cents) = cumulative .sources(&filter, &name, version) .expect("supported cumulative value cohort"); diff --git a/crates/brk_computer/src/distribution/metrics/additive/aggregate/fiat.rs b/crates/brk_computer/src/distribution/metrics/additive/aggregate/fiat.rs index 1894c13a9..cde8ad0d0 100644 --- a/crates/brk_computer/src/distribution/metrics/additive/aggregate/fiat.rs +++ b/crates/brk_computer/src/distribution/metrics/additive/aggregate/fiat.rs @@ -1,5 +1,6 @@ use brk_cohort::{ - ByTerm, TermId, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId, + ByTerm, CohortContext, TermId, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, + UTXOAggregateId, }; use brk_error::Result; use brk_traversable::Traversable; @@ -15,8 +16,6 @@ use crate::{ internal::{ColumnarPerBlock, FiatType, LazyFiatPerBlock}, }; -use super::super::utxo_metric_name; - #[derive(Deref, DerefMut, Traversable)] pub struct AdditiveAggregateFiatPerBlock { #[deref] @@ -39,7 +38,7 @@ impl AdditiveAggregateFiatPerBlock { |source| { let source = source.clone(); UTXOAggregate::from_fn(|aggregate| { - let name = utxo_metric_name( + let name = CohortContext::Utxo.metric_name( aggregate.select(&UTXO_AGGREGATE_FILTERS), aggregate.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/additive/mod.rs b/crates/brk_computer/src/distribution/metrics/additive/mod.rs index f2186cab9..f863eee55 100644 --- a/crates/brk_computer/src/distribution/metrics/additive/mod.rs +++ b/crates/brk_computer/src/distribution/metrics/additive/mod.rs @@ -3,5 +3,3 @@ mod utxo_raw; pub use aggregate::AdditiveAggregateFiatPerBlock; pub(crate) use utxo_raw::AdditiveUTXORawVec; - -use super::utxo_metric_name; diff --git a/crates/brk_computer/src/distribution/metrics/aggregate/cumulative_fiat.rs b/crates/brk_computer/src/distribution/metrics/aggregate/cumulative_fiat.rs index 290cca7a2..d919f2595 100644 --- a/crates/brk_computer/src/distribution/metrics/aggregate/cumulative_fiat.rs +++ b/crates/brk_computer/src/distribution/metrics/aggregate/cumulative_fiat.rs @@ -1,5 +1,6 @@ use brk_cohort::{ - ByTerm, TermId, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId, + ByTerm, CohortContext, TermId, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, + UTXOAggregateId, }; use brk_error::Result; use brk_traversable::Traversable; @@ -18,8 +19,6 @@ use crate::{ }, }; -use super::utxo_metric_name; - #[derive(Deref, DerefMut, Traversable)] pub struct AdditiveAggregateFiatPerBlockCumulativeWithSums { #[deref] @@ -48,7 +47,7 @@ impl AdditiveAggregateFiatPerBlockCumulativeWithSums { |source| { let source = source.clone(); UTXOAggregate::from_fn(|id| { - let name = utxo_metric_name( + let name = CohortContext::Utxo.metric_name( id.select(&UTXO_AGGREGATE_FILTERS), id.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/aggregate/fiat.rs b/crates/brk_computer/src/distribution/metrics/aggregate/fiat.rs index dd06fa11a..e0c0b06c7 100644 --- a/crates/brk_computer/src/distribution/metrics/aggregate/fiat.rs +++ b/crates/brk_computer/src/distribution/metrics/aggregate/fiat.rs @@ -1,4 +1,6 @@ -use brk_cohort::{UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId}; +use brk_cohort::{ + CohortContext, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId, +}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::Version; @@ -12,8 +14,6 @@ use crate::{ internal::{ColumnarPerBlock, FiatType, LazyFiatPerBlock}, }; -use super::utxo_metric_name; - #[derive(Deref, DerefMut, Traversable)] pub struct AggregateFiatPerBlock { #[deref] @@ -35,7 +35,7 @@ impl AggregateFiatPerBlock { version, |source| { UTXOAggregate::from_fn(|id| { - let name = utxo_metric_name( + let name = CohortContext::Utxo.metric_name( id.select(&UTXO_AGGREGATE_FILTERS), id.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/aggregate/mod.rs b/crates/brk_computer/src/distribution/metrics/aggregate/mod.rs index 0a414c2df..5821c13e3 100644 --- a/crates/brk_computer/src/distribution/metrics/aggregate/mod.rs +++ b/crates/brk_computer/src/distribution/metrics/aggregate/mod.rs @@ -7,5 +7,3 @@ pub use cumulative_fiat::AdditiveAggregateFiatPerBlockCumulativeWithSums; pub use fiat::AggregateFiatPerBlock; pub use percent::AggregatePercentPerBlock; pub use price::AggregatePriceWithRatioPerBlock; - -use super::utxo_metric_name; diff --git a/crates/brk_computer/src/distribution/metrics/aggregate/percent.rs b/crates/brk_computer/src/distribution/metrics/aggregate/percent.rs index 448f49e20..651f15368 100644 --- a/crates/brk_computer/src/distribution/metrics/aggregate/percent.rs +++ b/crates/brk_computer/src/distribution/metrics/aggregate/percent.rs @@ -1,4 +1,6 @@ -use brk_cohort::{UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId}; +use brk_cohort::{ + CohortContext, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId, +}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Height, Version}; @@ -10,8 +12,6 @@ use crate::{ internal::{ColumnarPerBlock, FixedRatio, LazyColumnPercentPerBlock}, }; -use super::utxo_metric_name; - #[derive(Deref, DerefMut, Traversable)] pub struct AggregatePercentPerBlock { #[deref] @@ -38,7 +38,7 @@ impl AggregatePercentPerBlock { version, |source| { UTXOAggregate::from_fn(|id| { - let name = utxo_metric_name( + let name = CohortContext::Utxo.metric_name( id.select(&UTXO_AGGREGATE_FILTERS), id.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/aggregate/price.rs b/crates/brk_computer/src/distribution/metrics/aggregate/price.rs index 5f9c16158..a0da8e220 100644 --- a/crates/brk_computer/src/distribution/metrics/aggregate/price.rs +++ b/crates/brk_computer/src/distribution/metrics/aggregate/price.rs @@ -1,4 +1,6 @@ -use brk_cohort::{UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId}; +use brk_cohort::{ + CohortContext, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId, +}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Cents, Height, Version}; @@ -10,8 +12,6 @@ use crate::{ internal::{ColumnarPerBlock, LazyColumnPriceWithRatioPerBlock}, }; -use super::utxo_metric_name; - #[derive(Deref, DerefMut, Traversable)] pub struct AggregatePriceWithRatioPerBlock { #[deref] @@ -39,7 +39,7 @@ impl AggregatePriceWithRatioPerBlock { version, |source| { UTXOAggregate::from_fn(|id| { - let name = utxo_metric_name( + let name = CohortContext::Utxo.metric_name( id.select(&UTXO_AGGREGATE_FILTERS), id.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/columnar/amount.rs b/crates/brk_computer/src/distribution/metrics/columnar/amount.rs index 8ab59a017..d21709876 100644 --- a/crates/brk_computer/src/distribution/metrics/columnar/amount.rs +++ b/crates/brk_computer/src/distribution/metrics/columnar/amount.rs @@ -67,8 +67,7 @@ where cohort_name: &str, metric: &str, ) -> String { - let cohort = context.full_name(filter, cohort_name); - format!("{cohort}_{metric}") + context.metric_name(filter, cohort_name, metric) } #[inline(always)] diff --git a/crates/brk_computer/src/distribution/metrics/columnar/amount_value.rs b/crates/brk_computer/src/distribution/metrics/columnar/amount_value.rs index 8b0cde3e4..888dd0f8a 100644 --- a/crates/brk_computer/src/distribution/metrics/columnar/amount_value.rs +++ b/crates/brk_computer/src/distribution/metrics/columnar/amount_value.rs @@ -37,12 +37,16 @@ impl ColumnarAmountValue { )?; let series = Amount::new(|filter, cohort_name| { - let amounts: Vec<_> = match AmountRangeId::matching(&filter) { - Some(amount) => vec![amount], - None => AmountRangeId::included_by(&filter).collect(), - }; let name = Self::metric_name(context, &filter, cohort_name, metric); - let (sats, cents) = values.sources(&format!("{name}_cumulative"), version, amounts); + let amounts = AmountRangeId::matching(&filter); + let (sats, cents) = match amounts { + Some(amount) => values.sources(&format!("{name}_cumulative"), version, [amount]), + None => values.sources( + &format!("{name}_cumulative"), + version, + AmountRangeId::included_by(&filter), + ), + }; build(&name, sats, cents) }); @@ -55,8 +59,7 @@ impl ColumnarAmountValue { cohort_name: &str, metric: &str, ) -> String { - let cohort = context.full_name(filter, cohort_name); - format!("{cohort}_{metric}") + context.metric_name(filter, cohort_name, metric) } #[inline(always)] diff --git a/crates/brk_computer/src/distribution/metrics/columnar/cumulative/value_with_amount_and_type.rs b/crates/brk_computer/src/distribution/metrics/columnar/cumulative/value_with_amount_and_type.rs index 5dd1e83fe..916c3fe6f 100644 --- a/crates/brk_computer/src/distribution/metrics/columnar/cumulative/value_with_amount_and_type.rs +++ b/crates/brk_computer/src/distribution/metrics/columnar/cumulative/value_with_amount_and_type.rs @@ -98,16 +98,15 @@ impl CumulativeUTXOValueColumnarMetric { ReadableBoxedVec, ReadableBoxedVec, )> { - let columns: Vec<_> = UNDER_AMOUNT_FILTERS + let filter = UNDER_AMOUNT_FILTERS .iter() .chain(OVER_AMOUNT_FILTERS.iter()) - .find(|candidate| *candidate == filter) - .map(|filter| AmountRangeId::included_by(filter).collect())?; + .find(|candidate| *candidate == filter)?; Some(Self::matrix_sources( &self.amount_range, name, version, - columns, + AmountRangeId::included_by(filter), )) } diff --git a/crates/brk_computer/src/distribution/metrics/columnar/mod.rs b/crates/brk_computer/src/distribution/metrics/columnar/mod.rs index 553784c74..b5535c8f7 100644 --- a/crates/brk_computer/src/distribution/metrics/columnar/mod.rs +++ b/crates/brk_computer/src/distribution/metrics/columnar/mod.rs @@ -5,8 +5,6 @@ mod cumulative; mod exact; mod rows; -use brk_cohort::{CohortContext, Filter}; - pub(crate) use additive::{ UTXOColumnarMetric, UTXOColumnarMetricWithoutAmount, UTXOColumnarMetricWithoutAmountOrType, }; @@ -18,12 +16,3 @@ pub(crate) use cumulative::{ }; pub(crate) use exact::ExactUTXOColumnarMetric; pub(crate) use rows::{UTXOAggregateRows, UTXORows}; - -pub(crate) fn utxo_metric_name(filter: &Filter, cohort_name: &str, metric: &str) -> String { - let cohort_name = CohortContext::Utxo.full_name(filter, cohort_name); - if cohort_name.is_empty() { - metric.to_owned() - } else { - format!("{cohort_name}_{metric}") - } -} diff --git a/crates/brk_computer/src/distribution/metrics/cost_basis/block_data.rs b/crates/brk_computer/src/distribution/metrics/cost_basis/block_data.rs index d89736316..6c4109861 100644 --- a/crates/brk_computer/src/distribution/metrics/cost_basis/block_data.rs +++ b/crates/brk_computer/src/distribution/metrics/cost_basis/block_data.rs @@ -1,5 +1,6 @@ use brk_types::{Cents, PartsPerMillion32}; +use crate::distribution::state::PercentileResult; use crate::internal::PERCENTILES_LEN; #[derive(Clone)] @@ -10,3 +11,19 @@ pub(crate) struct CostBasisBlockData { pub per_dollar: [Cents; PERCENTILES_LEN], pub supply_density: PartsPerMillion32, } + +impl CostBasisBlockData { + #[inline(always)] + pub(crate) fn from_percentiles( + percentiles: PercentileResult, + supply_density: PartsPerMillion32, + ) -> Self { + Self { + min: percentiles.min_price, + max: percentiles.max_price, + per_coin: percentiles.sat_prices, + per_dollar: percentiles.usd_prices, + supply_density, + } + } +} diff --git a/crates/brk_computer/src/distribution/metrics/cost_basis/vecs.rs b/crates/brk_computer/src/distribution/metrics/cost_basis/vecs.rs index 2d1d98e79..a581f6cdf 100644 --- a/crates/brk_computer/src/distribution/metrics/cost_basis/vecs.rs +++ b/crates/brk_computer/src/distribution/metrics/cost_basis/vecs.rs @@ -1,11 +1,13 @@ -use brk_cohort::{UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId}; +use brk_cohort::{ + CohortContext, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId, +}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Cents, PartsPerMillion32, Sats, Version}; use vecdb::{AnyStoredVec, AnyVec, Database, Rw, StorageMode}; use crate::{ - distribution::{metrics::utxo_metric_name, state::UnrealizedState}, + distribution::state::UnrealizedState, indexes, internal::{ ColumnarPerBlock, LazyColumnPerBlock, LazyColumnPercentPerBlock, PercentilesVecs, Price, @@ -208,7 +210,7 @@ impl CostBasisVecs { } fn cohort_metric_name(id: UTXOAggregateId, metric: &str) -> String { - utxo_metric_name( + CohortContext::Utxo.metric_name( id.select(&UTXO_AGGREGATE_FILTERS), id.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/mod.rs b/crates/brk_computer/src/distribution/metrics/mod.rs index f1b36da1c..f3d6381b4 100644 --- a/crates/brk_computer/src/distribution/metrics/mod.rs +++ b/crates/brk_computer/src/distribution/metrics/mod.rs @@ -26,7 +26,7 @@ pub(crate) use columnar::{ CumulativeUTXOColumnarMetric, CumulativeUTXOColumnarMetricWithoutAmountOrType, CumulativeUTXOValueColumnarMetric, CumulativeUTXOValueColumnarMetricWithoutAmountOrType, ExactUTXOColumnarMetric, UTXOColumnarMetric, UTXOColumnarMetricWithoutAmount, - UTXOColumnarMetricWithoutAmountOrType, UTXORows, utxo_metric_name, + UTXOColumnarMetricWithoutAmountOrType, UTXORows, }; pub(crate) use cost_basis::CostBasisBlockData; pub use cost_basis::CostBasisVecs; diff --git a/crates/brk_computer/src/distribution/metrics/outputs/vecs/spent.rs b/crates/brk_computer/src/distribution/metrics/outputs/vecs/spent.rs index de8efb507..18cc99cd5 100644 --- a/crates/brk_computer/src/distribution/metrics/outputs/vecs/spent.rs +++ b/crates/brk_computer/src/distribution/metrics/outputs/vecs/spent.rs @@ -1,11 +1,11 @@ -use brk_cohort::UTXOGroups; +use brk_cohort::{CohortContext, UTXOGroups}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{StoredU64, Version}; use vecdb::{Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{CumulativeUTXOColumnarMetric, utxo_metric_name}, + distribution::metrics::CumulativeUTXOColumnarMetric, indexes, internal::{CachedWindowStartVec, LazyPerBlockCumulativeRolling, Windows}, }; @@ -32,7 +32,7 @@ impl SpentOutputCount { version, )?; let cohorts = UTXOGroups::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, "spent_utxo_count"); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, "spent_utxo_count"); LazyPerBlockCumulativeRolling::from_boxed_cumulative_source( &name, version, diff --git a/crates/brk_computer/src/distribution/metrics/outputs/vecs/unspent.rs b/crates/brk_computer/src/distribution/metrics/outputs/vecs/unspent.rs index 27f40846c..865bfc392 100644 --- a/crates/brk_computer/src/distribution/metrics/outputs/vecs/unspent.rs +++ b/crates/brk_computer/src/distribution/metrics/outputs/vecs/unspent.rs @@ -5,7 +5,7 @@ use brk_types::{PartsPerMillionSigned64, StoredI64, StoredU64, Version}; use vecdb::{Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{ColumnarAmount, UTXOColumnarMetric, utxo_metric_name}, + distribution::metrics::{ColumnarAmount, UTXOColumnarMetric}, indexes, internal::{CachedWindowStartVec, LazyPerBlockWithDeltas, Windows}, }; @@ -32,7 +32,7 @@ impl UnspentOutputCount { ) -> Result { let matrices = UTXOColumnarMetric::forced_import(db, "utxo_count", version)?; let cohorts = UTXOGroups::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, "utxo_count"); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, "utxo_count"); LazyPerBlockWithDeltas::from_boxed_height_source( &name, version, diff --git a/crates/brk_computer/src/distribution/metrics/percentiles.rs b/crates/brk_computer/src/distribution/metrics/percentiles.rs index a48006b47..160aa78a7 100644 --- a/crates/brk_computer/src/distribution/metrics/percentiles.rs +++ b/crates/brk_computer/src/distribution/metrics/percentiles.rs @@ -2,12 +2,12 @@ use std::path::Path; use brk_cohort::{ByTerm, Filter, ProfitabilityRangeId, Term, UTXOAggregate}; use brk_error::Result; -use brk_types::{Cents, Date, PartsPerMillion32}; +use brk_types::{Cents, Date}; use vecdb::ColumnId; use crate::distribution::{ metrics::{CohortMetrics, CostBasisBlockData}, - state::{PercentileResult, UTXOStates}, + state::UTXOStates, }; impl CohortMetrics { @@ -31,9 +31,9 @@ impl CohortMetrics { let fenwick = states.fenwick(); let (all_density, sth_density, lth_density) = fenwick.density(spot_price); self.cost_basis.push(UTXOAggregate { - all: cost_basis_data(fenwick.percentiles_all(), all_density), - sth: cost_basis_data(fenwick.percentiles_sth(), sth_density), - lth: cost_basis_data(fenwick.percentiles_lth(), lth_density), + all: CostBasisBlockData::from_percentiles(fenwick.percentiles_all(), all_density), + sth: CostBasisBlockData::from_percentiles(fenwick.percentiles_sth(), sth_density), + lth: CostBasisBlockData::from_percentiles(fenwick.percentiles_lth(), lth_density), }); let profitability = fenwick.profitability(spot_price); @@ -50,17 +50,3 @@ impl CohortMetrics { ); } } - -#[inline(always)] -fn cost_basis_data( - percentiles: PercentileResult, - supply_density: PartsPerMillion32, -) -> CostBasisBlockData { - CostBasisBlockData { - min: percentiles.min_price, - max: percentiles.max_price, - per_coin: percentiles.sat_prices, - per_dollar: percentiles.usd_prices, - supply_density, - } -} diff --git a/crates/brk_computer/src/distribution/metrics/profitability/compute.rs b/crates/brk_computer/src/distribution/metrics/profitability/compute.rs deleted file mode 100644 index 8702859e2..000000000 --- a/crates/brk_computer/src/distribution/metrics/profitability/compute.rs +++ /dev/null @@ -1,134 +0,0 @@ -use std::ops::Add; - -use brk_cohort::{ - ByTerm, ProfitabilityId, ProfitabilityRange, ProfitabilityRangeId, ProfitabilityRow, -}; -use brk_types::{Bitcoin, Cents, Dollars, PartsPerMillionSigned32, Sats}; -use vecdb::ColumnId; - -pub(super) fn sum_terms(rows: &ByTerm>) -> ProfitabilityRange -where - T: Add + Copy, -{ - ProfitabilityRange::from_fn(|range| *range.select(&rows.short) + *range.select(&rows.long)) -} - -pub(super) fn unrealized_pnl_rows( - spot: Cents, - cap: &ByTerm>, - supply: &ByTerm>, -) -> ByTerm> { - ByTerm { - short: unrealized_pnl_row(spot, &cap.short, &supply.short), - long: unrealized_pnl_row(spot, &cap.long, &supply.long), - } -} - -fn unrealized_pnl_row( - spot: Cents, - cap: &ProfitabilityRange, - supply: &ProfitabilityRange, -) -> ProfitabilityRange { - ProfitabilityRangeId::from_fn(|column| { - let market_value = - f64::from(Dollars::from(spot)) * f64::from(Bitcoin::from(*column.get(supply))); - let realized_cap = f64::from(*column.get(cap)); - let pnl = if column.is_profit() { - market_value - realized_cap - } else { - realized_cap - market_value - } - .max(0.0); - Dollars::from(pnl) - }) -} - -pub(super) fn nupl_row( - spot: Cents, - cap: &ProfitabilityRange, - supply: &ProfitabilityRange, -) -> ProfitabilityRow { - let cap = ProfitabilityRow::from_ranges(cap.clone()); - let supply = ProfitabilityRow::from_ranges(supply.clone()); - ProfitabilityId::from_fn(|column| { - let spot = spot.as_u128(); - let supply = column.get(&supply).as_u128(); - if spot == 0 || supply == 0 { - PartsPerMillionSigned32::ZERO - } else { - let realized_price = - Cents::from(*column.get(&cap)).as_u128() * Sats::ONE_BTC_U128 / supply; - PartsPerMillionSigned32::from((spot as f64 - realized_price as f64) / spot as f64) - } - }) -} - -#[cfg(test)] -mod tests { - use brk_cohort::{ - ByTerm, PROFIT_COUNT, ProfitabilityId, ProfitabilityRangeId, ProfitabilityRow, - }; - use brk_types::{Cents, Dollars, PartsPerMillionSigned32, Sats}; - use vecdb::ColumnId; - - use super::{nupl_row, sum_terms, unrealized_pnl_rows}; - - #[test] - fn expanded_thresholds_match_prefix_and_suffix_sums() { - let ranges = ProfitabilityRangeId::from_fn(|id| Sats::from(id.index() as u64 + 1)); - let row = ProfitabilityRow::from_ranges(ranges.clone()); - let sum = |values: &[Sats]| { - values - .iter() - .copied() - .fold(Sats::default(), |total, value| total + value) - }; - - let ranges: Vec<_> = ranges.iter().copied().collect(); - for (threshold, &column) in ProfitabilityId::profit_ids().iter().enumerate() { - assert_eq!( - *column.get(&row), - sum(&ranges[..PROFIT_COUNT + 1 - threshold]) - ); - } - for (threshold, &column) in ProfitabilityId::loss_ids().iter().enumerate() { - assert_eq!( - *column.get(&row), - sum(&ranges[PROFIT_COUNT + 1 + threshold..]) - ); - } - } - - #[test] - fn derived_rows_preserve_profit_and_loss_polarity() { - let supply = ProfitabilityRangeId::from_fn(|_| Sats::ONE_BTC); - let cap = ProfitabilityRangeId::from_fn(|column| { - Dollars::from(if column.is_profit() { 1.0 } else { 3.0 }) - }); - let spot = Cents::from(200_u64); - - let cap = ByTerm { - short: cap.clone(), - long: cap.clone(), - }; - let supply = ByTerm { - short: supply.clone(), - long: supply.clone(), - }; - let pnl = unrealized_pnl_rows(spot, &cap, &supply); - let all_cap = sum_terms(&cap); - let all_supply = sum_terms(&supply); - let nupl = nupl_row(spot, &all_cap, &all_supply); - - for column in ProfitabilityRangeId::ALL { - assert_eq!(*column.get(&pnl.short), Dollars::from(1.0)); - assert_eq!(*column.get(&pnl.long), Dollars::from(1.0)); - } - for column in ProfitabilityId::ALL { - assert_eq!( - *column.get(&nupl), - PartsPerMillionSigned32::from(if column.is_profit() { 0.5 } else { -0.5 }) - ); - } - } -} diff --git a/crates/brk_computer/src/distribution/metrics/profitability/mod.rs b/crates/brk_computer/src/distribution/metrics/profitability/mod.rs index 67ece38e3..987b24f42 100644 --- a/crates/brk_computer/src/distribution/metrics/profitability/mod.rs +++ b/crates/brk_computer/src/distribution/metrics/profitability/mod.rs @@ -1,5 +1,4 @@ mod column_id; -mod compute; mod vecs; pub use vecs::ProfitabilityVecs; diff --git a/crates/brk_computer/src/distribution/metrics/profitability/vecs.rs b/crates/brk_computer/src/distribution/metrics/profitability/vecs.rs index 38be0a34d..37a60864c 100644 --- a/crates/brk_computer/src/distribution/metrics/profitability/vecs.rs +++ b/crates/brk_computer/src/distribution/metrics/profitability/vecs.rs @@ -1,14 +1,15 @@ -use std::ops::AddAssign; +use std::ops::{Add, AddAssign}; use brk_cohort::{ - ByTerm, ProfitabilityId, ProfitabilityRange, ProfitabilityRow, UTXOAggregate, UTXOAggregateId, + ByTerm, ProfitabilityId, ProfitabilityRange, ProfitabilityRangeId, ProfitabilityRow, + UTXOAggregate, UTXOAggregateId, }; use brk_error::Result; use brk_traversable::Traversable; -use brk_types::{Cents, Dollars, Height, PartsPerMillionSigned32, Sats, Version}; +use brk_types::{Bitcoin, Cents, Dollars, Height, PartsPerMillionSigned32, Sats, Version}; use vecdb::{ - AnyStoredVec, AnyVec, CachedBoxedVec, Database, PcoVec, PcoVecValue, ReadOnlyColumnarVec, - ReadableBoxedVec, Rw, StorageMode, + AnyStoredVec, AnyVec, CachedBoxedVec, ColumnId, Database, PcoVec, PcoVecValue, + ReadOnlyColumnarVec, ReadableBoxedVec, Rw, StorageMode, }; use crate::{ @@ -19,10 +20,7 @@ use crate::{ }, }; -use super::{ - TermProfitabilityRangeId, - compute::{nupl_row, sum_terms, unrealized_pnl_rows}, -}; +use super::TermProfitabilityRangeId; const VERSION: Version = Version::new(7); @@ -176,10 +174,10 @@ impl ProfitabilityVecs { supply: ByTerm>, realized_cap: ByTerm>, ) { - let all_supply = sum_terms(&supply); - let all_realized_cap = sum_terms(&realized_cap); - let unrealized_pnl = unrealized_pnl_rows(spot, &realized_cap, &supply); - let nupl = nupl_row(spot, &all_realized_cap, &all_supply); + let all_supply = Self::sum_terms(&supply); + let all_realized_cap = Self::sum_terms(&realized_cap); + let unrealized_pnl = Self::unrealized_pnl_rows(spot, &realized_cap, &supply); + let nupl = Self::nupl_row(spot, &all_realized_cap, &all_supply); self.supply.push(supply); self.realized_cap.push(realized_cap); @@ -195,4 +193,131 @@ impl ProfitabilityVecs { self.nupl.stored_mut(), ] } + + fn sum_terms(rows: &ByTerm>) -> ProfitabilityRange + where + T: Add + Copy, + { + ProfitabilityRange::from_fn(|range| *range.select(&rows.short) + *range.select(&rows.long)) + } + + fn unrealized_pnl_rows( + spot: Cents, + cap: &ByTerm>, + supply: &ByTerm>, + ) -> ByTerm> { + ByTerm { + short: Self::unrealized_pnl_row(spot, &cap.short, &supply.short), + long: Self::unrealized_pnl_row(spot, &cap.long, &supply.long), + } + } + + fn unrealized_pnl_row( + spot: Cents, + cap: &ProfitabilityRange, + supply: &ProfitabilityRange, + ) -> ProfitabilityRange { + ProfitabilityRangeId::from_fn(|column| { + let market_value = + f64::from(Dollars::from(spot)) * f64::from(Bitcoin::from(*column.get(supply))); + let realized_cap = f64::from(*column.get(cap)); + let pnl = if column.is_profit() { + market_value - realized_cap + } else { + realized_cap - market_value + } + .max(0.0); + Dollars::from(pnl) + }) + } + + fn nupl_row( + spot: Cents, + cap: &ProfitabilityRange, + supply: &ProfitabilityRange, + ) -> ProfitabilityRow { + let cap = ProfitabilityRow::from_ranges(cap.clone()); + let supply = ProfitabilityRow::from_ranges(supply.clone()); + ProfitabilityId::from_fn(|column| { + let spot = spot.as_u128(); + let supply = column.get(&supply).as_u128(); + if spot == 0 || supply == 0 { + PartsPerMillionSigned32::ZERO + } else { + let realized_price = + Cents::from(*column.get(&cap)).as_u128() * Sats::ONE_BTC_U128 / supply; + PartsPerMillionSigned32::from((spot as f64 - realized_price as f64) / spot as f64) + } + }) + } +} + +#[cfg(test)] +mod tests { + use brk_cohort::{ + ByTerm, PROFIT_COUNT, ProfitabilityId, ProfitabilityRangeId, ProfitabilityRow, + }; + use brk_types::{Cents, Dollars, PartsPerMillionSigned32, Sats}; + use vecdb::ColumnId; + + use super::ProfitabilityVecs; + + #[test] + fn expanded_thresholds_match_prefix_and_suffix_sums() { + let ranges = ProfitabilityRangeId::from_fn(|id| Sats::from(id.index() as u64 + 1)); + let row = ProfitabilityRow::from_ranges(ranges.clone()); + let sum = |values: &[Sats]| { + values + .iter() + .copied() + .fold(Sats::default(), |total, value| total + value) + }; + + let ranges: Vec<_> = ranges.iter().copied().collect(); + for (threshold, &column) in ProfitabilityId::profit_ids().iter().enumerate() { + assert_eq!( + *column.get(&row), + sum(&ranges[..PROFIT_COUNT + 1 - threshold]) + ); + } + for (threshold, &column) in ProfitabilityId::loss_ids().iter().enumerate() { + assert_eq!( + *column.get(&row), + sum(&ranges[PROFIT_COUNT + 1 + threshold..]) + ); + } + } + + #[test] + fn derived_rows_preserve_profit_and_loss_polarity() { + let supply = ProfitabilityRangeId::from_fn(|_| Sats::ONE_BTC); + let cap = ProfitabilityRangeId::from_fn(|column| { + Dollars::from(if column.is_profit() { 1.0 } else { 3.0 }) + }); + let spot = Cents::from(200_u64); + + let cap = ByTerm { + short: cap.clone(), + long: cap.clone(), + }; + let supply = ByTerm { + short: supply.clone(), + long: supply.clone(), + }; + let pnl = ProfitabilityVecs::unrealized_pnl_rows(spot, &cap, &supply); + let all_cap = ProfitabilityVecs::sum_terms(&cap); + let all_supply = ProfitabilityVecs::sum_terms(&supply); + let nupl = ProfitabilityVecs::nupl_row(spot, &all_cap, &all_supply); + + for column in ProfitabilityRangeId::ALL { + assert_eq!(*column.get(&pnl.short), Dollars::from(1.0)); + assert_eq!(*column.get(&pnl.long), Dollars::from(1.0)); + } + for column in ProfitabilityId::ALL { + assert_eq!( + *column.get(&nupl), + PartsPerMillionSigned32::from(if column.is_profit() { 0.5 } else { -0.5 }) + ); + } + } } diff --git a/crates/brk_computer/src/distribution/metrics/realized/adjusted.rs b/crates/brk_computer/src/distribution/metrics/realized/adjusted.rs index 7da8a2d25..dac1aac71 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/adjusted.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/adjusted.rs @@ -1,4 +1,6 @@ -use brk_cohort::{Filter, TERM_NAMES, Term, UTXO_ALL_NAME, UTXOAllAndSth, UTXOAllAndSthId}; +use brk_cohort::{ + CohortContext, Filter, TERM_NAMES, Term, UTXO_ALL_NAME, UTXOAllAndSth, UTXOAllAndSthId, +}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Cents, Height, StoredF64, Version}; @@ -7,7 +9,6 @@ use vecdb::{ }; use crate::{ - distribution::metrics::utxo_metric_name, indexes, internal::{ CachedWindowStartVec, ColumnarPerBlockCumulativeRolling, ColumnarRollingWindows, @@ -120,10 +121,14 @@ impl AdjustedSoprVecs { fn cohort_metric_name(id: UTXOAllAndSthId, metric: &str) -> String { match id { - UTXOAllAndSthId::All => utxo_metric_name(&Filter::All, UTXO_ALL_NAME.id, metric), - UTXOAllAndSthId::Sth => { - utxo_metric_name(&Filter::Term(Term::Sth), TERM_NAMES.short.id, metric) + UTXOAllAndSthId::All => { + CohortContext::Utxo.metric_name(&Filter::All, UTXO_ALL_NAME.id, metric) } + UTXOAllAndSthId::Sth => CohortContext::Utxo.metric_name( + &Filter::Term(Term::Sth), + TERM_NAMES.short.id, + metric, + ), } } diff --git a/crates/brk_computer/src/distribution/metrics/realized/sopr_vecs.rs b/crates/brk_computer/src/distribution/metrics/realized/sopr_vecs.rs index 269852f02..2a1d17c5c 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/sopr_vecs.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/sopr_vecs.rs @@ -1,8 +1,8 @@ use brk_cohort::{ AGE_RANGE_FILTERS, AgeRange, AgeRangeId, ByEntry, ByEpoch, CLASS_FILTERS, Class, ClassId, - ENTRY_FILTERS, EPOCH_FILTERS, EntryId, EpochId, Filter, OVER_AGE_FILTERS, OverAge, OverAgeId, - Term, UNDER_AGE_FILTERS, UTXOAggregate, UTXOAggregateId, UTXOGroupsWithoutAmountOrType, - UnderAge, UnderAgeId, + CohortContext, ENTRY_FILTERS, EPOCH_FILTERS, EntryId, EpochId, Filter, OVER_AGE_FILTERS, + OverAge, OverAgeId, Term, UNDER_AGE_FILTERS, UTXOAggregate, UTXOAggregateId, + UTXOGroupsWithoutAmountOrType, UnderAge, UnderAgeId, }; use brk_error::Result; use brk_traversable::Traversable; @@ -13,7 +13,6 @@ use vecdb::{ }; use crate::{ - distribution::metrics::utxo_metric_name, indexes, internal::{ColumnarPerBlock, Identity, LazyColumnPerBlock, LazyPerBlock, RatioCents64}, }; @@ -121,7 +120,7 @@ impl Sopr24hVecs { })?; let cohorts = UTXOGroupsWithoutAmountOrType::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, "sopr_24h"); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, "sopr_24h"); let version = Self::cohort_version(version, &filter); match &filter { Filter::All => { diff --git a/crates/brk_computer/src/distribution/metrics/realized/vecs/cap.rs b/crates/brk_computer/src/distribution/metrics/realized/vecs/cap.rs index 6a8fb8062..998ce6325 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/vecs/cap.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/vecs/cap.rs @@ -1,11 +1,11 @@ -use brk_cohort::UTXOGroups; +use brk_cohort::{CohortContext, UTXOGroups}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Cents, CentsSigned, PartsPerMillionSigned64, Version}; use vecdb::{Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{UTXOColumnarMetric, utxo_metric_name}, + distribution::metrics::UTXOColumnarMetric, indexes, internal::{CachedWindowStartVec, LazyFiatPerBlockWithDeltas, Windows}, }; @@ -28,7 +28,7 @@ impl RealizedCapByCohort { ) -> Result { let matrices = UTXOColumnarMetric::forced_import(db, "realized_cap_cents", version)?; let cohorts = UTXOGroups::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, "realized_cap"); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, "realized_cap"); LazyFiatPerBlockWithDeltas::from_boxed_cents_source( &name, version, diff --git a/crates/brk_computer/src/distribution/metrics/realized/vecs/collection.rs b/crates/brk_computer/src/distribution/metrics/realized/vecs/collection.rs index 638a12d28..4c4b4601b 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/vecs/collection.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/vecs/collection.rs @@ -19,7 +19,7 @@ use crate::{ metrics::{ AdditiveAggregateFiatPerBlockCumulativeWithSums, AdditiveUTXORawVec, AggregatePercentPerBlock, AggregatePriceWithRatioPerBlock, ColumnarAmount, - RealizedBlockData, RealizedTotals, UTXORows, utxo_metric_name, + RealizedBlockData, RealizedTotals, UTXORows, }, }, indexes, @@ -222,14 +222,14 @@ impl RealizedVecs { let mvrv = price.cohorts.map_named(|filter, cohort_name, price| { LazyPerBlock::from_lazy::, PartsPerMillion64>( - &utxo_metric_name(filter, cohort_name, "mvrv"), + &CohortContext::Utxo.metric_name(filter, cohort_name, "mvrv"), Self::cohort_version(version, filter), &price.ratio, ) }); let negative_loss = UTXOGroupsWithoutAmountOrType::new(|filter, cohort_name| { let loss = loss.cohorts.get(&filter).expect("realized-loss cohort"); - let name = utxo_metric_name(&filter, cohort_name, "realized_loss_neg"); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, "realized_loss_neg"); let version = Self::cohort_version(version, &filter) + Version::ONE; let base = LazyVec::transformed::( &name, @@ -248,7 +248,7 @@ impl RealizedVecs { }); let cap_to_own_mcap = UTXOAggregate::from_fn(|id| { let filter = id.select(&UTXO_AGGREGATE_FILTERS); - let name = utxo_metric_name( + let name = CohortContext::Utxo.metric_name( filter, id.select(&UTXO_AGGREGATE_NAMES).id, "realized_cap_to_own_mcap", @@ -268,7 +268,7 @@ impl RealizedVecs { }); let net_pnl_change_1m_to_mcap = UTXOAggregate::from_fn(|id| { let filter = id.select(&UTXO_AGGREGATE_FILTERS); - let name = utxo_metric_name( + let name = CohortContext::Utxo.metric_name( filter, id.select(&UTXO_AGGREGATE_NAMES).id, "net_pnl_change_1m_to_mcap", @@ -343,7 +343,7 @@ impl RealizedVecs { } fn aggregate_metric_name(id: UTXOAggregateId, metric: &str) -> String { - utxo_metric_name( + CohortContext::Utxo.metric_name( id.select(&UTXO_AGGREGATE_FILTERS), id.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/realized/vecs/cumulative.rs b/crates/brk_computer/src/distribution/metrics/realized/vecs/cumulative.rs index b5d733e0b..28cfa336b 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/vecs/cumulative.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/vecs/cumulative.rs @@ -1,11 +1,11 @@ -use brk_cohort::UTXOGroups; +use brk_cohort::{CohortContext, UTXOGroups}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Cents, Version}; use vecdb::{Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{CumulativeUTXOColumnarMetric, utxo_metric_name}, + distribution::metrics::CumulativeUTXOColumnarMetric, indexes, internal::{CachedWindowStartVec, LazyFiatPerBlockCumulativeWithSums, Windows}, }; @@ -32,7 +32,7 @@ impl CumulativeRealizedByCohort { version, )?; let cohorts = UTXOGroups::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, metric); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, metric); let source = cumulative .matrices .additive_source(&filter, &format!("{name}_cumulative_cents"), version) diff --git a/crates/brk_computer/src/distribution/metrics/realized/vecs/cumulative_net.rs b/crates/brk_computer/src/distribution/metrics/realized/vecs/cumulative_net.rs index d596e49ec..ee66ca334 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/vecs/cumulative_net.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/vecs/cumulative_net.rs @@ -1,11 +1,11 @@ -use brk_cohort::UTXOGroupsWithoutAmountOrType; +use brk_cohort::{CohortContext, UTXOGroupsWithoutAmountOrType}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{CentsSigned, PartsPerMillionSigned64, Version}; use vecdb::{Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{CumulativeUTXOColumnarMetricWithoutAmountOrType, utxo_metric_name}, + distribution::metrics::CumulativeUTXOColumnarMetricWithoutAmountOrType, indexes, internal::{CachedWindowStartVec, LazyFiatPerBlockCumulativeWithSumsAndDeltas, Windows}, }; @@ -38,7 +38,7 @@ impl CumulativeNetRealizedByCohort { version, )?; let cohorts = UTXOGroupsWithoutAmountOrType::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, "net_realized_pnl"); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, "net_realized_pnl"); let source = cumulative .matrices .additive_source(&filter, &format!("{name}_cumulative_cents"), version) diff --git a/crates/brk_computer/src/distribution/metrics/realized/vecs/price.rs b/crates/brk_computer/src/distribution/metrics/realized/vecs/price.rs index cd3c016df..15ee132be 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/vecs/price.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/vecs/price.rs @@ -1,13 +1,11 @@ -use brk_cohort::UTXOGroups; +use brk_cohort::{CohortContext, UTXOGroups}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Cents, Height, Version}; use vecdb::{CachedBoxedVec, Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{ExactUTXOColumnarMetric, utxo_metric_name}, - indexes, - internal::LazyPriceWithRatioPerBlock, + distribution::metrics::ExactUTXOColumnarMetric, indexes, internal::LazyPriceWithRatioPerBlock, }; #[derive(Traversable)] @@ -28,7 +26,7 @@ impl RealizedPriceByCohort { let version = version + Version::ONE; let matrices = ExactUTXOColumnarMetric::forced_import(db, "realized_price_cents", version)?; let cohorts = UTXOGroups::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, "realized_price"); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, "realized_price"); LazyPriceWithRatioPerBlock::from_boxed_height_source( &name, version, diff --git a/crates/brk_computer/src/distribution/metrics/realized/vecs/value_destroyed.rs b/crates/brk_computer/src/distribution/metrics/realized/vecs/value_destroyed.rs index 9acae5ddf..19f780d4a 100644 --- a/crates/brk_computer/src/distribution/metrics/realized/vecs/value_destroyed.rs +++ b/crates/brk_computer/src/distribution/metrics/realized/vecs/value_destroyed.rs @@ -1,11 +1,11 @@ -use brk_cohort::UTXOGroupsWithoutAmountOrType; +use brk_cohort::{CohortContext, UTXOGroupsWithoutAmountOrType}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Cents, Version}; use vecdb::{Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{CumulativeUTXOColumnarMetricWithoutAmountOrType, utxo_metric_name}, + distribution::metrics::CumulativeUTXOColumnarMetricWithoutAmountOrType, indexes, internal::{CachedWindowStartVec, LazyFiatPerBlockCumulativeWithSums, Windows}, }; @@ -32,7 +32,7 @@ impl CumulativeValueDestroyedByCohort { version, )?; let cohorts = UTXOGroupsWithoutAmountOrType::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, metric); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, metric); let source = cumulative .matrices .additive_source(&filter, &format!("{name}_cumulative_cents"), version) diff --git a/crates/brk_computer/src/distribution/metrics/relative/gross_pnl_composition.rs b/crates/brk_computer/src/distribution/metrics/relative/gross_pnl_composition.rs index ccb06bedd..c50a8d74b 100644 --- a/crates/brk_computer/src/distribution/metrics/relative/gross_pnl_composition.rs +++ b/crates/brk_computer/src/distribution/metrics/relative/gross_pnl_composition.rs @@ -1,4 +1,6 @@ -use brk_cohort::{UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId}; +use brk_cohort::{ + CohortContext, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId, +}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Dollars, Height, PartsPerMillion32, PartsPerMillionSigned32, Version}; @@ -8,7 +10,6 @@ use vecdb::{ }; use crate::{ - distribution::metrics::utxo_metric_name, indexes, internal::{ColumnarPerBlock, FixedRatio, LazyPercentPerBlock}, }; @@ -82,7 +83,7 @@ impl GrossPnlComposition { indexes: &indexes::Vecs, ) -> UTXOAggregate> { UTXOAggregate::from_fn(|id| { - let name = utxo_metric_name( + let name = CohortContext::Utxo.metric_name( id.select(&UTXO_AGGREGATE_FILTERS), id.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/relative/supply_profitability_shares.rs b/crates/brk_computer/src/distribution/metrics/relative/supply_profitability_shares.rs index 484d20896..8b64d7bee 100644 --- a/crates/brk_computer/src/distribution/metrics/relative/supply_profitability_shares.rs +++ b/crates/brk_computer/src/distribution/metrics/relative/supply_profitability_shares.rs @@ -1,4 +1,6 @@ -use brk_cohort::{UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId}; +use brk_cohort::{ + CohortContext, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId, +}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Height, PartsPerMillion32, Sats, Version}; @@ -8,7 +10,6 @@ use vecdb::{ }; use crate::{ - distribution::metrics::utxo_metric_name, indexes, internal::{ColumnarPerBlock, LazyPercentPerBlock, RatioSats}, }; @@ -71,7 +72,7 @@ impl SupplyProfitabilityShares { indexes: &indexes::Vecs, ) -> UTXOAggregate> { UTXOAggregate::from_fn(|id| { - let name = utxo_metric_name( + let name = CohortContext::Utxo.metric_name( id.select(&UTXO_AGGREGATE_FILTERS), id.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/relative/vecs.rs b/crates/brk_computer/src/distribution/metrics/relative/vecs.rs index 3bbbe6e3f..2787bb6dc 100644 --- a/crates/brk_computer/src/distribution/metrics/relative/vecs.rs +++ b/crates/brk_computer/src/distribution/metrics/relative/vecs.rs @@ -1,6 +1,6 @@ use brk_cohort::{ - ByTerm, TERM_FILTERS, TERM_NAMES, TermId, UTXO_AGGREGATE_FILTERS, UTXO_AGGREGATE_NAMES, - UTXOAggregate, UTXOAggregateId, + ByTerm, CohortContext, TERM_FILTERS, TERM_NAMES, TermId, UTXO_AGGREGATE_FILTERS, + UTXO_AGGREGATE_NAMES, UTXOAggregate, UTXOAggregateId, }; use brk_error::Result; use brk_traversable::Traversable; @@ -8,10 +8,7 @@ use brk_types::{Cents, Height, PartsPerMillion32, PartsPerMillionSigned32, Versi use vecdb::{AnyStoredVec, BinaryTransform, Database, Exit, Rw, StorageMode}; use crate::{ - distribution::{ - AllChainCache, - metrics::{AggregatePercentPerBlock, utxo_metric_name}, - }, + distribution::{AllChainCache, metrics::AggregatePercentPerBlock}, indexes, internal::{ ColumnarPerBlock, LazyColumnPercentPerBlock, LazyPercentPerBlock, RatioCents, RatioDollars, @@ -162,15 +159,18 @@ impl RelativeVecs { > { ColumnarPerBlock::forced_import(db, &format!("{metric}_ppm_by_term"), version, |source| { ByTerm::from_fn(|id| { - let name = - utxo_metric_name(id.select(&TERM_FILTERS), id.select(&TERM_NAMES).id, metric); + let name = CohortContext::Utxo.metric_name( + id.select(&TERM_FILTERS), + id.select(&TERM_NAMES).id, + metric, + ); LazyColumnPercentPerBlock::new(&name, version, source, id, indexes) }) }) } fn aggregate_metric_name(id: UTXOAggregateId, metric: &str) -> String { - utxo_metric_name( + CohortContext::Utxo.metric_name( id.select(&UTXO_AGGREGATE_FILTERS), id.select(&UTXO_AGGREGATE_NAMES).id, metric, diff --git a/crates/brk_computer/src/distribution/metrics/supply/by_cohort.rs b/crates/brk_computer/src/distribution/metrics/supply/by_cohort.rs index c4bbde43b..aa2306849 100644 --- a/crates/brk_computer/src/distribution/metrics/supply/by_cohort.rs +++ b/crates/brk_computer/src/distribution/metrics/supply/by_cohort.rs @@ -1,11 +1,11 @@ -use brk_cohort::{Filter, UTXOGroupsWithoutAmount}; +use brk_cohort::{CohortContext, Filter, UTXOGroupsWithoutAmount}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{Cents, Height, Sats, Version}; use vecdb::{AnyStoredVec, CachedBoxedVec, Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{UTXOColumnarMetricWithoutAmount, UTXORows, utxo_metric_name}, + distribution::metrics::{UTXOColumnarMetricWithoutAmount, UTXORows}, indexes, internal::LazySpotValuePerBlock, }; @@ -29,7 +29,7 @@ impl SupplyByCohort { let matrices = UTXOColumnarMetricWithoutAmount::forced_import(db, &format!("{metric}_sats"), version)?; let cohorts = UTXOGroupsWithoutAmount::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, metric); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, metric); let source = matrices .additive_source(&filter, &format!("{name}_sats"), version) .expect("supported supply cohort"); diff --git a/crates/brk_computer/src/distribution/metrics/supply/total.rs b/crates/brk_computer/src/distribution/metrics/supply/total.rs index f3edcf96b..8177781c9 100644 --- a/crates/brk_computer/src/distribution/metrics/supply/total.rs +++ b/crates/brk_computer/src/distribution/metrics/supply/total.rs @@ -5,7 +5,7 @@ use brk_types::{Cents, Height, Sats, Version}; use vecdb::{AnyStoredVec, CachedBoxedVec, Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{ColumnarAmount, UTXOColumnarMetric, UTXORows, utxo_metric_name}, + distribution::metrics::{ColumnarAmount, UTXOColumnarMetric, UTXORows}, indexes, internal::LazySpotValuePerBlock, }; @@ -30,7 +30,7 @@ impl SupplyTotal { ) -> Result<(Self, AllSupplyCache)> { let matrices = UTXOColumnarMetric::forced_import(db, "supply_sats", version)?; let cohorts = UTXOGroups::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, "supply"); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, "supply"); LazySpotValuePerBlock::from_boxed_sats_source( &name, version, diff --git a/crates/brk_computer/src/distribution/metrics/unrealized/vecs/by_cohort.rs b/crates/brk_computer/src/distribution/metrics/unrealized/vecs/by_cohort.rs index 8bfe6b469..18cc33159 100644 --- a/crates/brk_computer/src/distribution/metrics/unrealized/vecs/by_cohort.rs +++ b/crates/brk_computer/src/distribution/metrics/unrealized/vecs/by_cohort.rs @@ -1,13 +1,13 @@ use std::ops::AddAssign; -use brk_cohort::UTXOGroupsWithoutAmount; +use brk_cohort::{CohortContext, UTXOGroupsWithoutAmount}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::Version; use vecdb::{Database, PcoVecValue, Rw, StorageMode}; use crate::{ - distribution::metrics::{UTXOColumnarMetricWithoutAmount, utxo_metric_name}, + distribution::metrics::UTXOColumnarMetricWithoutAmount, indexes, internal::{FiatType, LazyFiatPerBlock}, }; @@ -39,7 +39,7 @@ where version, )?; let cohorts = UTXOGroupsWithoutAmount::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, metric); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, metric); let source = matrices .additive_source(&filter, &format!("{name}_cents"), version) .expect("supported unrealized cohort"); diff --git a/crates/brk_computer/src/distribution/metrics/unrealized/vecs/collection.rs b/crates/brk_computer/src/distribution/metrics/unrealized/vecs/collection.rs index aa9180682..f37d82571 100644 --- a/crates/brk_computer/src/distribution/metrics/unrealized/vecs/collection.rs +++ b/crates/brk_computer/src/distribution/metrics/unrealized/vecs/collection.rs @@ -1,4 +1,4 @@ -use brk_cohort::{Filter, UTXOAggregate, UTXOGroups, UTXOGroupsWithoutAmount}; +use brk_cohort::{CohortContext, Filter, UTXOAggregate, UTXOGroups, UTXOGroupsWithoutAmount}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{ @@ -11,7 +11,6 @@ use crate::{ distribution::{ metrics::{ AdditiveAggregateFiatPerBlock, AdditiveUTXORawVec, AggregateFiatPerBlock, UTXORows, - utxo_metric_name, }, state::UnrealizedState, }, @@ -95,13 +94,13 @@ impl UnrealizedVecs { AggregateFiatPerBlock::forced_import(db, "net_sentiment", aggregate_version, indexes)?; let nupl = realized_price.map_named(|filter, cohort_name, price| { LazyRatioPerBlock::from_lazy_source::( - &utxo_metric_name(filter, cohort_name, "nupl"), + &CohortContext::Utxo.metric_name(filter, cohort_name, "nupl"), Self::cohort_version(version, filter) + Version::new(5), &price.ppm, ) }); let negative_loss = UTXOGroupsWithoutAmount::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, "unrealized_loss_neg"); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, "unrealized_loss_neg"); LazyPerBlock::from_lazy::( &name, Self::cohort_version(version, &filter), diff --git a/crates/brk_computer/src/distribution/metrics/unrealized/vecs/net_by_cohort.rs b/crates/brk_computer/src/distribution/metrics/unrealized/vecs/net_by_cohort.rs index 90efa0d0a..08c7c5d8a 100644 --- a/crates/brk_computer/src/distribution/metrics/unrealized/vecs/net_by_cohort.rs +++ b/crates/brk_computer/src/distribution/metrics/unrealized/vecs/net_by_cohort.rs @@ -1,12 +1,11 @@ -use brk_cohort::UTXOGroupsWithoutAmountOrType; +use brk_cohort::{CohortContext, UTXOGroupsWithoutAmountOrType}; use brk_error::Result; use brk_traversable::Traversable; use brk_types::{CentsSigned, Version}; use vecdb::{Database, Rw, StorageMode}; use crate::{ - distribution::metrics::{UTXOColumnarMetricWithoutAmountOrType, utxo_metric_name}, - indexes, + distribution::metrics::UTXOColumnarMetricWithoutAmountOrType, indexes, internal::LazyFiatPerBlock, }; @@ -31,7 +30,7 @@ impl NetUnrealizedByCohort { version, )?; let cohorts = UTXOGroupsWithoutAmountOrType::new(|filter, cohort_name| { - let name = utxo_metric_name(&filter, cohort_name, metric); + let name = CohortContext::Utxo.metric_name(&filter, cohort_name, metric); let source = matrices .additive_source(&filter, &format!("{name}_cents"), version) .expect("supported net unrealized cohort"); diff --git a/crates/brk_computer/src/distribution/state/utxo/fenwick.rs b/crates/brk_computer/src/distribution/state/utxo/fenwick.rs index dab95ffc4..f5ef676fc 100644 --- a/crates/brk_computer/src/distribution/state/utxo/fenwick.rs +++ b/crates/brk_computer/src/distribution/state/utxo/fenwick.rs @@ -30,7 +30,7 @@ const TREE_SIZE: usize = TIER0_COUNT + TIER1_COUNT + OVERFLOW; // 190,001 /// Fenwick tree node for combined cost basis tracking. #[derive(Clone, Copy, Default)] -pub(super) struct CostBasisNode { +struct CostBasisNode { all_sats: i64, sth_sats: i64, all_usd: i128, diff --git a/crates/brk_computer/src/frameworks/coinflow/age_band.rs b/crates/brk_computer/src/frameworks/coinflow/age_band.rs new file mode 100644 index 000000000..98f555655 --- /dev/null +++ b/crates/brk_computer/src/frameworks/coinflow/age_band.rs @@ -0,0 +1,68 @@ +use brk_cohort::{AgeRange, AgeRangeId}; +use vecdb::ColumnId; + +use super::{HOURS_PER_DAY, MINIMUM_DURATION_DAYS}; + +#[derive(Clone, Copy, Debug)] +pub(crate) struct AgeBand { + pub(crate) lower: f64, + pub(crate) upper: f64, +} + +impl AgeBand { + pub(crate) fn all() -> AgeRange { + AgeRange::from_fn(|id| { + let bound = id.bounds(); + Self { + lower: bound.start as f64 / HOURS_PER_DAY, + upper: if id == AgeRangeId::Over15Y { + f64::INFINITY + } else { + bound.end as f64 / HOURS_PER_DAY + }, + } + }) + } + + #[inline] + pub(crate) fn mobility(exposure: f64) -> f64 { + if exposure.is_nan() || exposure <= 0.0 { + 0.0 + } else { + (-(-exposure).exp_m1()).min(1.0 - 1e-12) + } + } + + pub(crate) fn horizon_mobility( + hazards: &AgeRange, + start_band: AgeRangeId, + horizon: f64, + bounds: &AgeRange, + ) -> f64 { + let start = *start_band.select(bounds); + let mut age = if start.upper.is_finite() { + (start.lower + start.upper) / 2.0 + } else { + start.lower + }; + let mut remaining = horizon; + let mut exposure = 0.0; + + for &band in &AgeRangeId::ALL[start_band.index()..] { + if remaining <= 0.0 { + break; + } + let bound = *band.select(bounds); + let duration = if bound.upper.is_finite() { + remaining.min((bound.upper - age).max(MINIMUM_DURATION_DAYS)) + } else { + remaining + }; + exposure += band.select(hazards).max(0.0) * duration; + remaining -= duration; + age = bound.upper; + } + + Self::mobility(exposure) + } +} diff --git a/crates/brk_computer/src/frameworks/coinflow/compute.rs b/crates/brk_computer/src/frameworks/coinflow/compute.rs index d8abed6f9..77b629063 100644 --- a/crates/brk_computer/src/frameworks/coinflow/compute.rs +++ b/crates/brk_computer/src/frameworks/coinflow/compute.rs @@ -8,7 +8,6 @@ use brk_cohort::{AgeRange, AgeRangeId, ByTerm, TERM_FILTERS, UTXOAggregate}; use super::super::cointime; use super::{ AGE_COHORT_COUNT, AgeBand, AggregateSources, HorizonId, Horizons, MINIMUM_DURATION_DAYS, Vecs, - age_bounds_days, horizon_mobility, mobility, }; use crate::{ distribution, @@ -195,7 +194,7 @@ impl Vecs { let genesis_timestamp = timestamps .collect_one(Height::ZERO) .unwrap_or(Timestamp::ZERO); - let bounds = age_bounds_days(); + let bounds = AgeBand::all(); let mut chunk_start = start; while chunk_start < source_end { let chunk_end = (chunk_start + WRITE_INTERVAL).min(source_end); @@ -219,7 +218,7 @@ impl Vecs { for offset in 0..(chunk_end - chunk_start) { let hazards = AgeRange::from_fn(|id| { - spending_rate( + Self::spending_rate( id.select(&transfer_batches)[offset], *id.get(&coinday_batch[offset]), ) @@ -228,10 +227,12 @@ impl Vecs { .difference_in_days_between_float(genesis_timestamp) .max(MINIMUM_DURATION_DAYS); let exposures = DecayFit::exposures(&hazards, network_age, &bounds); - let mobilities = AgeRange::from_fn(|id| mobility(*id.select(&exposures))); + let mobilities = AgeRange::from_fn(|id| AgeBand::mobility(*id.select(&exposures))); let horizon_mobilities: Horizons> = HorizonId::from_fn(|horizon| { let horizon = horizon.days(); - AgeRange::from_fn(|age| horizon_mobility(&hazards, age, horizon, &bounds)) + AgeRange::from_fn(|age| { + AgeBand::horizon_mobility(&hazards, age, horizon, &bounds) + }) }); self.age_range.spending_rate.push(AgeRangeId::from_fn(|id| { StoredF64::from(*id.select(&hazards)) @@ -305,6 +306,16 @@ impl Vecs { .into_iter() .chain(self.aggregate_sources.primary_vecs_mut()) } + + #[inline] + fn spending_rate(transfer_volume: Sats, coindays_created: StoredF64) -> f64 { + let exposure = f64::from(coindays_created); + if exposure > 0.0 { + (f64::from(Bitcoin::from(transfer_volume)) / exposure).max(0.0) + } else { + 0.0 + } + } } impl AggregateSources { @@ -364,16 +375,6 @@ impl AggregateSources { } } -#[inline] -fn spending_rate(transfer_volume: Sats, coindays_created: StoredF64) -> f64 { - let exposure = f64::from(coindays_created); - if exposure > 0.0 { - (f64::from(Bitcoin::from(transfer_volume)) / exposure).max(0.0) - } else { - 0.0 - } -} - impl DecayFit { fn fit(hazards: &AgeRange, network_age: f64, bounds: &AgeRange) -> Option { let mut total_duration = 0.0; @@ -511,26 +512,27 @@ mod tests { #[test] fn mobility_is_the_complement_of_survival() { - assert_eq!(mobility(0.0), 0.0); - assert!((mobility(2.0_f64.ln()) - 0.5).abs() < 1e-12); - assert!((mobility(1e-15) - 1e-15).abs() < 1e-27); - assert!(mobility(1_000.0) < 1.0); - assert_eq!(mobility(f64::INFINITY), 1.0 - 1e-12); - assert_eq!(mobility(f64::NAN), 0.0); + assert_eq!(AgeBand::mobility(0.0), 0.0); + assert!((AgeBand::mobility(2.0_f64.ln()) - 0.5).abs() < 1e-12); + assert!((AgeBand::mobility(1e-15) - 1e-15).abs() < 1e-27); + assert!(AgeBand::mobility(1_000.0) < 1.0); + assert_eq!(AgeBand::mobility(f64::INFINITY), 1.0 - 1e-12); + assert_eq!(AgeBand::mobility(f64::NAN), 0.0); } #[test] fn fixed_horizon_compounds_hazards_across_age_ranges() { - let bounds = age_bounds_days(); + let bounds = AgeBand::all(); let hazards = AgeRange::from_fn(|_| 0.01); - let probability = horizon_mobility(&hazards, AgeRangeId::From1DTo1W, 30.0, &bounds); + let probability = + AgeBand::horizon_mobility(&hazards, AgeRangeId::From1DTo1W, 30.0, &bounds); - assert!((probability - mobility(0.3)).abs() < 1e-12); + assert!((probability - AgeBand::mobility(0.3)).abs() < 1e-12); } #[test] fn decay_fit_recovers_an_exponential_lifetime() { - let bounds = age_bounds_days(); + let bounds = AgeBand::all(); let expected_tau = 1_000.0; let hazards = AgeRange::from_fn(|id| { let band = *id.select(&bounds); @@ -549,7 +551,7 @@ mod tests { #[test] fn oldest_cohort_exposure_is_its_observed_tail_lifetime() { - let bounds = age_bounds_days(); + let bounds = AgeBand::all(); let hazards = AgeRange::from_fn(|id| { let band = *id.select(&bounds); let age = if band.upper.is_finite() { diff --git a/crates/brk_computer/src/frameworks/coinflow/import.rs b/crates/brk_computer/src/frameworks/coinflow/import.rs index 82e524229..76c2361e5 100644 --- a/crates/brk_computer/src/frameworks/coinflow/import.rs +++ b/crates/brk_computer/src/frameworks/coinflow/import.rs @@ -10,8 +10,8 @@ use vecdb::{ }; use super::{ - AgeRangeVecs, AggregateSources, AggregateVecs, HorizonId, HorizonVecs, Mobility, MobilityId, - SpendingExposureSeries, Vecs, mobility, + AgeBand, AgeRangeVecs, AggregateSources, AggregateVecs, HorizonId, HorizonVecs, Mobility, + MobilityId, SpendingExposureSeries, Vecs, }; use crate::{ indexes, @@ -28,7 +28,7 @@ struct ExposureToMobility; impl UnaryTransform for ExposureToMobility { #[inline(always)] fn apply(exposure: StoredF64) -> StoredF64 { - StoredF64::from(mobility(*exposure)) + StoredF64::from(AgeBand::mobility(*exposure)) } } diff --git a/crates/brk_computer/src/frameworks/coinflow/mod.rs b/crates/brk_computer/src/frameworks/coinflow/mod.rs index 70bbd6aa5..131d14c77 100644 --- a/crates/brk_computer/src/frameworks/coinflow/mod.rs +++ b/crates/brk_computer/src/frameworks/coinflow/mod.rs @@ -1,11 +1,10 @@ +mod age_band; mod compute; mod horizon; mod import; mod vecs; -use brk_cohort::{AgeRange, AgeRangeId}; -use vecdb::ColumnId; - +pub(crate) use age_band::AgeBand; pub(crate) use brk_cohort::AGE_RANGE_COUNT as AGE_COHORT_COUNT; pub use horizon::{HorizonId, Horizons}; pub use vecs::{ @@ -16,66 +15,3 @@ pub use vecs::{ pub(crate) const HORIZON_COUNT: usize = HorizonId::ALL.len(); pub(crate) const HOURS_PER_DAY: f64 = 24.0; pub(crate) const MINIMUM_DURATION_DAYS: f64 = 1.0 / HOURS_PER_DAY; - -#[derive(Clone, Copy, Debug)] -pub(crate) struct AgeBand { - pub lower: f64, - pub upper: f64, -} - -pub(crate) fn age_bounds_days() -> AgeRange { - AgeRange::from_fn(|id| { - let bound = id.bounds(); - AgeBand { - lower: bound.start as f64 / HOURS_PER_DAY, - upper: if id == AgeRangeId::Over15Y { - f64::INFINITY - } else { - bound.end as f64 / HOURS_PER_DAY - }, - } - }) -} - -#[inline] -pub(crate) fn mobility(exposure: f64) -> f64 { - if exposure.is_nan() || exposure <= 0.0 { - 0.0 - } else { - (-(-exposure).exp_m1()).min(1.0 - 1e-12) - } -} - -pub(crate) fn horizon_mobility( - hazards: &AgeRange, - start_band: AgeRangeId, - horizon: f64, - bounds: &AgeRange, -) -> f64 { - let start = *start_band.select(bounds); - let mut age = if start.upper.is_finite() { - (start.lower + start.upper) / 2.0 - } else { - start.lower - }; - let mut remaining = horizon; - let mut exposure = 0.0; - - for &band in &AgeRangeId::ALL[start_band.index()..] { - if remaining <= 0.0 { - break; - } - let bound = *band.select(bounds); - let upper = bound.upper; - let duration = if upper.is_finite() { - remaining.min((upper - age).max(MINIMUM_DURATION_DAYS)) - } else { - remaining - }; - exposure += band.select(hazards).max(0.0) * duration; - remaining -= duration; - age = upper; - } - - mobility(exposure) -} diff --git a/crates/brk_computer/src/frameworks/cointime/activity/compute.rs b/crates/brk_computer/src/frameworks/cointime/activity/compute.rs index d022376b8..41428bdc7 100644 --- a/crates/brk_computer/src/frameworks/cointime/activity/compute.rs +++ b/crates/brk_computer/src/frameworks/cointime/activity/compute.rs @@ -1,6 +1,6 @@ use brk_error::Result; use brk_indexer::Indexer; -use brk_types::{Bitcoin, StoredF64}; +use brk_types::{Bitcoin, Height, StoredF64}; use vecdb::Exit; use super::Vecs; @@ -10,7 +10,7 @@ use crate::{ }; pub(crate) fn compute_rest( - starting_height: brk_types::Height, + starting_height: Height, created: &PerBlockCumulativeRolling, consumed: &PerBlockCumulativeRolling, stored: &mut PerBlockCumulativeRolling, diff --git a/crates/brk_computer/src/frameworks/cointime/aggregate/import.rs b/crates/brk_computer/src/frameworks/cointime/aggregate/import.rs index eab41d64b..8a9788186 100644 --- a/crates/brk_computer/src/frameworks/cointime/aggregate/import.rs +++ b/crates/brk_computer/src/frameworks/cointime/aggregate/import.rs @@ -5,7 +5,7 @@ use brk_error::Result; use brk_types::{Cents, Height, StoredF64, Version}; use vecdb::{ CachedBoxedVec, ColumnId, Database, ImportableVec, PcoVec, PcoVecValue, ReadOnlyClone, - ReadableBoxedVec, ReadableCloneableVec, ReadableColumnarVec, + ReadOnlyColumnarVec, ReadableBoxedVec, ReadableCloneableVec, ReadableColumnarVec, }; use super::{AwakeVecs, CohortVecs, DormantVecs, Sources, Vecs}; @@ -49,7 +49,7 @@ impl Sources { } fn additive_source( - source: &vecdb::ReadOnlyColumnarVec, TermId>, + source: &ReadOnlyColumnarVec, TermId>, name: &str, version: Version, aggregate: UTXOAggregateId, diff --git a/crates/brk_computer/src/frameworks/cointime/prices/import.rs b/crates/brk_computer/src/frameworks/cointime/prices/import.rs index 06d1bde12..43a4d0043 100644 --- a/crates/brk_computer/src/frameworks/cointime/prices/import.rs +++ b/crates/brk_computer/src/frameworks/cointime/prices/import.rs @@ -1,6 +1,6 @@ use brk_error::Result; use brk_types::{Bitcoin, Cents, Height, Version}; -use vecdb::{CachedBoxedVec, Database}; +use vecdb::{CachedBoxedVec, Database, ReadableCloneableVec}; use super::Vecs; use crate::{ @@ -16,7 +16,7 @@ impl Vecs { indexes: &indexes::Vecs, spot_price: &CachedBoxedVec, all_chain: &AllChainCache, - cointime_cap: &(impl vecdb::ReadableCloneableVec + 'static), + cointime_cap: &(impl ReadableCloneableVec + 'static), ) -> Result { macro_rules! import { ($name:expr) => { diff --git a/crates/brk_computer/src/indexes/height.rs b/crates/brk_computer/src/indexes/height.rs index 14a74f8ee..fa31cb10a 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, Epoch, Halving, Height, Hour1, Hour4, Hour12, Minute10, Minute30, Month1, Month3, - Month6, StoredU64, Timestamp, Version, Week1, Year1, Year10, + Date, Day1, Day3, Epoch, Halving, Height, Hour1, Hour4, Hour12, Minute10, Minute30, Month1, + Month3, Month6, StoredU64, Timestamp, Version, Week1, Year1, Year10, }; use vecdb::{CachedBoxedVec, CachedReadableVec, CachedVec, LazyVec, ReadableBoxedVec, VecValue}; @@ -94,7 +94,7 @@ impl Vecs { } pub(crate) fn day1_from_timestamp(timestamp: Timestamp) -> Day1 { - Day1::try_from(brk_types::Date::from(timestamp)).unwrap() + Day1::try_from(Date::from(timestamp)).unwrap() } pub(crate) fn month1_from_timestamp(timestamp: Timestamp) -> Month1 { diff --git a/crates/brk_computer/src/indexes/tx_index.rs b/crates/brk_computer/src/indexes/tx_index.rs index 7a0058239..08834a5f8 100644 --- a/crates/brk_computer/src/indexes/tx_index.rs +++ b/crates/brk_computer/src/indexes/tx_index.rs @@ -1,6 +1,6 @@ use brk_indexer::Indexer; use brk_traversable::Traversable; -use brk_types::{TxIndex, Txid, Version}; +use brk_types::{TxInIndex, TxIndex, TxOutIndex, Txid, Version}; use vecdb::{LazyVec, ReadableCloneableVec}; use crate::internal::LazyIndexCountVec; @@ -8,8 +8,8 @@ use crate::internal::LazyIndexCountVec; #[derive(Clone, Traversable)] pub struct Vecs { pub identity: LazyVec, - pub input_count: LazyIndexCountVec, - pub output_count: LazyIndexCountVec, + pub input_count: LazyIndexCountVec, + pub output_count: LazyIndexCountVec, } impl Vecs { diff --git a/crates/brk_computer/src/internal/containers/distribution_stats.rs b/crates/brk_computer/src/internal/containers/distribution_stats.rs index b41856c77..45e69b7d6 100644 --- a/crates/brk_computer/src/internal/containers/distribution_stats.rs +++ b/crates/brk_computer/src/internal/containers/distribution_stats.rs @@ -1,3 +1,6 @@ +use std::result::Result as StdResult; + +use brk_error::Result; use brk_traversable::Traversable; #[derive(Clone, Traversable)] @@ -15,9 +18,7 @@ impl DistributionStats { pub const SUFFIXES: [&'static str; 7] = ["min", "max", "pct10", "pct25", "median", "pct75", "pct90"]; - pub fn try_from_fn( - mut f: impl FnMut(&str) -> std::result::Result, - ) -> std::result::Result { + pub fn try_from_fn(mut f: impl FnMut(&str) -> StdResult) -> StdResult { Ok(Self { min: f(Self::SUFFIXES[0])?, max: f(Self::SUFFIXES[1])?, @@ -30,10 +31,7 @@ impl DistributionStats { } /// Apply a fallible operation to each of the 7 fields. - pub fn try_for_each_mut( - &mut self, - mut f: impl FnMut(&mut A) -> brk_error::Result<()>, - ) -> brk_error::Result<()> { + pub fn try_for_each_mut(&mut self, mut f: impl FnMut(&mut A) -> Result<()>) -> Result<()> { f(&mut self.min)?; f(&mut self.max)?; f(&mut self.pct10)?; diff --git a/crates/brk_computer/src/internal/per_block/computed/distribution.rs b/crates/brk_computer/src/internal/per_block/computed/distribution.rs index a779fb8b3..54df08e9e 100644 --- a/crates/brk_computer/src/internal/per_block/computed/distribution.rs +++ b/crates/brk_computer/src/internal/per_block/computed/distribution.rs @@ -2,7 +2,7 @@ use std::collections::VecDeque; use brk_error::Result; use brk_traversable::Traversable; -use brk_types::{Height, VSize, get_percentile, get_weighted_percentile}; +use brk_types::{Height, StoredU64, VSize, get_percentile, get_weighted_percentile}; use derive_more::{Deref, DerefMut}; use schemars::JsonSchema; use vecdb::{ @@ -38,12 +38,12 @@ impl PerBlockDistribution { max_from: Height, source: &impl ReadableVec, first_indexes: &impl ReadableVec, - count_indexes: &impl ReadableVec, + count_indexes: &impl ReadableVec, exit: &Exit, skip_count: usize, ) -> Result<()> where - A: VecIndex + VecValue + brk_types::CheckedSub, + A: VecIndex + VecValue + CheckedSub, { let DistributionStats { min, @@ -95,8 +95,7 @@ impl PerBlockDistribution { let fi_len = first_indexes.len(); let first_indexes_batch: Vec = first_indexes.collect_range_at(start, fi_len); - let count_indexes_batch: Vec = - count_indexes.collect_range_at(start, fi_len); + let count_indexes_batch: Vec = count_indexes.collect_range_at(start, fi_len); let zero = T::from(0_usize); let mut values: Vec = Vec::new(); @@ -163,12 +162,12 @@ impl PerBlockDistribution { source: &impl ReadableVec, vsize_source: &impl ReadableVec, first_indexes: &impl ReadableVec, - count_indexes: &impl ReadableVec, + count_indexes: &impl ReadableVec, exit: &Exit, skip_count: usize, ) -> Result<()> where - A: VecIndex + VecValue + brk_types::CheckedSub, + A: VecIndex + VecValue + CheckedSub, { let DistributionStats { min, @@ -223,8 +222,7 @@ impl PerBlockDistribution { let fi_len = first_indexes.len(); let first_indexes_batch: Vec = first_indexes.collect_range_at(start, fi_len); - let count_indexes_batch: Vec = - count_indexes.collect_range_at(start, fi_len); + let count_indexes_batch: Vec = count_indexes.collect_range_at(start, fi_len); let zero = T::from(0_usize); let mut values: Vec = Vec::new(); @@ -294,13 +292,13 @@ impl PerBlockDistribution { max_from: Height, source: &(impl ReadableVec + Sized), first_indexes: &impl ReadableVec, - count_indexes: &impl ReadableVec, + count_indexes: &impl ReadableVec, n_blocks: usize, exit: &Exit, ) -> Result<()> where T: CheckedSub, - A: VecIndex + VecValue + brk_types::CheckedSub, + A: VecIndex + VecValue + CheckedSub, { let DistributionStats { min, @@ -341,8 +339,7 @@ impl PerBlockDistribution { let batch_start = start.saturating_sub(n_blocks - 1); let first_indexes_batch: Vec = first_indexes.collect_range_at(batch_start, fi_len); - let count_indexes_all: Vec = - count_indexes.collect_range_at(batch_start, fi_len); + let count_indexes_all: Vec = count_indexes.collect_range_at(batch_start, fi_len); let zero = T::from(0_usize); diff --git a/crates/brk_computer/src/internal/per_block/percent/base.rs b/crates/brk_computer/src/internal/per_block/percent/base.rs index 26cafacc3..840907981 100644 --- a/crates/brk_computer/src/internal/per_block/percent/base.rs +++ b/crates/brk_computer/src/internal/per_block/percent/base.rs @@ -3,7 +3,8 @@ use brk_traversable::Traversable; use brk_types::{Height, StoredF32, Version}; use derive_more::{Deref, DerefMut}; use vecdb::{ - BinaryTransform, Database, Exit, ReadableCloneableVec, ReadableVec, Rw, StorageMode, VecValue, + BinaryTransform, Database, EagerVec, Exit, PcoVec, ReadableCloneableVec, ReadableVec, Rw, + StorageMode, VecValue, }; use crate::{ @@ -73,7 +74,7 @@ impl PercentPerBlock { C: VecValue, A: VecValue, f64: From + From, - vecdb::EagerVec>: ComputeDrawdown, + EagerVec>: ComputeDrawdown, { self.ppm .height diff --git a/crates/brk_computer/src/internal/per_block/percent/lazy.rs b/crates/brk_computer/src/internal/per_block/percent/lazy.rs index 6b112b720..22824b145 100644 --- a/crates/brk_computer/src/internal/per_block/percent/lazy.rs +++ b/crates/brk_computer/src/internal/per_block/percent/lazy.rs @@ -1,5 +1,5 @@ use brk_traversable::Traversable; -use brk_types::{Height, StoredF32, Version}; +use brk_types::{Height, PartsPerMillionSigned64, StoredF32, Version}; use derive_more::{Deref, DerefMut}; use vecdb::{ BinaryTransform, CachedBoxedVec, ReadableCloneableVec, ReadableVec, TypedVec, UnaryTransform, @@ -186,7 +186,7 @@ impl LazyPercentPerBlock { } } -impl LazyPercentPerBlock { +impl LazyPercentPerBlock { pub(crate) fn from_lazy_cagr(name: &str, version: Version, years: u8, source: &Self) -> Self { match years { 2 => Self::from_lazy_percent::>(name, version, source), diff --git a/crates/brk_computer/src/internal/per_block/price.rs b/crates/brk_computer/src/internal/per_block/price.rs index 2a84adecc..899a85b0c 100644 --- a/crates/brk_computer/src/internal/per_block/price.rs +++ b/crates/brk_computer/src/internal/per_block/price.rs @@ -109,10 +109,7 @@ impl Price> { indexes: &indexes::Vecs, ) -> Self where - V: TypedVec - + ReadableVec - + Clone - + 'static, + V: TypedVec + ReadableVec + Clone + 'static, { let cents = LazyPerBlock::from_height_source::, _>( &format!("{name}_cents"), @@ -136,10 +133,7 @@ impl Price> { indexes: &indexes::Vecs, ) -> Self where - V: TypedVec - + ReadableVec - + Clone - + 'static, + V: TypedVec + ReadableVec + Clone + 'static, { let cents = LazyPerBlock::from_uncached_height_source::, _>( &format!("{name}_cents"), diff --git a/crates/brk_computer/src/internal/per_block/rolling/windows.rs b/crates/brk_computer/src/internal/per_block/rolling/windows.rs deleted file mode 100644 index 41f48ee43..000000000 --- a/crates/brk_computer/src/internal/per_block/rolling/windows.rs +++ /dev/null @@ -1,126 +0,0 @@ -//! RollingWindows - newtype on Windows with PerBlock per window duration. -//! -//! Each of the 4 windows (24h, 1w, 1m, 1y) contains a height-level vec plus -//! all 17 LazyAggVec index views. - -use brk_error::Result; - -use brk_traversable::Traversable; -use brk_types::Version; -use derive_more::{Deref, DerefMut}; -use schemars::JsonSchema; -use vecdb::{Database, Rw, StorageMode}; - -use crate::{ - blocks::lookback::LazyWindowStartVec, - indexes, - internal::{ - ColumnarPerBlock, ComputedVecValue, LazyColumnPerBlock, NumericValue, PerBlock, - WindowFrom1wId, WindowId, Windows, WindowsFrom1w, - }, -}; - -pub use crate::blocks::lookback::CachedWindowStartVec; - -/// Rolling window start heights — the 4 height-ago vecs (24h, 1w, 1m, 1y). -#[derive(Deref, DerefMut)] -pub struct WindowStarts<'a>(pub Windows<&'a LazyWindowStartVec>); - -/// 4 rolling window vecs (24h, 1w, 1m, 1y), each with height data + all 17 index views. -#[derive(Deref, DerefMut, Traversable)] -#[traversable(transparent)] -pub struct RollingWindows(pub Windows>) -where - T: ComputedVecValue + PartialOrd + JsonSchema; - -impl RollingWindows -where - T: NumericValue + JsonSchema, -{ - pub(crate) fn forced_import( - db: &Database, - name: &str, - version: Version, - indexes: &indexes::Vecs, - ) -> Result { - Ok(Self(Windows::try_from_fn(|suffix| { - PerBlock::forced_import(db, &format!("{name}_{suffix}"), version, indexes) - })?)) - } -} - -/// Four named rolling-window views backed by one columnar source. -#[derive(Deref, DerefMut, Traversable)] -#[traversable(transparent)] -pub struct ColumnarRollingWindows( - pub ColumnarPerBlock>, M>, -) -where - T: NumericValue + JsonSchema; - -impl ColumnarRollingWindows -where - T: NumericValue + JsonSchema, -{ - pub(crate) fn forced_import( - db: &Database, - name: &str, - version: Version, - indexes: &indexes::Vecs, - ) -> Result { - Ok(Self(ColumnarPerBlock::forced_import( - db, - name, - version, - |source| { - WindowId::series(|window| { - LazyColumnPerBlock::new( - &format!("{name}_{}", window.suffix()), - version, - source, - window, - indexes, - ) - }) - }, - )?)) - } -} - -/// The 1w, 1m, and 1y views backed by one columnar source. -#[derive(Deref, DerefMut, Traversable)] -#[traversable(transparent)] -pub struct ColumnarRollingWindowsFrom1w( - pub ColumnarPerBlock>, M>, -) -where - T: NumericValue + JsonSchema; - -impl ColumnarRollingWindowsFrom1w -where - T: NumericValue + JsonSchema, -{ - pub(crate) fn forced_import( - db: &Database, - name: &str, - version: Version, - indexes: &indexes::Vecs, - ) -> Result { - Ok(Self(ColumnarPerBlock::forced_import( - db, - name, - version, - |source| { - WindowFrom1wId::series(|window| { - LazyColumnPerBlock::new( - &format!("{name}_{}", window.suffix()), - version, - source, - window, - indexes, - ) - }) - }, - )?)) - } -} diff --git a/crates/brk_computer/src/internal/per_block/rolling/windows/columnar.rs b/crates/brk_computer/src/internal/per_block/rolling/windows/columnar.rs new file mode 100644 index 000000000..5492b346b --- /dev/null +++ b/crates/brk_computer/src/internal/per_block/rolling/windows/columnar.rs @@ -0,0 +1,48 @@ +use brk_error::Result; +use brk_traversable::Traversable; +use brk_types::Version; +use derive_more::{Deref, DerefMut}; +use schemars::JsonSchema; +use vecdb::{Database, Rw, StorageMode}; + +use crate::{ + indexes, + internal::{ColumnarPerBlock, LazyColumnPerBlock, NumericValue, WindowId, Windows}, +}; + +#[derive(Deref, DerefMut, Traversable)] +#[traversable(transparent)] +pub struct ColumnarRollingWindows( + pub ColumnarPerBlock>, M>, +) +where + T: NumericValue + JsonSchema; + +impl ColumnarRollingWindows +where + T: NumericValue + JsonSchema, +{ + pub(crate) fn forced_import( + db: &Database, + name: &str, + version: Version, + indexes: &indexes::Vecs, + ) -> Result { + Ok(Self(ColumnarPerBlock::forced_import( + db, + name, + version, + |source| { + WindowId::series(|window| { + LazyColumnPerBlock::new( + &format!("{name}_{}", window.suffix()), + version, + source, + window, + indexes, + ) + }) + }, + )?)) + } +} diff --git a/crates/brk_computer/src/internal/per_block/rolling/windows/columnar_from_1w.rs b/crates/brk_computer/src/internal/per_block/rolling/windows/columnar_from_1w.rs new file mode 100644 index 000000000..1444fcd97 --- /dev/null +++ b/crates/brk_computer/src/internal/per_block/rolling/windows/columnar_from_1w.rs @@ -0,0 +1,48 @@ +use brk_error::Result; +use brk_traversable::Traversable; +use brk_types::Version; +use derive_more::{Deref, DerefMut}; +use schemars::JsonSchema; +use vecdb::{Database, Rw, StorageMode}; + +use crate::{ + indexes, + internal::{ColumnarPerBlock, LazyColumnPerBlock, NumericValue, WindowFrom1wId, WindowsFrom1w}, +}; + +#[derive(Deref, DerefMut, Traversable)] +#[traversable(transparent)] +pub struct ColumnarRollingWindowsFrom1w( + pub ColumnarPerBlock>, M>, +) +where + T: NumericValue + JsonSchema; + +impl ColumnarRollingWindowsFrom1w +where + T: NumericValue + JsonSchema, +{ + pub(crate) fn forced_import( + db: &Database, + name: &str, + version: Version, + indexes: &indexes::Vecs, + ) -> Result { + Ok(Self(ColumnarPerBlock::forced_import( + db, + name, + version, + |source| { + WindowFrom1wId::series(|window| { + LazyColumnPerBlock::new( + &format!("{name}_{}", window.suffix()), + version, + source, + window, + indexes, + ) + }) + }, + )?)) + } +} diff --git a/crates/brk_computer/src/internal/per_block/rolling/windows/mod.rs b/crates/brk_computer/src/internal/per_block/rolling/windows/mod.rs new file mode 100644 index 000000000..54be740e8 --- /dev/null +++ b/crates/brk_computer/src/internal/per_block/rolling/windows/mod.rs @@ -0,0 +1,10 @@ +mod columnar; +mod columnar_from_1w; +mod rolling; +mod starts; + +pub use crate::blocks::lookback::CachedWindowStartVec; +pub use columnar::ColumnarRollingWindows; +pub use columnar_from_1w::ColumnarRollingWindowsFrom1w; +pub use rolling::RollingWindows; +pub use starts::WindowStarts; diff --git a/crates/brk_computer/src/internal/per_block/rolling/windows/rolling.rs b/crates/brk_computer/src/internal/per_block/rolling/windows/rolling.rs new file mode 100644 index 000000000..4fc327fa4 --- /dev/null +++ b/crates/brk_computer/src/internal/per_block/rolling/windows/rolling.rs @@ -0,0 +1,33 @@ +use brk_error::Result; +use brk_traversable::Traversable; +use brk_types::Version; +use derive_more::{Deref, DerefMut}; +use schemars::JsonSchema; +use vecdb::{Database, Rw, StorageMode}; + +use crate::{ + indexes, + internal::{ComputedVecValue, NumericValue, PerBlock, Windows}, +}; + +#[derive(Deref, DerefMut, Traversable)] +#[traversable(transparent)] +pub struct RollingWindows(pub Windows>) +where + T: ComputedVecValue + PartialOrd + JsonSchema; + +impl RollingWindows +where + T: NumericValue + JsonSchema, +{ + pub(crate) fn forced_import( + db: &Database, + name: &str, + version: Version, + indexes: &indexes::Vecs, + ) -> Result { + Ok(Self(Windows::try_from_fn(|suffix| { + PerBlock::forced_import(db, &format!("{name}_{suffix}"), version, indexes) + })?)) + } +} diff --git a/crates/brk_computer/src/internal/per_block/rolling/windows/starts.rs b/crates/brk_computer/src/internal/per_block/rolling/windows/starts.rs new file mode 100644 index 000000000..60e0d9451 --- /dev/null +++ b/crates/brk_computer/src/internal/per_block/rolling/windows/starts.rs @@ -0,0 +1,6 @@ +use derive_more::{Deref, DerefMut}; + +use crate::{blocks::lookback::LazyWindowStartVec, internal::Windows}; + +#[derive(Deref, DerefMut)] +pub struct WindowStarts<'a>(pub Windows<&'a LazyWindowStartVec>); diff --git a/crates/brk_computer/src/internal/per_block/value/columnar_cumulative_rolling.rs b/crates/brk_computer/src/internal/per_block/value/columnar_cumulative_rolling.rs index 0ed370433..3826b22fc 100644 --- a/crates/brk_computer/src/internal/per_block/value/columnar_cumulative_rolling.rs +++ b/crates/brk_computer/src/internal/per_block/value/columnar_cumulative_rolling.rs @@ -88,18 +88,18 @@ where ReadableBoxedVec, ReadableBoxedVec, ) { - let columns: Vec<_> = columns.into_iter().collect(); + let columns: Box<[_]> = columns.into_iter().collect(); let sats = Self::typed_source::( sats, &format!("{name}_sats"), version, - columns.iter().copied(), + &columns, ); let cents = Self::typed_source::( cents, &format!("{name}_cents"), version, - columns, + &columns, ); (sats, cents) } @@ -108,20 +108,19 @@ where source: &ReadOnlyColumnarVec, C>, name: &str, version: Version, - columns: impl IntoIterator, + columns: &[C], ) -> ReadableBoxedVec where F: UnaryTransform, T: VecValue, { - let columns: Vec<_> = columns.into_iter().collect(); let raw = if columns.len() == 1 { source .column(name, version, columns[0]) .read_only_boxed_clone() } else { source - .sum_columns(name, version, columns) + .sum_columns(name, version, columns.iter().copied()) .read_only_boxed_clone() }; LazyVec::transformed::(name, version, raw).read_only_boxed_clone() diff --git a/crates/brk_computer/src/internal/transform/currency.rs b/crates/brk_computer/src/internal/transform/currency.rs deleted file mode 100644 index fcbf29235..000000000 --- a/crates/brk_computer/src/internal/transform/currency.rs +++ /dev/null @@ -1,154 +0,0 @@ -use brk_types::{ - Bitcoin, Cents, CentsSigned, Dollars, Sats, SatsFract, SatsSigned, StoredF32, StoredU64, -}; -use vecdb::{BinaryTransform, UnaryTransform, unlikely}; - -pub struct SatsToBitcoin; - -impl UnaryTransform for SatsToBitcoin { - #[inline(always)] - fn apply(sats: Sats) -> Bitcoin { - Bitcoin::from(sats) - } -} - -pub struct StoredU64ToSats; - -impl UnaryTransform for StoredU64ToSats { - #[inline(always)] - fn apply(value: StoredU64) -> Sats { - Sats::new(value.into()) - } -} - -pub struct StoredU64ToCents; - -impl UnaryTransform for StoredU64ToCents { - #[inline(always)] - fn apply(value: StoredU64) -> Cents { - Cents::new(value.into()) - } -} - -pub struct SatsSignedToBitcoin; - -impl UnaryTransform for SatsSignedToBitcoin { - #[inline(always)] - fn apply(sats: SatsSigned) -> Bitcoin { - Bitcoin::from(sats) - } -} - -pub struct AvgSatsToBtc; - -impl UnaryTransform for AvgSatsToBtc { - #[inline(always)] - fn apply(sats: StoredF32) -> Bitcoin { - Bitcoin::from(f64::from(sats) / Sats::ONE_BTC_U128 as f64) - } -} - -pub struct AvgCentsToUsd; - -impl UnaryTransform for AvgCentsToUsd { - #[inline(always)] - fn apply(cents: StoredF32) -> Dollars { - Dollars::from(f64::from(cents) / 100.0) - } -} - -pub struct SatsToCents; - -impl BinaryTransform for SatsToCents { - #[inline(always)] - fn apply(sats: Sats, price_cents: Cents) -> Cents { - if unlikely(price_cents.is_nan()) { - Cents::NAN - } else { - Cents::from(sats.as_u128() * price_cents.as_u128() / Sats::ONE_BTC_U128) - } - } -} - -pub struct CentsUnsignedToDollars; - -impl UnaryTransform for CentsUnsignedToDollars { - #[inline(always)] - fn apply(cents: Cents) -> Dollars { - cents.into() - } -} - -pub struct NegCentsUnsignedToDollars; - -impl UnaryTransform for NegCentsUnsignedToDollars { - #[inline(always)] - fn apply(cents: Cents) -> Dollars { - -Dollars::from(cents) - } -} - -pub struct CentsSignedToDollars; - -impl UnaryTransform for CentsSignedToDollars { - #[inline(always)] - fn apply(cents: CentsSigned) -> Dollars { - cents.into() - } -} - -pub struct CentsUnsignedToSats; - -impl UnaryTransform for CentsUnsignedToSats { - #[inline(always)] - fn apply(cents: Cents) -> Sats { - if unlikely(cents.is_nan()) { - panic!("Cents::NAN cannot be converted to whole Sats"); - } - let dollars = Dollars::from(cents); - if dollars == Dollars::ZERO { - Sats::ZERO - } else { - Sats::ONE_BTC / dollars - } - } -} - -pub struct CentsTimesTenths; - -impl UnaryTransform for CentsTimesTenths { - #[inline(always)] - fn apply(c: Cents) -> Cents { - if unlikely(c.is_nan()) { - Cents::NAN - } else { - Cents::from(c.as_u128() * V as u128 / 10) - } - } -} - -pub struct DollarsToSatsFract; - -impl UnaryTransform for DollarsToSatsFract { - #[inline(always)] - fn apply(usd: Dollars) -> SatsFract { - SatsFract::ONE_BTC / usd - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn cents_outputs_propagate_nan() { - assert!(SatsToCents::apply(Sats::ONE_BTC, Cents::NAN).is_nan()); - assert!(CentsTimesTenths::<24>::apply(Cents::NAN).is_nan()); - } - - #[test] - #[should_panic(expected = "Cents::NAN cannot be converted to whole Sats")] - fn whole_sats_reject_nan() { - CentsUnsignedToSats::apply(Cents::NAN); - } -} diff --git a/crates/brk_computer/src/internal/transform/currency/avg_cents_to_usd.rs b/crates/brk_computer/src/internal/transform/currency/avg_cents_to_usd.rs new file mode 100644 index 000000000..a0baf70f9 --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/avg_cents_to_usd.rs @@ -0,0 +1,11 @@ +use brk_types::{Dollars, StoredF32}; +use vecdb::UnaryTransform; + +pub struct AvgCentsToUsd; + +impl UnaryTransform for AvgCentsToUsd { + #[inline(always)] + fn apply(cents: StoredF32) -> Dollars { + Dollars::from(f64::from(cents) / 100.0) + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/avg_sats_to_btc.rs b/crates/brk_computer/src/internal/transform/currency/avg_sats_to_btc.rs new file mode 100644 index 000000000..6c194790d --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/avg_sats_to_btc.rs @@ -0,0 +1,11 @@ +use brk_types::{Bitcoin, Sats, StoredF32}; +use vecdb::UnaryTransform; + +pub struct AvgSatsToBtc; + +impl UnaryTransform for AvgSatsToBtc { + #[inline(always)] + fn apply(sats: StoredF32) -> Bitcoin { + Bitcoin::from(f64::from(sats) / Sats::ONE_BTC_U128 as f64) + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/cents_signed_to_dollars.rs b/crates/brk_computer/src/internal/transform/currency/cents_signed_to_dollars.rs new file mode 100644 index 000000000..a9ac42619 --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/cents_signed_to_dollars.rs @@ -0,0 +1,11 @@ +use brk_types::{CentsSigned, Dollars}; +use vecdb::UnaryTransform; + +pub struct CentsSignedToDollars; + +impl UnaryTransform for CentsSignedToDollars { + #[inline(always)] + fn apply(cents: CentsSigned) -> Dollars { + cents.into() + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/cents_times_tenths.rs b/crates/brk_computer/src/internal/transform/currency/cents_times_tenths.rs new file mode 100644 index 000000000..b8d35130f --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/cents_times_tenths.rs @@ -0,0 +1,15 @@ +use brk_types::Cents; +use vecdb::{UnaryTransform, unlikely}; + +pub struct CentsTimesTenths; + +impl UnaryTransform for CentsTimesTenths { + #[inline(always)] + fn apply(cents: Cents) -> Cents { + if unlikely(cents.is_nan()) { + Cents::NAN + } else { + Cents::from(cents.as_u128() * V as u128 / 10) + } + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/cents_unsigned_to_dollars.rs b/crates/brk_computer/src/internal/transform/currency/cents_unsigned_to_dollars.rs new file mode 100644 index 000000000..d270f303f --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/cents_unsigned_to_dollars.rs @@ -0,0 +1,11 @@ +use brk_types::{Cents, Dollars}; +use vecdb::UnaryTransform; + +pub struct CentsUnsignedToDollars; + +impl UnaryTransform for CentsUnsignedToDollars { + #[inline(always)] + fn apply(cents: Cents) -> Dollars { + cents.into() + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/cents_unsigned_to_sats.rs b/crates/brk_computer/src/internal/transform/currency/cents_unsigned_to_sats.rs new file mode 100644 index 000000000..926f0fc53 --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/cents_unsigned_to_sats.rs @@ -0,0 +1,19 @@ +use brk_types::{Cents, Dollars, Sats}; +use vecdb::{UnaryTransform, unlikely}; + +pub struct CentsUnsignedToSats; + +impl UnaryTransform for CentsUnsignedToSats { + #[inline(always)] + fn apply(cents: Cents) -> Sats { + if unlikely(cents.is_nan()) { + panic!("Cents::NAN cannot be converted to whole Sats"); + } + let dollars = Dollars::from(cents); + if dollars == Dollars::ZERO { + Sats::ZERO + } else { + Sats::ONE_BTC / dollars + } + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/dollars_to_sats_fract.rs b/crates/brk_computer/src/internal/transform/currency/dollars_to_sats_fract.rs new file mode 100644 index 000000000..cc9d3433c --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/dollars_to_sats_fract.rs @@ -0,0 +1,11 @@ +use brk_types::{Dollars, SatsFract}; +use vecdb::UnaryTransform; + +pub struct DollarsToSatsFract; + +impl UnaryTransform for DollarsToSatsFract { + #[inline(always)] + fn apply(dollars: Dollars) -> SatsFract { + SatsFract::ONE_BTC / dollars + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/mod.rs b/crates/brk_computer/src/internal/transform/currency/mod.rs new file mode 100644 index 000000000..fb8c58400 --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/mod.rs @@ -0,0 +1,47 @@ +mod avg_cents_to_usd; +mod avg_sats_to_btc; +mod cents_signed_to_dollars; +mod cents_times_tenths; +mod cents_unsigned_to_dollars; +mod cents_unsigned_to_sats; +mod dollars_to_sats_fract; +mod neg_cents_unsigned_to_dollars; +mod sats_signed_to_bitcoin; +mod sats_to_bitcoin; +mod sats_to_cents; +mod stored_u64_to_cents; +mod stored_u64_to_sats; + +pub use avg_cents_to_usd::AvgCentsToUsd; +pub use avg_sats_to_btc::AvgSatsToBtc; +pub use cents_signed_to_dollars::CentsSignedToDollars; +pub use cents_times_tenths::CentsTimesTenths; +pub use cents_unsigned_to_dollars::CentsUnsignedToDollars; +pub use cents_unsigned_to_sats::CentsUnsignedToSats; +pub use dollars_to_sats_fract::DollarsToSatsFract; +pub use neg_cents_unsigned_to_dollars::NegCentsUnsignedToDollars; +pub use sats_signed_to_bitcoin::SatsSignedToBitcoin; +pub use sats_to_bitcoin::SatsToBitcoin; +pub use sats_to_cents::SatsToCents; +pub use stored_u64_to_cents::StoredU64ToCents; +pub use stored_u64_to_sats::StoredU64ToSats; + +#[cfg(test)] +mod tests { + use brk_types::{Cents, Sats}; + use vecdb::{BinaryTransform, UnaryTransform}; + + use super::{CentsTimesTenths, CentsUnsignedToSats, SatsToCents}; + + #[test] + fn cents_outputs_propagate_nan() { + assert!(SatsToCents::apply(Sats::ONE_BTC, Cents::NAN).is_nan()); + assert!(CentsTimesTenths::<24>::apply(Cents::NAN).is_nan()); + } + + #[test] + #[should_panic(expected = "Cents::NAN cannot be converted to whole Sats")] + fn whole_sats_reject_nan() { + CentsUnsignedToSats::apply(Cents::NAN); + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/neg_cents_unsigned_to_dollars.rs b/crates/brk_computer/src/internal/transform/currency/neg_cents_unsigned_to_dollars.rs new file mode 100644 index 000000000..6e2bdf4ad --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/neg_cents_unsigned_to_dollars.rs @@ -0,0 +1,11 @@ +use brk_types::{Cents, Dollars}; +use vecdb::UnaryTransform; + +pub struct NegCentsUnsignedToDollars; + +impl UnaryTransform for NegCentsUnsignedToDollars { + #[inline(always)] + fn apply(cents: Cents) -> Dollars { + -Dollars::from(cents) + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/sats_signed_to_bitcoin.rs b/crates/brk_computer/src/internal/transform/currency/sats_signed_to_bitcoin.rs new file mode 100644 index 000000000..dfb8537ec --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/sats_signed_to_bitcoin.rs @@ -0,0 +1,11 @@ +use brk_types::{Bitcoin, SatsSigned}; +use vecdb::UnaryTransform; + +pub struct SatsSignedToBitcoin; + +impl UnaryTransform for SatsSignedToBitcoin { + #[inline(always)] + fn apply(sats: SatsSigned) -> Bitcoin { + Bitcoin::from(sats) + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/sats_to_bitcoin.rs b/crates/brk_computer/src/internal/transform/currency/sats_to_bitcoin.rs new file mode 100644 index 000000000..5373f2327 --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/sats_to_bitcoin.rs @@ -0,0 +1,11 @@ +use brk_types::{Bitcoin, Sats}; +use vecdb::UnaryTransform; + +pub struct SatsToBitcoin; + +impl UnaryTransform for SatsToBitcoin { + #[inline(always)] + fn apply(sats: Sats) -> Bitcoin { + Bitcoin::from(sats) + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/sats_to_cents.rs b/crates/brk_computer/src/internal/transform/currency/sats_to_cents.rs new file mode 100644 index 000000000..748f93d70 --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/sats_to_cents.rs @@ -0,0 +1,15 @@ +use brk_types::{Cents, Sats}; +use vecdb::{BinaryTransform, unlikely}; + +pub struct SatsToCents; + +impl BinaryTransform for SatsToCents { + #[inline(always)] + fn apply(sats: Sats, price_cents: Cents) -> Cents { + if unlikely(price_cents.is_nan()) { + Cents::NAN + } else { + Cents::from(sats.as_u128() * price_cents.as_u128() / Sats::ONE_BTC_U128) + } + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/stored_u64_to_cents.rs b/crates/brk_computer/src/internal/transform/currency/stored_u64_to_cents.rs new file mode 100644 index 000000000..4efaeb770 --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/stored_u64_to_cents.rs @@ -0,0 +1,11 @@ +use brk_types::{Cents, StoredU64}; +use vecdb::UnaryTransform; + +pub struct StoredU64ToCents; + +impl UnaryTransform for StoredU64ToCents { + #[inline(always)] + fn apply(value: StoredU64) -> Cents { + Cents::new(value.into()) + } +} diff --git a/crates/brk_computer/src/internal/transform/currency/stored_u64_to_sats.rs b/crates/brk_computer/src/internal/transform/currency/stored_u64_to_sats.rs new file mode 100644 index 000000000..38501189c --- /dev/null +++ b/crates/brk_computer/src/internal/transform/currency/stored_u64_to_sats.rs @@ -0,0 +1,11 @@ +use brk_types::{Sats, StoredU64}; +use vecdb::UnaryTransform; + +pub struct StoredU64ToSats; + +impl UnaryTransform for StoredU64ToSats { + #[inline(always)] + fn apply(value: StoredU64) -> Sats { + Sats::new(value.into()) + } +} diff --git a/crates/brk_computer/src/models/bedrock/calibration.rs b/crates/brk_computer/src/models/bedrock/calibration.rs new file mode 100644 index 000000000..002eb3c18 --- /dev/null +++ b/crates/brk_computer/src/models/bedrock/calibration.rs @@ -0,0 +1,168 @@ +use std::cmp::Ordering; + +use brk_types::Day1; +use vecdb::{ReadableVec, VecValue}; + +use super::{ModeId, Modes, Percentiles, WeightedModeId, WeightedModes}; + +const MINIMUM_DAYS: usize = 365; +const PERCENTILES: Percentiles = Percentiles { + pct95: 0.95, + pct98: 0.98, + pct99: 0.99, + pct99_5: 0.995, + pct99_9: 0.999, +}; + +pub(super) type Thresholds = Modes>>; + +pub(super) struct Calibration { + histories: Modes>, +} + +impl Calibration { + pub(super) fn from_sources( + raw: &impl ReadableVec>, + weighted: &WeightedModes<&dyn ReadableVec>>, + end: usize, + ) -> Self + where + T: VecValue, + U: VecValue, + f64: From + From, + { + let mut histories = Modes::from_fn(|_| Vec::new()); + histories.raw = Self::history(raw, end); + for id in WeightedModeId::ALL { + let source = weighted.select(id); + *histories.select_mut(id.mode()) = Self::history(*source, end); + } + Self { histories } + } + + pub(super) fn loss_shares( + raw: &impl ReadableVec>, + weighted: &WeightedModes<&dyn ReadableVec>>, + day: Day1, + ) -> Modes> + where + T: VecValue, + U: VecValue, + f64: From + From, + { + let mut shares = Modes::from_fn(|_| None); + shares.raw = Self::loss_share(raw, day); + for id in WeightedModeId::ALL { + let source = weighted.select(id); + *shares.select_mut(id.mode()) = Self::loss_share(*source, day); + } + shares + } + + pub(super) fn thresholds(&self, current: &Modes>) -> Thresholds { + Modes::from_fn(|mode| { + let history = self.histories.select(mode); + (current.select(mode).is_some() && history.len() >= MINIMUM_DAYS).then(|| { + Percentiles::from_fn(|percentile| { + Self::quantile(history, *percentile.select(&PERCENTILES)) + .expect("non-empty history") + }) + }) + }) + } + + pub(super) fn observe(&mut self, shares: Modes>) { + for mode in ModeId::ALL { + let history = self.histories.select_mut(mode); + if let Some(share) = *shares.select(mode) { + Self::insert_sorted(history, share.clamp(0.0, 1.0)); + } + } + } + + fn history(source: &(impl ReadableVec> + ?Sized), end: usize) -> Vec + where + T: VecValue, + f64: From, + { + let mut history = Vec::with_capacity(end); + source.for_each_range_dyn_at(0, end, &mut |value| { + if let Some(value) = value.map(f64::from).filter(|value| value.is_finite()) { + history.push(value); + } + }); + history.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap_or(Ordering::Equal)); + history + } + + fn loss_share( + source: &(impl ReadableVec> + ?Sized), + day: Day1, + ) -> Option + where + T: VecValue, + f64: From, + { + source + .collect_one(day) + .flatten() + .map(f64::from) + .filter(|value| value.is_finite()) + } + + fn quantile(sorted: &[f64], percentile: f64) -> Option { + if sorted.is_empty() { + return None; + } + let position = percentile.clamp(0.0, 1.0) * (sorted.len() - 1) as f64; + let lower = position.floor() as usize; + let upper = position.ceil() as usize; + let fraction = position - lower as f64; + Some(sorted[lower] * (1.0 - fraction) + sorted[upper] * fraction) + } + + fn insert_sorted(values: &mut Vec, value: f64) { + let index = values + .binary_search_by(|candidate| candidate.partial_cmp(&value).unwrap_or(Ordering::Less)) + .unwrap_or_else(|index| index); + values.insert(index, value); + } +} + +#[cfg(test)] +mod tests { + use super::{Calibration, MINIMUM_DAYS}; + use crate::models::bedrock::Modes; + + #[test] + fn quantile_linearly_interpolates() { + assert_eq!(Calibration::quantile(&[0.0, 1.0], 0.95), Some(0.95)); + assert_eq!(Calibration::quantile(&[], 0.95), None); + } + + #[test] + fn missing_share_does_not_update_history() { + let mut calibration = Calibration { + histories: Modes::from_fn(|_| Vec::new()), + }; + let shares = Modes::from_fn(|_| None); + assert!(calibration.thresholds(&shares).iter().all(Option::is_none)); + calibration.observe(shares); + assert!(calibration.histories.iter().all(Vec::is_empty)); + } + + #[test] + fn a_year_of_history_enables_thresholds() { + let calibration = Calibration { + histories: Modes::from_fn(|_| vec![0.5; MINIMUM_DAYS]), + }; + let shares = Modes::from_fn(|_| Some(0.5)); + let thresholds = calibration.thresholds(&shares); + assert!(thresholds.iter().all(|values| values.is_some())); + assert!( + thresholds + .iter() + .all(|values| values.as_ref().unwrap().pct95 == 0.5) + ); + } +} diff --git a/crates/brk_computer/src/models/bedrock/compute.rs b/crates/brk_computer/src/models/bedrock/compute.rs index ec7ec9cd2..0b1bef963 100644 --- a/crates/brk_computer/src/models/bedrock/compute.rs +++ b/crates/brk_computer/src/models/bedrock/compute.rs @@ -1,188 +1,25 @@ -use std::{ - cmp::Ordering, - collections::BTreeMap, - fs, - io::{Error, ErrorKind}, - path::Path, -}; - -use brk_cohort::{ - AgeRange, AgeRangeId, ByTerm, CohortContext, TERM_FILTERS, TERM_NAMES, UTXO_ALL_NAME, -}; +use brk_cohort::{AgeRange, AgeRangeId, UTXO_ALL_NAME}; use brk_error::Result; use brk_indexer::Indexer; -use brk_types::{Cents, CentsCompact, Date, Day1, Sats, StoredF64, UrpdRaw, UrpdWeight, Version}; +use brk_types::{Day1, Sats, StoredF64, UrpdRaw, Version}; use vecdb::{AnyStoredVec, AnyVec, ColumnId, Exit, ReadableVec, VecValue}; use super::{ - vecs::{ - LEVEL_IDS, Levels, LossPercentileId, ModeId, ModeVecs, Modes, Percentiles, PriceBandId, - PriceBands, Vecs, WeightedModeId, WeightedModes, - }, - weighted_urpd_name, + Calibration, DayResult, DayUrpds, ModeId, ModeResult, ModeVecs, ModeWeights, Vecs, + WeightedModeId, WeightedModes, }; use crate::{ distribution::{self, UTXOStates}, frameworks::{ self, - coinflow::{AgeBand, HORIZON_COUNT, HorizonId, age_bounds_days, horizon_mobility}, + coinflow::{AgeBand, HORIZON_COUNT, HorizonId}, }, indexes, internal::db_utils::validate_any_computed_version_or_reset, }; -const MIN_CALIBRATION_DAYS: usize = 365; const WRITE_INTERVAL_DAYS: usize = 100; -const PERCENTILES: Percentiles = Percentiles { - pct95: 0.95, - pct98: 0.98, - pct99: 0.99, - pct99_5: 0.995, - pct99_9: 0.999, -}; -const LEVEL_PERCENTILES: Levels = Levels { - pct10: 0.1, - pct20: 0.2, - pct30: 0.3, - pct40: 0.4, - pct50: 0.5, - pct60: 0.6, - pct70: 0.7, - pct80: 0.8, - pct90: 0.9, -}; const WEIGHTED_URPD_VERSION: Version = Version::TWO; -const WEIGHTED_URPD_VERSION_FILE: &str = "bedrock_urpd.version"; - -type Thresholds = Modes>>; -type ModeWeights = Modes>>; -type WeightedUrpdNames = AggregateCohorts>; - -#[derive(Default)] -struct StoredWeights { - cointime: T, - coinflow: T, -} - -impl StoredWeights { - fn from_fn(mut create: impl FnMut(UrpdWeight) -> T) -> Self { - Self { - cointime: create(UrpdWeight::Cointime), - coinflow: create(UrpdWeight::Coinflow), - } - } - - fn iter(&self) -> impl Iterator { - [&self.cointime, &self.coinflow].into_iter() - } -} - -struct AggregateCohorts { - all: T, - term: ByTerm, -} - -struct WeightedMasses { - all: WeightedModes, - term: ByTerm>, -} - -impl Default for WeightedMasses { - fn default() -> Self { - Self { - all: WeightedModes::from_fn(|_| 0.0), - term: ByTerm::default(), - } - } -} - -type WeightedUrpd = BTreeMap; - -struct DayUrpds { - raw: UrpdRaw, - all: WeightedModes, - term: ByTerm>, -} - -impl DayUrpds { - fn mode(&self, mode: ModeId) -> &UrpdRaw { - match mode { - ModeId::Raw => &self.raw, - _ => self.all.select(mode.weighted().expect("weighted mode")), - } - } -} - -struct ModeResult { - loss_threshold: Percentiles, - prices: PriceBands, -} - -struct DayResult { - by_mode: Modes, -} - -impl DayResult { - fn from_thresholds(thresholds: &Thresholds) -> Self { - Self { - by_mode: Modes::from_fn(|mode| ModeResult { - loss_threshold: match thresholds.select(mode) { - Some(values) => Percentiles::from_fn(|percentile| { - StoredF64::from(*percentile.select(values)) - }), - None => Percentiles::from_fn(|_| StoredF64::NAN), - }, - prices: PriceBands::from_fn(|_| Cents::NAN), - }), - } - } -} - -struct Calibration { - histories: Modes>, -} - -impl Calibration { - fn from_sources( - raw: &impl ReadableVec>, - weighted: &WeightedModes<&dyn ReadableVec>>, - end: usize, - ) -> Self - where - T: VecValue, - U: VecValue, - f64: From + From, - { - let mut histories = Modes::from_fn(|_| Vec::new()); - histories.raw = collect_loss_history(raw, end); - for id in WeightedModeId::ALL { - let source = weighted.select(id); - *histories.select_mut(id.mode()) = collect_loss_history(*source, end); - } - Self { histories } - } - - fn thresholds(&self, current: &Modes>) -> Thresholds { - Modes::from_fn(|mode| { - let history = self.histories.select(mode); - (current.select(mode).is_some() && history.len() >= MIN_CALIBRATION_DAYS).then(|| { - Percentiles::from_fn(|percentile| { - quantile(history, *percentile.select(&PERCENTILES)).expect("non-empty history") - }) - }) - }) - } - - fn observe(&mut self, shares: Modes>) { - for mode in ModeId::ALL { - let history = self.histories.select_mut(mode); - let share = *shares.select(mode); - if let Some(share) = share { - insert_sorted(history, share.clamp(0.0, 1.0)); - } - } - } -} impl ModeVecs { fn stored_vecs_mut(&mut self) -> [&mut dyn AnyStoredVec; 2] { @@ -190,11 +27,12 @@ impl ModeVecs { } fn push(&mut self, result: &ModeResult) { - self.loss_threshold.push(LossPercentileId::from_fn(|id| { - *id.select(&result.loss_threshold) - })); + self.loss_threshold + .push(super::LossPercentileId::from_fn(|id| { + *id.select(&result.loss_threshold) + })); self.prices - .push(PriceBandId::from_fn(|id| *id.select(&result.prices))); + .push(super::PriceBandId::from_fn(|id| *id.select(&result.prices))); } } @@ -262,7 +100,7 @@ impl Vecs { } } }); - let weighted_urpd_names = weighted_urpd_names(); + let weighted_urpd_names = DayUrpds::names(); let weighted_urpd_source_version: Version = std::iter::once(WEIGHTED_URPD_VERSION) .chain(std::iter::once(indexes.day1.date.version())) @@ -291,13 +129,13 @@ impl Vecs { .chain(coinflow_spending_rate.iter().map(|vec| vec.len())) .min() .unwrap_or_default(); - let recompute_from = recompute_day(indexer, indexes) + let recompute_from = Self::recompute_day(indexer, indexes) .map(usize::from) .unwrap_or_default(); let weighted_urpd_is_current = - read_weighted_urpd_version(&self.states_path)? == Some(weighted_urpd_source_version); + DayUrpds::stored_version(&self.states_path)? == Some(weighted_urpd_source_version); if !weighted_urpd_is_current { - reset_weighted_urpds(&self.states_path, &weighted_urpd_names)?; + DayUrpds::reset(&self.states_path, &weighted_urpd_names)?; } let weighted_urpd_start = if weighted_urpd_is_current { recompute_from @@ -316,11 +154,11 @@ impl Vecs { let mut calibration = Calibration::from_sources(raw_loss_share, &weighted_loss_shares, start); - let bounds = age_bounds_days(); + let bounds = AgeBand::all(); for day_index in start..source_end { let day = Day1::from(day_index); - let loss_shares = collect_loss_shares(raw_loss_share, &weighted_loss_shares, day); + let loss_shares = Calibration::loss_shares(raw_loss_share, &weighted_loss_shares, day); let thresholds = calibration.thresholds(&loss_shares); let mut result = DayResult::from_thresholds(&thresholds); @@ -329,7 +167,7 @@ impl Vecs { if let Some(date) = indexes.day1.date.collect_one(day) && (needs_rebuild || needs_evaluation) { - let weights = mode_weights( + let weights = Self::mode_weights( day, &age_supplies, &cointime_wakefulness, @@ -338,35 +176,30 @@ impl Vecs { &bounds, ); let urpds = if day_index + 1 == source_end { - Some(build_current_day_urpds(utxo_states, &weights)) + Some(DayUrpds::current(utxo_states, &weights)) } else if UrpdRaw::path(&distribution.states_path, UTXO_ALL_NAME.id, date) .try_exists()? { - Some(read_day_urpds(&distribution.states_path, date, &weights)?) + Some(DayUrpds::read(&distribution.states_path, date, &weights)?) } else { None }; if let Some(urpds) = urpds { if needs_rebuild { - write_weighted_day_urpds( - &self.states_path, - &weighted_urpd_names, - date, - &urpds, - )?; + urpds.write(&self.states_path, &weighted_urpd_names, date)?; } if needs_evaluation { - evaluate_day(&urpds, &thresholds, &mut result); + result.evaluate(&urpds, &thresholds); } } } calibration.observe(loss_shares); for mode in ModeId::ALL { - let output = self.modes.select_mut(mode); - let mode_result = result.by_mode.select(mode); - output.push(mode_result); + self.modes + .select_mut(mode) + .push(result.by_mode.select(mode)); } if (day_index + 1).is_multiple_of(WRITE_INTERVAL_DAYS) || day_index + 1 == source_end { @@ -379,9 +212,7 @@ impl Vecs { if !weighted_urpd_is_current { let _lock = exit.lock(); - fs::create_dir_all(&self.states_path)?; - weighted_urpd_source_version - .write(&self.states_path.join(WEIGHTED_URPD_VERSION_FILE))?; + DayUrpds::write_version(&self.states_path, weighted_urpd_source_version)?; } Ok(()) @@ -397,657 +228,81 @@ impl Vecs { .min() .unwrap_or_default() } -} -fn collect_loss_history( - source: &(impl ReadableVec> + ?Sized), - end: usize, -) -> Vec -where - T: VecValue, - f64: From, -{ - let mut history = Vec::with_capacity(end); - source.for_each_range_dyn_at(0, end, &mut |value| { - if let Some(value) = value.map(f64::from).filter(|value| value.is_finite()) { - history.push(value); + fn recompute_day(indexer: &Indexer, indexes: &indexes::Vecs) -> Option { + let starting_height = indexer.safe_lengths().height; + indexes + .height + .day1 + .collect_one(starting_height) + .or_else(|| { + starting_height + .decremented() + .and_then(|height| indexes.height.day1.collect_one(height)) + }) + } + + fn mode_weights( + day: Day1, + age_supplies: &AgeRange<&impl ReadableVec>>, + cointime_wakefulness: &AgeRange<&impl ReadableVec>>, + coinflow_mobility: &AgeRange<&impl ReadableVec>>, + coinflow_spending_rate: &AgeRange<&impl ReadableVec>>, + bounds: &AgeRange, + ) -> ModeWeights { + debug_assert_eq!(WeightedModeId::COINFLOW_HORIZONS.len(), HORIZON_COUNT); + let mut weights = ModeWeights::from_fn(|_| None); + weights.raw = Some(AgeRange::from_fn(|_| 1.0)); + + let Some(supplies) = Self::collect_age_supplies(age_supplies, day) else { + return weights; + }; + weights.cointime = Self::collect_age_values(cointime_wakefulness, &supplies, day) + .map(|values| AgeRange::from_fn(|id| (*id.select(&values)).clamp(0.0, 1.0))); + weights.coinflow = Self::collect_age_values(coinflow_mobility, &supplies, day) + .map(|values| AgeRange::from_fn(|id| (*id.select(&values)).clamp(0.0, 1.0))); + + if let Some(hazards) = Self::collect_age_values(coinflow_spending_rate, &supplies, day) { + let hazards = AgeRange::from_fn(|id| (*id.select(&hazards)).max(0.0)); + for (id, horizon) in WeightedModeId::COINFLOW_HORIZONS + .into_iter() + .zip(HorizonId::ALL.into_iter().map(HorizonId::days)) + { + *weights.select_mut(id.mode()) = Some(AgeRange::from_fn(|age| { + AgeBand::horizon_mobility(&hazards, age, horizon, bounds) + })); + } } - }); - history.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap_or(Ordering::Equal)); - history -} - -fn collect_loss_share( - source: &(impl ReadableVec> + ?Sized), - day: Day1, -) -> Option -where - T: VecValue, - f64: From, -{ - source - .collect_one(day) - .flatten() - .map(f64::from) - .filter(|value| value.is_finite()) -} - -fn collect_loss_shares( - raw: &impl ReadableVec>, - weighted: &WeightedModes<&dyn ReadableVec>>, - day: Day1, -) -> Modes> -where - T: VecValue, - U: VecValue, - f64: From + From, -{ - let mut shares = Modes::from_fn(|_| None); - shares.raw = collect_loss_share(raw, day); - for id in WeightedModeId::ALL { - let source = weighted.select(id); - *shares.select_mut(id.mode()) = collect_loss_share(*source, day); + weights } - shares -} -fn recompute_day(indexer: &Indexer, indexes: &indexes::Vecs) -> Option { - let starting_height = indexer.safe_lengths().height; - indexes - .height - .day1 - .collect_one(starting_height) - .or_else(|| { - starting_height - .decremented() - .and_then(|height| indexes.height.day1.collect_one(height)) - }) -} - -fn mode_weights( - day: Day1, - age_supplies: &AgeRange<&impl ReadableVec>>, - cointime_wakefulness: &AgeRange<&impl ReadableVec>>, - coinflow_mobility: &AgeRange<&impl ReadableVec>>, - coinflow_spending_rate: &AgeRange<&impl ReadableVec>>, - bounds: &AgeRange, -) -> ModeWeights { - debug_assert_eq!(WeightedModeId::COINFLOW_HORIZONS.len(), HORIZON_COUNT); - let mut weights = Modes::from_fn(|_| None); - weights.raw = Some(AgeRange::from_fn(|_| 1.0)); - weights.cointime = collect_age_values(cointime_wakefulness, age_supplies, day) - .map(|values| AgeRange::from_fn(|id| (*id.select(&values)).clamp(0.0, 1.0))); - weights.coinflow = collect_age_values(coinflow_mobility, age_supplies, day) - .map(|values| AgeRange::from_fn(|id| (*id.select(&values)).clamp(0.0, 1.0))); - - if let Some(hazards) = collect_age_values(coinflow_spending_rate, age_supplies, day) { - let hazards = AgeRange::from_fn(|id| (*id.select(&hazards)).max(0.0)); - for (id, horizon) in WeightedModeId::COINFLOW_HORIZONS - .into_iter() - .zip(HorizonId::ALL.into_iter().map(HorizonId::days)) - { - *weights.select_mut(id.mode()) = Some(AgeRange::from_fn(|age| { - horizon_mobility(&hazards, age, horizon, bounds) - })); + fn collect_age_supplies( + sources: &AgeRange<&impl ReadableVec>>, + day: Day1, + ) -> Option> { + let mut supplies = AgeRange::default(); + for &id in AgeRangeId::ALL { + *id.select_mut(&mut supplies) = id.select(sources).collect_one(day).flatten()?; } + Some(supplies) } - weights -} -fn collect_age_values( - sources: &AgeRange<&impl ReadableVec>>, - supplies: &AgeRange<&impl ReadableVec>>, - day: Day1, -) -> Option> -where - T: VecValue, - f64: From, -{ - let mut values = AgeRange::default(); - for &id in AgeRangeId::ALL { - let supply = id.select(supplies).collect_one(day).flatten()?; - *id.select_mut(&mut values) = - resolve_age_value(id.select(sources).collect_one(day).flatten(), supply)?; - } - Some(values) -} - -pub(super) fn resolve_age_value(value: Option, supply: Sats) -> Option -where - f64: From, -{ - match value.map(f64::from) { - Some(value) if value.is_finite() => Some(value), - _ if supply == Sats::ZERO => Some(0.0), - _ => None, - } -} - -fn read_weighted_urpd_version(states_path: &Path) -> Result> { - let path = states_path.join(WEIGHTED_URPD_VERSION_FILE); - if !path.exists() { - return Ok(None); - } - Ok(Some(Version::try_from(path.as_path())?)) -} - -fn reset_weighted_urpds(states_path: &Path, weighted_names: &WeightedUrpdNames) -> Result<()> { - for name in weighted_names - .all - .iter() - .chain(weighted_names.term.iter().flat_map(StoredWeights::iter)) + fn collect_age_values( + sources: &AgeRange<&impl ReadableVec>>, + supplies: &AgeRange, + day: Day1, + ) -> Option> + where + T: VecValue, + f64: From, { - remove_urpd_dir(states_path, name)?; - } - for id in WeightedModeId::COINFLOW_HORIZONS { - remove_urpd_dir(states_path, &format!("bedrock_{}", id.mode().name()))?; - } - Ok(()) -} - -fn remove_urpd_dir(states_path: &Path, name: &str) -> Result<()> { - let path = UrpdRaw::dir(states_path, name); - match fs::remove_dir_all(&path) { - Ok(()) => Ok(()), - Err(error) if error.kind() == ErrorKind::NotFound => Ok(()), - Err(error) => Err(Error::new( - error.kind(), - format!("Cannot reset URPD '{}': {error}", path.display()), - ) - .into()), - } -} - -fn read_day_urpds( - distribution_states_path: &Path, - date: Date, - weights: &ModeWeights, -) -> Result { - let raw = UrpdRaw::read(distribution_states_path, UTXO_ALL_NAME.id, date)?; - let mut weighted = WeightedUrpd::new(); - - for &age in AgeRangeId::ALL { - let cohort = CohortContext::Utxo.prefixed(age.name().id); - let source = UrpdRaw::read(distribution_states_path, &cohort, date)?; - let is_short = TERM_FILTERS.short.includes(age.filter()); - - for (price, sats) in source.map { - add_weighted_entry(&mut weighted, price, sats, age, is_short, weights); - } - } - - Ok(finalize_day_urpds(raw, weighted)) -} - -fn build_current_day_urpds(utxos: &UTXOStates, weights: &ModeWeights) -> DayUrpds { - build_urpds_from_age_entries(utxos.age_range_urpd_entries(), weights) -} - -fn build_urpds_from_age_entries( - entries: impl IntoIterator, - weights: &ModeWeights, -) -> DayUrpds { - let mut raw = UrpdRaw::default(); - let mut weighted = WeightedUrpd::new(); - - for (age, price, sats) in entries { - *raw.map.entry(price).or_default() += sats; - let is_short = TERM_FILTERS.short.includes(age.filter()); - add_weighted_entry(&mut weighted, price, sats, age, is_short, weights); - } - - finalize_day_urpds(raw, weighted) -} - -fn add_weighted_entry( - weighted: &mut WeightedUrpd, - price: CentsCompact, - sats: Sats, - age: AgeRangeId, - is_short: bool, - weights: &ModeWeights, -) { - let mass = u64::from(sats) as f64; - let bucket = weighted.entry(price).or_default(); - for id in WeightedModeId::ALL { - let mode = id.mode(); - if let Some(mode_weights) = weights.select(mode) { - let weighted_mass = mass * *age.select(mode_weights); - *bucket.all.select_mut(id) += weighted_mass; - let term = if is_short { - &mut bucket.term.short - } else { - &mut bucket.term.long - }; - match mode { - ModeId::Cointime => term.cointime += weighted_mass, - ModeId::Coinflow => term.coinflow += weighted_mass, - _ => {} - } + let mut values = AgeRange::default(); + for &id in AgeRangeId::ALL { + *id.select_mut(&mut values) = Self::resolve_age_value( + id.select(sources).collect_one(day).flatten(), + *id.select(supplies), + )?; } - } -} - -fn finalize_day_urpds(raw: UrpdRaw, weighted: WeightedUrpd) -> DayUrpds { - let mut all = WeightedModes::from_fn(|_| UrpdRaw::default()); - let mut term = ByTerm::>::default(); - - for (price, masses) in weighted { - for id in WeightedModeId::ALL { - let distribution = all.select_mut(id); - let sats = floor_weighted_sats(*masses.all.select(id)); - if sats != Sats::ZERO { - distribution.map.insert(price, sats); - } - } - insert_stored_weighted_masses(price, &mut term.short, &masses.term.short); - insert_stored_weighted_masses(price, &mut term.long, &masses.term.long); - } - - DayUrpds { raw, all, term } -} - -fn insert_stored_weighted_masses( - price: CentsCompact, - distributions: &mut StoredWeights, - masses: &StoredWeights, -) { - insert_weighted_mass(price, &mut distributions.cointime, masses.cointime); - insert_weighted_mass(price, &mut distributions.coinflow, masses.coinflow); -} - -fn insert_weighted_mass(price: CentsCompact, distribution: &mut UrpdRaw, mass: f64) { - let sats = floor_weighted_sats(mass); - if sats != Sats::ZERO { - distribution.map.insert(price, sats); - } -} - -fn floor_weighted_sats(mass: f64) -> Sats { - debug_assert!(mass.is_finite() && mass >= 0.0); - Sats::from(mass.floor() as u64) -} - -fn write_weighted_day_urpds( - models_states_path: &Path, - weighted_names: &WeightedUrpdNames, - date: Date, - urpds: &DayUrpds, -) -> Result<()> { - write_stored_weights( - models_states_path, - &weighted_names.all, - date, - &urpds.all.cointime, - &urpds.all.coinflow, - )?; - write_stored_weights( - models_states_path, - &weighted_names.term.short, - date, - &urpds.term.short.cointime, - &urpds.term.short.coinflow, - )?; - write_stored_weights( - models_states_path, - &weighted_names.term.long, - date, - &urpds.term.long.cointime, - &urpds.term.long.coinflow, - ) -} - -fn write_stored_weights( - models_states_path: &Path, - names: &StoredWeights, - date: Date, - cointime: &UrpdRaw, - coinflow: &UrpdRaw, -) -> Result<()> { - write_weighted_urpd(models_states_path, &names.cointime, date, cointime)?; - write_weighted_urpd(models_states_path, &names.coinflow, date, coinflow) -} - -fn write_weighted_urpd( - models_states_path: &Path, - name: &str, - date: Date, - distribution: &UrpdRaw, -) -> Result<()> { - UrpdRaw::write( - models_states_path, - name, - date, - distribution.map.iter().map(|(&price, &sats)| (price, sats)), - ) -} - -fn weighted_urpd_names() -> WeightedUrpdNames { - AggregateCohorts { - all: StoredWeights::from_fn(|weight| weighted_urpd_name(weight, UTXO_ALL_NAME.id)), - term: ByTerm { - short: StoredWeights::from_fn(|weight| weighted_urpd_name(weight, TERM_NAMES.short.id)), - long: StoredWeights::from_fn(|weight| weighted_urpd_name(weight, TERM_NAMES.long.id)), - }, - } -} - -fn evaluate_day(urpds: &DayUrpds, thresholds: &Thresholds, result: &mut DayResult) { - for mode in ModeId::ALL { - let urpd = urpds.mode(mode); - let denominator = urpd.map.values().copied().map(u64::from).sum::(); - let Some(thresholds) = thresholds.select(mode) else { - continue; - }; - if denominator == 0 - || !urpd - .map - .iter() - .any(|(price, sats)| price.inner() != 0 && *sats != Sats::ZERO) - { - continue; - } - - let mut remaining_loss = denominator; - let mut floors = Percentiles::from_fn(|_| Cents::NAN); - let mut p95_floor = None; - for (price, sats) in &urpd.map { - remaining_loss -= u64::from(*sats); - let remaining_share = remaining_loss as f64 / denominator as f64; - for &percentile in LossPercentileId::ALL { - let floor = percentile.select_mut(&mut floors); - if floor.is_nan() && remaining_share <= *percentile.select(thresholds) { - *floor = Cents::from(*price); - if percentile == LossPercentileId::Pct95 { - p95_floor = Some(*price); - } - } - } - if floors.iter().all(|floor| !floor.is_nan()) { - break; - } - } - let mode_result = result.by_mode.select_mut(mode); - mode_result.prices.floor = floors; - if let Some(p95_floor) = p95_floor { - mode_result.prices.level = conditional_levels(urpd, p95_floor); - } - } -} - -fn conditional_levels(urpd: &UrpdRaw, lower: CentsCompact) -> Levels { - let mut levels = Levels::from_fn(|_| Cents::NAN); - let total = urpd - .map - .range(lower..) - .map(|(_, sats)| u64::from(*sats)) - .sum::(); - if total == 0 { - return levels; - } - - let mut cumulative = 0_u64; - let mut percentiles = LEVEL_IDS.iter().copied().peekable(); - for (price, sats) in urpd.map.range(lower..) { - let sats = u64::from(*sats); - if sats == 0 { - continue; - } - cumulative += sats; - while let Some(percentile) = percentiles.peek().copied() - && cumulative as f64 >= total as f64 * *percentile.select(&LEVEL_PERCENTILES) - { - *percentile.select_mut(&mut levels) = Cents::from(*price); - percentiles.next(); - } - if percentiles.peek().is_none() { - break; - } - } - levels -} - -fn quantile(sorted: &[f64], percentile: f64) -> Option { - if sorted.is_empty() { - return None; - } - let position = percentile.clamp(0.0, 1.0) * (sorted.len() - 1) as f64; - let lower = position.floor() as usize; - let upper = position.ceil() as usize; - let fraction = position - lower as f64; - Some(sorted[lower] * (1.0 - fraction) + sorted[upper] * fraction) -} - -fn insert_sorted(values: &mut Vec, value: f64) { - let index = values - .binary_search_by(|candidate| candidate.partial_cmp(&value).unwrap_or(Ordering::Less)) - .unwrap_or_else(|index| index); - values.insert(index, value); -} - -#[cfg(test)] -mod tests { - use super::*; - - fn repeated_day_urpds(entries: [(u32, u64); N]) -> DayUrpds { - let map = entries - .into_iter() - .map(|(price, sats)| (CentsCompact::new(price), Sats::from(sats))) - .collect::>(); - DayUrpds { - raw: UrpdRaw { map: map.clone() }, - all: WeightedModes::from_fn(|_| UrpdRaw { map: map.clone() }), - term: ByTerm { - short: StoredWeights::from_fn(|_| UrpdRaw { map: map.clone() }), - long: StoredWeights::from_fn(|_| UrpdRaw { map: map.clone() }), - }, - } - } - - #[test] - fn quantile_linearly_interpolates() { - assert_eq!(quantile(&[0.0, 1.0], 0.95), Some(0.95)); - assert_eq!(quantile(&[], 0.95), None); - } - - #[test] - fn empty_age_cohort_uses_zero_weight() { - assert_eq!(resolve_age_value::(None, Sats::ZERO), Some(0.0)); - assert_eq!( - resolve_age_value(Some(StoredF64::NAN), Sats::ZERO), - Some(0.0) - ); - } - - #[test] - fn non_empty_age_cohort_requires_finite_weight() { - let supply = Sats::from(1_u64); - assert_eq!(resolve_age_value::(None, supply), None); - assert_eq!(resolve_age_value(Some(StoredF64::NAN), supply), None); - assert_eq!( - resolve_age_value(Some(StoredF64::from(0.25)), supply), - Some(0.25) - ); - } - - #[test] - fn daily_loss_share_calibrates_the_floor() { - let urpds = repeated_day_urpds([(100, 50), (200, 50)]); - let mut calibration = Calibration { - histories: Modes::from_fn(|_| vec![0.5; MIN_CALIBRATION_DAYS]), - }; - let shares = Modes::from_fn(|_| Some(0.5)); - let thresholds = calibration.thresholds(&shares); - let mut result = DayResult::from_thresholds(&thresholds); - evaluate_day(&urpds, &thresholds, &mut result); - calibration.observe(shares); - let result = &result.by_mode.coinflow; - - assert_eq!( - result.loss_threshold, - Percentiles::from_fn(|_| StoredF64::from(0.5)) - ); - assert_eq!( - result.prices.floor, - Percentiles::from_fn(|_| Cents::new(100)) - ); - assert_eq!( - result.prices.level, - Levels { - pct10: Cents::new(100), - pct20: Cents::new(100), - pct30: Cents::new(100), - pct40: Cents::new(100), - pct50: Cents::new(100), - pct60: Cents::new(200), - pct70: Cents::new(200), - pct80: Cents::new(200), - pct90: Cents::new(200), - } - ); - assert_eq!( - calibration.histories.coinflow.len(), - MIN_CALIBRATION_DAYS + 1 - ); - } - - #[test] - fn zero_cost_distribution_stays_missing() { - let urpds = repeated_day_urpds([(0, 100)]); - let mut calibration = Calibration { - histories: Modes::from_fn(|_| vec![0.5; MIN_CALIBRATION_DAYS]), - }; - let shares = Modes::from_fn(|_| Some(1.0)); - let thresholds = calibration.thresholds(&shares); - let mut result = DayResult::from_thresholds(&thresholds); - evaluate_day(&urpds, &thresholds, &mut result); - calibration.observe(shares); - let result = &result.by_mode.raw; - - assert_eq!(result.loss_threshold.pct95, StoredF64::from(0.5)); - assert!(result.prices.floor.pct95.is_nan()); - assert_eq!(calibration.histories.raw.len(), MIN_CALIBRATION_DAYS + 1); - } - - #[test] - fn missing_framework_share_does_not_update_history() { - let mut calibration = Calibration { - histories: Modes::from_fn(|_| Vec::new()), - }; - let shares = Modes::from_fn(|_| None); - let thresholds = calibration.thresholds(&shares); - calibration.observe(shares); - - assert!(thresholds.iter().all(Option::is_none)); - assert!(calibration.histories.raw.is_empty()); - } - - #[test] - fn weighted_sats_are_floored_after_summing() { - let summed_mass = 0.6 + 0.6; - assert_eq!(floor_weighted_sats(summed_mass), Sats::from(1_u64)); - assert_eq!(floor_weighted_sats(0.6), Sats::ZERO); - - let weighted = BTreeMap::from([( - CentsCompact::new(100), - WeightedMasses { - all: WeightedModes::from_fn(|_| summed_mass), - term: ByTerm { - short: StoredWeights::from_fn(|_| 0.6), - long: StoredWeights::from_fn(|_| 0.6), - }, - }, - )]); - let urpds = finalize_day_urpds(UrpdRaw::default(), weighted); - - assert_eq!( - urpds.all.cointime.map[&CentsCompact::new(100)], - Sats::from(1_u64) - ); - assert!( - !urpds - .term - .short - .cointime - .map - .contains_key(&CentsCompact::new(100)) - ); - } - - #[test] - fn current_day_entries_build_raw_and_weighted_urpds() { - let weights = Modes::from_fn(|_| Some(AgeRange::from_fn(|_| 0.5))); - let price = CentsCompact::new(100); - let urpds = build_urpds_from_age_entries( - [ - (AgeRangeId::Under1H, price, Sats::from(3_u64)), - (AgeRangeId::From5MTo6M, price, Sats::from(5_u64)), - ], - &weights, - ); - - assert_eq!(urpds.raw.map[&price], Sats::from(8_u64)); - assert_eq!(urpds.all.cointime.map[&price], Sats::from(4_u64)); - assert_eq!(urpds.term.short.cointime.map[&price], Sats::from(1_u64)); - assert_eq!(urpds.term.long.cointime.map[&price], Sats::from(2_u64)); - } - - #[test] - fn stores_only_cointime_and_coinflow_for_all_sth_and_lth() { - let root = - std::env::temp_dir().join(format!("brk-bedrock-urpd-file-{}", std::process::id())); - let distribution_states = root.join("distribution"); - let models_states = root.join("models"); - let date = Date::new(2026, 8, 4); - let names = weighted_urpd_names(); - let expected = repeated_day_urpds([(100, 21), (200, 34)]); - assert_eq!(names.all.cointime, "bedrock_cointime"); - assert_eq!(names.all.coinflow, "bedrock_coinflow"); - assert_eq!(names.term.short.cointime, "bedrock_cointime_sth"); - assert_eq!(names.term.long.coinflow, "bedrock_coinflow_lth"); - - UrpdRaw::write( - &distribution_states, - UTXO_ALL_NAME.id, - date, - expected.raw.map.iter().map(|(&price, &sats)| (price, sats)), - ) - .unwrap(); - write_weighted_day_urpds(&models_states, &names, date, &expected).unwrap(); - - let assert_stored = |name: &str, expected: &UrpdRaw| { - assert_eq!( - UrpdRaw::read(&models_states, name, date).unwrap().map, - expected.map - ); - }; - assert_stored(&names.all.cointime, &expected.all.cointime); - assert_stored(&names.all.coinflow, &expected.all.coinflow); - assert_stored(&names.term.short.cointime, &expected.term.short.cointime); - assert_stored(&names.term.short.coinflow, &expected.term.short.coinflow); - assert_stored(&names.term.long.cointime, &expected.term.long.cointime); - assert_stored(&names.term.long.coinflow, &expected.term.long.coinflow); - assert!(!UrpdRaw::path(&models_states, "bedrock_raw", date).exists()); - assert!(!UrpdRaw::path(&models_states, "bedrock_coinflow_8y", date).exists()); - - UrpdRaw::write( - &models_states, - "bedrock_coinflow_8y", - date, - expected.raw.map.iter().map(|(&price, &sats)| (price, sats)), - ) - .unwrap(); - reset_weighted_urpds(&models_states, &names).unwrap(); - assert!(UrpdRaw::path(&distribution_states, UTXO_ALL_NAME.id, date).exists()); - assert!(!UrpdRaw::path(&models_states, "bedrock_coinflow_8y", date).exists()); - assert!( - names - .all - .iter() - .chain(names.term.iter().flat_map(StoredWeights::iter)) - .all(|name| !UrpdRaw::path(&models_states, name, date).exists()) - ); - - std::fs::remove_dir_all(root).unwrap(); + Some(values) } } diff --git a/crates/brk_computer/src/models/bedrock/day_result.rs b/crates/brk_computer/src/models/bedrock/day_result.rs new file mode 100644 index 000000000..8a9fb9e25 --- /dev/null +++ b/crates/brk_computer/src/models/bedrock/day_result.rs @@ -0,0 +1,182 @@ +use brk_types::{Cents, CentsCompact, Sats, StoredF64, UrpdRaw}; + +use super::{ + DayUrpds, LEVEL_IDS, Levels, LossPercentileId, ModeId, ModeResult, Modes, Percentiles, + PriceBands, Thresholds, +}; + +const LEVEL_PERCENTILES: Levels = Levels { + pct10: 0.1, + pct20: 0.2, + pct30: 0.3, + pct40: 0.4, + pct50: 0.5, + pct60: 0.6, + pct70: 0.7, + pct80: 0.8, + pct90: 0.9, +}; + +pub(super) struct DayResult { + pub(super) by_mode: Modes, +} + +impl DayResult { + pub(super) fn from_thresholds(thresholds: &Thresholds) -> Self { + Self { + by_mode: Modes::from_fn(|mode| ModeResult { + loss_threshold: match thresholds.select(mode) { + Some(values) => Percentiles::from_fn(|percentile| { + StoredF64::from(*percentile.select(values)) + }), + None => Percentiles::from_fn(|_| StoredF64::NAN), + }, + prices: PriceBands::from_fn(|_| Cents::NAN), + }), + } + } + + pub(super) fn evaluate(&mut self, urpds: &DayUrpds, thresholds: &Thresholds) { + for mode in ModeId::ALL { + let urpd = urpds.mode(mode); + let denominator = urpd.map.values().copied().map(u64::from).sum::(); + let Some(thresholds) = thresholds.select(mode) else { + continue; + }; + if denominator == 0 + || !urpd + .map + .iter() + .any(|(price, sats)| price.inner() != 0 && *sats != Sats::ZERO) + { + continue; + } + + let mut remaining_loss = denominator; + let mut floors = Percentiles::from_fn(|_| Cents::NAN); + let mut p95_floor = None; + for (price, sats) in &urpd.map { + remaining_loss -= u64::from(*sats); + let remaining_share = remaining_loss as f64 / denominator as f64; + for percentile in LossPercentileId::ALL { + let floor = percentile.select_mut(&mut floors); + if floor.is_nan() && remaining_share <= *percentile.select(thresholds) { + *floor = Cents::from(*price); + if percentile == LossPercentileId::Pct95 { + p95_floor = Some(*price); + } + } + } + if floors.iter().all(|floor| !floor.is_nan()) { + break; + } + } + let mode_result = self.by_mode.select_mut(mode); + mode_result.prices.floor = floors; + if let Some(p95_floor) = p95_floor { + mode_result.prices.level = Self::conditional_levels(urpd, p95_floor); + } + } + } + + fn conditional_levels(urpd: &UrpdRaw, lower: CentsCompact) -> Levels { + let mut levels = Levels::from_fn(|_| Cents::NAN); + let total = urpd + .map + .range(lower..) + .map(|(_, sats)| u64::from(*sats)) + .sum::(); + if total == 0 { + return levels; + } + + let mut cumulative = 0_u64; + let mut percentiles = LEVEL_IDS.iter().copied().peekable(); + for (price, sats) in urpd.map.range(lower..) { + let sats = u64::from(*sats); + if sats == 0 { + continue; + } + cumulative += sats; + while let Some(percentile) = percentiles.peek().copied() + && cumulative as f64 >= total as f64 * *percentile.select(&LEVEL_PERCENTILES) + { + *percentile.select_mut(&mut levels) = Cents::from(*price); + percentiles.next(); + } + if percentiles.peek().is_none() { + break; + } + } + levels + } +} + +#[cfg(test)] +mod tests { + use std::collections::BTreeMap; + + use brk_cohort::ByTerm; + use brk_types::{Cents, CentsCompact, Sats, StoredF64, UrpdRaw}; + + use super::DayResult; + use crate::models::bedrock::{ + DayUrpds, Levels, Modes, Percentiles, WeightedModes, WeightedPair, + }; + + fn repeated_urpds(entries: [(u32, u64); N]) -> DayUrpds { + let map = entries + .into_iter() + .map(|(price, sats)| (CentsCompact::new(price), Sats::from(sats))) + .collect::>(); + DayUrpds { + raw: UrpdRaw { map: map.clone() }, + all: WeightedModes::from_fn(|_| UrpdRaw { map: map.clone() }), + term: ByTerm { + short: WeightedPair::from_fn(|_| UrpdRaw { map: map.clone() }), + long: WeightedPair::from_fn(|_| UrpdRaw { map: map.clone() }), + }, + } + } + + #[test] + fn calibrated_loss_share_sets_floor_and_levels() { + let urpds = repeated_urpds([(100, 50), (200, 50)]); + let thresholds = Modes::from_fn(|_| Some(Percentiles::from_fn(|_| 0.5))); + let mut result = DayResult::from_thresholds(&thresholds); + result.evaluate(&urpds, &thresholds); + let result = &result.by_mode.coinflow; + + assert_eq!( + result.loss_threshold, + Percentiles::from_fn(|_| StoredF64::from(0.5)) + ); + assert_eq!( + result.prices.floor, + Percentiles::from_fn(|_| Cents::new(100)) + ); + assert_eq!( + result.prices.level, + Levels { + pct10: Cents::new(100), + pct20: Cents::new(100), + pct30: Cents::new(100), + pct40: Cents::new(100), + pct50: Cents::new(100), + pct60: Cents::new(200), + pct70: Cents::new(200), + pct80: Cents::new(200), + pct90: Cents::new(200), + } + ); + } + + #[test] + fn zero_cost_distribution_stays_missing() { + let urpds = repeated_urpds([(0, 100)]); + let thresholds = Modes::from_fn(|_| Some(Percentiles::from_fn(|_| 1.0))); + let mut result = DayResult::from_thresholds(&thresholds); + result.evaluate(&urpds, &thresholds); + assert!(result.by_mode.raw.prices.floor.pct95.is_nan()); + } +} diff --git a/crates/brk_computer/src/models/bedrock/day_urpds.rs b/crates/brk_computer/src/models/bedrock/day_urpds.rs new file mode 100644 index 000000000..c1cc9dc69 --- /dev/null +++ b/crates/brk_computer/src/models/bedrock/day_urpds.rs @@ -0,0 +1,301 @@ +use std::{ + collections::BTreeMap, + fs, + io::{Error, ErrorKind}, + path::Path, +}; + +use brk_cohort::{ + AgeRange, AgeRangeId, ByTerm, CohortContext, TERM_FILTERS, TERM_NAMES, UTXO_ALL_NAME, + UTXOAggregate, +}; +use brk_error::Result; +use brk_types::{CentsCompact, Date, Sats, UrpdRaw, UrpdWeight, Version}; +use vecdb::ColumnId; + +use super::{ModeId, Modes, WeightedModeId, WeightedModes, WeightedPair}; +use crate::distribution::UTXOStates; + +const VERSION_FILE: &str = "bedrock_urpd.version"; + +pub(super) type ModeWeights = Modes>>; +pub(super) type WeightedUrpdNames = UTXOAggregate>; + +struct WeightedMasses { + all: WeightedModes, + term: ByTerm>, +} + +impl Default for WeightedMasses { + fn default() -> Self { + Self { + all: WeightedModes::from_fn(|_| 0.0), + term: ByTerm::default(), + } + } +} + +pub(super) struct DayUrpds { + pub(super) raw: UrpdRaw, + pub(super) all: WeightedModes, + pub(super) term: ByTerm>, +} + +impl DayUrpds { + pub(super) fn mode(&self, mode: ModeId) -> &UrpdRaw { + match mode { + ModeId::Raw => &self.raw, + _ => self.all.select(mode.weighted().expect("weighted mode")), + } + } + + pub(super) fn names() -> WeightedUrpdNames { + UTXOAggregate { + all: WeightedPair::from_fn(|weight| Self::weighted_name(weight, UTXO_ALL_NAME.id)), + sth: WeightedPair::from_fn(|weight| Self::weighted_name(weight, TERM_NAMES.short.id)), + lth: WeightedPair::from_fn(|weight| Self::weighted_name(weight, TERM_NAMES.long.id)), + } + } + + pub(super) fn weighted_name(weight: UrpdWeight, cohort: &str) -> String { + debug_assert!(weight.is_weighted()); + if cohort == UTXO_ALL_NAME.id { + format!("bedrock_{}", weight.as_str()) + } else { + format!("bedrock_{}_{cohort}", weight.as_str()) + } + } + + pub(super) fn read( + distribution_states_path: &Path, + date: Date, + weights: &ModeWeights, + ) -> Result { + let raw = UrpdRaw::read(distribution_states_path, UTXO_ALL_NAME.id, date)?; + let mut weighted = BTreeMap::new(); + + for &age in AgeRangeId::ALL { + let cohort = CohortContext::Utxo.prefixed(age.name().id); + let source = UrpdRaw::read(distribution_states_path, &cohort, date)?; + let is_short = TERM_FILTERS.short.includes(age.filter()); + + for (price, sats) in source.map { + Self::add_weighted_entry(&mut weighted, price, sats, age, is_short, weights); + } + } + + Ok(Self::finalize(raw, weighted)) + } + + pub(super) fn current(utxos: &UTXOStates, weights: &ModeWeights) -> Self { + Self::from_age_entries(utxos.age_range_urpd_entries(), weights) + } + + pub(super) fn from_age_entries( + entries: impl IntoIterator, + weights: &ModeWeights, + ) -> Self { + let mut raw = UrpdRaw::default(); + let mut weighted = BTreeMap::new(); + + for (age, price, sats) in entries { + *raw.map.entry(price).or_default() += sats; + let is_short = TERM_FILTERS.short.includes(age.filter()); + Self::add_weighted_entry(&mut weighted, price, sats, age, is_short, weights); + } + + Self::finalize(raw, weighted) + } + + pub(super) fn write( + &self, + states_path: &Path, + names: &WeightedUrpdNames, + date: Date, + ) -> Result<()> { + Self::write_pair( + states_path, + &names.all, + date, + &self.all.cointime, + &self.all.coinflow, + )?; + Self::write_pair( + states_path, + &names.sth, + date, + &self.term.short.cointime, + &self.term.short.coinflow, + )?; + Self::write_pair( + states_path, + &names.lth, + date, + &self.term.long.cointime, + &self.term.long.coinflow, + ) + } + + pub(super) fn stored_version(states_path: &Path) -> Result> { + let path = states_path.join(VERSION_FILE); + if !path.exists() { + return Ok(None); + } + Ok(Some(Version::try_from(path.as_path())?)) + } + + pub(super) fn write_version(states_path: &Path, version: Version) -> Result<()> { + fs::create_dir_all(states_path)?; + Ok(version.write(&states_path.join(VERSION_FILE))?) + } + + pub(super) fn reset(states_path: &Path, names: &WeightedUrpdNames) -> Result<()> { + for name in names.iter().flat_map(WeightedPair::iter) { + Self::remove_dir(states_path, name)?; + } + for id in WeightedModeId::COINFLOW_HORIZONS { + Self::remove_dir(states_path, &format!("bedrock_{}", id.mode().name()))?; + } + Ok(()) + } + + fn add_weighted_entry( + weighted: &mut BTreeMap, + price: CentsCompact, + sats: Sats, + age: AgeRangeId, + is_short: bool, + weights: &ModeWeights, + ) { + let mass = u64::from(sats) as f64; + let bucket = weighted.entry(price).or_default(); + for id in WeightedModeId::ALL { + let mode = id.mode(); + if let Some(mode_weights) = weights.select(mode) { + let weighted_mass = mass * *age.select(mode_weights); + *bucket.all.select_mut(id) += weighted_mass; + let term = if is_short { + &mut bucket.term.short + } else { + &mut bucket.term.long + }; + match mode { + ModeId::Cointime => term.cointime += weighted_mass, + ModeId::Coinflow => term.coinflow += weighted_mass, + _ => {} + } + } + } + } + + fn finalize(raw: UrpdRaw, weighted: BTreeMap) -> Self { + let mut all = WeightedModes::from_fn(|_| UrpdRaw::default()); + let mut term = ByTerm::>::default(); + + for (price, masses) in weighted { + for id in WeightedModeId::ALL { + let distribution = all.select_mut(id); + Self::insert_mass(price, distribution, *masses.all.select(id)); + } + Self::insert_pair(price, &mut term.short, &masses.term.short); + Self::insert_pair(price, &mut term.long, &masses.term.long); + } + + Self { raw, all, term } + } + + fn insert_pair( + price: CentsCompact, + distributions: &mut WeightedPair, + masses: &WeightedPair, + ) { + Self::insert_mass(price, &mut distributions.cointime, masses.cointime); + Self::insert_mass(price, &mut distributions.coinflow, masses.coinflow); + } + + fn insert_mass(price: CentsCompact, distribution: &mut UrpdRaw, mass: f64) { + let sats = Self::floor_sats(mass); + if sats != Sats::ZERO { + distribution.map.insert(price, sats); + } + } + + fn floor_sats(mass: f64) -> Sats { + debug_assert!(mass.is_finite() && mass >= 0.0); + Sats::from(mass.floor() as u64) + } + + fn write_pair( + states_path: &Path, + names: &WeightedPair, + date: Date, + cointime: &UrpdRaw, + coinflow: &UrpdRaw, + ) -> Result<()> { + Self::write_one(states_path, &names.cointime, date, cointime)?; + Self::write_one(states_path, &names.coinflow, date, coinflow) + } + + fn write_one(states_path: &Path, name: &str, date: Date, distribution: &UrpdRaw) -> Result<()> { + UrpdRaw::write( + states_path, + name, + date, + distribution.map.iter().map(|(&price, &sats)| (price, sats)), + ) + } + + fn remove_dir(states_path: &Path, name: &str) -> Result<()> { + let path = UrpdRaw::dir(states_path, name); + match fs::remove_dir_all(&path) { + Ok(()) => Ok(()), + Err(error) if error.kind() == ErrorKind::NotFound => Ok(()), + Err(error) => Err(Error::new( + error.kind(), + format!("Cannot reset URPD '{}': {error}", path.display()), + ) + .into()), + } + } +} + +#[cfg(test)] +mod tests { + use brk_cohort::{AgeRange, AgeRangeId}; + use brk_types::{CentsCompact, Sats}; + + use super::{DayUrpds, ModeWeights}; + + #[test] + fn weighted_sats_are_floored_after_summing() { + assert_eq!(DayUrpds::floor_sats(0.6 + 0.6), Sats::from(1_u64)); + assert_eq!(DayUrpds::floor_sats(0.6), Sats::ZERO); + } + + #[test] + fn current_entries_build_raw_and_weighted_urpds() { + let weights = ModeWeights::from_fn(|_| Some(AgeRange::from_fn(|_| 0.5))); + let price = CentsCompact::new(100); + let urpds = DayUrpds::from_age_entries( + [ + (AgeRangeId::Under1H, price, Sats::from(3_u64)), + (AgeRangeId::From5MTo6M, price, Sats::from(5_u64)), + ], + &weights, + ); + + assert_eq!(urpds.raw.map[&price], Sats::from(8_u64)); + assert_eq!(urpds.all.cointime.map[&price], Sats::from(4_u64)); + assert_eq!(urpds.term.short.cointime.map[&price], Sats::from(1_u64)); + assert_eq!(urpds.term.long.cointime.map[&price], Sats::from(2_u64)); + } + + #[test] + fn names_cover_only_stored_aggregate_weights() { + let names = DayUrpds::names(); + assert_eq!(names.all.cointime, "bedrock_cointime"); + assert_eq!(names.all.coinflow, "bedrock_coinflow"); + assert_eq!(names.sth.cointime, "bedrock_cointime_sth"); + assert_eq!(names.lth.coinflow, "bedrock_coinflow_lth"); + } +} diff --git a/crates/brk_computer/src/models/bedrock/import.rs b/crates/brk_computer/src/models/bedrock/import.rs index db736a9db..48e97172b 100644 --- a/crates/brk_computer/src/models/bedrock/import.rs +++ b/crates/brk_computer/src/models/bedrock/import.rs @@ -4,10 +4,7 @@ use brk_error::Result; use brk_types::Version; use vecdb::Database; -use super::{ - price::LazyColumnPrice, - vecs::{LossPercentileId, ModeVecs, Modes, PriceBandId, Vecs}, -}; +use super::{LossPercentileId, ModeVecs, Modes, PriceBandId, Vecs, price::LazyColumnPrice}; use crate::{ indexes, internal::{ColumnarDailyMetric, DailyMappings, LazyColumnDailyMetric}, diff --git a/crates/brk_computer/src/models/bedrock/level_id.rs b/crates/brk_computer/src/models/bedrock/level_id.rs new file mode 100644 index 000000000..3a86f8ea6 --- /dev/null +++ b/crates/brk_computer/src/models/bedrock/level_id.rs @@ -0,0 +1,57 @@ +use super::Levels; + +pub(crate) const LEVEL_COUNT: usize = 9; +pub(crate) const LEVEL_IDS: [LevelId; LEVEL_COUNT] = [ + LevelId::Pct10, + LevelId::Pct20, + LevelId::Pct30, + LevelId::Pct40, + LevelId::Pct50, + LevelId::Pct60, + LevelId::Pct70, + LevelId::Pct80, + LevelId::Pct90, +]; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub(crate) enum LevelId { + Pct10, + Pct20, + Pct30, + Pct40, + Pct50, + Pct60, + Pct70, + Pct80, + Pct90, +} + +impl LevelId { + pub(super) fn select(self, values: &Levels) -> &T { + match self { + Self::Pct10 => &values.pct10, + Self::Pct20 => &values.pct20, + Self::Pct30 => &values.pct30, + Self::Pct40 => &values.pct40, + Self::Pct50 => &values.pct50, + Self::Pct60 => &values.pct60, + Self::Pct70 => &values.pct70, + Self::Pct80 => &values.pct80, + Self::Pct90 => &values.pct90, + } + } + + pub(super) fn select_mut(self, values: &mut Levels) -> &mut T { + match self { + Self::Pct10 => &mut values.pct10, + Self::Pct20 => &mut values.pct20, + Self::Pct30 => &mut values.pct30, + Self::Pct40 => &mut values.pct40, + Self::Pct50 => &mut values.pct50, + Self::Pct60 => &mut values.pct60, + Self::Pct70 => &mut values.pct70, + Self::Pct80 => &mut values.pct80, + Self::Pct90 => &mut values.pct90, + } + } +} diff --git a/crates/brk_computer/src/models/bedrock/levels.rs b/crates/brk_computer/src/models/bedrock/levels.rs index 5c47f317c..d11219dd7 100644 --- a/crates/brk_computer/src/models/bedrock/levels.rs +++ b/crates/brk_computer/src/models/bedrock/levels.rs @@ -1,6 +1,11 @@ +use std::{fmt, str}; + use brk_traversable::Traversable; use schemars::JsonSchema; use serde::Serialize; +use vecdb::Formattable; + +use super::LevelId; #[derive(Debug, Clone, Copy, PartialEq, Traversable, Serialize, JsonSchema)] pub struct Levels { @@ -14,3 +19,45 @@ pub struct Levels { pub pct80: T, pub pct90: T, } + +impl_named_row_formattable!(Levels { + pct10, + pct20, + pct30, + pct40, + pct50, + pct60, + pct70, + pct80, + pct90, +}); + +impl Levels { + pub(super) fn from_fn(mut create: impl FnMut(LevelId) -> T) -> Self { + Self { + pct10: create(LevelId::Pct10), + pct20: create(LevelId::Pct20), + pct30: create(LevelId::Pct30), + pct40: create(LevelId::Pct40), + pct50: create(LevelId::Pct50), + pct60: create(LevelId::Pct60), + pct70: create(LevelId::Pct70), + pct80: create(LevelId::Pct80), + pct90: create(LevelId::Pct90), + } + } + + pub(super) fn map(self, mut map: impl FnMut(T) -> U) -> Levels { + Levels { + pct10: map(self.pct10), + pct20: map(self.pct20), + pct30: map(self.pct30), + pct40: map(self.pct40), + pct50: map(self.pct50), + pct60: map(self.pct60), + pct70: map(self.pct70), + pct80: map(self.pct80), + pct90: map(self.pct90), + } + } +} diff --git a/crates/brk_computer/src/models/bedrock/loss_percentile_id.rs b/crates/brk_computer/src/models/bedrock/loss_percentile_id.rs new file mode 100644 index 000000000..bcd57fcb7 --- /dev/null +++ b/crates/brk_computer/src/models/bedrock/loss_percentile_id.rs @@ -0,0 +1,120 @@ +use brk_types::Version; +use vecdb::{ColumnId, VecValue}; + +use super::Percentiles; + +const PERCENTILE_COUNT: usize = 5; +const LOSS_PERCENTILE_IDS: [LossPercentileId; PERCENTILE_COUNT] = [ + LossPercentileId::Pct95, + LossPercentileId::Pct98, + LossPercentileId::Pct99, + LossPercentileId::Pct99_5, + LossPercentileId::Pct99_9, +]; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +pub enum LossPercentileId { + Pct95, + Pct98, + Pct99, + Pct99_5, + Pct99_9, +} + +impl LossPercentileId { + pub(super) const ALL: [Self; PERCENTILE_COUNT] = LOSS_PERCENTILE_IDS; + + pub(super) const fn suffix(self) -> &'static str { + match self { + Self::Pct95 => "pct95", + Self::Pct98 => "pct98", + Self::Pct99 => "pct99", + Self::Pct99_5 => "pct99_5", + Self::Pct99_9 => "pct99_9", + } + } + + pub(super) fn select(self, values: &Percentiles) -> &T { + match self { + Self::Pct95 => &values.pct95, + Self::Pct98 => &values.pct98, + Self::Pct99 => &values.pct99, + Self::Pct99_5 => &values.pct99_5, + Self::Pct99_9 => &values.pct99_9, + } + } + + pub(super) fn select_mut(self, values: &mut Percentiles) -> &mut T { + match self { + Self::Pct95 => &mut values.pct95, + Self::Pct98 => &mut values.pct98, + Self::Pct99 => &mut values.pct99, + Self::Pct99_5 => &mut values.pct99_5, + Self::Pct99_9 => &mut values.pct99_9, + } + } + + pub(super) fn series(create: impl FnMut(Self) -> T) -> Percentiles { + Percentiles::from_fn(create) + } +} + +impl ColumnId for LossPercentileId { + type Row + = Percentiles + where + T: VecValue; + + const VERSION: Version = Version::ONE; + const ALL: &'static [Self] = &LOSS_PERCENTILE_IDS; + + #[inline] + fn index(self) -> usize { + self as usize + } + + #[inline] + fn get(self, row: &Self::Row) -> &T { + self.select(row) + } + + #[inline] + fn get_mut(self, row: &mut Self::Row) -> &mut T { + self.select_mut(row) + } + + #[inline] + fn from_fn(create: F) -> Self::Row + where + T: VecValue, + F: FnMut(Self) -> T, + { + Percentiles::from_fn(create) + } + + #[inline] + fn map(row: Self::Row, create: F) -> Self::Row + where + T: VecValue, + U: VecValue, + F: FnMut(T) -> U, + { + row.map(create) + } +} + +#[cfg(test)] +mod tests { + use vecdb::ColumnId; + + use super::{LOSS_PERCENTILE_IDS, LossPercentileId}; + + #[test] + fn storage_order_matches_public_order() { + assert_eq!(LossPercentileId::ALL, LOSS_PERCENTILE_IDS); + let row = LossPercentileId::from_fn(|id| id); + for id in LossPercentileId::ALL { + assert_eq!(id.get(&row), &id); + } + } +} diff --git a/crates/brk_computer/src/models/bedrock/mod.rs b/crates/brk_computer/src/models/bedrock/mod.rs index 32f2f0c53..6d2bbbbac 100644 --- a/crates/brk_computer/src/models/bedrock/mod.rs +++ b/crates/brk_computer/src/models/bedrock/mod.rs @@ -1,48 +1,93 @@ +macro_rules! impl_named_row_formattable { + ($row:ident { $($field:ident),+ $(,)? }) => { + impl Formattable for $row { + fn write_to(&self, output: &mut Vec) { + output.push(b'{'); + let mut first = true; + $( + if !first { + output.push(b','); + } + first = false; + output.extend_from_slice(concat!("\"", stringify!($field), "\":").as_bytes()); + self.$field.fmt_json(output); + )+ + let _ = first; + output.push(b'}'); + } + + fn fmt_csv(&self, output: &mut String) -> fmt::Result { + let mut json = Vec::new(); + self.write_to(&mut json); + let json = str::from_utf8(&json).map_err(|_| fmt::Error)?; + + output.push('"'); + for character in json.chars() { + if character == '"' { + output.push('"'); + } + output.push(character); + } + output.push('"'); + Ok(()) + } + } + }; +} + +mod calibration; mod compute; +mod day_result; +mod day_urpds; mod import; +mod level_id; mod levels; +mod loss_percentile_id; +mod mode_id; +mod mode_result; mod mode_vecs; mod modes; mod percentiles; mod price; +mod price_band_id; mod price_bands; mod vecs; mod weighted; +mod weighted_pair; -pub(super) use levels::Levels; -pub(super) use mode_vecs::ModeVecs; -pub(super) use modes::Modes; -pub(super) use percentiles::Percentiles; -pub(super) use price_bands::PriceBands; -pub(super) use weighted::WeightedModes; +use calibration::{Calibration, Thresholds}; +use day_result::DayResult; +use day_urpds::{DayUrpds, ModeWeights}; +use level_id::{LEVEL_COUNT, LEVEL_IDS, LevelId}; +use levels::Levels; +use loss_percentile_id::LossPercentileId; +use mode_id::{MODE_COUNT, ModeId}; +use mode_result::ModeResult; +use mode_vecs::ModeVecs; +use modes::Modes; +use percentiles::Percentiles; +use price_band_id::PriceBandId; +use price_bands::PriceBands; +use weighted::{WeightedModeId, WeightedModes}; +use weighted_pair::WeightedPair; use std::path::PathBuf; -use brk_cohort::{AgeRangeId, UTXO_ALL_NAME}; +use brk_cohort::AgeRangeId; use brk_error::Result; use brk_types::{Cohort, Date, Day1, UrpdRaw, UrpdWeight}; use vecdb::{ColumnId, ReadableVec, StorageMode}; -use self::compute::resolve_age_value; use crate::Computer; pub use vecs::Vecs; -pub(crate) fn weighted_urpd_name(weight: UrpdWeight, cohort: &str) -> String { - debug_assert!(weight.is_weighted()); - if cohort == UTXO_ALL_NAME.id { - format!("bedrock_{}", weight.as_str()) - } else { - format!("bedrock_{}_{cohort}", weight.as_str()) - } -} - impl Computer { /// Directory containing a persisted aggregate Bedrock-weighted URPD. pub fn bedrock_urpd_dir(&self, weight: UrpdWeight, cohort: &Cohort) -> PathBuf { UrpdRaw::dir( &self.models.bedrock.states_path, - &weighted_urpd_name(weight, cohort), + &DayUrpds::weighted_name(weight, cohort), ) } @@ -55,7 +100,7 @@ impl Computer { ) -> Result { UrpdRaw::read( &self.models.bedrock.states_path, - &weighted_urpd_name(weight, cohort), + &DayUrpds::weighted_name(weight, cohort), date, ) } @@ -84,7 +129,7 @@ impl Computer { UrpdWeight::Raw => Some(1.0), UrpdWeight::Cointime => { let cohort = age.select(&self.frameworks.cointime.age_range.activity.wakefulness); - resolve_age_value(cohort.day1.collect_one(day).flatten(), supply) + Vecs::::resolve_age_value(cohort.day1.collect_one(day).flatten(), supply) .map(|value| value.clamp(0.0, 1.0)) } UrpdWeight::Coinflow => { @@ -96,7 +141,7 @@ impl Computer { .spending_exposure .mobility, ); - resolve_age_value(cohort.day1.0.collect_one(day).flatten(), supply) + Vecs::::resolve_age_value(cohort.day1.0.collect_one(day).flatten(), supply) .map(|value| value.clamp(0.0, 1.0)) } } diff --git a/crates/brk_computer/src/models/bedrock/mode_id.rs b/crates/brk_computer/src/models/bedrock/mode_id.rs new file mode 100644 index 000000000..5dd5eaee1 --- /dev/null +++ b/crates/brk_computer/src/models/bedrock/mode_id.rs @@ -0,0 +1,108 @@ +use super::WeightedModeId; + +pub(crate) const MODE_COUNT: usize = 10; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +#[repr(u8)] +pub(crate) enum ModeId { + Raw, + Cointime, + Coinflow, + Coinflow8Y, + Coinflow4Y, + Coinflow2Y, + Coinflow1Y, + Coinflow6M, + Coinflow3M, + Coinflow1M, +} + +impl ModeId { + pub(super) const ALL: [Self; MODE_COUNT] = [ + Self::Raw, + Self::Cointime, + Self::Coinflow, + Self::Coinflow8Y, + Self::Coinflow4Y, + Self::Coinflow2Y, + Self::Coinflow1Y, + Self::Coinflow6M, + Self::Coinflow3M, + Self::Coinflow1M, + ]; + + pub(super) const fn name(self) -> &'static str { + match self { + Self::Raw => "raw", + Self::Cointime => "cointime", + Self::Coinflow => "coinflow", + Self::Coinflow8Y => "coinflow_8y", + Self::Coinflow4Y => "coinflow_4y", + Self::Coinflow2Y => "coinflow_2y", + Self::Coinflow1Y => "coinflow_1y", + Self::Coinflow6M => "coinflow_6m", + Self::Coinflow3M => "coinflow_3m", + Self::Coinflow1M => "coinflow_1m", + } + } + + pub(super) const fn weighted(self) -> Option { + match self { + Self::Raw => None, + Self::Cointime => Some(WeightedModeId::Cointime), + Self::Coinflow => Some(WeightedModeId::Coinflow), + Self::Coinflow8Y => Some(WeightedModeId::Coinflow8Y), + Self::Coinflow4Y => Some(WeightedModeId::Coinflow4Y), + Self::Coinflow2Y => Some(WeightedModeId::Coinflow2Y), + Self::Coinflow1Y => Some(WeightedModeId::Coinflow1Y), + Self::Coinflow6M => Some(WeightedModeId::Coinflow6M), + Self::Coinflow3M => Some(WeightedModeId::Coinflow3M), + Self::Coinflow1M => Some(WeightedModeId::Coinflow1M), + } + } +} + +#[cfg(test)] +mod tests { + use std::convert::Infallible; + + use super::ModeId; + use crate::models::bedrock::{Modes, WeightedModeId}; + + #[test] + fn ids_match_named_fields_and_storage_names() { + assert_eq!( + WeightedModeId::ALL.map(WeightedModeId::mode).as_slice(), + &ModeId::ALL[1..] + ); + assert_eq!( + WeightedModeId::COINFLOW_HORIZONS + .map(WeightedModeId::mode) + .as_slice(), + &ModeId::ALL[3..] + ); + + let mut modes = Modes::try_from_fn(|id| Ok::<_, Infallible>((id, false))).unwrap(); + for id in ModeId::ALL { + let mode = modes.select_mut(id); + assert_eq!(mode.0, id); + mode.1 = true; + } + assert!(modes.iter().all(|(_, visited)| *visited)); + assert_eq!( + ModeId::ALL.map(ModeId::name), + [ + "raw", + "cointime", + "coinflow", + "coinflow_8y", + "coinflow_4y", + "coinflow_2y", + "coinflow_1y", + "coinflow_6m", + "coinflow_3m", + "coinflow_1m", + ] + ); + } +} diff --git a/crates/brk_computer/src/models/bedrock/mode_result.rs b/crates/brk_computer/src/models/bedrock/mode_result.rs new file mode 100644 index 000000000..b4b667dba --- /dev/null +++ b/crates/brk_computer/src/models/bedrock/mode_result.rs @@ -0,0 +1,8 @@ +use brk_types::{Cents, StoredF64}; + +use super::{Percentiles, PriceBands}; + +pub(super) struct ModeResult { + pub(super) loss_threshold: Percentiles, + pub(super) prices: PriceBands, +} diff --git a/crates/brk_computer/src/models/bedrock/mode_vecs.rs b/crates/brk_computer/src/models/bedrock/mode_vecs.rs index d8f89c41d..cbe22ed7c 100644 --- a/crates/brk_computer/src/models/bedrock/mode_vecs.rs +++ b/crates/brk_computer/src/models/bedrock/mode_vecs.rs @@ -3,11 +3,7 @@ use brk_types::{Cents, StoredF64}; use derive_more::{Deref, DerefMut}; use vecdb::{Rw, StorageMode}; -use super::{ - Percentiles, PriceBands, - price::LazyColumnPrice, - vecs::{LossPercentileId, PriceBandId}, -}; +use super::{LossPercentileId, Percentiles, PriceBandId, PriceBands, price::LazyColumnPrice}; use crate::internal::{ColumnarDailyMetric, LazyColumnDailyMetric}; #[derive(Deref, DerefMut, Traversable)] diff --git a/crates/brk_computer/src/models/bedrock/modes.rs b/crates/brk_computer/src/models/bedrock/modes.rs index 74c5cf27f..4a50ef874 100644 --- a/crates/brk_computer/src/models/bedrock/modes.rs +++ b/crates/brk_computer/src/models/bedrock/modes.rs @@ -1,7 +1,7 @@ use brk_traversable::Traversable; use derive_more::{Deref, DerefMut}; -use super::WeightedModes; +use super::{ModeId, WeightedModes}; #[derive(Deref, DerefMut, Traversable)] pub struct Modes { @@ -11,3 +11,45 @@ pub struct Modes { #[traversable(flatten)] pub weighted: WeightedModes, } + +impl Modes { + pub(super) fn from_fn(mut create: impl FnMut(ModeId) -> T) -> Self { + Self { + raw: create(ModeId::Raw), + weighted: WeightedModes::from_fn(|id| create(id.mode())), + } + } + + pub(super) fn try_from_fn( + mut create: impl FnMut(ModeId) -> Result, + ) -> Result { + Ok(Self { + raw: create(ModeId::Raw)?, + weighted: WeightedModes::try_from_fn(|id| create(id.mode()))?, + }) + } + + pub(super) fn select_mut(&mut self, id: ModeId) -> &mut T { + match id { + ModeId::Raw => &mut self.raw, + _ => self + .weighted + .select_mut(id.weighted().expect("weighted mode")), + } + } + + pub(super) fn select(&self, id: ModeId) -> &T { + match id { + ModeId::Raw => &self.raw, + _ => self.weighted.select(id.weighted().expect("weighted mode")), + } + } + + pub(super) fn iter(&self) -> impl Iterator { + std::iter::once(&self.raw).chain(self.weighted.iter()) + } + + pub(super) fn iter_mut(&mut self) -> impl Iterator { + std::iter::once(&mut self.raw).chain(self.weighted.iter_mut()) + } +} diff --git a/crates/brk_computer/src/models/bedrock/percentiles.rs b/crates/brk_computer/src/models/bedrock/percentiles.rs index 7f51fc61a..1c1f3b815 100644 --- a/crates/brk_computer/src/models/bedrock/percentiles.rs +++ b/crates/brk_computer/src/models/bedrock/percentiles.rs @@ -1,6 +1,11 @@ +use std::{fmt, str}; + use brk_traversable::Traversable; use schemars::JsonSchema; use serde::Serialize; +use vecdb::Formattable; + +use super::LossPercentileId; #[derive(Debug, Clone, Copy, PartialEq, Traversable, Serialize, JsonSchema)] pub struct Percentiles { @@ -10,3 +15,44 @@ pub struct Percentiles { pub pct99_5: T, pub pct99_9: T, } + +impl_named_row_formattable!(Percentiles { + pct95, + pct98, + pct99, + pct99_5, + pct99_9, +}); + +impl Percentiles { + pub(super) fn from_fn(mut create: impl FnMut(LossPercentileId) -> T) -> Self { + Self { + pct95: create(LossPercentileId::Pct95), + pct98: create(LossPercentileId::Pct98), + pct99: create(LossPercentileId::Pct99), + pct99_5: create(LossPercentileId::Pct99_5), + pct99_9: create(LossPercentileId::Pct99_9), + } + } + + pub(super) fn iter(&self) -> impl Iterator { + [ + &self.pct95, + &self.pct98, + &self.pct99, + &self.pct99_5, + &self.pct99_9, + ] + .into_iter() + } + + pub(super) fn map(self, mut map: impl FnMut(T) -> U) -> Percentiles { + Percentiles { + pct95: map(self.pct95), + pct98: map(self.pct98), + pct99: map(self.pct99), + pct99_5: map(self.pct99_5), + pct99_9: map(self.pct99_9), + } + } +} diff --git a/crates/brk_computer/src/models/bedrock/price_band_id.rs b/crates/brk_computer/src/models/bedrock/price_band_id.rs new file mode 100644 index 000000000..c84f415ef --- /dev/null +++ b/crates/brk_computer/src/models/bedrock/price_band_id.rs @@ -0,0 +1,180 @@ +use brk_types::Version; +use vecdb::{ColumnId, VecValue}; + +use super::{LEVEL_COUNT, LevelId, PriceBands}; + +const PERCENTILE_COUNT: usize = 5; +const PRICE_BAND_COUNT: usize = PERCENTILE_COUNT + LEVEL_COUNT; +const PRICE_BAND_IDS: [PriceBandId; PRICE_BAND_COUNT] = [ + PriceBandId::FloorPct95, + PriceBandId::FloorPct98, + PriceBandId::FloorPct99, + PriceBandId::FloorPct99_5, + PriceBandId::FloorPct99_9, + PriceBandId::LevelPct10, + PriceBandId::LevelPct20, + PriceBandId::LevelPct30, + PriceBandId::LevelPct40, + PriceBandId::LevelPct50, + PriceBandId::LevelPct60, + PriceBandId::LevelPct70, + PriceBandId::LevelPct80, + PriceBandId::LevelPct90, +]; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +pub enum PriceBandId { + FloorPct95, + FloorPct98, + FloorPct99, + FloorPct99_5, + FloorPct99_9, + LevelPct10, + LevelPct20, + LevelPct30, + LevelPct40, + LevelPct50, + LevelPct60, + LevelPct70, + LevelPct80, + LevelPct90, +} + +impl PriceBandId { + pub(super) const fn suffix(self) -> &'static str { + match self { + Self::FloorPct95 => "floor_pct95", + Self::FloorPct98 => "floor_pct98", + Self::FloorPct99 => "floor_pct99", + Self::FloorPct99_5 => "floor_pct99_5", + Self::FloorPct99_9 => "floor_pct99_9", + Self::LevelPct10 => "level_pct10", + Self::LevelPct20 => "level_pct20", + Self::LevelPct30 => "level_pct30", + Self::LevelPct40 => "level_pct40", + Self::LevelPct50 => "level_pct50", + Self::LevelPct60 => "level_pct60", + Self::LevelPct70 => "level_pct70", + Self::LevelPct80 => "level_pct80", + Self::LevelPct90 => "level_pct90", + } + } + + pub(super) fn select(self, values: &PriceBands) -> &T { + match self { + Self::FloorPct95 => &values.floor.pct95, + Self::FloorPct98 => &values.floor.pct98, + Self::FloorPct99 => &values.floor.pct99, + Self::FloorPct99_5 => &values.floor.pct99_5, + Self::FloorPct99_9 => &values.floor.pct99_9, + Self::LevelPct10 => &values.level.pct10, + Self::LevelPct20 => &values.level.pct20, + Self::LevelPct30 => &values.level.pct30, + Self::LevelPct40 => &values.level.pct40, + Self::LevelPct50 => &values.level.pct50, + Self::LevelPct60 => &values.level.pct60, + Self::LevelPct70 => &values.level.pct70, + Self::LevelPct80 => &values.level.pct80, + Self::LevelPct90 => &values.level.pct90, + } + } + + pub(super) fn select_mut(self, values: &mut PriceBands) -> &mut T { + match self { + Self::FloorPct95 => &mut values.floor.pct95, + Self::FloorPct98 => &mut values.floor.pct98, + Self::FloorPct99 => &mut values.floor.pct99, + Self::FloorPct99_5 => &mut values.floor.pct99_5, + Self::FloorPct99_9 => &mut values.floor.pct99_9, + Self::LevelPct10 => &mut values.level.pct10, + Self::LevelPct20 => &mut values.level.pct20, + Self::LevelPct30 => &mut values.level.pct30, + Self::LevelPct40 => &mut values.level.pct40, + Self::LevelPct50 => &mut values.level.pct50, + Self::LevelPct60 => &mut values.level.pct60, + Self::LevelPct70 => &mut values.level.pct70, + Self::LevelPct80 => &mut values.level.pct80, + Self::LevelPct90 => &mut values.level.pct90, + } + } + + pub(super) fn series(create: impl FnMut(Self) -> T) -> PriceBands { + PriceBands::from_fn(create) + } +} + +impl From for PriceBandId { + fn from(value: LevelId) -> Self { + match value { + LevelId::Pct10 => Self::LevelPct10, + LevelId::Pct20 => Self::LevelPct20, + LevelId::Pct30 => Self::LevelPct30, + LevelId::Pct40 => Self::LevelPct40, + LevelId::Pct50 => Self::LevelPct50, + LevelId::Pct60 => Self::LevelPct60, + LevelId::Pct70 => Self::LevelPct70, + LevelId::Pct80 => Self::LevelPct80, + LevelId::Pct90 => Self::LevelPct90, + } + } +} + +impl ColumnId for PriceBandId { + type Row + = PriceBands + where + T: VecValue; + + const VERSION: Version = Version::ONE; + const ALL: &'static [Self] = &PRICE_BAND_IDS; + + #[inline] + fn index(self) -> usize { + self as usize + } + + #[inline] + fn get(self, row: &Self::Row) -> &T { + self.select(row) + } + + #[inline] + fn get_mut(self, row: &mut Self::Row) -> &mut T { + self.select_mut(row) + } + + #[inline] + fn from_fn(create: F) -> Self::Row + where + T: VecValue, + F: FnMut(Self) -> T, + { + PriceBands::from_fn(create) + } + + #[inline] + fn map(row: Self::Row, create: F) -> Self::Row + where + T: VecValue, + U: VecValue, + F: FnMut(T) -> U, + { + row.map(create) + } +} + +#[cfg(test)] +mod tests { + use vecdb::ColumnId; + + use super::{PRICE_BAND_IDS, PriceBandId}; + + #[test] + fn storage_order_matches_public_order() { + assert_eq!(PriceBandId::ALL, PRICE_BAND_IDS); + let row = PriceBandId::from_fn(|id| id); + for &id in PriceBandId::ALL { + assert_eq!(id.get(&row), &id); + } + } +} diff --git a/crates/brk_computer/src/models/bedrock/price_bands.rs b/crates/brk_computer/src/models/bedrock/price_bands.rs index 68e408296..013fed83e 100644 --- a/crates/brk_computer/src/models/bedrock/price_bands.rs +++ b/crates/brk_computer/src/models/bedrock/price_bands.rs @@ -1,11 +1,38 @@ +use std::{fmt, str}; + use brk_traversable::Traversable; use schemars::JsonSchema; use serde::Serialize; +use vecdb::Formattable; -use super::{Levels, Percentiles}; +use super::{LevelId, Levels, Percentiles, PriceBandId}; #[derive(Debug, Clone, Copy, PartialEq, Traversable, Serialize, JsonSchema)] pub struct PriceBands { pub floor: Percentiles, pub level: Levels, } + +impl_named_row_formattable!(PriceBands { floor, level }); + +impl PriceBands { + pub(super) fn from_fn(mut create: impl FnMut(PriceBandId) -> T) -> Self { + Self { + floor: Percentiles { + pct95: create(PriceBandId::FloorPct95), + pct98: create(PriceBandId::FloorPct98), + pct99: create(PriceBandId::FloorPct99), + pct99_5: create(PriceBandId::FloorPct99_5), + pct99_9: create(PriceBandId::FloorPct99_9), + }, + level: Levels::from_fn(|id: LevelId| create(id.into())), + } + } + + pub(super) fn map(self, mut map: impl FnMut(T) -> U) -> PriceBands { + PriceBands { + floor: self.floor.map(&mut map), + level: self.level.map(map), + } + } +} diff --git a/crates/brk_computer/src/models/bedrock/vecs.rs b/crates/brk_computer/src/models/bedrock/vecs.rs index 18c2ccb1d..819242183 100644 --- a/crates/brk_computer/src/models/bedrock/vecs.rs +++ b/crates/brk_computer/src/models/bedrock/vecs.rs @@ -1,716 +1,11 @@ use std::path::PathBuf; use brk_traversable::Traversable; -use brk_types::Version; +use brk_types::Sats; use derive_more::{Deref, DerefMut}; -use vecdb::{ColumnId, Formattable, Rw, StorageMode, VecValue}; +use vecdb::{Rw, StorageMode}; -pub(super) use super::{Levels, ModeVecs, Modes, Percentiles, PriceBands, WeightedModes}; - -macro_rules! impl_named_row_formattable { - ($row:ident { $($field:ident),+ $(,)? }) => { - impl Formattable for $row { - fn write_to(&self, output: &mut Vec) { - output.push(b'{'); - let mut first = true; - $( - if !first { - output.push(b','); - } - first = false; - output.extend_from_slice(concat!("\"", stringify!($field), "\":").as_bytes()); - self.$field.fmt_json(output); - )+ - let _ = first; - output.push(b'}'); - } - - fn fmt_csv(&self, output: &mut String) -> std::fmt::Result { - let mut json = Vec::new(); - self.write_to(&mut json); - let json = std::str::from_utf8(&json).map_err(|_| std::fmt::Error)?; - - output.push('"'); - for character in json.chars() { - if character == '"' { - output.push('"'); - } - output.push(character); - } - output.push('"'); - Ok(()) - } - } - }; -} - -pub(crate) const MODE_COUNT: usize = 10; -pub(crate) const PERCENTILE_COUNT: usize = 5; -pub(crate) const LEVEL_COUNT: usize = 9; -const WEIGHTED_MODE_COUNT: usize = MODE_COUNT - 1; - -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] -#[repr(u8)] -pub(super) enum ModeId { - Raw, - Cointime, - Coinflow, - Coinflow8Y, - Coinflow4Y, - Coinflow2Y, - Coinflow1Y, - Coinflow6M, - Coinflow3M, - Coinflow1M, -} - -impl ModeId { - pub(super) const ALL: [Self; MODE_COUNT] = [ - Self::Raw, - Self::Cointime, - Self::Coinflow, - Self::Coinflow8Y, - Self::Coinflow4Y, - Self::Coinflow2Y, - Self::Coinflow1Y, - Self::Coinflow6M, - Self::Coinflow3M, - Self::Coinflow1M, - ]; - - pub(super) const fn name(self) -> &'static str { - match self { - Self::Raw => "raw", - Self::Cointime => "cointime", - Self::Coinflow => "coinflow", - Self::Coinflow8Y => "coinflow_8y", - Self::Coinflow4Y => "coinflow_4y", - Self::Coinflow2Y => "coinflow_2y", - Self::Coinflow1Y => "coinflow_1y", - Self::Coinflow6M => "coinflow_6m", - Self::Coinflow3M => "coinflow_3m", - Self::Coinflow1M => "coinflow_1m", - } - } - - pub(super) const fn weighted(self) -> Option { - match self { - Self::Raw => None, - Self::Cointime => Some(WeightedModeId::Cointime), - Self::Coinflow => Some(WeightedModeId::Coinflow), - Self::Coinflow8Y => Some(WeightedModeId::Coinflow8Y), - Self::Coinflow4Y => Some(WeightedModeId::Coinflow4Y), - Self::Coinflow2Y => Some(WeightedModeId::Coinflow2Y), - Self::Coinflow1Y => Some(WeightedModeId::Coinflow1Y), - Self::Coinflow6M => Some(WeightedModeId::Coinflow6M), - Self::Coinflow3M => Some(WeightedModeId::Coinflow3M), - Self::Coinflow1M => Some(WeightedModeId::Coinflow1M), - } - } -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub(super) enum WeightedModeId { - Cointime, - Coinflow, - Coinflow8Y, - Coinflow4Y, - Coinflow2Y, - Coinflow1Y, - Coinflow6M, - Coinflow3M, - Coinflow1M, -} - -impl WeightedModeId { - pub(super) const ALL: [Self; WEIGHTED_MODE_COUNT] = [ - Self::Cointime, - Self::Coinflow, - Self::Coinflow8Y, - Self::Coinflow4Y, - Self::Coinflow2Y, - Self::Coinflow1Y, - Self::Coinflow6M, - Self::Coinflow3M, - Self::Coinflow1M, - ]; - - pub(super) const COINFLOW_HORIZONS: [Self; 7] = [ - Self::Coinflow8Y, - Self::Coinflow4Y, - Self::Coinflow2Y, - Self::Coinflow1Y, - Self::Coinflow6M, - Self::Coinflow3M, - Self::Coinflow1M, - ]; - - pub(super) const fn mode(self) -> ModeId { - match self { - Self::Cointime => ModeId::Cointime, - Self::Coinflow => ModeId::Coinflow, - Self::Coinflow8Y => ModeId::Coinflow8Y, - Self::Coinflow4Y => ModeId::Coinflow4Y, - Self::Coinflow2Y => ModeId::Coinflow2Y, - Self::Coinflow1Y => ModeId::Coinflow1Y, - Self::Coinflow6M => ModeId::Coinflow6M, - Self::Coinflow3M => ModeId::Coinflow3M, - Self::Coinflow1M => ModeId::Coinflow1M, - } - } -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] -pub enum LossPercentileId { - Pct95, - Pct98, - Pct99, - Pct99_5, - Pct99_9, -} - -impl LossPercentileId { - pub(super) const fn suffix(self) -> &'static str { - match self { - Self::Pct95 => "pct95", - Self::Pct98 => "pct98", - Self::Pct99 => "pct99", - Self::Pct99_5 => "pct99_5", - Self::Pct99_9 => "pct99_9", - } - } - - pub(super) fn select(self, values: &Percentiles) -> &T { - match self { - Self::Pct95 => &values.pct95, - Self::Pct98 => &values.pct98, - Self::Pct99 => &values.pct99, - Self::Pct99_5 => &values.pct99_5, - Self::Pct99_9 => &values.pct99_9, - } - } - - pub(super) fn select_mut(self, values: &mut Percentiles) -> &mut T { - match self { - Self::Pct95 => &mut values.pct95, - Self::Pct98 => &mut values.pct98, - Self::Pct99 => &mut values.pct99, - Self::Pct99_5 => &mut values.pct99_5, - Self::Pct99_9 => &mut values.pct99_9, - } - } -} - -const LOSS_PERCENTILE_IDS: [LossPercentileId; PERCENTILE_COUNT] = [ - LossPercentileId::Pct95, - LossPercentileId::Pct98, - LossPercentileId::Pct99, - LossPercentileId::Pct99_5, - LossPercentileId::Pct99_9, -]; - -impl ColumnId for LossPercentileId { - type Row - = Percentiles - where - T: VecValue; - - const VERSION: Version = Version::ONE; - const ALL: &'static [Self] = &LOSS_PERCENTILE_IDS; - - #[inline] - fn index(self) -> usize { - self as usize - } - - #[inline] - fn get(self, row: &Self::Row) -> &T { - self.select(row) - } - - #[inline] - fn get_mut(self, row: &mut Self::Row) -> &mut T { - self.select_mut(row) - } - - #[inline] - fn from_fn(create: F) -> Self::Row - where - T: VecValue, - F: FnMut(Self) -> T, - { - Percentiles::from_fn(create) - } - - #[inline] - fn map(row: Self::Row, create: F) -> Self::Row - where - T: VecValue, - U: VecValue, - F: FnMut(T) -> U, - { - row.map(create) - } -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] -pub enum PriceBandId { - FloorPct95, - FloorPct98, - FloorPct99, - FloorPct99_5, - FloorPct99_9, - LevelPct10, - LevelPct20, - LevelPct30, - LevelPct40, - LevelPct50, - LevelPct60, - LevelPct70, - LevelPct80, - LevelPct90, -} - -impl PriceBandId { - pub(super) const fn suffix(self) -> &'static str { - match self { - Self::FloorPct95 => "floor_pct95", - Self::FloorPct98 => "floor_pct98", - Self::FloorPct99 => "floor_pct99", - Self::FloorPct99_5 => "floor_pct99_5", - Self::FloorPct99_9 => "floor_pct99_9", - Self::LevelPct10 => "level_pct10", - Self::LevelPct20 => "level_pct20", - Self::LevelPct30 => "level_pct30", - Self::LevelPct40 => "level_pct40", - Self::LevelPct50 => "level_pct50", - Self::LevelPct60 => "level_pct60", - Self::LevelPct70 => "level_pct70", - Self::LevelPct80 => "level_pct80", - Self::LevelPct90 => "level_pct90", - } - } - - pub(super) fn select(self, values: &PriceBands) -> &T { - match self { - Self::FloorPct95 => &values.floor.pct95, - Self::FloorPct98 => &values.floor.pct98, - Self::FloorPct99 => &values.floor.pct99, - Self::FloorPct99_5 => &values.floor.pct99_5, - Self::FloorPct99_9 => &values.floor.pct99_9, - Self::LevelPct10 => &values.level.pct10, - Self::LevelPct20 => &values.level.pct20, - Self::LevelPct30 => &values.level.pct30, - Self::LevelPct40 => &values.level.pct40, - Self::LevelPct50 => &values.level.pct50, - Self::LevelPct60 => &values.level.pct60, - Self::LevelPct70 => &values.level.pct70, - Self::LevelPct80 => &values.level.pct80, - Self::LevelPct90 => &values.level.pct90, - } - } - - pub(super) fn select_mut(self, values: &mut PriceBands) -> &mut T { - match self { - Self::FloorPct95 => &mut values.floor.pct95, - Self::FloorPct98 => &mut values.floor.pct98, - Self::FloorPct99 => &mut values.floor.pct99, - Self::FloorPct99_5 => &mut values.floor.pct99_5, - Self::FloorPct99_9 => &mut values.floor.pct99_9, - Self::LevelPct10 => &mut values.level.pct10, - Self::LevelPct20 => &mut values.level.pct20, - Self::LevelPct30 => &mut values.level.pct30, - Self::LevelPct40 => &mut values.level.pct40, - Self::LevelPct50 => &mut values.level.pct50, - Self::LevelPct60 => &mut values.level.pct60, - Self::LevelPct70 => &mut values.level.pct70, - Self::LevelPct80 => &mut values.level.pct80, - Self::LevelPct90 => &mut values.level.pct90, - } - } -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub(super) enum LevelId { - Pct10, - Pct20, - Pct30, - Pct40, - Pct50, - Pct60, - Pct70, - Pct80, - Pct90, -} - -impl LevelId { - pub(super) fn select(self, values: &Levels) -> &T { - match self { - Self::Pct10 => &values.pct10, - Self::Pct20 => &values.pct20, - Self::Pct30 => &values.pct30, - Self::Pct40 => &values.pct40, - Self::Pct50 => &values.pct50, - Self::Pct60 => &values.pct60, - Self::Pct70 => &values.pct70, - Self::Pct80 => &values.pct80, - Self::Pct90 => &values.pct90, - } - } - - pub(super) fn select_mut(self, values: &mut Levels) -> &mut T { - match self { - Self::Pct10 => &mut values.pct10, - Self::Pct20 => &mut values.pct20, - Self::Pct30 => &mut values.pct30, - Self::Pct40 => &mut values.pct40, - Self::Pct50 => &mut values.pct50, - Self::Pct60 => &mut values.pct60, - Self::Pct70 => &mut values.pct70, - Self::Pct80 => &mut values.pct80, - Self::Pct90 => &mut values.pct90, - } - } - - const fn price_band(self) -> PriceBandId { - match self { - Self::Pct10 => PriceBandId::LevelPct10, - Self::Pct20 => PriceBandId::LevelPct20, - Self::Pct30 => PriceBandId::LevelPct30, - Self::Pct40 => PriceBandId::LevelPct40, - Self::Pct50 => PriceBandId::LevelPct50, - Self::Pct60 => PriceBandId::LevelPct60, - Self::Pct70 => PriceBandId::LevelPct70, - Self::Pct80 => PriceBandId::LevelPct80, - Self::Pct90 => PriceBandId::LevelPct90, - } - } -} - -const PRICE_BAND_COUNT: usize = PERCENTILE_COUNT + LEVEL_COUNT; -const PRICE_BAND_IDS: [PriceBandId; PRICE_BAND_COUNT] = [ - PriceBandId::FloorPct95, - PriceBandId::FloorPct98, - PriceBandId::FloorPct99, - PriceBandId::FloorPct99_5, - PriceBandId::FloorPct99_9, - PriceBandId::LevelPct10, - PriceBandId::LevelPct20, - PriceBandId::LevelPct30, - PriceBandId::LevelPct40, - PriceBandId::LevelPct50, - PriceBandId::LevelPct60, - PriceBandId::LevelPct70, - PriceBandId::LevelPct80, - PriceBandId::LevelPct90, -]; - -pub(super) const LEVEL_IDS: [LevelId; LEVEL_COUNT] = [ - LevelId::Pct10, - LevelId::Pct20, - LevelId::Pct30, - LevelId::Pct40, - LevelId::Pct50, - LevelId::Pct60, - LevelId::Pct70, - LevelId::Pct80, - LevelId::Pct90, -]; - -impl ColumnId for PriceBandId { - type Row - = PriceBands - where - T: VecValue; - - const VERSION: Version = Version::ONE; - const ALL: &'static [Self] = &PRICE_BAND_IDS; - - #[inline] - fn index(self) -> usize { - self as usize - } - - #[inline] - fn get(self, row: &Self::Row) -> &T { - self.select(row) - } - - #[inline] - fn get_mut(self, row: &mut Self::Row) -> &mut T { - self.select_mut(row) - } - - #[inline] - fn from_fn(create: F) -> Self::Row - where - T: VecValue, - F: FnMut(Self) -> T, - { - PriceBands::from_fn(create) - } - - #[inline] - fn map(row: Self::Row, create: F) -> Self::Row - where - T: VecValue, - U: VecValue, - F: FnMut(T) -> U, - { - row.map(create) - } -} - -impl_named_row_formattable!(Percentiles { - pct95, - pct98, - pct99, - pct99_5, - pct99_9, -}); - -impl Percentiles { - pub(super) fn from_fn(mut create: impl FnMut(LossPercentileId) -> T) -> Self { - Self { - pct95: create(LossPercentileId::Pct95), - pct98: create(LossPercentileId::Pct98), - pct99: create(LossPercentileId::Pct99), - pct99_5: create(LossPercentileId::Pct99_5), - pct99_9: create(LossPercentileId::Pct99_9), - } - } - - pub(super) fn iter(&self) -> impl Iterator { - [ - &self.pct95, - &self.pct98, - &self.pct99, - &self.pct99_5, - &self.pct99_9, - ] - .into_iter() - } - - fn map(self, mut map: impl FnMut(T) -> U) -> Percentiles { - Percentiles { - pct95: map(self.pct95), - pct98: map(self.pct98), - pct99: map(self.pct99), - pct99_5: map(self.pct99_5), - pct99_9: map(self.pct99_9), - } - } -} - -impl_named_row_formattable!(Levels { - pct10, - pct20, - pct30, - pct40, - pct50, - pct60, - pct70, - pct80, - pct90, -}); - -impl Levels { - pub(super) fn from_fn(mut create: impl FnMut(LevelId) -> T) -> Self { - Self { - pct10: create(LevelId::Pct10), - pct20: create(LevelId::Pct20), - pct30: create(LevelId::Pct30), - pct40: create(LevelId::Pct40), - pct50: create(LevelId::Pct50), - pct60: create(LevelId::Pct60), - pct70: create(LevelId::Pct70), - pct80: create(LevelId::Pct80), - pct90: create(LevelId::Pct90), - } - } - - fn map(self, mut map: impl FnMut(T) -> U) -> Levels { - Levels { - pct10: map(self.pct10), - pct20: map(self.pct20), - pct30: map(self.pct30), - pct40: map(self.pct40), - pct50: map(self.pct50), - pct60: map(self.pct60), - pct70: map(self.pct70), - pct80: map(self.pct80), - pct90: map(self.pct90), - } - } -} - -impl_named_row_formattable!(PriceBands { floor, level }); - -impl PriceBands { - pub(super) fn from_fn(mut create: impl FnMut(PriceBandId) -> T) -> Self { - Self { - floor: Percentiles { - pct95: create(PriceBandId::FloorPct95), - pct98: create(PriceBandId::FloorPct98), - pct99: create(PriceBandId::FloorPct99), - pct99_5: create(PriceBandId::FloorPct99_5), - pct99_9: create(PriceBandId::FloorPct99_9), - }, - level: Levels::from_fn(|id| create(id.price_band())), - } - } - - fn map(self, mut map: impl FnMut(T) -> U) -> PriceBands { - PriceBands { - floor: self.floor.map(&mut map), - level: self.level.map(map), - } - } -} - -impl LossPercentileId { - pub(super) fn series(mut create: impl FnMut(Self) -> T) -> Percentiles { - Percentiles::from_fn(&mut create) - } -} - -impl PriceBandId { - pub(super) fn series(mut create: impl FnMut(Self) -> T) -> PriceBands { - PriceBands::from_fn(&mut create) - } -} - -impl WeightedModes { - pub(super) fn from_fn(mut create: impl FnMut(WeightedModeId) -> T) -> Self { - Self { - cointime: create(WeightedModeId::Cointime), - coinflow: create(WeightedModeId::Coinflow), - coinflow_8y: create(WeightedModeId::Coinflow8Y), - coinflow_4y: create(WeightedModeId::Coinflow4Y), - coinflow_2y: create(WeightedModeId::Coinflow2Y), - coinflow_1y: create(WeightedModeId::Coinflow1Y), - coinflow_6m: create(WeightedModeId::Coinflow6M), - coinflow_3m: create(WeightedModeId::Coinflow3M), - coinflow_1m: create(WeightedModeId::Coinflow1M), - } - } - - pub(super) fn try_from_fn( - mut create: impl FnMut(WeightedModeId) -> Result, - ) -> Result { - Ok(Self { - cointime: create(WeightedModeId::Cointime)?, - coinflow: create(WeightedModeId::Coinflow)?, - coinflow_8y: create(WeightedModeId::Coinflow8Y)?, - coinflow_4y: create(WeightedModeId::Coinflow4Y)?, - coinflow_2y: create(WeightedModeId::Coinflow2Y)?, - coinflow_1y: create(WeightedModeId::Coinflow1Y)?, - coinflow_6m: create(WeightedModeId::Coinflow6M)?, - coinflow_3m: create(WeightedModeId::Coinflow3M)?, - coinflow_1m: create(WeightedModeId::Coinflow1M)?, - }) - } - - pub(super) fn select_mut(&mut self, id: WeightedModeId) -> &mut T { - match id { - WeightedModeId::Cointime => &mut self.cointime, - WeightedModeId::Coinflow => &mut self.coinflow, - WeightedModeId::Coinflow8Y => &mut self.coinflow_8y, - WeightedModeId::Coinflow4Y => &mut self.coinflow_4y, - WeightedModeId::Coinflow2Y => &mut self.coinflow_2y, - WeightedModeId::Coinflow1Y => &mut self.coinflow_1y, - WeightedModeId::Coinflow6M => &mut self.coinflow_6m, - WeightedModeId::Coinflow3M => &mut self.coinflow_3m, - WeightedModeId::Coinflow1M => &mut self.coinflow_1m, - } - } - - pub(super) fn select(&self, id: WeightedModeId) -> &T { - match id { - WeightedModeId::Cointime => &self.cointime, - WeightedModeId::Coinflow => &self.coinflow, - WeightedModeId::Coinflow8Y => &self.coinflow_8y, - WeightedModeId::Coinflow4Y => &self.coinflow_4y, - WeightedModeId::Coinflow2Y => &self.coinflow_2y, - WeightedModeId::Coinflow1Y => &self.coinflow_1y, - WeightedModeId::Coinflow6M => &self.coinflow_6m, - WeightedModeId::Coinflow3M => &self.coinflow_3m, - WeightedModeId::Coinflow1M => &self.coinflow_1m, - } - } - - pub(super) fn iter(&self) -> impl Iterator { - [ - &self.cointime, - &self.coinflow, - &self.coinflow_8y, - &self.coinflow_4y, - &self.coinflow_2y, - &self.coinflow_1y, - &self.coinflow_6m, - &self.coinflow_3m, - &self.coinflow_1m, - ] - .into_iter() - } - - pub(super) fn iter_mut(&mut self) -> impl Iterator { - [ - &mut self.cointime, - &mut self.coinflow, - &mut self.coinflow_8y, - &mut self.coinflow_4y, - &mut self.coinflow_2y, - &mut self.coinflow_1y, - &mut self.coinflow_6m, - &mut self.coinflow_3m, - &mut self.coinflow_1m, - ] - .into_iter() - } -} - -impl Modes { - pub(super) fn from_fn(mut create: impl FnMut(ModeId) -> T) -> Self { - Self { - raw: create(ModeId::Raw), - weighted: WeightedModes::from_fn(|id| create(id.mode())), - } - } - - pub(super) fn try_from_fn( - mut create: impl FnMut(ModeId) -> Result, - ) -> Result { - Ok(Self { - raw: create(ModeId::Raw)?, - weighted: WeightedModes::try_from_fn(|id| create(id.mode()))?, - }) - } - - pub(super) fn select_mut(&mut self, id: ModeId) -> &mut T { - match id { - ModeId::Raw => &mut self.raw, - _ => self - .weighted - .select_mut(id.weighted().expect("weighted mode")), - } - } - - pub(super) fn select(&self, id: ModeId) -> &T { - match id { - ModeId::Raw => &self.raw, - _ => self.weighted.select(id.weighted().expect("weighted mode")), - } - } - - pub(super) fn iter(&self) -> impl Iterator { - std::iter::once(&self.raw).chain(self.weighted.iter()) - } - - pub(super) fn iter_mut(&mut self) -> impl Iterator { - std::iter::once(&mut self.raw).chain(self.weighted.iter_mut()) - } -} +use super::{ModeVecs, Modes}; #[derive(Deref, DerefMut, Traversable)] pub struct Vecs { @@ -723,127 +18,52 @@ pub struct Vecs { pub modes: Modes>, } +impl Vecs { + pub(crate) fn resolve_age_value(value: Option, supply: Sats) -> Option + where + f64: From, + { + match value.map(f64::from) { + Some(value) if value.is_finite() => Some(value), + _ if supply == Sats::ZERO => Some(0.0), + _ => None, + } + } +} + #[cfg(test)] mod tests { - use std::convert::Infallible; + use brk_types::{Sats, StoredF64}; + use vecdb::Rw; - use vecdb::ColumnId; - - use super::{ - LOSS_PERCENTILE_IDS, Levels, LossPercentileId, ModeId, Modes, PRICE_BAND_IDS, Percentiles, - PriceBandId, PriceBands, WeightedModeId, - }; + use super::Vecs; #[test] - fn bedrock_columns_match_public_band_order() { - assert_eq!(LossPercentileId::ALL, LOSS_PERCENTILE_IDS); - let percentiles = LossPercentileId::from_fn(|percentile| percentile); + fn empty_age_cohort_uses_zero_weight() { assert_eq!( - percentiles, - Percentiles { - pct95: LossPercentileId::Pct95, - pct98: LossPercentileId::Pct98, - pct99: LossPercentileId::Pct99, - pct99_5: LossPercentileId::Pct99_5, - pct99_9: LossPercentileId::Pct99_9, - }, + Vecs::::resolve_age_value::(None, Sats::ZERO), + Some(0.0) ); - assert_eq!(PriceBandId::ALL, PRICE_BAND_IDS); - let bands = PriceBandId::from_fn(|band| band); assert_eq!( - bands, - PriceBands { - floor: Percentiles { - pct95: PriceBandId::FloorPct95, - pct98: PriceBandId::FloorPct98, - pct99: PriceBandId::FloorPct99, - pct99_5: PriceBandId::FloorPct99_5, - pct99_9: PriceBandId::FloorPct99_9, - }, - level: Levels { - pct10: PriceBandId::LevelPct10, - pct20: PriceBandId::LevelPct20, - pct30: PriceBandId::LevelPct30, - pct40: PriceBandId::LevelPct40, - pct50: PriceBandId::LevelPct50, - pct60: PriceBandId::LevelPct60, - pct70: PriceBandId::LevelPct70, - pct80: PriceBandId::LevelPct80, - pct90: PriceBandId::LevelPct90, - }, - }, - ); - let suffixes = LossPercentileId::from_fn(LossPercentileId::suffix); - assert_eq!( - suffixes, - Percentiles { - pct95: "pct95", - pct98: "pct98", - pct99: "pct99", - pct99_5: "pct99_5", - pct99_9: "pct99_9", - }, - ); - let suffixes = PriceBandId::from_fn(PriceBandId::suffix); - assert_eq!( - suffixes, - PriceBands { - floor: Percentiles { - pct95: "floor_pct95", - pct98: "floor_pct98", - pct99: "floor_pct99", - pct99_5: "floor_pct99_5", - pct99_9: "floor_pct99_9", - }, - level: Levels { - pct10: "level_pct10", - pct20: "level_pct20", - pct30: "level_pct30", - pct40: "level_pct40", - pct50: "level_pct50", - pct60: "level_pct60", - pct70: "level_pct70", - pct80: "level_pct80", - pct90: "level_pct90", - }, - }, + Vecs::::resolve_age_value(Some(StoredF64::NAN), Sats::ZERO), + Some(0.0) ); } #[test] - fn mode_ids_match_named_fields_and_storage_names() { + fn non_empty_age_cohort_requires_finite_weight() { + let supply = Sats::from(1_u64); assert_eq!( - WeightedModeId::ALL.map(WeightedModeId::mode).as_slice(), - &ModeId::ALL[1..] + Vecs::::resolve_age_value::(None, supply), + None ); assert_eq!( - WeightedModeId::COINFLOW_HORIZONS - .map(WeightedModeId::mode) - .as_slice(), - &ModeId::ALL[3..] + Vecs::::resolve_age_value(Some(StoredF64::NAN), supply), + None ); - - let mut modes = Modes::try_from_fn(|id| Ok::<_, Infallible>((id, false))).unwrap(); - for id in ModeId::ALL { - let mode = modes.select_mut(id); - assert_eq!(mode.0, id); - mode.1 = true; - } - assert!(modes.iter().all(|(_, visited)| *visited)); assert_eq!( - ModeId::ALL.map(ModeId::name), - [ - "raw", - "cointime", - "coinflow", - "coinflow_8y", - "coinflow_4y", - "coinflow_2y", - "coinflow_1y", - "coinflow_6m", - "coinflow_3m", - "coinflow_1m", - ] + Vecs::::resolve_age_value(Some(StoredF64::from(0.25)), supply), + Some(0.25) ); } } diff --git a/crates/brk_computer/src/models/bedrock/weighted/mod.rs b/crates/brk_computer/src/models/bedrock/weighted/mod.rs index 0d4e66d6b..daead5587 100644 --- a/crates/brk_computer/src/models/bedrock/weighted/mod.rs +++ b/crates/brk_computer/src/models/bedrock/weighted/mod.rs @@ -1,3 +1,5 @@ +mod mode_id; mod modes; +pub(crate) use mode_id::WeightedModeId; pub(crate) use modes::WeightedModes; diff --git a/crates/brk_computer/src/models/bedrock/weighted/mode_id.rs b/crates/brk_computer/src/models/bedrock/weighted/mode_id.rs new file mode 100644 index 000000000..dadd3fa5c --- /dev/null +++ b/crates/brk_computer/src/models/bedrock/weighted/mode_id.rs @@ -0,0 +1,54 @@ +use super::super::{MODE_COUNT, ModeId}; + +const WEIGHTED_MODE_COUNT: usize = MODE_COUNT - 1; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub(crate) enum WeightedModeId { + Cointime, + Coinflow, + Coinflow8Y, + Coinflow4Y, + Coinflow2Y, + Coinflow1Y, + Coinflow6M, + Coinflow3M, + Coinflow1M, +} + +impl WeightedModeId { + pub(crate) const ALL: [Self; WEIGHTED_MODE_COUNT] = [ + Self::Cointime, + Self::Coinflow, + Self::Coinflow8Y, + Self::Coinflow4Y, + Self::Coinflow2Y, + Self::Coinflow1Y, + Self::Coinflow6M, + Self::Coinflow3M, + Self::Coinflow1M, + ]; + + pub(crate) const COINFLOW_HORIZONS: [Self; 7] = [ + Self::Coinflow8Y, + Self::Coinflow4Y, + Self::Coinflow2Y, + Self::Coinflow1Y, + Self::Coinflow6M, + Self::Coinflow3M, + Self::Coinflow1M, + ]; + + pub(crate) const fn mode(self) -> ModeId { + match self { + Self::Cointime => ModeId::Cointime, + Self::Coinflow => ModeId::Coinflow, + Self::Coinflow8Y => ModeId::Coinflow8Y, + Self::Coinflow4Y => ModeId::Coinflow4Y, + Self::Coinflow2Y => ModeId::Coinflow2Y, + Self::Coinflow1Y => ModeId::Coinflow1Y, + Self::Coinflow6M => ModeId::Coinflow6M, + Self::Coinflow3M => ModeId::Coinflow3M, + Self::Coinflow1M => ModeId::Coinflow1M, + } + } +} diff --git a/crates/brk_computer/src/models/bedrock/weighted/modes.rs b/crates/brk_computer/src/models/bedrock/weighted/modes.rs index d0d4edbd7..3dbfdf84e 100644 --- a/crates/brk_computer/src/models/bedrock/weighted/modes.rs +++ b/crates/brk_computer/src/models/bedrock/weighted/modes.rs @@ -1,5 +1,7 @@ use brk_traversable::Traversable; +use super::WeightedModeId; + #[derive(Traversable)] pub struct WeightedModes { pub cointime: T, @@ -12,3 +14,93 @@ pub struct WeightedModes { pub coinflow_3m: T, pub coinflow_1m: T, } + +impl WeightedModes { + pub(crate) fn from_fn(mut create: impl FnMut(WeightedModeId) -> T) -> Self { + Self { + cointime: create(WeightedModeId::Cointime), + coinflow: create(WeightedModeId::Coinflow), + coinflow_8y: create(WeightedModeId::Coinflow8Y), + coinflow_4y: create(WeightedModeId::Coinflow4Y), + coinflow_2y: create(WeightedModeId::Coinflow2Y), + coinflow_1y: create(WeightedModeId::Coinflow1Y), + coinflow_6m: create(WeightedModeId::Coinflow6M), + coinflow_3m: create(WeightedModeId::Coinflow3M), + coinflow_1m: create(WeightedModeId::Coinflow1M), + } + } + + pub(crate) fn try_from_fn( + mut create: impl FnMut(WeightedModeId) -> Result, + ) -> Result { + Ok(Self { + cointime: create(WeightedModeId::Cointime)?, + coinflow: create(WeightedModeId::Coinflow)?, + coinflow_8y: create(WeightedModeId::Coinflow8Y)?, + coinflow_4y: create(WeightedModeId::Coinflow4Y)?, + coinflow_2y: create(WeightedModeId::Coinflow2Y)?, + coinflow_1y: create(WeightedModeId::Coinflow1Y)?, + coinflow_6m: create(WeightedModeId::Coinflow6M)?, + coinflow_3m: create(WeightedModeId::Coinflow3M)?, + coinflow_1m: create(WeightedModeId::Coinflow1M)?, + }) + } + + pub(crate) fn select_mut(&mut self, id: WeightedModeId) -> &mut T { + match id { + WeightedModeId::Cointime => &mut self.cointime, + WeightedModeId::Coinflow => &mut self.coinflow, + WeightedModeId::Coinflow8Y => &mut self.coinflow_8y, + WeightedModeId::Coinflow4Y => &mut self.coinflow_4y, + WeightedModeId::Coinflow2Y => &mut self.coinflow_2y, + WeightedModeId::Coinflow1Y => &mut self.coinflow_1y, + WeightedModeId::Coinflow6M => &mut self.coinflow_6m, + WeightedModeId::Coinflow3M => &mut self.coinflow_3m, + WeightedModeId::Coinflow1M => &mut self.coinflow_1m, + } + } + + pub(crate) fn select(&self, id: WeightedModeId) -> &T { + match id { + WeightedModeId::Cointime => &self.cointime, + WeightedModeId::Coinflow => &self.coinflow, + WeightedModeId::Coinflow8Y => &self.coinflow_8y, + WeightedModeId::Coinflow4Y => &self.coinflow_4y, + WeightedModeId::Coinflow2Y => &self.coinflow_2y, + WeightedModeId::Coinflow1Y => &self.coinflow_1y, + WeightedModeId::Coinflow6M => &self.coinflow_6m, + WeightedModeId::Coinflow3M => &self.coinflow_3m, + WeightedModeId::Coinflow1M => &self.coinflow_1m, + } + } + + pub(crate) fn iter(&self) -> impl Iterator { + [ + &self.cointime, + &self.coinflow, + &self.coinflow_8y, + &self.coinflow_4y, + &self.coinflow_2y, + &self.coinflow_1y, + &self.coinflow_6m, + &self.coinflow_3m, + &self.coinflow_1m, + ] + .into_iter() + } + + pub(crate) fn iter_mut(&mut self) -> impl Iterator { + [ + &mut self.cointime, + &mut self.coinflow, + &mut self.coinflow_8y, + &mut self.coinflow_4y, + &mut self.coinflow_2y, + &mut self.coinflow_1y, + &mut self.coinflow_6m, + &mut self.coinflow_3m, + &mut self.coinflow_1m, + ] + .into_iter() + } +} diff --git a/crates/brk_computer/src/models/bedrock/weighted_pair.rs b/crates/brk_computer/src/models/bedrock/weighted_pair.rs new file mode 100644 index 000000000..1774c5d0c --- /dev/null +++ b/crates/brk_computer/src/models/bedrock/weighted_pair.rs @@ -0,0 +1,20 @@ +use brk_types::UrpdWeight; + +#[derive(Default)] +pub(super) struct WeightedPair { + pub(super) cointime: T, + pub(super) coinflow: T, +} + +impl WeightedPair { + pub(super) fn from_fn(mut create: impl FnMut(UrpdWeight) -> T) -> Self { + Self { + cointime: create(UrpdWeight::Cointime), + coinflow: create(UrpdWeight::Coinflow), + } + } + + pub(super) fn iter(&self) -> impl Iterator { + [&self.cointime, &self.coinflow].into_iter() + } +} diff --git a/crates/brk_computer/src/models/rarity_meter/band.rs b/crates/brk_computer/src/models/rarity_meter/band.rs new file mode 100644 index 000000000..252378469 --- /dev/null +++ b/crates/brk_computer/src/models/rarity_meter/band.rs @@ -0,0 +1,11 @@ +use brk_traversable::Traversable; +use brk_types::{Cents, PartsPerMillion32, RarityPercentileId}; + +use crate::internal::{LazyColumnRatioPerBlock, LazyPerBlock, Price}; + +#[derive(Clone, Traversable)] +pub struct Band { + #[traversable(flatten)] + pub ratio: LazyColumnRatioPerBlock, + pub price: Price>, +} diff --git a/crates/brk_computer/src/models/rarity_meter/block_decay_percentiles.rs b/crates/brk_computer/src/models/rarity_meter/block_decay_percentiles.rs new file mode 100644 index 000000000..3bee8eead --- /dev/null +++ b/crates/brk_computer/src/models/rarity_meter/block_decay_percentiles.rs @@ -0,0 +1,157 @@ +use brk_types::StoredF32; + +use crate::internal::algo::FenwickTree; + +pub(super) const START_HEIGHT: usize = 210_000; +const HALF_LIFE_BLOCKS: usize = 210_000; +const BUCKET_WIDTH: f64 = 0.001; +const MAX_RATIO: f64 = 43.0; +const TREE_SIZE: usize = (MAX_RATIO / BUCKET_WIDTH) as usize + 1; + +#[derive(Clone)] +pub(crate) struct BlockDecayPercentiles { + tree: FenwickTree, + len: usize, + mass: f64, +} + +impl Default for BlockDecayPercentiles { + fn default() -> Self { + Self { + tree: FenwickTree::new(TREE_SIZE), + len: 0, + mass: 0.0, + } + } +} + +impl BlockDecayPercentiles { + pub(super) fn len(&self) -> usize { + self.len + } + + pub(super) fn reset(&mut self) { + self.tree.reset(); + self.len = 0; + self.mass = 0.0; + } + + #[inline] + fn to_bucket(value: f32) -> usize { + (value as f64 / BUCKET_WIDTH) + .round() + .clamp(0.0, (TREE_SIZE - 1) as f64) as usize + } + + #[inline] + fn weight(height: usize) -> f64 { + 2.0_f64.powf(height.saturating_sub(START_HEIGHT) as f64 / HALF_LIFE_BLOCKS as f64) + } + + pub(super) fn add_bulk(&mut self, start_height: usize, values: &[StoredF32]) { + for (offset, &value) in values.iter().enumerate() { + self.len += 1; + let value = *value; + if value.is_nan() { + continue; + } + let weight = Self::weight(start_height + offset); + self.mass += weight; + self.tree.add_raw(Self::to_bucket(value), &weight); + } + self.tree.build_in_place(); + } + + #[inline] + pub(super) fn add(&mut self, height: usize, value: f32) { + self.len += 1; + if value.is_nan() { + return; + } + let weight = Self::weight(height); + self.mass += weight; + self.tree.add(Self::to_bucket(value), &weight); + } + + pub(super) fn quantiles(&self, qs: &[f64; N], out: &mut [f64; N]) { + if self.mass == 0.0 { + out.fill(0.0); + return; + } + + let mut targets = [0.0; N]; + for (index, &quantile) in qs.iter().enumerate() { + targets[index] = (quantile * self.mass).next_down().max(0.0); + } + + let mut buckets = [0; N]; + self.tree + .kth(&targets, &|weight: &f64| *weight, &mut buckets); + for (index, bucket) in buckets.iter().enumerate() { + out[index] = *bucket as f64 * BUCKET_WIDTH; + } + } +} + +#[cfg(test)] +mod tests { + use brk_types::StoredF32; + + use super::{BlockDecayPercentiles, HALF_LIFE_BLOCKS, START_HEIGHT}; + + fn quantile(percentiles: &BlockDecayPercentiles, quantile: f64) -> f64 { + let mut out = [0.0; 8]; + percentiles.quantiles(&[quantile; 8], &mut out); + out[0] + } + + #[test] + fn basic_quantiles() { + let mut percentiles = BlockDecayPercentiles::default(); + for index in 1..=1000 { + percentiles.add(START_HEIGHT + index, index as f32 / 1000.0); + } + assert_eq!(percentiles.len(), 1000); + assert!((quantile(&percentiles, 0.5) - 0.5).abs() < 0.01); + assert!((quantile(&percentiles, 0.99) - 0.99).abs() < 0.01); + assert!((quantile(&percentiles, 0.01) - 0.01).abs() < 0.01); + } + + #[test] + fn empty_is_zero() { + assert_eq!(quantile(&BlockDecayPercentiles::default(), 0.5), 0.0); + } + + #[test] + fn one_half_life_doubles_relative_weight() { + let mut percentiles = BlockDecayPercentiles::default(); + percentiles.add(START_HEIGHT, 1.0); + percentiles.add(START_HEIGHT + HALF_LIFE_BLOCKS, 2.0); + assert!((percentiles.mass - 3.0).abs() < f64::EPSILON); + assert_eq!(quantile(&percentiles, 0.5), 2.0); + } + + #[test] + fn bulk_recovery_matches_incremental_state() { + let values: Vec<_> = (0..1000) + .map(|index| StoredF32::from(index as f64 / 100.0)) + .collect(); + let mut incremental = BlockDecayPercentiles::default(); + for (offset, value) in values.iter().enumerate() { + incremental.add(START_HEIGHT + offset, **value); + } + + let mut recovered = BlockDecayPercentiles::default(); + recovered.add_bulk(START_HEIGHT, &values); + + let quantiles = [0.0001, 0.01, 0.1, 0.5, 0.9, 0.99, 0.999, 0.9999]; + let mut incremental_out = [0.0; 8]; + let mut recovered_out = [0.0; 8]; + incremental.quantiles(&quantiles, &mut incremental_out); + recovered.quantiles(&quantiles, &mut recovered_out); + + assert_eq!(incremental.len, recovered.len); + assert!((incremental.mass - recovered.mass).abs() < 1e-9); + assert_eq!(incremental_out, recovered_out); + } +} diff --git a/crates/brk_computer/src/models/rarity_meter/component.rs b/crates/brk_computer/src/models/rarity_meter/component.rs new file mode 100644 index 000000000..07561d297 --- /dev/null +++ b/crates/brk_computer/src/models/rarity_meter/component.rs @@ -0,0 +1,144 @@ +use brk_error::Result; +use brk_indexer::Lengths; +use brk_traversable::Traversable; +use brk_types::{ + Cents, Height, PartsPerMillion32, RARITY_PERCENTILES, RARITY_PERCENTILES_LEN, + RarityPercentileId, StoredF32, Version, +}; +use vecdb::{ + AnyVec, ColumnId, ColumnarVec, Database, EagerVec, Exit, ImportableVec, PcoVec, ReadOnlyClone, + ReadableCloneableVec, ReadableVec, Rw, StorageMode, WritableVec, +}; + +use super::{ + Band, BlockDecayPercentiles, COMPUTE_BATCH_SIZE, START_HEIGHT, + cached_component_price::CachedComponentPrice, percentiles::RarityPercentiles, +}; +use crate::{indexes, internal::LazyColumnRatioPerBlock}; + +#[derive(Traversable)] +pub struct Component { + #[traversable(flatten)] + pub bands: RarityPercentiles, + + pub ratios: + M::Stored, RarityPercentileId>>>, + + #[traversable(skip)] + block_decay_pct: BlockDecayPercentiles, + + #[traversable(skip)] + cached_price: CachedComponentPrice, +} + +const VERSION: Version = Version::new(11); + +impl Component { + pub(super) fn forced_import( + db: &Database, + name: &str, + version: Version, + indexes: &indexes::Vecs, + price_source: &(impl ReadableCloneableVec + 'static), + ) -> Result { + let version = version + VERSION; + let cached_price = CachedComponentPrice::new(name, version, price_source); + let ratios = EagerVec::< + ColumnarVec, RarityPercentileId>, + >::forced_import(db, &format!("{name}_ratios_ppm"), version)?; + let source = ratios.read_only_clone(); + let bands = RarityPercentiles::from_fn(|id| { + let suffix = id.suffix(); + let ratio = LazyColumnRatioPerBlock::new( + &format!("{name}_ratio_{suffix}"), + version, + &source, + id, + indexes, + ); + let price = cached_price.price_for_ratio( + &format!("{name}_{suffix}"), + version, + &ratio.ppm.height, + indexes, + ); + Band { ratio, price } + }); + + Ok(Self { + bands, + ratios, + block_decay_pct: BlockDecayPercentiles::default(), + cached_price, + }) + } + + pub(super) fn compute( + &mut self, + starting_lengths: &Lengths, + ratio_source: &impl ReadableVec, + exit: &Exit, + ) -> Result<()> { + self.cached_price + .clear_if_recomputed_from(starting_lengths.height); + + let block_decay_pct = &mut self.block_decay_pct; + self.ratios.compute_batched_to( + starting_lengths.height, + ratio_source.len(), + ratio_source.version(), + COMPUTE_BATCH_SIZE, + |ratios, range| { + let expected_len = range.start.saturating_sub(START_HEIGHT); + if block_decay_pct.len() != expected_len { + block_decay_pct.reset(); + if range.start > START_HEIGHT { + let historical = ratio_source.collect_range_at(START_HEIGHT, range.start); + block_decay_pct.add_bulk(START_HEIGHT, &historical); + } + } + + let new_ratios = ratio_source.collect_range_at(range.start, range.end); + let mut out = [0.0; RARITY_PERCENTILES_LEN]; + for (offset, &ratio) in new_ratios.iter().enumerate() { + let height = range.start + offset; + if height >= START_HEIGHT { + block_decay_pct.add(height, *ratio); + } + block_decay_pct.quantiles(&RARITY_PERCENTILES, &mut out); + ratios.push(RarityPercentileId::from_fn(|id| { + PartsPerMillion32::from(out[id.index()]) + })); + } + + Ok(()) + }, + exit, + )?; + + Ok(()) + } + + pub(super) fn boundary_version(&self) -> Version { + self.bands + .boundary_refs() + .into_iter() + .map(|band| band.price.cents.height.version()) + .sum() + } + + pub(super) fn boundary_len(&self) -> usize { + self.bands + .boundary_refs() + .into_iter() + .map(|band| band.price.cents.height.len()) + .min() + .unwrap_or_default() + } + + pub(super) fn collect_boundary_prices(&self, start: usize, end: usize) -> [Vec; 10] { + self.bands + .boundary_refs() + .map(|band| band.price.cents.height.collect_range_at(start, end)) + } +} diff --git a/crates/brk_computer/src/models/rarity_meter/components.rs b/crates/brk_computer/src/models/rarity_meter/components.rs index fe3a6e974..29064167b 100644 --- a/crates/brk_computer/src/models/rarity_meter/components.rs +++ b/crates/brk_computer/src/models/rarity_meter/components.rs @@ -1,162 +1,16 @@ use brk_error::Result; -use brk_indexer::{Indexer, Lengths}; +use brk_indexer::Indexer; use brk_traversable::Traversable; -use brk_types::{ - Cents, Height, PartsPerMillion32, RARITY_PERCENTILES, RARITY_PERCENTILES_LEN, - RarityPercentileId, StoredF32, Version, -}; -use vecdb::{ - AnyVec, ColumnId, ColumnarVec, Database, EagerVec, Exit, ImportableVec, PcoVec, ReadOnlyClone, - ReadableVec, Rw, StorageMode, WritableVec, -}; +use brk_types::Version; +use vecdb::{Database, Exit, Rw, StorageMode}; +use super::Component; use crate::{ distribution, frameworks::{coinflow, cointime}, indexes, - internal::{LazyColumnRatioPerBlock, LazyPerBlock, Price}, }; -use super::{ - COMPUTE_BATCH_SIZE, - cached_component_price::CachedComponentPrice, - percentiles::{BlockDecayPercentiles, RarityPercentiles, START_HEIGHT, suffix}, -}; - -#[derive(Clone, Traversable)] -pub struct Band { - #[traversable(flatten)] - pub ratio: LazyColumnRatioPerBlock, - pub price: Price>, -} - -#[derive(Traversable)] -pub struct Component { - #[traversable(flatten)] - pub bands: RarityPercentiles, - - pub ratios: - M::Stored, RarityPercentileId>>>, - - #[traversable(skip)] - block_decay_pct: BlockDecayPercentiles, - - #[traversable(skip)] - cached_price: CachedComponentPrice, -} - -const VERSION: Version = Version::new(11); - -impl Component { - fn forced_import( - db: &Database, - name: &str, - version: Version, - indexes: &indexes::Vecs, - price_source: &(impl vecdb::ReadableCloneableVec + 'static), - ) -> Result { - let version = version + VERSION; - let cached_price = CachedComponentPrice::new(name, version, price_source); - let ratios = EagerVec::< - ColumnarVec, RarityPercentileId>, - >::forced_import(db, &format!("{name}_ratios_ppm"), version)?; - let source = ratios.read_only_clone(); - let bands = RarityPercentiles::from_fn(|id| { - let suffix = suffix(id); - let ratio = LazyColumnRatioPerBlock::new( - &format!("{name}_ratio_{suffix}"), - version, - &source, - id, - indexes, - ); - let price = cached_price.price_for_ratio( - &format!("{name}_{suffix}"), - version, - &ratio.ppm.height, - indexes, - ); - Band { ratio, price } - }); - - Ok(Self { - bands, - ratios, - block_decay_pct: BlockDecayPercentiles::default(), - cached_price, - }) - } - - fn compute( - &mut self, - starting_lengths: &Lengths, - ratio_source: &impl ReadableVec, - exit: &Exit, - ) -> Result<()> { - self.cached_price - .clear_if_recomputed_from(starting_lengths.height); - - let block_decay_pct = &mut self.block_decay_pct; - self.ratios.compute_batched_to( - starting_lengths.height, - ratio_source.len(), - ratio_source.version(), - COMPUTE_BATCH_SIZE, - |ratios, range| { - let expected_len = range.start.saturating_sub(START_HEIGHT); - if block_decay_pct.len() != expected_len { - block_decay_pct.reset(); - if range.start > START_HEIGHT { - let historical = ratio_source.collect_range_at(START_HEIGHT, range.start); - block_decay_pct.add_bulk(START_HEIGHT, &historical); - } - } - - let new_ratios = ratio_source.collect_range_at(range.start, range.end); - let mut out = [0.0; RARITY_PERCENTILES_LEN]; - for (offset, &ratio) in new_ratios.iter().enumerate() { - let height = range.start + offset; - if height >= START_HEIGHT { - block_decay_pct.add(height, *ratio); - } - block_decay_pct.quantiles(&RARITY_PERCENTILES, &mut out); - ratios.push(RarityPercentileId::from_fn(|id| { - PartsPerMillion32::from(out[id.index()]) - })); - } - - Ok(()) - }, - exit, - )?; - - Ok(()) - } - - pub(super) fn boundary_version(&self) -> Version { - self.bands - .boundary_refs() - .into_iter() - .map(|band| band.price.cents.height.version()) - .sum() - } - - pub(super) fn boundary_len(&self) -> usize { - self.bands - .boundary_refs() - .into_iter() - .map(|band| band.price.cents.height.len()) - .min() - .unwrap_or_default() - } - - pub(super) fn collect_boundary_prices(&self, start: usize, end: usize) -> [Vec; 10] { - self.bands - .boundary_refs() - .map(|band| band.price.cents.height.collect_range_at(start, end)) - } -} - #[derive(Traversable)] pub struct Components { pub realized_price: Component, diff --git a/crates/brk_computer/src/models/rarity_meter/extreme.rs b/crates/brk_computer/src/models/rarity_meter/extreme.rs new file mode 100644 index 000000000..467ae5f5e --- /dev/null +++ b/crates/brk_computer/src/models/rarity_meter/extreme.rs @@ -0,0 +1,686 @@ +use std::{collections::VecDeque, iter::repeat_n}; + +use brk_error::Result; +use brk_indexer::Indexer; +use brk_traversable::Traversable; +use brk_types::{Height, PartsPerMillion32, StoredU8, Version}; +use derive_more::{Deref, DerefMut}; +use schemars::JsonSchema; +use vecdb::{ + AnyStoredVec, AnyVec, ColumnId, Database, Exit, ReadableVec, Rw, StorageMode, VecIndex, + WritableVec, +}; + +use super::{ExtremeThresholdId, ThresholdVecs}; + +use crate::{ + indexes, + internal::{ + ColumnarPerBlock, LazyColumnPerBlock, NumericValue, PerBlock, PercentPerBlock, + algo::{ExactOrderStats, FenwickTree}, + db_utils::validate_any_computed_version_or_reset, + }, +}; + +const MIN_HISTORY_BLOCKS: usize = 210_000; +const WRITE_INTERVAL: usize = 10_000; +/// Above this many missing outputs, coordinate compression is faster than +/// applying exact live updates one at a time. +const BULK_BACKFILL_THRESHOLD: usize = 10_000; +const BANDS: [(f64, u8); 3] = [(0.00025, 3), (0.0005, 2), (0.001, 1)]; + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum WindowKind { + Full, + Rolling(usize), +} + +#[derive(Clone, Copy)] +struct Config { + upper_tail: bool, + window: WindowKind, + positive_only: bool, +} + +impl Config { + fn accepts(self, value: f64) -> bool { + value.is_finite() && (!self.positive_only || value > 0.0) + } +} + +const REALIZED: Config = Config { + upper_tail: true, + window: WindowKind::Full, + positive_only: false, +}; + +const COINS_IN_LOSS: Config = Config { + upper_tail: true, + window: WindowKind::Full, + positive_only: true, +}; + +const SELLER_EXHAUSTION: Config = Config { + upper_tail: false, + window: WindowKind::Rolling(MIN_HISTORY_BLOCKS), + positive_only: true, +}; + +/// Historical extremeness of one metric. +/// +/// `tail` is the current observation's top- or bottom-tail share, the three +/// `threshold` fields are the highlight boundaries, and `rank` is 0 through 3. +#[derive(Deref, DerefMut, Traversable)] +pub struct Extreme +where + T: NumericValue + JsonSchema, +{ + #[deref] + #[deref_mut] + #[traversable(flatten)] + pub thresholds: ColumnarPerBlock< + T, + ExtremeThresholdId, + ThresholdVecs>, + M, + >, + pub tail: PercentPerBlock, + pub rank: PerBlock, + + #[traversable(skip)] + history: LiveHistory, +} + +impl Extreme +where + T: NumericValue + JsonSchema, +{ + pub(super) fn forced_import( + db: &Database, + name: &str, + version: Version, + indexes: &indexes::Vecs, + ) -> Result { + let thresholds = ColumnarPerBlock::forced_import( + db, + &format!("{name}_thresholds"), + version, + |source| { + ExtremeThresholdId::series(|threshold| { + let series_name = match threshold { + ExtremeThresholdId::Pct0_1 => format!("{name}_threshold_pct0_1"), + ExtremeThresholdId::Pct0_05 => format!("{name}_threshold_pct0_05"), + ExtremeThresholdId::Pct0_025 => format!("{name}_threshold"), + }; + LazyColumnPerBlock::new(&series_name, version, source, threshold, indexes) + }) + }, + )?; + + Ok(Self { + thresholds, + tail: PercentPerBlock::forced_import(db, &format!("{name}_tail"), version, indexes)?, + rank: PerBlock::forced_import(db, &format!("{name}_rank"), version, indexes)?, + history: LiveHistory::new(), + }) + } + + pub(super) fn compute_coins_in_loss( + &mut self, + indexer: &Indexer, + source: &impl ReadableVec, + exit: &Exit, + ) -> Result<()> { + self.compute(indexer, source, COINS_IN_LOSS, exit) + } + + pub(super) fn compute_realized( + &mut self, + indexer: &Indexer, + source: &impl ReadableVec, + exit: &Exit, + ) -> Result<()> { + self.compute(indexer, source, REALIZED, exit) + } + + pub(super) fn compute_seller_exhaustion( + &mut self, + indexer: &Indexer, + source: &impl ReadableVec, + exit: &Exit, + ) -> Result<()> { + self.compute(indexer, source, SELLER_EXHAUSTION, exit) + } + + fn compute( + &mut self, + indexer: &Indexer, + source: &impl ReadableVec, + config: Config, + exit: &Exit, + ) -> Result<()> { + let dependency_version = source.version(); + for output in [ + &mut self.thresholds.height as &mut dyn AnyStoredVec, + &mut self.tail.ppm.height, + &mut self.rank.height, + ] { + validate_any_computed_version_or_reset(output, dependency_version)?; + } + + let source_end = source.len(); + let start = [ + self.thresholds.height.len(), + self.tail.ppm.height.len(), + self.rank.height.len(), + indexer.safe_lengths().height.to_usize(), + source_end, + ] + .into_iter() + .min() + .unwrap_or_default(); + + self.thresholds.height.any_truncate_if_needed_at(start)?; + self.tail.ppm.height.any_truncate_if_needed_at(start)?; + self.rank.height.any_truncate_if_needed_at(start)?; + + if source_end.saturating_sub(start) > BULK_BACKFILL_THRESHOLD { + self.compute_bulk(source, start, source_end, config, exit) + } else { + self.compute_incremental(source, start, source_end, config, exit) + } + } + + fn compute_incremental( + &mut self, + source: &impl ReadableVec, + start: usize, + source_end: usize, + config: Config, + exit: &Exit, + ) -> Result<()> { + let pending = if self.history.is_current(start, config.window) { + source + .collect_range_at(start, source_end) + .into_iter() + .map(Into::into) + .collect() + } else { + let mut values: Vec = source + .collect_range_at(0, source_end) + .into_iter() + .map(Into::into) + .collect(); + let pending = values.split_off(start); + self.history.rebuild(values, config); + pending + }; + + for (offset, value) in pending.into_iter().enumerate() { + let height_index = start + offset; + let state = if config.accepts(value) && self.history.len() >= MIN_HISTORY_BLOCKS { + EventState::new(value, &self.history, config) + } else { + EventState::missing() + }; + + self.push_state(state); + self.history.observe(value, config); + self.write_if_needed(height_index, source_end, exit)?; + } + + Ok(()) + } + + /// Preserve the coordinate-compressed Fenwick path for large backfills. + fn compute_bulk( + &mut self, + source: &impl ReadableVec, + start: usize, + source_end: usize, + config: Config, + exit: &Exit, + ) -> Result<()> { + let values: Vec = source + .collect_range_at(0, source_end) + .into_iter() + .map(Into::into) + .collect(); + let mut sorted_values: Vec = values + .iter() + .copied() + .filter(|&value| config.accepts(value)) + .collect(); + sorted_values.sort_unstable_by(f64::total_cmp); + let mut coordinates = sorted_values.clone(); + coordinates.dedup_by(|a, b| a.total_cmp(b).is_eq()); + + let mut history = CoordinateHistory::new(&coordinates, config.window); + for &value in &values[..start] { + if config.accepts(value) { + history.add(value); + } + } + + for (height_index, &value) in values.iter().enumerate().skip(start) { + let state = if config.accepts(value) && history.len() >= MIN_HISTORY_BLOCKS { + EventState::new(value, &history, config) + } else { + EventState::missing() + }; + + self.push_state(state); + if config.accepts(value) { + history.add(value); + } + self.write_if_needed(height_index, source_end, exit)?; + } + + let (sorted_values, window) = match config.window { + WindowKind::Full => (sorted_values, HistoryWindow::Full), + WindowKind::Rolling(_) => history.rolling_snapshot(), + }; + self.history + .replace_from_sorted(source_end, sorted_values, window); + Ok(()) + } + + fn push_state(&mut self, state: EventState) { + self.thresholds + .push(ExtremeThresholdId::from_fn(|threshold| match threshold { + ExtremeThresholdId::Pct0_1 => T::from(state.thresholds.pct0_1), + ExtremeThresholdId::Pct0_05 => T::from(state.thresholds.pct0_05), + ExtremeThresholdId::Pct0_025 => T::from(state.thresholds.pct0_025), + })); + self.tail + .ppm + .height + .push(PartsPerMillion32::from(state.tail)); + self.rank.height.push(StoredU8::new(state.rank)); + } + + fn write_if_needed( + &mut self, + height_index: usize, + source_end: usize, + exit: &Exit, + ) -> Result<()> { + if (height_index + 1).is_multiple_of(WRITE_INTERVAL) || height_index + 1 == source_end { + let _lock = exit.lock(); + self.thresholds.write()?; + self.tail.ppm.height.write()?; + self.rank.height.write()?; + } + Ok(()) + } +} + +#[derive(Clone)] +enum HistoryWindow { + Full, + Rolling { values: VecDeque, limit: usize }, +} + +impl HistoryWindow { + fn new(kind: WindowKind) -> Self { + match kind { + WindowKind::Full => Self::Full, + WindowKind::Rolling(limit) => Self::Rolling { + values: VecDeque::with_capacity(limit), + limit, + }, + } + } + + fn kind(&self) -> WindowKind { + match self { + Self::Full => WindowKind::Full, + Self::Rolling { limit, .. } => WindowKind::Rolling(*limit), + } + } + + fn push(&mut self, value: T) -> Option { + let Self::Rolling { values, limit } = self else { + return None; + }; + values.push_back(value); + (values.len() > *limit).then(|| values.pop_front().unwrap()) + } +} + +struct CoordinateHistory<'a> { + coordinates: &'a [f64], + tree: FenwickTree, + len: usize, + window: HistoryWindow, +} + +impl<'a> CoordinateHistory<'a> { + fn new(coordinates: &'a [f64], window: WindowKind) -> Self { + Self { + coordinates, + tree: FenwickTree::new(coordinates.len().max(1)), + len: 0, + window: HistoryWindow::new(window), + } + } + + fn add(&mut self, value: f64) { + let bucket = self.bucket(value); + self.tree.add(bucket, &1.0); + self.len += 1; + + if let Some(expired) = self.window.push(bucket) { + self.tree.add(expired, &-1.0); + self.len -= 1; + } + } + + fn rolling_snapshot(&self) -> (Vec, HistoryWindow) { + let HistoryWindow::Rolling { values, limit } = &self.window else { + unreachable!("rolling snapshot requested for full history") + }; + + let mut counts = vec![0_usize; self.coordinates.len()]; + let chronological: VecDeque<_> = values + .iter() + .map(|&bucket| { + counts[bucket] += 1; + self.coordinates[bucket] + }) + .collect(); + let sorted = self + .coordinates + .iter() + .zip(counts) + .flat_map(|(&value, count)| repeat_n(value, count)) + .collect(); + + ( + sorted, + HistoryWindow::Rolling { + values: chronological, + limit: *limit, + }, + ) + } + + fn bucket(&self, value: f64) -> usize { + self.coordinates + .binary_search_by(|candidate| candidate.total_cmp(&value)) + .expect("event value must exist in coordinate set") + } +} + +#[derive(Clone)] +struct LiveHistory { + stats: ExactOrderStats, + processed: usize, + window: HistoryWindow, +} + +impl LiveHistory { + fn new() -> Self { + Self { + stats: ExactOrderStats::new(0), + processed: 0, + window: HistoryWindow::Full, + } + } + + fn is_current(&self, processed: usize, window: WindowKind) -> bool { + self.processed == processed && self.window.kind() == window + } + + fn rebuild(&mut self, mut historical: Vec, config: Config) { + self.processed = historical.len(); + historical.retain(|&value| config.accepts(value)); + + self.window = HistoryWindow::new(config.window); + if let HistoryWindow::Rolling { values, limit } = &mut self.window { + let keep_from = historical.len().saturating_sub(*limit); + historical.drain(..keep_from); + values.extend(historical.iter().copied()); + } + + self.stats = ExactOrderStats::from_unsorted(historical); + } + + fn replace_from_sorted( + &mut self, + processed: usize, + sorted_values: Vec, + window: HistoryWindow, + ) { + if let HistoryWindow::Rolling { values, .. } = &window { + debug_assert_eq!(sorted_values.len(), values.len()); + } + self.processed = processed; + self.stats = ExactOrderStats::from_sorted(sorted_values); + self.window = window; + } + + fn observe(&mut self, value: f64, config: Config) { + self.processed += 1; + if !config.accepts(value) { + return; + } + + self.stats.insert(value); + if let Some(expired) = self.window.push(value) { + assert!(self.stats.remove(expired)); + } + } +} + +trait HistoryStats { + fn len(&self) -> usize; + fn quantile(&self, percentile: f64) -> f64; + fn tail(&self, value: f64, upper: bool) -> f64; +} + +impl HistoryStats for CoordinateHistory<'_> { + fn len(&self) -> usize { + self.len + } + + fn quantile(&self, percentile: f64) -> f64 { + let target = ((self.len - 1) as f64 * percentile).floor(); + let mut index = [0]; + self.tree.kth(&[target], &|count: &f64| *count, &mut index); + self.coordinates[index[0]] + } + + fn tail(&self, value: f64, upper: bool) -> f64 { + let bucket = self.bucket(value); + let less = if bucket == 0 { + 0.0 + } else { + self.tree.prefix_sum(bucket - 1) + }; + let less_or_equal = self.tree.prefix_sum(bucket); + let count = if upper { + self.len as f64 - less + } else { + less_or_equal + }; + (count + 1.0) / (self.len as f64 + 1.0) + } +} + +impl HistoryStats for LiveHistory { + fn len(&self) -> usize { + self.stats.len() + } + + fn quantile(&self, percentile: f64) -> f64 { + let index = ((self.stats.len() - 1) as f64 * percentile).floor() as usize; + self.stats.kth(index) + } + + fn tail(&self, value: f64, upper: bool) -> f64 { + let count = if upper { + self.stats.len() - self.stats.count_lt(value) + } else { + self.stats.count_le(value) + }; + (count as f64 + 1.0) / (self.stats.len() as f64 + 1.0) + } +} + +struct EventState { + thresholds: EventThresholds, + tail: f64, + rank: u8, +} + +struct EventThresholds { + pct0_1: f64, + pct0_05: f64, + pct0_025: f64, +} + +impl EventState { + fn missing() -> Self { + Self { + thresholds: EventThresholds { + pct0_1: f64::NAN, + pct0_05: f64::NAN, + pct0_025: f64::NAN, + }, + tail: f64::NAN, + rank: 0, + } + } + + fn new(value: f64, history: &impl HistoryStats, config: Config) -> Self { + let percentile = |tail: f64| { + if config.upper_tail { 1.0 - tail } else { tail } + }; + let boundary = |tail: f64| history.quantile(percentile(tail)); + let thresholds = EventThresholds { + pct0_1: boundary(BANDS[2].0), + pct0_05: boundary(BANDS[1].0), + pct0_025: boundary(BANDS[0].0), + }; + let rank = [ + (thresholds.pct0_025, BANDS[0].1), + (thresholds.pct0_05, BANDS[1].1), + (thresholds.pct0_1, BANDS[2].1), + ] + .into_iter() + .find_map(|(boundary, rank)| { + let reached = if config.upper_tail { + value >= boundary + } else { + value <= boundary + }; + reached.then_some(rank) + }) + .unwrap_or_default(); + + Self { + thresholds, + tail: history.tail(value, config.upper_tail), + rank, + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn history(values: &[f64], config: Config) -> LiveHistory { + let mut history = LiveHistory::new(); + history.rebuild(values.to_vec(), config); + history + } + + fn assert_same_state(left: EventState, right: EventState) { + assert_eq!(left.thresholds.pct0_1, right.thresholds.pct0_1); + assert_eq!(left.thresholds.pct0_05, right.thresholds.pct0_05); + assert_eq!(left.thresholds.pct0_025, right.thresholds.pct0_025); + assert_eq!(left.tail, right.tail); + assert_eq!(left.rank, right.rank); + } + + #[test] + fn upper_tail_includes_current_observation() { + let history = history(&(1..=100).map(f64::from).collect::>(), REALIZED); + + let state = EventState::new(101.0, &history, REALIZED); + assert!((state.tail - 1.0 / 101.0).abs() < f64::EPSILON); + assert_eq!(state.rank, 3); + assert_eq!(state.thresholds.pct0_025, 99.0); + assert!(state.thresholds.pct0_1 <= state.thresholds.pct0_05); + assert!(state.thresholds.pct0_05 <= state.thresholds.pct0_025); + } + + #[test] + fn lower_tail_includes_current_observation() { + let history = history( + &(1..=100).map(f64::from).collect::>(), + SELLER_EXHAUSTION, + ); + let state = EventState::new(0.0, &history, SELLER_EXHAUSTION); + + assert!((state.tail - 1.0 / 101.0).abs() < f64::EPSILON); + assert_eq!(state.rank, 3); + assert_eq!(state.thresholds.pct0_025, 1.0); + assert!(state.thresholds.pct0_1 >= state.thresholds.pct0_05); + assert!(state.thresholds.pct0_05 >= state.thresholds.pct0_025); + } + + #[test] + fn incremental_history_matches_coordinate_history() { + let values = [3.0, 1.0, 2.0, 2.0, -1.0, 5.0, 4.0, 5.0]; + let mut coordinates = values.to_vec(); + coordinates.sort_unstable_by(f64::total_cmp); + coordinates.dedup_by(|a, b| a.total_cmp(b).is_eq()); + + let mut coordinate = CoordinateHistory::new(&coordinates, WindowKind::Full); + let mut incremental = LiveHistory::new(); + + for value in values { + if coordinate.len() > 0 { + assert_same_state( + EventState::new(value, &coordinate, REALIZED), + EventState::new(value, &incremental, REALIZED), + ); + } + coordinate.add(value); + incremental.observe(value, REALIZED); + } + } + + #[test] + fn rolling_history_evicts_the_oldest_observation() { + let values: Vec<_> = (1..=MIN_HISTORY_BLOCKS + 1) + .map(|value| value as f64) + .collect(); + let mut history = history(&values, SELLER_EXHAUSTION); + + assert_eq!(history.len(), MIN_HISTORY_BLOCKS); + assert_eq!(history.stats.kth(0), 2.0); + + history.observe((MIN_HISTORY_BLOCKS + 2) as f64, SELLER_EXHAUSTION); + + assert_eq!(history.len(), MIN_HISTORY_BLOCKS); + assert_eq!(history.stats.kth(0), 3.0); + } + + #[test] + fn rollback_rebuild_replaces_incremental_state() { + let mut history = history(&[1.0, 2.0, 3.0], REALIZED); + history.observe(4.0, REALIZED); + assert!(history.is_current(4, WindowKind::Full)); + + history.rebuild(vec![1.0, 2.0], REALIZED); + + assert!(history.is_current(2, WindowKind::Full)); + assert_eq!(history.len(), 2); + assert_eq!(history.stats.kth(0), 1.0); + assert_eq!(history.stats.kth(1), 2.0); + } +} diff --git a/crates/brk_computer/src/models/rarity_meter/extremes.rs b/crates/brk_computer/src/models/rarity_meter/extremes.rs index dce1e497c..f1a8a3f09 100644 --- a/crates/brk_computer/src/models/rarity_meter/extremes.rs +++ b/crates/brk_computer/src/models/rarity_meter/extremes.rs @@ -1,361 +1,13 @@ -use std::collections::VecDeque; - use brk_error::Result; use brk_indexer::Indexer; use brk_traversable::Traversable; -use brk_types::{Bitcoin, Dollars, Height, PartsPerMillion32, StoredF32, StoredU8, Version}; -use derive_more::{Deref, DerefMut}; -use schemars::JsonSchema; -use vecdb::{ - AnyStoredVec, AnyVec, ColumnId, Database, Exit, ReadableVec, Rw, StorageMode, VecIndex, - VecValue, WritableVec, -}; +use brk_types::{Bitcoin, Dollars, Height, StoredF32, Version}; +use vecdb::{Database, Exit, ReadableVec, Rw, StorageMode}; -use crate::{ - indexes, - internal::{ - ColumnarPerBlock, LazyColumnPerBlock, NumericValue, PerBlock, PercentPerBlock, - algo::{ExactOrderStats, FenwickTree}, - db_utils::validate_any_computed_version_or_reset, - }, -}; +use super::extreme::Extreme; +use crate::indexes; const VERSION: Version = Version::new(7); -const MIN_HISTORY_BLOCKS: usize = 210_000; -const WRITE_INTERVAL: usize = 10_000; -/// Above this many missing outputs, coordinate compression is faster than -/// applying exact live updates one at a time. -const BULK_BACKFILL_THRESHOLD: usize = 10_000; -const BANDS: [(f64, u8); 3] = [(0.00025, 3), (0.0005, 2), (0.001, 1)]; - -const THRESHOLD_COUNT: usize = 3; - -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] -pub enum ExtremeThresholdId { - Pct0_1, - Pct0_05, - Pct0_025, -} - -const EXTREME_THRESHOLD_IDS: [ExtremeThresholdId; THRESHOLD_COUNT] = [ - ExtremeThresholdId::Pct0_1, - ExtremeThresholdId::Pct0_05, - ExtremeThresholdId::Pct0_025, -]; - -impl ExtremeThresholdId { - fn series(mut create: impl FnMut(Self) -> T) -> ThresholdVecs { - ThresholdVecs { - threshold_pct0_1: create(Self::Pct0_1), - threshold_pct0_05: create(Self::Pct0_05), - threshold_pct0_025: create(Self::Pct0_025), - } - } -} - -impl ColumnId for ExtremeThresholdId { - type Row - = [T; THRESHOLD_COUNT] - where - T: VecValue; - - const VERSION: Version = Version::ONE; - const ALL: &'static [Self] = &EXTREME_THRESHOLD_IDS; - - #[inline] - fn index(self) -> usize { - self as usize - } - - #[inline] - fn get(self, row: &Self::Row) -> &T { - &row[self.index()] - } - - #[inline] - fn get_mut(self, row: &mut Self::Row) -> &mut T { - &mut row[self.index()] - } - - #[inline] - fn from_fn(mut create: F) -> Self::Row - where - T: VecValue, - F: FnMut(Self) -> T, - { - std::array::from_fn(|index| create(EXTREME_THRESHOLD_IDS[index])) - } - - #[inline] - fn map(row: Self::Row, create: F) -> Self::Row - where - T: VecValue, - U: VecValue, - F: FnMut(T) -> U, - { - row.map(create) - } -} - -#[derive(Clone, Traversable)] -pub struct ThresholdVecs { - pub threshold_pct0_1: T, - pub threshold_pct0_05: T, - pub threshold_pct0_025: T, -} - -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -enum WindowKind { - Full, - Rolling(usize), -} - -#[derive(Clone, Copy)] -struct Config { - upper_tail: bool, - window: WindowKind, - positive_only: bool, -} - -const REALIZED: Config = Config { - upper_tail: true, - window: WindowKind::Full, - positive_only: false, -}; - -const COINS_IN_LOSS: Config = Config { - upper_tail: true, - window: WindowKind::Full, - positive_only: true, -}; - -const SELLER_EXHAUSTION: Config = Config { - upper_tail: false, - window: WindowKind::Rolling(MIN_HISTORY_BLOCKS), - positive_only: true, -}; - -/// Historical extremeness of one metric. -/// -/// `tail` is the current observation's top- or bottom-tail share, the three -/// `threshold` fields are the highlight boundaries, and `rank` is 0 through 3. -#[derive(Deref, DerefMut, Traversable)] -pub struct Extreme -where - T: NumericValue + JsonSchema, -{ - #[deref] - #[deref_mut] - #[traversable(flatten)] - pub thresholds: ColumnarPerBlock< - T, - ExtremeThresholdId, - ThresholdVecs>, - M, - >, - pub tail: PercentPerBlock, - pub rank: PerBlock, - - #[traversable(skip)] - history: LiveHistory, -} - -impl Extreme -where - T: NumericValue + JsonSchema, -{ - fn forced_import( - db: &Database, - name: &str, - version: Version, - indexes: &indexes::Vecs, - ) -> Result { - let thresholds = ColumnarPerBlock::forced_import( - db, - &format!("{name}_thresholds"), - version, - |source| { - ExtremeThresholdId::series(|threshold| { - let series_name = match threshold { - ExtremeThresholdId::Pct0_1 => format!("{name}_threshold_pct0_1"), - ExtremeThresholdId::Pct0_05 => format!("{name}_threshold_pct0_05"), - ExtremeThresholdId::Pct0_025 => format!("{name}_threshold"), - }; - LazyColumnPerBlock::new(&series_name, version, source, threshold, indexes) - }) - }, - )?; - - Ok(Self { - thresholds, - tail: PercentPerBlock::forced_import(db, &format!("{name}_tail"), version, indexes)?, - rank: PerBlock::forced_import(db, &format!("{name}_rank"), version, indexes)?, - history: LiveHistory::new(), - }) - } - - fn compute( - &mut self, - indexer: &Indexer, - source: &impl ReadableVec, - config: Config, - exit: &Exit, - ) -> Result<()> { - let dependency_version = source.version(); - for output in [ - &mut self.thresholds.height as &mut dyn AnyStoredVec, - &mut self.tail.ppm.height, - &mut self.rank.height, - ] { - validate_any_computed_version_or_reset(output, dependency_version)?; - } - - let source_end = source.len(); - let start = [ - self.thresholds.height.len(), - self.tail.ppm.height.len(), - self.rank.height.len(), - indexer.safe_lengths().height.to_usize(), - source_end, - ] - .into_iter() - .min() - .unwrap_or_default(); - - self.thresholds.height.any_truncate_if_needed_at(start)?; - self.tail.ppm.height.any_truncate_if_needed_at(start)?; - self.rank.height.any_truncate_if_needed_at(start)?; - - if source_end.saturating_sub(start) > BULK_BACKFILL_THRESHOLD { - self.compute_bulk(source, start, source_end, config, exit) - } else { - self.compute_incremental(source, start, source_end, config, exit) - } - } - - fn compute_incremental( - &mut self, - source: &impl ReadableVec, - start: usize, - source_end: usize, - config: Config, - exit: &Exit, - ) -> Result<()> { - let pending = if self.history.is_current(start, config.window) { - source - .collect_range_at(start, source_end) - .into_iter() - .map(Into::into) - .collect() - } else { - let mut values: Vec = source - .collect_range_at(0, source_end) - .into_iter() - .map(Into::into) - .collect(); - let pending = values.split_off(start); - self.history.rebuild(values, config); - pending - }; - - for (offset, value) in pending.into_iter().enumerate() { - let height_index = start + offset; - let state = if is_valid(value, config) && self.history.len() >= MIN_HISTORY_BLOCKS { - event_state(value, &self.history, config) - } else { - EventState::missing() - }; - - self.push_state(state); - self.history.observe(value, config); - self.write_if_needed(height_index, source_end, exit)?; - } - - Ok(()) - } - - /// Preserve the coordinate-compressed Fenwick path for large backfills. - fn compute_bulk( - &mut self, - source: &impl ReadableVec, - start: usize, - source_end: usize, - config: Config, - exit: &Exit, - ) -> Result<()> { - let values: Vec = source - .collect_range_at(0, source_end) - .into_iter() - .map(Into::into) - .collect(); - let mut sorted_values: Vec = values - .iter() - .copied() - .filter(|&value| is_valid(value, config)) - .collect(); - sorted_values.sort_unstable_by(f64::total_cmp); - let mut coordinates = sorted_values.clone(); - coordinates.dedup_by(|a, b| a.total_cmp(b).is_eq()); - - let mut history = CoordinateHistory::new(&coordinates, config.window); - for &value in &values[..start] { - if is_valid(value, config) { - history.add(value); - } - } - - for (height_index, &value) in values.iter().enumerate().skip(start) { - let state = if is_valid(value, config) && history.len() >= MIN_HISTORY_BLOCKS { - event_state(value, &history, config) - } else { - EventState::missing() - }; - - self.push_state(state); - if is_valid(value, config) { - history.add(value); - } - self.write_if_needed(height_index, source_end, exit)?; - } - - let (sorted_values, window) = match config.window { - WindowKind::Full => (sorted_values, HistoryWindow::Full), - WindowKind::Rolling(_) => history.rolling_snapshot(), - }; - self.history - .replace_from_sorted(source_end, sorted_values, window); - Ok(()) - } - - fn push_state(&mut self, state: EventState) { - self.thresholds - .push(ExtremeThresholdId::from_fn(|threshold| match threshold { - ExtremeThresholdId::Pct0_1 => T::from(state.thresholds.pct0_1), - ExtremeThresholdId::Pct0_05 => T::from(state.thresholds.pct0_05), - ExtremeThresholdId::Pct0_025 => T::from(state.thresholds.pct0_025), - })); - self.tail - .ppm - .height - .push(PartsPerMillion32::from(state.tail)); - self.rank.height.push(StoredU8::new(state.rank)); - } - - fn write_if_needed( - &mut self, - height_index: usize, - source_end: usize, - exit: &Exit, - ) -> Result<()> { - if (height_index + 1).is_multiple_of(WRITE_INTERVAL) || height_index + 1 == source_end { - let _lock = exit.lock(); - self.thresholds.write()?; - self.tail.ppm.height.write()?; - self.rank.height.write()?; - } - Ok(()) - } -} #[derive(Traversable)] pub struct Extremes { @@ -414,398 +66,15 @@ impl Extremes { exit: &Exit, ) -> Result<()> { self.coins_in_loss - .compute(indexer, coins_in_loss, COINS_IN_LOSS, exit)?; + .compute_coins_in_loss(indexer, coins_in_loss, exit)?; self.profit_taking - .compute(indexer, realized_profit, REALIZED, exit)?; + .compute_realized(indexer, realized_profit, exit)?; self.capitulation - .compute(indexer, realized_loss, REALIZED, exit)?; + .compute_realized(indexer, realized_loss, exit)?; self.peak_regret - .compute(indexer, peak_regret, REALIZED, exit)?; + .compute_realized(indexer, peak_regret, exit)?; self.seller_exhaustion - .compute(indexer, seller_exhaustion, SELLER_EXHAUSTION, exit)?; + .compute_seller_exhaustion(indexer, seller_exhaustion, exit)?; Ok(()) } } - -#[derive(Clone)] -enum HistoryWindow { - Full, - Rolling { values: VecDeque, limit: usize }, -} - -impl HistoryWindow { - fn new(kind: WindowKind) -> Self { - match kind { - WindowKind::Full => Self::Full, - WindowKind::Rolling(limit) => Self::Rolling { - values: VecDeque::with_capacity(limit), - limit, - }, - } - } - - fn kind(&self) -> WindowKind { - match self { - Self::Full => WindowKind::Full, - Self::Rolling { limit, .. } => WindowKind::Rolling(*limit), - } - } - - fn push(&mut self, value: T) -> Option { - let Self::Rolling { values, limit } = self else { - return None; - }; - values.push_back(value); - (values.len() > *limit).then(|| values.pop_front().unwrap()) - } -} - -struct CoordinateHistory<'a> { - coordinates: &'a [f64], - tree: FenwickTree, - len: usize, - window: HistoryWindow, -} - -impl<'a> CoordinateHistory<'a> { - fn new(coordinates: &'a [f64], window: WindowKind) -> Self { - Self { - coordinates, - tree: FenwickTree::new(coordinates.len().max(1)), - len: 0, - window: HistoryWindow::new(window), - } - } - - fn add(&mut self, value: f64) { - let bucket = bucket(self.coordinates, value); - self.tree.add(bucket, &1.0); - self.len += 1; - - if let Some(expired) = self.window.push(bucket) { - self.tree.add(expired, &-1.0); - self.len -= 1; - } - } - - fn rolling_snapshot(&self) -> (Vec, HistoryWindow) { - let HistoryWindow::Rolling { values, limit } = &self.window else { - unreachable!("rolling snapshot requested for full history") - }; - - let mut counts = vec![0_usize; self.coordinates.len()]; - let chronological: VecDeque<_> = values - .iter() - .map(|&bucket| { - counts[bucket] += 1; - self.coordinates[bucket] - }) - .collect(); - let sorted = self - .coordinates - .iter() - .zip(counts) - .flat_map(|(&value, count)| std::iter::repeat_n(value, count)) - .collect(); - - ( - sorted, - HistoryWindow::Rolling { - values: chronological, - limit: *limit, - }, - ) - } -} - -#[derive(Clone)] -struct LiveHistory { - stats: ExactOrderStats, - processed: usize, - window: HistoryWindow, -} - -impl LiveHistory { - fn new() -> Self { - Self { - stats: ExactOrderStats::new(0), - processed: 0, - window: HistoryWindow::Full, - } - } - - fn is_current(&self, processed: usize, window: WindowKind) -> bool { - self.processed == processed && self.window.kind() == window - } - - fn rebuild(&mut self, mut historical: Vec, config: Config) { - self.processed = historical.len(); - historical.retain(|&value| is_valid(value, config)); - - self.window = HistoryWindow::new(config.window); - if let HistoryWindow::Rolling { values, limit } = &mut self.window { - let keep_from = historical.len().saturating_sub(*limit); - historical.drain(..keep_from); - values.extend(historical.iter().copied()); - } - - self.stats = ExactOrderStats::from_unsorted(historical); - } - - fn replace_from_sorted( - &mut self, - processed: usize, - sorted_values: Vec, - window: HistoryWindow, - ) { - if let HistoryWindow::Rolling { values, .. } = &window { - debug_assert_eq!(sorted_values.len(), values.len()); - } - self.processed = processed; - self.stats = ExactOrderStats::from_sorted(sorted_values); - self.window = window; - } - - fn observe(&mut self, value: f64, config: Config) { - self.processed += 1; - if !is_valid(value, config) { - return; - } - - self.stats.insert(value); - if let Some(expired) = self.window.push(value) { - assert!(self.stats.remove(expired)); - } - } -} - -trait HistoryStats { - fn len(&self) -> usize; - fn quantile(&self, percentile: f64) -> f64; - fn tail(&self, value: f64, upper: bool) -> f64; -} - -impl HistoryStats for CoordinateHistory<'_> { - fn len(&self) -> usize { - self.len - } - - fn quantile(&self, percentile: f64) -> f64 { - let target = ((self.len - 1) as f64 * percentile).floor(); - let mut index = [0]; - self.tree.kth(&[target], &|count: &f64| *count, &mut index); - self.coordinates[index[0]] - } - - fn tail(&self, value: f64, upper: bool) -> f64 { - let bucket = bucket(self.coordinates, value); - let less = if bucket == 0 { - 0.0 - } else { - self.tree.prefix_sum(bucket - 1) - }; - let less_or_equal = self.tree.prefix_sum(bucket); - let count = if upper { - self.len as f64 - less - } else { - less_or_equal - }; - (count + 1.0) / (self.len as f64 + 1.0) - } -} - -impl HistoryStats for LiveHistory { - fn len(&self) -> usize { - self.stats.len() - } - - fn quantile(&self, percentile: f64) -> f64 { - let index = ((self.stats.len() - 1) as f64 * percentile).floor() as usize; - self.stats.kth(index) - } - - fn tail(&self, value: f64, upper: bool) -> f64 { - let count = if upper { - self.stats.len() - self.stats.count_lt(value) - } else { - self.stats.count_le(value) - }; - (count as f64 + 1.0) / (self.stats.len() as f64 + 1.0) - } -} - -struct EventState { - thresholds: EventThresholds, - tail: f64, - rank: u8, -} - -struct EventThresholds { - pct0_1: f64, - pct0_05: f64, - pct0_025: f64, -} - -impl EventState { - fn missing() -> Self { - Self { - thresholds: EventThresholds { - pct0_1: f64::NAN, - pct0_05: f64::NAN, - pct0_025: f64::NAN, - }, - tail: f64::NAN, - rank: 0, - } - } -} - -fn event_state(value: f64, history: &impl HistoryStats, config: Config) -> EventState { - let percentile = |tail: f64| { - if config.upper_tail { 1.0 - tail } else { tail } - }; - let boundary = |tail: f64| history.quantile(percentile(tail)); - let thresholds = EventThresholds { - pct0_1: boundary(BANDS[2].0), - pct0_05: boundary(BANDS[1].0), - pct0_025: boundary(BANDS[0].0), - }; - let rank = [ - (thresholds.pct0_025, BANDS[0].1), - (thresholds.pct0_05, BANDS[1].1), - (thresholds.pct0_1, BANDS[2].1), - ] - .into_iter() - .find_map(|(boundary, rank)| { - let reached = if config.upper_tail { - value >= boundary - } else { - value <= boundary - }; - reached.then_some(rank) - }) - .unwrap_or_default(); - - EventState { - thresholds, - tail: history.tail(value, config.upper_tail), - rank, - } -} - -fn is_valid(value: f64, config: Config) -> bool { - value.is_finite() && (!config.positive_only || value > 0.0) -} - -fn bucket(coordinates: &[f64], value: f64) -> usize { - coordinates - .binary_search_by(|candidate| candidate.total_cmp(&value)) - .expect("event value must exist in coordinate set") -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn threshold_columns_match_public_fields() { - assert_eq!(ExtremeThresholdId::ALL, EXTREME_THRESHOLD_IDS); - let fields = ExtremeThresholdId::series(|threshold| threshold); - assert_eq!(fields.threshold_pct0_1, ExtremeThresholdId::Pct0_1); - assert_eq!(fields.threshold_pct0_05, ExtremeThresholdId::Pct0_05); - assert_eq!(fields.threshold_pct0_025, ExtremeThresholdId::Pct0_025); - } - - fn history(values: &[f64], config: Config) -> LiveHistory { - let mut history = LiveHistory::new(); - history.rebuild(values.to_vec(), config); - history - } - - fn assert_same_state(left: EventState, right: EventState) { - assert_eq!(left.thresholds.pct0_1, right.thresholds.pct0_1); - assert_eq!(left.thresholds.pct0_05, right.thresholds.pct0_05); - assert_eq!(left.thresholds.pct0_025, right.thresholds.pct0_025); - assert_eq!(left.tail, right.tail); - assert_eq!(left.rank, right.rank); - } - - #[test] - fn upper_tail_includes_current_observation() { - let history = history(&(1..=100).map(f64::from).collect::>(), REALIZED); - - let state = event_state(101.0, &history, REALIZED); - assert!((state.tail - 1.0 / 101.0).abs() < f64::EPSILON); - assert_eq!(state.rank, 3); - assert_eq!(state.thresholds.pct0_025, 99.0); - assert!(state.thresholds.pct0_1 <= state.thresholds.pct0_05); - assert!(state.thresholds.pct0_05 <= state.thresholds.pct0_025); - } - - #[test] - fn lower_tail_includes_current_observation() { - let history = history( - &(1..=100).map(f64::from).collect::>(), - SELLER_EXHAUSTION, - ); - let state = event_state(0.0, &history, SELLER_EXHAUSTION); - - assert!((state.tail - 1.0 / 101.0).abs() < f64::EPSILON); - assert_eq!(state.rank, 3); - assert_eq!(state.thresholds.pct0_025, 1.0); - assert!(state.thresholds.pct0_1 >= state.thresholds.pct0_05); - assert!(state.thresholds.pct0_05 >= state.thresholds.pct0_025); - } - - #[test] - fn incremental_history_matches_coordinate_history() { - let values = [3.0, 1.0, 2.0, 2.0, -1.0, 5.0, 4.0, 5.0]; - let mut coordinates = values.to_vec(); - coordinates.sort_unstable_by(f64::total_cmp); - coordinates.dedup_by(|a, b| a.total_cmp(b).is_eq()); - - let mut coordinate = CoordinateHistory::new(&coordinates, WindowKind::Full); - let mut incremental = LiveHistory::new(); - - for value in values { - if coordinate.len() > 0 { - assert_same_state( - event_state(value, &coordinate, REALIZED), - event_state(value, &incremental, REALIZED), - ); - } - coordinate.add(value); - incremental.observe(value, REALIZED); - } - } - - #[test] - fn rolling_history_evicts_the_oldest_observation() { - let values: Vec<_> = (1..=MIN_HISTORY_BLOCKS + 1) - .map(|value| value as f64) - .collect(); - let mut history = history(&values, SELLER_EXHAUSTION); - - assert_eq!(history.len(), MIN_HISTORY_BLOCKS); - assert_eq!(history.stats.kth(0), 2.0); - - history.observe((MIN_HISTORY_BLOCKS + 2) as f64, SELLER_EXHAUSTION); - - assert_eq!(history.len(), MIN_HISTORY_BLOCKS); - assert_eq!(history.stats.kth(0), 3.0); - } - - #[test] - fn rollback_rebuild_replaces_incremental_state() { - let mut history = history(&[1.0, 2.0, 3.0], REALIZED); - history.observe(4.0, REALIZED); - assert!(history.is_current(4, WindowKind::Full)); - - history.rebuild(vec![1.0, 2.0], REALIZED); - - assert!(history.is_current(2, WindowKind::Full)); - assert_eq!(history.len(), 2); - assert_eq!(history.stats.kth(0), 1.0); - assert_eq!(history.stats.kth(1), 2.0); - } -} diff --git a/crates/brk_computer/src/models/rarity_meter/inner.rs b/crates/brk_computer/src/models/rarity_meter/inner.rs index 5bb5f3222..2b41c0966 100644 --- a/crates/brk_computer/src/models/rarity_meter/inner.rs +++ b/crates/brk_computer/src/models/rarity_meter/inner.rs @@ -9,12 +9,7 @@ use crate::{ internal::{ColumnarPerBlock, LazyColumnPerBlock, PerBlock, Price}, }; -use super::{ - COMPUTE_BATCH_SIZE, Component, - percentiles::{ - BOUNDARY_PERCENTILE_IDS, RarityPercentiles, boundary_index, is_lower_boundary, price_suffix, - }, -}; +use super::{COMPUTE_BATCH_SIZE, Component, percentiles::RarityPercentiles}; #[derive(Traversable)] pub struct RarityMeterInner { @@ -46,7 +41,7 @@ impl RarityMeterInner { |source| { RarityPercentiles::from_fn(|id| { Price::from_columnar_source( - &format!("{prefix}_{}", price_suffix(id)), + &format!("{prefix}_{}", id.price_suffix()), version, source, id, @@ -93,7 +88,7 @@ impl RarityMeterInner { .collect(); for offset in 0..range.len() { - cents.push(combine_percentiles(&component_prices, offset)); + cents.push(Self::combine_percentiles(&component_prices, offset)); } Ok(()) @@ -131,7 +126,7 @@ impl RarityMeterInner { .each_ref() .map(|band| band.collect_range_at(range.start, range.end)); for (offset, price) in spot.into_iter().enumerate() { - index.push(StoredI8::new(score_at(price, &bands, offset))); + index.push(StoredI8::new(Self::score_at(price, &bands, offset))); } Ok(()) @@ -176,7 +171,7 @@ impl RarityMeterInner { for (offset, price) in spot.into_iter().enumerate() { let value = component_prices .iter() - .map(|bands| score_at(price, bands, offset)) + .map(|bands| Self::score_at(price, bands, offset)) .sum(); score.push(StoredI8::new(value)); } @@ -188,50 +183,50 @@ impl RarityMeterInner { Ok(()) } -} -fn combine_percentiles( - component_prices: &[[Vec; 10]], - offset: usize, -) -> [Cents; RARITY_PERCENTILES_LEN] { - let boundary_values = BOUNDARY_PERCENTILE_IDS.map(|id| { - let index = boundary_index(id).expect("boundary percentile"); - let values = component_prices - .iter() - .map(|component| component[index][offset]); - if is_lower_boundary(id) { - values.max().expect("rarity meter component") + fn combine_percentiles( + component_prices: &[[Vec; 10]], + offset: usize, + ) -> [Cents; RARITY_PERCENTILES_LEN] { + let boundary_values = RarityPercentileId::BOUNDARIES.map(|id| { + let index = id.boundary_index().expect("boundary percentile"); + let values = component_prices + .iter() + .map(|component| component[index][offset]); + if id.is_lower_boundary() { + values.max().expect("rarity meter component") + } else { + values.min().expect("rarity meter component") + } + }); + let lower = boundary_values[RarityPercentileId::Pct5.boundary_index().unwrap()]; + let upper = boundary_values[RarityPercentileId::Pct95.boundary_index().unwrap()]; + + RarityPercentileId::from_fn(|id| { + id.boundary_index() + .map(|index| boundary_values[index]) + .unwrap_or_else(|| Self::interpolate(lower, upper, id.percentile())) + }) + } + + fn interpolate(lower: Cents, upper: Cents, percentile: f64) -> Cents { + let position = (percentile - 0.05) / 0.90; + let lower = f64::from(lower); + let upper = f64::from(upper); + let value = if lower > 0.0 && upper > 0.0 { + (lower.ln() + position * (upper.ln() - lower.ln())).exp() } else { - values.min().expect("rarity meter component") - } - }); - let lower = boundary_values[boundary_index(RarityPercentileId::Pct5).unwrap()]; - let upper = boundary_values[boundary_index(RarityPercentileId::Pct95).unwrap()]; + lower + position * (upper - lower) + }; + Cents::from(value.round()) + } - RarityPercentileId::from_fn(|id| { - boundary_index(id) - .map(|index| boundary_values[index]) - .unwrap_or_else(|| interpolate(lower, upper, id.percentile())) - }) -} + fn score_at(price: Cents, bands: &[Vec; 10], index: usize) -> i8 { + let lower = bands[..5].iter().filter(|band| price < band[index]).count() as i8; + let upper = bands[5..].iter().filter(|band| price > band[index]).count() as i8; -fn interpolate(lower: Cents, upper: Cents, percentile: f64) -> Cents { - let position = (percentile - 0.05) / 0.90; - let lower = f64::from(lower); - let upper = f64::from(upper); - let value = if lower > 0.0 && upper > 0.0 { - (lower.ln() + position * (upper.ln() - lower.ln())).exp() - } else { - lower + position * (upper - lower) - }; - Cents::from(value.round()) -} - -fn score_at(price: Cents, bands: &[Vec; 10], index: usize) -> i8 { - let lower = bands[..5].iter().filter(|band| price < band[index]).count() as i8; - let upper = bands[5..].iter().filter(|band| price > band[index]).count() as i8; - - upper - lower + upper - lower + } } #[cfg(test)] @@ -250,7 +245,7 @@ mod tests { bands([10, 20, 30, 40, 50, 500, 600, 700, 800, 900]), bands([15, 25, 35, 45, 55, 450, 550, 650, 750, 850]), ]; - let row = combine_percentiles(&components, 0); + let row = RarityMeterInner::combine_percentiles(&components, 0); assert_eq!(*Pct0_1.get(&row), Cents::from(15_u64)); assert_eq!(*Pct5.get(&row), Cents::from(55_u64)); @@ -258,7 +253,7 @@ mod tests { assert_eq!(*Pct99_9.get(&row), Cents::from(850_u64)); assert_eq!( *Pct50.get(&row), - interpolate(Cents::from(55_u64), Cents::from(450_u64), 0.5) + RarityMeterInner::interpolate(Cents::from(55_u64), Cents::from(450_u64), 0.5) ); } } diff --git a/crates/brk_computer/src/models/rarity_meter/mod.rs b/crates/brk_computer/src/models/rarity_meter/mod.rs index 7504fae36..f66a29f60 100644 --- a/crates/brk_computer/src/models/rarity_meter/mod.rs +++ b/crates/brk_computer/src/models/rarity_meter/mod.rs @@ -1,8 +1,13 @@ +mod band; +mod block_decay_percentiles; mod cached_component_price; +mod component; mod components; +mod extreme; mod extremes; mod inner; mod percentiles; +mod threshold_vecs; use brk_error::Result; use brk_indexer::Indexer; @@ -16,9 +21,14 @@ use crate::{ indexes, price, }; -pub use components::{Component, Components}; +pub use band::Band; +pub use component::Component; +pub use components::Components; pub use extremes::Extremes; pub use inner::RarityMeterInner; +pub use threshold_vecs::{ExtremeThresholdId, ThresholdVecs}; + +use block_decay_percentiles::{BlockDecayPercentiles, START_HEIGHT}; #[derive(Traversable)] pub struct RarityMeter { diff --git a/crates/brk_computer/src/models/rarity_meter/percentiles.rs b/crates/brk_computer/src/models/rarity_meter/percentiles.rs index 15a44c950..de2cbb72c 100644 --- a/crates/brk_computer/src/models/rarity_meter/percentiles.rs +++ b/crates/brk_computer/src/models/rarity_meter/percentiles.rs @@ -1,49 +1,5 @@ use brk_traversable::Traversable; -use brk_types::{RarityPercentileId, StoredF32}; - -use crate::internal::algo::FenwickTree; - -pub(crate) const BOUNDARY_PERCENTILE_IDS: [RarityPercentileId; 10] = [ - RarityPercentileId::Pct0_1, - RarityPercentileId::Pct0_5, - RarityPercentileId::Pct1, - RarityPercentileId::Pct2, - RarityPercentileId::Pct5, - RarityPercentileId::Pct95, - RarityPercentileId::Pct98, - RarityPercentileId::Pct99, - RarityPercentileId::Pct99_5, - RarityPercentileId::Pct99_9, -]; - -pub(crate) const fn boundary_index(id: RarityPercentileId) -> Option { - use RarityPercentileId::*; - - match id { - Pct0_1 => Some(0), - Pct0_5 => Some(1), - Pct1 => Some(2), - Pct2 => Some(3), - Pct5 => Some(4), - Pct95 => Some(5), - Pct98 => Some(6), - Pct99 => Some(7), - Pct99_5 => Some(8), - Pct99_9 => Some(9), - _ => None, - } -} - -pub(crate) const fn is_lower_boundary(id: RarityPercentileId) -> bool { - matches!( - id, - RarityPercentileId::Pct0_1 - | RarityPercentileId::Pct0_5 - | RarityPercentileId::Pct1 - | RarityPercentileId::Pct2 - | RarityPercentileId::Pct5 - ) -} +use brk_types::RarityPercentileId; #[derive(Clone, Traversable)] pub struct RarityPercentiles { @@ -122,235 +78,6 @@ impl RarityPercentiles { } pub(crate) fn boundary_refs(&self) -> [&T; 10] { - BOUNDARY_PERCENTILE_IDS.map(|id| self.get(id)) - } -} - -pub(crate) const fn suffix(id: RarityPercentileId) -> &'static str { - use RarityPercentileId::*; - - match id { - Pct0_1 => "pct0_1", - Pct0_5 => "pct0_5", - Pct1 => "pct1", - Pct2 => "pct2", - Pct5 => "pct5", - Pct10 => "pct10", - Pct20 => "pct20", - Pct30 => "pct30", - Pct40 => "pct40", - Pct50 => "pct50", - Pct60 => "pct60", - Pct70 => "pct70", - Pct80 => "pct80", - Pct90 => "pct90", - Pct95 => "pct95", - Pct98 => "pct98", - Pct99 => "pct99", - Pct99_5 => "pct99_5", - Pct99_9 => "pct99_9", - } -} - -pub(crate) const fn price_suffix(id: RarityPercentileId) -> &'static str { - use RarityPercentileId::*; - - match id { - Pct1 => "pct01", - Pct2 => "pct02", - Pct5 => "pct05", - _ => suffix(id), - } -} - -/// First block included in the Rarity Meter distribution. -pub const START_HEIGHT: usize = 210_000; - -/// Number of blocks after which an observation has half the weight of a new one. -pub const HALF_LIFE_BLOCKS: usize = 210_000; - -/// Block-decayed percentile tracker backed by a Fenwick tree. -/// -/// An observation at `height` receives weight -/// `2 ^ ((height - START_HEIGHT) / HALF_LIFE_BLOCKS)`. Multiplying every -/// observation by the same current-height decay factor does not change -/// quantiles, so this fixed scale is exactly equivalent to halving old weights -/// every 210,000 blocks without rescaling the tree on every block. -#[derive(Clone)] -pub(crate) struct BlockDecayPercentiles { - tree: FenwickTree, - len: usize, - mass: f64, -} - -const BUCKET_WIDTH: f64 = 0.001; -const MAX_RATIO: f64 = 43.0; -const TREE_SIZE: usize = (MAX_RATIO / BUCKET_WIDTH) as usize + 1; - -impl Default for BlockDecayPercentiles { - fn default() -> Self { - Self { - tree: FenwickTree::new(TREE_SIZE), - len: 0, - mass: 0.0, - } - } -} - -impl BlockDecayPercentiles { - pub fn len(&self) -> usize { - self.len - } - - pub fn reset(&mut self) { - self.tree.reset(); - self.len = 0; - self.mass = 0.0; - } - - #[inline] - fn to_bucket(value: f32) -> usize { - (value as f64 / BUCKET_WIDTH) - .round() - .clamp(0.0, (TREE_SIZE - 1) as f64) as usize - } - - #[inline] - fn weight(height: usize) -> f64 { - 2.0_f64.powf(height.saturating_sub(START_HEIGHT) as f64 / HALF_LIFE_BLOCKS as f64) - } - - /// Rebuild historical state in O(n + N). - pub fn add_bulk(&mut self, start_height: usize, values: &[StoredF32]) { - for (offset, &value) in values.iter().enumerate() { - self.len += 1; - let value = *value; - if value.is_nan() { - continue; - } - let weight = Self::weight(start_height + offset); - self.mass += weight; - self.tree.add_raw(Self::to_bucket(value), &weight); - } - self.tree.build_in_place(); - } - - /// Add the observation for one block. O(log N). - #[inline] - pub fn add(&mut self, height: usize, value: f32) { - self.len += 1; - if value.is_nan() { - return; - } - let weight = Self::weight(height); - self.mass += weight; - self.tree.add(Self::to_bucket(value), &weight); - } - - /// Compute sorted quantiles in one shared tree walk. - pub fn quantiles(&self, qs: &[f64; N], out: &mut [f64; N]) { - if self.mass == 0.0 { - out.fill(0.0); - return; - } - - let mut targets = [0.0; N]; - for (i, &q) in qs.iter().enumerate() { - targets[i] = (q * self.mass).next_down().max(0.0); - } - - let mut buckets = [0; N]; - self.tree - .kth(&targets, &|weight: &f64| *weight, &mut buckets); - for (i, bucket) in buckets.iter().enumerate() { - out[i] = *bucket as f64 * BUCKET_WIDTH; - } - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn schema_preserves_existing_names_and_boundaries() { - use RarityPercentileId::*; - - let percentiles = RarityPercentiles::from_fn(suffix); - assert_eq!(percentiles.pct0_1, "pct0_1"); - assert_eq!(percentiles.pct50, "pct50"); - assert_eq!(percentiles.pct99_9, "pct99_9"); - assert_eq!(price_suffix(Pct1), "pct01"); - assert_eq!(price_suffix(Pct2), "pct02"); - assert_eq!(price_suffix(Pct5), "pct05"); - - for (index, id) in BOUNDARY_PERCENTILE_IDS.into_iter().enumerate() { - assert_eq!(boundary_index(id), Some(index)); - } - assert!(boundary_index(Pct50).is_none()); - } - - fn quantile(percentiles: &BlockDecayPercentiles, q: f64) -> f64 { - let mut out = [0.0; 8]; - percentiles.quantiles(&[q, q, q, q, q, q, q, q], &mut out); - out[0] - } - - #[test] - fn basic_quantiles() { - let mut percentiles = BlockDecayPercentiles::default(); - for i in 1..=1000 { - percentiles.add(START_HEIGHT + i, i as f32 / 1000.0); - } - assert_eq!(percentiles.len(), 1000); - - let median = quantile(&percentiles, 0.5); - assert!((median - 0.5).abs() < 0.01, "median was {median}"); - - let p99 = quantile(&percentiles, 0.99); - assert!((p99 - 0.99).abs() < 0.01, "p99 was {p99}"); - - let p01 = quantile(&percentiles, 0.01); - assert!((p01 - 0.01).abs() < 0.01, "p01 was {p01}"); - } - - #[test] - fn empty() { - let percentiles = BlockDecayPercentiles::default(); - assert_eq!(quantile(&percentiles, 0.5), 0.0); - } - - #[test] - fn one_half_life_doubles_relative_weight() { - let mut percentiles = BlockDecayPercentiles::default(); - percentiles.add(START_HEIGHT, 1.0); - percentiles.add(START_HEIGHT + HALF_LIFE_BLOCKS, 2.0); - - assert!((percentiles.mass - 3.0).abs() < f64::EPSILON); - assert_eq!(quantile(&percentiles, 0.5), 2.0); - } - - #[test] - fn bulk_recovery_matches_incremental_state() { - let values: Vec<_> = (0..1000) - .map(|i| StoredF32::from(i as f64 / 100.0)) - .collect(); - let mut incremental = BlockDecayPercentiles::default(); - for (offset, value) in values.iter().enumerate() { - incremental.add(START_HEIGHT + offset, **value); - } - - let mut recovered = BlockDecayPercentiles::default(); - recovered.add_bulk(START_HEIGHT, &values); - - let qs = [0.0001, 0.01, 0.1, 0.5, 0.9, 0.99, 0.999, 0.9999]; - let mut incremental_out = [0.0; 8]; - let mut recovered_out = [0.0; 8]; - incremental.quantiles(&qs, &mut incremental_out); - recovered.quantiles(&qs, &mut recovered_out); - - assert_eq!(incremental.len, recovered.len); - assert!((incremental.mass - recovered.mass).abs() < 1e-9); - assert_eq!(incremental_out, recovered_out); + RarityPercentileId::BOUNDARIES.map(|id| self.get(id)) } } diff --git a/crates/brk_computer/src/models/rarity_meter/threshold_vecs.rs b/crates/brk_computer/src/models/rarity_meter/threshold_vecs.rs new file mode 100644 index 000000000..ef50ad5e2 --- /dev/null +++ b/crates/brk_computer/src/models/rarity_meter/threshold_vecs.rs @@ -0,0 +1,95 @@ +use brk_traversable::Traversable; +use brk_types::Version; +use vecdb::{ColumnId, VecValue}; + +const THRESHOLD_COUNT: usize = 3; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +pub enum ExtremeThresholdId { + Pct0_1, + Pct0_05, + Pct0_025, +} + +const EXTREME_THRESHOLD_IDS: [ExtremeThresholdId; THRESHOLD_COUNT] = [ + ExtremeThresholdId::Pct0_1, + ExtremeThresholdId::Pct0_05, + ExtremeThresholdId::Pct0_025, +]; + +impl ExtremeThresholdId { + pub(super) fn series(mut create: impl FnMut(Self) -> T) -> ThresholdVecs { + ThresholdVecs { + threshold_pct0_1: create(Self::Pct0_1), + threshold_pct0_05: create(Self::Pct0_05), + threshold_pct0_025: create(Self::Pct0_025), + } + } +} + +impl ColumnId for ExtremeThresholdId { + type Row + = [T; THRESHOLD_COUNT] + where + T: VecValue; + + const VERSION: Version = Version::ONE; + const ALL: &'static [Self] = &EXTREME_THRESHOLD_IDS; + + #[inline] + fn index(self) -> usize { + self as usize + } + + #[inline] + fn get(self, row: &Self::Row) -> &T { + &row[self.index()] + } + + #[inline] + fn get_mut(self, row: &mut Self::Row) -> &mut T { + &mut row[self.index()] + } + + #[inline] + fn from_fn(mut create: F) -> Self::Row + where + T: VecValue, + F: FnMut(Self) -> T, + { + std::array::from_fn(|index| create(EXTREME_THRESHOLD_IDS[index])) + } + + #[inline] + fn map(row: Self::Row, create: F) -> Self::Row + where + T: VecValue, + U: VecValue, + F: FnMut(T) -> U, + { + row.map(create) + } +} + +#[derive(Clone, Traversable)] +pub struct ThresholdVecs { + pub threshold_pct0_1: T, + pub threshold_pct0_05: T, + pub threshold_pct0_025: T, +} + +#[cfg(test)] +mod tests { + use vecdb::ColumnId; + + use super::{EXTREME_THRESHOLD_IDS, ExtremeThresholdId}; + + #[test] + fn field_order_matches_columns() { + assert_eq!(ExtremeThresholdId::ALL, EXTREME_THRESHOLD_IDS); + let fields = ExtremeThresholdId::series(|threshold| threshold); + assert_eq!(fields.threshold_pct0_1, ExtremeThresholdId::Pct0_1); + assert_eq!(fields.threshold_pct0_05, ExtremeThresholdId::Pct0_05); + assert_eq!(fields.threshold_pct0_025, ExtremeThresholdId::Pct0_025); + } +} diff --git a/crates/brk_computer/src/op_return/breakdown/block_metrics.rs b/crates/brk_computer/src/op_return/breakdown/block_metrics.rs new file mode 100644 index 000000000..1c61310fa --- /dev/null +++ b/crates/brk_computer/src/op_return/breakdown/block_metrics.rs @@ -0,0 +1,10 @@ +use brk_types::{Bytes, Sats, VSize}; + +#[derive(Clone, Copy, Debug, Default)] +pub(crate) struct BlockMetrics { + pub(crate) output_count: u64, + pub(crate) data_bytes: Bytes, + pub(crate) tx_count: u64, + pub(crate) tx_vsize: VSize, + pub(crate) fees: Sats, +} diff --git a/crates/brk_computer/src/op_return/breakdown/data_bytes_series.rs b/crates/brk_computer/src/op_return/breakdown/data_bytes_series.rs new file mode 100644 index 000000000..b7c322e30 --- /dev/null +++ b/crates/brk_computer/src/op_return/breakdown/data_bytes_series.rs @@ -0,0 +1,53 @@ +use brk_traversable::Traversable; +use brk_types::{Bytes, Height, PartsPerMillion32, StoredU64, Version}; +use derive_more::{Deref, DerefMut}; +use vecdb::{CachedBoxedVec, ColumnId}; + +use crate::{ + indexes, + internal::{LazyColumnPerBlockCumulativeRolling, LazyPercentPerBlock, RatioBytes}, +}; + +#[derive(Clone, Deref, DerefMut, Traversable)] +pub struct DataBytesSeries { + #[deref] + #[deref_mut] + #[traversable(flatten)] + pub data_bytes: LazyColumnPerBlockCumulativeRolling, + pub data_share: LazyPercentPerBlock, + pub chain_share: LazyPercentPerBlock, +} + +impl DataBytesSeries { + pub(super) fn new( + prefix: &str, + version: Version, + data_bytes: LazyColumnPerBlockCumulativeRolling, + total_data: CachedBoxedVec, + block_size: CachedBoxedVec, + indexes: &indexes::Vecs, + ) -> Self { + let data_share = + LazyPercentPerBlock::from_cached_ratio::>( + &format!("{prefix}_data_share"), + version, + &data_bytes.cumulative.height, + total_data, + indexes, + ); + let chain_share = + LazyPercentPerBlock::from_cached_ratio::>( + &format!("{prefix}_chain_share"), + version, + &data_bytes.cumulative.height, + block_size, + indexes, + ); + + Self { + data_bytes, + data_share, + chain_share, + } + } +} diff --git a/crates/brk_computer/src/op_return/breakdown/fees_series.rs b/crates/brk_computer/src/op_return/breakdown/fees_series.rs new file mode 100644 index 000000000..df0dd2812 --- /dev/null +++ b/crates/brk_computer/src/op_return/breakdown/fees_series.rs @@ -0,0 +1,47 @@ +use brk_traversable::Traversable; +use brk_types::{Height, PartsPerMillion32, Sats, Version}; +use derive_more::{Deref, DerefMut}; +use vecdb::{CachedBoxedVec, ColumnId}; + +use crate::{ + indexes, + internal::{ + CachedWindowStartVec, LazyColumnPerBlockCumulativeRolling, LazyPercentCumulativeRolling, + RatioSats, Windows, + }, +}; + +#[derive(Clone, Deref, DerefMut, Traversable)] +pub struct FeesSeries { + #[deref] + #[deref_mut] + #[traversable(flatten)] + pub fees: LazyColumnPerBlockCumulativeRolling, + pub fee_share: LazyPercentCumulativeRolling, +} + +impl FeesSeries { + pub(super) fn new( + prefix: &str, + version: Version, + fees: LazyColumnPerBlockCumulativeRolling, + chain_fees: CachedBoxedVec, + cached_starts: &Windows<&CachedWindowStartVec>, + indexes: &indexes::Vecs, + ) -> Self { + let fee_share = LazyPercentCumulativeRolling::from_cumulative_ratio::< + Sats, + Sats, + RatioSats, + >( + &format!("{prefix}_fee_share"), + version, + &fees.cumulative.height, + chain_fees, + cached_starts, + indexes, + ); + + Self { fees, fee_share } + } +} diff --git a/crates/brk_computer/src/op_return/breakdown/mod.rs b/crates/brk_computer/src/op_return/breakdown/mod.rs new file mode 100644 index 000000000..65b697947 --- /dev/null +++ b/crates/brk_computer/src/op_return/breakdown/mod.rs @@ -0,0 +1,53 @@ +mod block_metrics; +mod data_bytes_series; +mod fees_series; +mod vecs; + +use brk_traversable::Traversable; +use brk_types::{OpReturnKind, OpReturnPolicyId}; +use vecdb::ColumnId; + +use super::{by_kind::ByKind, policy::Policy}; + +pub(crate) use block_metrics::BlockMetrics; +pub use data_bytes_series::DataBytesSeries; +pub use fees_series::FeesSeries; +pub use vecs::BreakdownVecs; + +pub trait BreakdownAxis: ColumnId { + type Series: Clone + Traversable + where + T: Clone + Traversable + Send + Sync + 'static; + + fn series(create: impl FnMut(Self, &'static str) -> T) -> Self::Series + where + T: Clone + Traversable + Send + Sync + 'static; +} + +impl BreakdownAxis for OpReturnKind { + type Series + = ByKind + where + T: Clone + Traversable + Send + Sync + 'static; + + fn series(create: impl FnMut(Self, &'static str) -> T) -> Self::Series + where + T: Clone + Traversable + Send + Sync + 'static, + { + ByKind::new(create) + } +} + +impl BreakdownAxis for OpReturnPolicyId { + type Series + = Policy + where + T: Clone + Traversable + Send + Sync + 'static; + + fn series(create: impl FnMut(Self, &'static str) -> T) -> Self::Series + where + T: Clone + Traversable + Send + Sync + 'static, + { + Policy::new(create) + } +} diff --git a/crates/brk_computer/src/op_return/breakdown.rs b/crates/brk_computer/src/op_return/breakdown/vecs.rs similarity index 64% rename from crates/brk_computer/src/op_return/breakdown.rs rename to crates/brk_computer/src/op_return/breakdown/vecs.rs index 5d1297672..d9c95b302 100644 --- a/crates/brk_computer/src/op_return/breakdown.rs +++ b/crates/brk_computer/src/op_return/breakdown/vecs.rs @@ -1,148 +1,17 @@ use brk_error::Result; use brk_traversable::Traversable; -use brk_types::{ - Bytes, Height, OpReturnKind, OpReturnPolicyId, PartsPerMillion32, Sats, StoredU64, VSize, - Version, -}; -use derive_more::{Deref, DerefMut}; -use vecdb::{AnyVec, CachedBoxedVec, ColumnId, Database, Rw, StorageMode}; +use brk_types::{Bytes, Height, Sats, StoredU64, VSize, Version}; +use vecdb::{AnyVec, CachedBoxedVec, Database, Rw, StorageMode}; -use super::{by_kind::ByKind, policy::Policy}; +use super::{BlockMetrics, BreakdownAxis, DataBytesSeries, FeesSeries}; use crate::{ indexes, internal::{ CachedWindowStartVec, ColumnarPerBlockCumulativeRolling, - LazyColumnPerBlockCumulativeRolling, LazyPercentCumulativeRolling, LazyPercentPerBlock, - RatioBytes, RatioSats, Windows, + LazyColumnPerBlockCumulativeRolling, Windows, }, }; -#[derive(Clone, Copy, Debug, Default)] -pub(crate) struct BlockMetrics { - pub output_count: u64, - pub data_bytes: Bytes, - pub tx_count: u64, - pub tx_vsize: VSize, - pub fees: Sats, -} - -pub trait BreakdownAxis: ColumnId { - type Series: Clone + Traversable - where - T: Clone + Traversable + Send + Sync + 'static; - - fn series(create: impl FnMut(Self, &'static str) -> T) -> Self::Series - where - T: Clone + Traversable + Send + Sync + 'static; -} - -impl BreakdownAxis for OpReturnKind { - type Series - = ByKind - where - T: Clone + Traversable + Send + Sync + 'static; - - fn series(create: impl FnMut(Self, &'static str) -> T) -> Self::Series - where - T: Clone + Traversable + Send + Sync + 'static, - { - ByKind::new(create) - } -} - -impl BreakdownAxis for OpReturnPolicyId { - type Series - = Policy - where - T: Clone + Traversable + Send + Sync + 'static; - - fn series(create: impl FnMut(Self, &'static str) -> T) -> Self::Series - where - T: Clone + Traversable + Send + Sync + 'static, - { - Policy::new(create) - } -} - -#[derive(Clone, Deref, DerefMut, Traversable)] -pub struct DataBytesSeries { - #[deref] - #[deref_mut] - #[traversable(flatten)] - pub data_bytes: LazyColumnPerBlockCumulativeRolling, - pub data_share: LazyPercentPerBlock, - pub chain_share: LazyPercentPerBlock, -} - -#[derive(Clone, Deref, DerefMut, Traversable)] -pub struct FeesSeries { - #[deref] - #[deref_mut] - #[traversable(flatten)] - pub fees: LazyColumnPerBlockCumulativeRolling, - pub fee_share: LazyPercentCumulativeRolling, -} - -impl DataBytesSeries { - fn new( - prefix: &str, - version: Version, - data_bytes: LazyColumnPerBlockCumulativeRolling, - total_data: CachedBoxedVec, - block_size: CachedBoxedVec, - indexes: &indexes::Vecs, - ) -> Self { - let data_share = - LazyPercentPerBlock::from_cached_ratio::>( - &format!("{prefix}_data_share"), - version, - &data_bytes.cumulative.height, - total_data, - indexes, - ); - let chain_share = - LazyPercentPerBlock::from_cached_ratio::>( - &format!("{prefix}_chain_share"), - version, - &data_bytes.cumulative.height, - block_size, - indexes, - ); - - Self { - data_bytes, - data_share, - chain_share, - } - } -} - -impl FeesSeries { - fn new( - prefix: &str, - version: Version, - fees: LazyColumnPerBlockCumulativeRolling, - chain_fees: CachedBoxedVec, - cached_starts: &Windows<&CachedWindowStartVec>, - indexes: &indexes::Vecs, - ) -> Self { - let fee_share = LazyPercentCumulativeRolling::from_cumulative_ratio::< - Sats, - Sats, - RatioSats, - >( - &format!("{prefix}_fee_share"), - version, - &fees.cumulative.height, - chain_fees, - cached_starts, - indexes, - ); - - Self { fees, fee_share } - } -} - #[derive(Traversable)] pub struct BreakdownVecs { pub output_count: ColumnarPerBlockCumulativeRolling< diff --git a/crates/brk_computer/src/op_return/compute.rs b/crates/brk_computer/src/op_return/compute.rs index 67025d9bc..db33105b2 100644 --- a/crates/brk_computer/src/op_return/compute.rs +++ b/crates/brk_computer/src/op_return/compute.rs @@ -42,47 +42,45 @@ impl Carrier { return; } - total.add_carrier(self); + self.add_to(total); let mut kinds = self.kinds; while kinds != 0 { let kind_index = kinds.trailing_zeros() as usize; - by_kind[kind_index].add_carrier(self); + self.add_to(&mut by_kind[kind_index]); kinds &= kinds - 1; } if self.oversized_output_count > 0 { policy.oversized.output_count += self.oversized_output_count; policy.oversized.data_bytes += self.oversized_data_bytes; - policy.oversized.add_carrier(self); + self.add_to(&mut policy.oversized); } if self.output_count > 1 { policy.multiple.output_count += self.output_count; policy.multiple.data_bytes += self.data_bytes; - policy.multiple.add_carrier(self); + self.add_to(&mut policy.multiple); } if self.oversized_output_count > 0 || self.output_count > 1 { policy.pre_v30_nonstandard.output_count += self.output_count; policy.pre_v30_nonstandard.data_bytes += self.data_bytes; - policy.pre_v30_nonstandard.add_carrier(self); + self.add_to(&mut policy.pre_v30_nonstandard); } else { policy.pre_v30_standard.output_count += self.output_count; policy.pre_v30_standard.data_bytes += self.data_bytes; - policy.pre_v30_standard.add_carrier(self); + self.add_to(&mut policy.pre_v30_standard); } } const fn kind_bit(kind: OpReturnKind) -> u32 { 1_u32 << kind as u8 } -} -impl BlockMetrics { - fn add_carrier(&mut self, carrier: Carrier) { - self.tx_count += 1; - self.tx_vsize += carrier.vsize; - self.fees += carrier.fees; + fn add_to(self, metrics: &mut BlockMetrics) { + metrics.tx_count += 1; + metrics.tx_vsize += self.vsize; + metrics.fees += self.fees; } } diff --git a/crates/brk_computer/src/price/mod.rs b/crates/brk_computer/src/price/mod.rs index 4226f2d8f..3cc9bc036 100644 --- a/crates/brk_computer/src/price/mod.rs +++ b/crates/brk_computer/src/price/mod.rs @@ -5,6 +5,7 @@ pub(crate) mod ohlcs; use std::path::Path; +use brk_error::Result; use brk_oracle::VERSION as ORACLE_VERSION; use brk_traversable::Traversable; use brk_types::Version; @@ -40,7 +41,7 @@ impl Vecs { parent: &Path, version: Version, indexes: &indexes::Vecs, - ) -> brk_error::Result { + ) -> Result { let db = open_db(parent, DB_NAME, 100_000)?; let this = Self::forced_import_inner(&db, version, indexes)?; finalize_db(&this.db, &this)?; @@ -51,7 +52,7 @@ impl Vecs { db: &Database, version: Version, indexes: &indexes::Vecs, - ) -> brk_error::Result { + ) -> Result { // `ORACLE_VERSION` folds in the on-chain oracle algorithm version so // every price-derived module invalidates when computed prices change. let version = version + Version::new(11 + ORACLE_VERSION); diff --git a/crates/brk_types/src/percentile.rs b/crates/brk_types/src/percentile.rs index 215821022..8ce7709c2 100644 --- a/crates/brk_types/src/percentile.rs +++ b/crates/brk_types/src/percentile.rs @@ -117,10 +117,79 @@ impl PercentileId { } impl RarityPercentileId { + pub const BOUNDARIES: [Self; 10] = [ + Self::Pct0_1, + Self::Pct0_5, + Self::Pct1, + Self::Pct2, + Self::Pct5, + Self::Pct95, + Self::Pct98, + Self::Pct99, + Self::Pct99_5, + Self::Pct99_9, + ]; + #[inline] pub const fn percentile(self) -> f64 { RARITY_PERCENTILES[self as usize] } + + pub const fn boundary_index(self) -> Option { + match self { + Self::Pct0_1 => Some(0), + Self::Pct0_5 => Some(1), + Self::Pct1 => Some(2), + Self::Pct2 => Some(3), + Self::Pct5 => Some(4), + Self::Pct95 => Some(5), + Self::Pct98 => Some(6), + Self::Pct99 => Some(7), + Self::Pct99_5 => Some(8), + Self::Pct99_9 => Some(9), + _ => None, + } + } + + pub const fn is_lower_boundary(self) -> bool { + matches!( + self, + Self::Pct0_1 | Self::Pct0_5 | Self::Pct1 | Self::Pct2 | Self::Pct5 + ) + } + + pub const fn suffix(self) -> &'static str { + match self { + Self::Pct0_1 => "pct0_1", + Self::Pct0_5 => "pct0_5", + Self::Pct1 => "pct1", + Self::Pct2 => "pct2", + Self::Pct5 => "pct5", + Self::Pct10 => "pct10", + Self::Pct20 => "pct20", + Self::Pct30 => "pct30", + Self::Pct40 => "pct40", + Self::Pct50 => "pct50", + Self::Pct60 => "pct60", + Self::Pct70 => "pct70", + Self::Pct80 => "pct80", + Self::Pct90 => "pct90", + Self::Pct95 => "pct95", + Self::Pct98 => "pct98", + Self::Pct99 => "pct99", + Self::Pct99_5 => "pct99_5", + Self::Pct99_9 => "pct99_9", + } + } + + pub const fn price_suffix(self) -> &'static str { + match self { + Self::Pct1 => "pct01", + Self::Pct2 => "pct02", + Self::Pct5 => "pct05", + _ => self.suffix(), + } + } } impl ColumnId for PercentileId { diff --git a/crates/vecdb/src/variants/columnar/lazy.rs b/crates/vecdb/src/variants/columnar/lazy.rs index 51a034f48..92942af2b 100644 --- a/crates/vecdb/src/variants/columnar/lazy.rs +++ b/crates/vecdb/src/variants/columnar/lazy.rs @@ -149,10 +149,10 @@ where return; } - let mut rows = Vec::with_capacity(to - from); - self.source.read_into_at(from, to, &mut rows); let compute = self.compute; - out.extend(rows.into_iter().map(|row| C::map(row, compute))); + out.reserve(to - from); + self.source + .for_each_range_dyn_at(from, to, &mut |row| out.push(C::map(row, compute))); } fn for_each_range_dyn_at(&self, from: usize, to: usize, f: &mut dyn FnMut(C::Row)) {