diff --git a/crates/brk_binder/src/javascript.rs b/crates/brk_binder/src/javascript.rs index 18ae59bce..232971164 100644 --- a/crates/brk_binder/src/javascript.rs +++ b/crates/brk_binder/src/javascript.rs @@ -1,5 +1,7 @@ use std::{collections::HashSet, fmt::Write as FmtWrite, fs, io, path::Path}; +use serde_json::json; + use brk_grouper::{ AGE_RANGE_NAMES, AMOUNT_RANGE_NAMES, EPOCH_NAMES, GE_AMOUNT_NAMES, LT_AMOUNT_NAMES, MAX_AGE_NAMES, MIN_AGE_NAMES, SPENDABLE_TYPE_NAMES, TERM_NAMES, YEAR_NAMES, @@ -37,6 +39,32 @@ pub fn generate_javascript_client( fs::write(output_path, output)?; + // Update package.json version if it exists in the same directory + if let Some(parent) = output_path.parent() { + let package_json_path = parent.join("package.json"); + if package_json_path.exists() { + update_package_json_version(&package_json_path)?; + } + } + + Ok(()) +} + +/// Update the version field in package.json to match the current VERSION. +fn update_package_json_version(package_json_path: &Path) -> io::Result<()> { + let content = fs::read_to_string(package_json_path)?; + let mut package: serde_json::Value = serde_json::from_str(&content) + .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?; + + if let Some(obj) = package.as_object_mut() { + obj.insert("version".to_string(), json!(VERSION)); + } + + let updated = serde_json::to_string_pretty(&package) + .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?; + + fs::write(package_json_path, updated + "\n")?; + Ok(()) } @@ -269,7 +297,7 @@ fn generate_base_client(output: &mut String) { */ const _isBrowser = typeof window !== 'undefined' && 'caches' in window; -const _runIdle = (fn) => (globalThis.requestIdleCallback ?? setTimeout)(fn); +const _runIdle = (/** @type {{VoidFunction}} */ fn) => (globalThis.requestIdleCallback ?? setTimeout)(fn); /** @type {{Promise}} */ const _cachePromise = _isBrowser diff --git a/crates/brk_binder/src/python.rs b/crates/brk_binder/src/python.rs index 29982a9fd..d3467c123 100644 --- a/crates/brk_binder/src/python.rs +++ b/crates/brk_binder/src/python.rs @@ -30,7 +30,7 @@ pub fn generate_python_client( writeln!(output, "from __future__ import annotations").unwrap(); writeln!( output, - "from typing import TypeVar, Generic, Any, Optional, List, Literal, TypedDict, Final" + "from typing import TypeVar, Generic, Any, Optional, List, Literal, TypedDict, Final, Union" ) .unwrap(); writeln!(output, "import httpx\n").unwrap(); @@ -296,7 +296,7 @@ fn schema_to_python_type_ctx(schema: &Value, current_type: Option<&str>) -> Stri base_type.clone() }; } else if !types.is_empty() { - let union = types.join(" | "); + let union = format!("Union[{}]", types.join(", ")); return if has_null { format!("Optional[{}]", union) } else { @@ -321,13 +321,16 @@ fn schema_to_python_type_ctx(schema: &Value, current_type: Option<&str>) -> Stri .collect(); let filtered: Vec<_> = types.iter().filter(|t| *t != "Any").collect(); if !filtered.is_empty() { - return filtered - .iter() - .map(|s| s.as_str()) - .collect::>() - .join(" | "); + return format!( + "Union[{}]", + filtered + .iter() + .map(|s| s.as_str()) + .collect::>() + .join(", ") + ); } - return types.join(" | "); + return format!("Union[{}]", types.join(", ")); } // Check for format hint without type (common in OpenAPI) diff --git a/crates/brk_client/src/lib.rs b/crates/brk_client/src/lib.rs index d3f7059d5..a2591970d 100644 --- a/crates/brk_client/src/lib.rs +++ b/crates/brk_client/src/lib.rs @@ -1055,43 +1055,6 @@ impl Ratio1ySdPattern { } } -/// Pattern struct for repeated tree structure. -pub struct AXbtPattern { - pub _1d_dominance: BlockCountPattern, - pub _1m_blocks_mined: Indexes, - pub _1m_dominance: Indexes, - pub _1w_blocks_mined: Indexes, - pub _1w_dominance: Indexes, - pub _1y_blocks_mined: Indexes, - pub _1y_dominance: Indexes, - pub blocks_mined: BlockCountPattern, - pub coinbase: UnclaimedRewardsPattern, - pub days_since_block: Indexes, - pub dominance: BlockCountPattern, - pub fee: FeePattern2, - pub subsidy: FeePattern2, -} - -impl AXbtPattern { - pub fn new(client: Arc, base_path: &str) -> Self { - Self { - _1d_dominance: BlockCountPattern::new(client.clone(), &format!("{base_path}/1d_dominance")), - _1m_blocks_mined: Indexes::new(client.clone(), &format!("{base_path}/1m_blocks_mined")), - _1m_dominance: Indexes::new(client.clone(), &format!("{base_path}/1m_dominance")), - _1w_blocks_mined: Indexes::new(client.clone(), &format!("{base_path}/1w_blocks_mined")), - _1w_dominance: Indexes::new(client.clone(), &format!("{base_path}/1w_dominance")), - _1y_blocks_mined: Indexes::new(client.clone(), &format!("{base_path}/1y_blocks_mined")), - _1y_dominance: Indexes::new(client.clone(), &format!("{base_path}/1y_dominance")), - blocks_mined: BlockCountPattern::new(client.clone(), &format!("{base_path}/blocks_mined")), - coinbase: UnclaimedRewardsPattern::new(client.clone(), &format!("{base_path}/coinbase")), - days_since_block: Indexes::new(client.clone(), &format!("{base_path}/days_since_block")), - dominance: BlockCountPattern::new(client.clone(), &format!("{base_path}/dominance")), - fee: FeePattern2::new(client.clone(), &format!("{base_path}/fee")), - subsidy: FeePattern2::new(client.clone(), &format!("{base_path}/subsidy")), - } - } -} - /// Pattern struct for repeated tree structure. pub struct ActivePriceRatioPattern { pub ratio: Indexes, @@ -1129,6 +1092,43 @@ impl ActivePriceRatioPattern { } } +/// Pattern struct for repeated tree structure. +pub struct AXbtPattern { + pub _1d_dominance: BlockCountPattern, + pub _1m_blocks_mined: Indexes, + pub _1m_dominance: Indexes, + pub _1w_blocks_mined: Indexes, + pub _1w_dominance: Indexes, + pub _1y_blocks_mined: Indexes, + pub _1y_dominance: Indexes, + pub blocks_mined: BlockCountPattern, + pub coinbase: UnclaimedRewardsPattern, + pub days_since_block: Indexes, + pub dominance: BlockCountPattern, + pub fee: FeePattern2, + pub subsidy: FeePattern2, +} + +impl AXbtPattern { + pub fn new(client: Arc, base_path: &str) -> Self { + Self { + _1d_dominance: BlockCountPattern::new(client.clone(), &format!("{base_path}/1d_dominance")), + _1m_blocks_mined: Indexes::new(client.clone(), &format!("{base_path}/1m_blocks_mined")), + _1m_dominance: Indexes::new(client.clone(), &format!("{base_path}/1m_dominance")), + _1w_blocks_mined: Indexes::new(client.clone(), &format!("{base_path}/1w_blocks_mined")), + _1w_dominance: Indexes::new(client.clone(), &format!("{base_path}/1w_dominance")), + _1y_blocks_mined: Indexes::new(client.clone(), &format!("{base_path}/1y_blocks_mined")), + _1y_dominance: Indexes::new(client.clone(), &format!("{base_path}/1y_dominance")), + blocks_mined: BlockCountPattern::new(client.clone(), &format!("{base_path}/blocks_mined")), + coinbase: UnclaimedRewardsPattern::new(client.clone(), &format!("{base_path}/coinbase")), + days_since_block: Indexes::new(client.clone(), &format!("{base_path}/days_since_block")), + dominance: BlockCountPattern::new(client.clone(), &format!("{base_path}/dominance")), + fee: FeePattern2::new(client.clone(), &format!("{base_path}/fee")), + subsidy: FeePattern2::new(client.clone(), &format!("{base_path}/subsidy")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct BitcoinPattern { pub average: Indexes4, @@ -1164,60 +1164,31 @@ impl BitcoinPattern { /// Pattern struct for repeated tree structure. pub struct BlockSizePattern { - pub average: Indexes4, + pub average: Indexes3, pub cumulative: Indexes3, - pub max: Indexes4, - pub median: Indexes5, - pub min: Indexes4, - pub pct10: Indexes5, - pub pct25: Indexes5, - pub pct75: Indexes5, - pub pct90: Indexes5, - pub sum: Indexes4, + pub max: Indexes3, + pub median: Indexes2, + pub min: Indexes3, + pub pct10: Indexes2, + pub pct25: Indexes2, + pub pct75: Indexes2, + pub pct90: Indexes2, + pub sum: Indexes3, } impl BlockSizePattern { pub fn new(client: Arc, base_path: &str) -> Self { Self { - average: Indexes4::new(client.clone(), &format!("{base_path}/average")), + average: Indexes3::new(client.clone(), &format!("{base_path}/average")), cumulative: Indexes3::new(client.clone(), &format!("{base_path}/cumulative")), - max: Indexes4::new(client.clone(), &format!("{base_path}/max")), - median: Indexes5::new(client.clone(), &format!("{base_path}/median")), - min: Indexes4::new(client.clone(), &format!("{base_path}/min")), - pct10: Indexes5::new(client.clone(), &format!("{base_path}/pct10")), - pct25: Indexes5::new(client.clone(), &format!("{base_path}/pct25")), - pct75: Indexes5::new(client.clone(), &format!("{base_path}/pct75")), - pct90: Indexes5::new(client.clone(), &format!("{base_path}/pct90")), - sum: Indexes4::new(client.clone(), &format!("{base_path}/sum")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct RelativePattern { - pub neg_unrealized_loss_rel_to_market_cap: Indexes27, - pub net_unrealized_pnl_rel_to_market_cap: Indexes26, - pub supply_in_loss_rel_to_circulating_supply: Indexes27, - pub supply_in_loss_rel_to_own_supply: Indexes27, - pub supply_in_profit_rel_to_circulating_supply: Indexes27, - pub supply_in_profit_rel_to_own_supply: Indexes27, - pub supply_rel_to_circulating_supply: Indexes, - pub unrealized_loss_rel_to_market_cap: Indexes27, - pub unrealized_profit_rel_to_market_cap: Indexes27, -} - -impl RelativePattern { - pub fn new(client: Arc, base_path: &str) -> Self { - Self { - neg_unrealized_loss_rel_to_market_cap: Indexes27::new(client.clone(), &format!("{base_path}/neg_unrealized_loss_rel_to_market_cap")), - net_unrealized_pnl_rel_to_market_cap: Indexes26::new(client.clone(), &format!("{base_path}/net_unrealized_pnl_rel_to_market_cap")), - supply_in_loss_rel_to_circulating_supply: Indexes27::new(client.clone(), &format!("{base_path}/supply_in_loss_rel_to_circulating_supply")), - supply_in_loss_rel_to_own_supply: Indexes27::new(client.clone(), &format!("{base_path}/supply_in_loss_rel_to_own_supply")), - supply_in_profit_rel_to_circulating_supply: Indexes27::new(client.clone(), &format!("{base_path}/supply_in_profit_rel_to_circulating_supply")), - supply_in_profit_rel_to_own_supply: Indexes27::new(client.clone(), &format!("{base_path}/supply_in_profit_rel_to_own_supply")), - supply_rel_to_circulating_supply: Indexes::new(client.clone(), &format!("{base_path}/supply_rel_to_circulating_supply")), - unrealized_loss_rel_to_market_cap: Indexes27::new(client.clone(), &format!("{base_path}/unrealized_loss_rel_to_market_cap")), - unrealized_profit_rel_to_market_cap: Indexes27::new(client.clone(), &format!("{base_path}/unrealized_profit_rel_to_market_cap")), + max: Indexes3::new(client.clone(), &format!("{base_path}/max")), + median: Indexes2::new(client.clone(), &format!("{base_path}/median")), + min: Indexes3::new(client.clone(), &format!("{base_path}/min")), + pct10: Indexes2::new(client.clone(), &format!("{base_path}/pct10")), + pct25: Indexes2::new(client.clone(), &format!("{base_path}/pct25")), + pct75: Indexes2::new(client.clone(), &format!("{base_path}/pct75")), + pct90: Indexes2::new(client.clone(), &format!("{base_path}/pct90")), + sum: Indexes3::new(client.clone(), &format!("{base_path}/sum")), } } } @@ -1251,6 +1222,62 @@ impl UnrealizedPattern { } } +/// Pattern struct for repeated tree structure. +pub struct RelativePattern { + pub neg_unrealized_loss_rel_to_market_cap: Indexes27, + pub net_unrealized_pnl_rel_to_market_cap: Indexes26, + pub supply_in_loss_rel_to_circulating_supply: Indexes27, + pub supply_in_loss_rel_to_own_supply: Indexes27, + pub supply_in_profit_rel_to_circulating_supply: Indexes27, + pub supply_in_profit_rel_to_own_supply: Indexes27, + pub supply_rel_to_circulating_supply: Indexes, + pub unrealized_loss_rel_to_market_cap: Indexes27, + pub unrealized_profit_rel_to_market_cap: Indexes27, +} + +impl RelativePattern { + pub fn new(client: Arc, base_path: &str) -> Self { + Self { + neg_unrealized_loss_rel_to_market_cap: Indexes27::new(client.clone(), &format!("{base_path}/neg_unrealized_loss_rel_to_market_cap")), + net_unrealized_pnl_rel_to_market_cap: Indexes26::new(client.clone(), &format!("{base_path}/net_unrealized_pnl_rel_to_market_cap")), + supply_in_loss_rel_to_circulating_supply: Indexes27::new(client.clone(), &format!("{base_path}/supply_in_loss_rel_to_circulating_supply")), + supply_in_loss_rel_to_own_supply: Indexes27::new(client.clone(), &format!("{base_path}/supply_in_loss_rel_to_own_supply")), + supply_in_profit_rel_to_circulating_supply: Indexes27::new(client.clone(), &format!("{base_path}/supply_in_profit_rel_to_circulating_supply")), + supply_in_profit_rel_to_own_supply: Indexes27::new(client.clone(), &format!("{base_path}/supply_in_profit_rel_to_own_supply")), + supply_rel_to_circulating_supply: Indexes::new(client.clone(), &format!("{base_path}/supply_rel_to_circulating_supply")), + unrealized_loss_rel_to_market_cap: Indexes27::new(client.clone(), &format!("{base_path}/unrealized_loss_rel_to_market_cap")), + unrealized_profit_rel_to_market_cap: Indexes27::new(client.clone(), &format!("{base_path}/unrealized_profit_rel_to_market_cap")), + } + } +} + +/// Pattern struct for repeated tree structure. +pub struct AddresstypeToHeightToAddrCountPattern { + pub p2a: Indexes2, + pub p2pk33: Indexes2, + pub p2pk65: Indexes2, + pub p2pkh: Indexes2, + pub p2sh: Indexes2, + pub p2tr: Indexes2, + pub p2wpkh: Indexes2, + pub p2wsh: Indexes2, +} + +impl AddresstypeToHeightToAddrCountPattern { + pub fn new(client: Arc, base_path: &str) -> Self { + Self { + p2a: Indexes2::new(client.clone(), &format!("{base_path}/p2a")), + p2pk33: Indexes2::new(client.clone(), &format!("{base_path}/p2pk33")), + p2pk65: Indexes2::new(client.clone(), &format!("{base_path}/p2pk65")), + p2pkh: Indexes2::new(client.clone(), &format!("{base_path}/p2pkh")), + p2sh: Indexes2::new(client.clone(), &format!("{base_path}/p2sh")), + p2tr: Indexes2::new(client.clone(), &format!("{base_path}/p2tr")), + p2wpkh: Indexes2::new(client.clone(), &format!("{base_path}/p2wpkh")), + p2wsh: Indexes2::new(client.clone(), &format!("{base_path}/p2wsh")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct Constant0Pattern { pub dateindex: Indexes5, @@ -1279,33 +1306,6 @@ impl Constant0Pattern { } } -/// Pattern struct for repeated tree structure. -pub struct AddresstypeToHeightToAddrCountPattern { - pub p2a: Indexes16, - pub p2pk33: Indexes17, - pub p2pk65: Indexes18, - pub p2pkh: Indexes19, - pub p2sh: Indexes20, - pub p2tr: Indexes21, - pub p2wpkh: Indexes22, - pub p2wsh: Indexes23, -} - -impl AddresstypeToHeightToAddrCountPattern { - pub fn new(client: Arc, base_path: &str) -> Self { - Self { - p2a: Indexes16::new(client.clone(), &format!("{base_path}/p2a")), - p2pk33: Indexes17::new(client.clone(), &format!("{base_path}/p2pk33")), - p2pk65: Indexes18::new(client.clone(), &format!("{base_path}/p2pk65")), - p2pkh: Indexes19::new(client.clone(), &format!("{base_path}/p2pkh")), - p2sh: Indexes20::new(client.clone(), &format!("{base_path}/p2sh")), - p2tr: Indexes21::new(client.clone(), &format!("{base_path}/p2tr")), - p2wpkh: Indexes22::new(client.clone(), &format!("{base_path}/p2wpkh")), - p2wsh: Indexes23::new(client.clone(), &format!("{base_path}/p2wsh")), - } - } -} - /// Pattern struct for repeated tree structure. pub struct BlockIntervalPattern { pub average: Indexes3, @@ -1359,6 +1359,29 @@ impl _0satsPattern { } } +/// Pattern struct for repeated tree structure. +pub struct _10yTo12yPattern { + pub activity: ActivityPattern, + pub price_paid: PricePaidPattern2, + pub realized: RealizedPattern2, + pub relative: RelativePattern2, + pub supply: SupplyPattern2, + pub unrealized: UnrealizedPattern, +} + +impl _10yTo12yPattern { + pub fn new(client: Arc, base_path: &str) -> Self { + Self { + activity: ActivityPattern::new(client.clone(), &format!("{base_path}/activity")), + price_paid: PricePaidPattern2::new(client.clone(), &format!("{base_path}/price_paid")), + realized: RealizedPattern2::new(client.clone(), &format!("{base_path}/realized")), + relative: RelativePattern2::new(client.clone(), &format!("{base_path}/relative")), + supply: SupplyPattern2::new(client.clone(), &format!("{base_path}/supply")), + unrealized: UnrealizedPattern::new(client.clone(), &format!("{base_path}/unrealized")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct UpTo1dPattern { pub activity: ActivityPattern, @@ -1406,24 +1429,22 @@ impl _0satsPattern2 { } /// Pattern struct for repeated tree structure. -pub struct _10yTo12yPattern { - pub activity: ActivityPattern, - pub price_paid: PricePaidPattern2, - pub realized: RealizedPattern2, - pub relative: RelativePattern2, - pub supply: SupplyPattern2, - pub unrealized: UnrealizedPattern, +pub struct SupplyPattern2 { + pub supply: SupplyPattern, + pub supply_half: ActiveSupplyPattern, + pub supply_half_value: ActiveSupplyPattern, + pub supply_value: SupplyValuePattern, + pub utxo_count: Indexes3, } -impl _10yTo12yPattern { +impl SupplyPattern2 { pub fn new(client: Arc, base_path: &str) -> Self { Self { - activity: ActivityPattern::new(client.clone(), &format!("{base_path}/activity")), - price_paid: PricePaidPattern2::new(client.clone(), &format!("{base_path}/price_paid")), - realized: RealizedPattern2::new(client.clone(), &format!("{base_path}/realized")), - relative: RelativePattern2::new(client.clone(), &format!("{base_path}/relative")), - supply: SupplyPattern2::new(client.clone(), &format!("{base_path}/supply")), - unrealized: UnrealizedPattern::new(client.clone(), &format!("{base_path}/unrealized")), + supply: SupplyPattern::new(client.clone(), &format!("{base_path}/supply")), + supply_half: ActiveSupplyPattern::new(client.clone(), &format!("{base_path}/supply_half")), + supply_half_value: ActiveSupplyPattern::new(client.clone(), &format!("{base_path}/supply_half_value")), + supply_value: SupplyValuePattern::new(client.clone(), &format!("{base_path}/supply_value")), + utxo_count: Indexes3::new(client.clone(), &format!("{base_path}/utxo_count")), } } } @@ -1449,27 +1470,6 @@ impl ActivityPattern { } } -/// Pattern struct for repeated tree structure. -pub struct SupplyPattern2 { - pub supply: SupplyPattern, - pub supply_half: ActiveSupplyPattern, - pub supply_half_value: ActiveSupplyPattern, - pub supply_value: SupplyValuePattern, - pub utxo_count: Indexes3, -} - -impl SupplyPattern2 { - pub fn new(client: Arc, base_path: &str) -> Self { - Self { - supply: SupplyPattern::new(client.clone(), &format!("{base_path}/supply")), - supply_half: ActiveSupplyPattern::new(client.clone(), &format!("{base_path}/supply_half")), - supply_half_value: ActiveSupplyPattern::new(client.clone(), &format!("{base_path}/supply_half_value")), - supply_value: SupplyValuePattern::new(client.clone(), &format!("{base_path}/supply_value")), - utxo_count: Indexes3::new(client.clone(), &format!("{base_path}/utxo_count")), - } - } -} - /// Pattern struct for repeated tree structure. pub struct FeePattern2 { pub base: Indexes2, @@ -1526,18 +1526,18 @@ impl UnclaimedRewardsPattern { } /// Pattern struct for repeated tree structure. -pub struct PricePaidPattern2 { - pub max_price_paid: Indexes3, - pub min_price_paid: Indexes3, - pub price_percentiles: PricePercentilesPattern, +pub struct ActiveSupplyPattern { + pub bitcoin: Indexes3, + pub dollars: Indexes3, + pub sats: Indexes3, } -impl PricePaidPattern2 { +impl ActiveSupplyPattern { pub fn new(client: Arc, base_path: &str) -> Self { Self { - max_price_paid: Indexes3::new(client.clone(), &format!("{base_path}/max_price_paid")), - min_price_paid: Indexes3::new(client.clone(), &format!("{base_path}/min_price_paid")), - price_percentiles: PricePercentilesPattern::new(client.clone(), &format!("{base_path}/price_percentiles")), + bitcoin: Indexes3::new(client.clone(), &format!("{base_path}/bitcoin")), + dollars: Indexes3::new(client.clone(), &format!("{base_path}/dollars")), + sats: Indexes3::new(client.clone(), &format!("{base_path}/sats")), } } } @@ -1560,18 +1560,18 @@ impl CoinbasePattern { } /// Pattern struct for repeated tree structure. -pub struct ActiveSupplyPattern { - pub bitcoin: Indexes3, - pub dollars: Indexes3, - pub sats: Indexes3, +pub struct PricePaidPattern2 { + pub max_price_paid: Indexes3, + pub min_price_paid: Indexes3, + pub price_percentiles: PricePercentilesPattern, } -impl ActiveSupplyPattern { +impl PricePaidPattern2 { pub fn new(client: Arc, base_path: &str) -> Self { Self { - bitcoin: Indexes3::new(client.clone(), &format!("{base_path}/bitcoin")), - dollars: Indexes3::new(client.clone(), &format!("{base_path}/dollars")), - sats: Indexes3::new(client.clone(), &format!("{base_path}/sats")), + max_price_paid: Indexes3::new(client.clone(), &format!("{base_path}/max_price_paid")), + min_price_paid: Indexes3::new(client.clone(), &format!("{base_path}/min_price_paid")), + price_percentiles: PricePercentilesPattern::new(client.clone(), &format!("{base_path}/price_percentiles")), } } } @@ -1593,6 +1593,21 @@ impl BlockCountPattern { } } +/// Pattern struct for repeated tree structure. +pub struct SupplyValuePattern { + pub bitcoin: Indexes2, + pub dollars: Indexes2, +} + +impl SupplyValuePattern { + pub fn new(client: Arc, base_path: &str) -> Self { + Self { + bitcoin: Indexes2::new(client.clone(), &format!("{base_path}/bitcoin")), + dollars: Indexes2::new(client.clone(), &format!("{base_path}/dollars")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct PricePaidPattern { pub max_price_paid: Indexes3, @@ -1624,21 +1639,6 @@ impl _1dReturns1mSdPattern { } } -/// Pattern struct for repeated tree structure. -pub struct SupplyValuePattern { - pub bitcoin: Indexes2, - pub dollars: Indexes2, -} - -impl SupplyValuePattern { - pub fn new(client: Arc, base_path: &str) -> Self { - Self { - bitcoin: Indexes2::new(client.clone(), &format!("{base_path}/bitcoin")), - dollars: Indexes2::new(client.clone(), &format!("{base_path}/dollars")), - } - } -} - /// Pattern struct for repeated tree structure. pub struct SatsPattern { pub cumulative: Indexes3,