From 147a3c75930b4e6161997086660f3abed62950ae Mon Sep 17 00:00:00 2001 From: nym21 Date: Sat, 21 Mar 2026 09:31:10 +0100 Subject: [PATCH] global: snapshot part 8 --- crates/brk_client/src/lib.rs | 990 ++++++++------- .../per_block/amount/lazy_rolling_avg.rs | 2 +- .../per_block/computed/cumulative_rolling.rs | 1 - .../src/internal/per_block/computed/full.rs | 6 +- .../per_block/computed/rolling_average.rs | 1 - modules/brk-client/index.js | 1051 ++++++++-------- packages/brk_client/brk_client/__init__.py | 468 +++---- .../options/distribution/cost-basis.js | 52 +- .../scripts/options/distribution/holdings.js | 1089 ++++++----------- website/scripts/options/distribution/index.js | 70 +- .../options/distribution/profitability.js | 67 +- .../scripts/options/distribution/valuation.js | 278 ++--- website/scripts/options/series.js | 104 +- website/scripts/options/shared.js | 14 +- website/scripts/options/unused.js | 13 +- website/scripts/types.js | 30 +- 16 files changed, 1984 insertions(+), 2252 deletions(-) diff --git a/crates/brk_client/src/lib.rs b/crates/brk_client/src/lib.rs index e650da440..0d5c9bb18 100644 --- a/crates/brk_client/src/lib.rs +++ b/crates/brk_client/src/lib.rs @@ -1035,36 +1035,36 @@ impl _10y1m1w1y2y3m3y4y5y6m6y8yPattern2 { /// Pattern struct for repeated tree structure. pub struct _10y1m1w1y2y3m3y4y5y6m6y8yPattern3 { - pub _10y: BtcCentsSatsUsdPattern2, - pub _1m: BtcCentsSatsUsdPattern2, - pub _1w: BtcCentsSatsUsdPattern2, - pub _1y: BtcCentsSatsUsdPattern2, - pub _2y: BtcCentsSatsUsdPattern2, - pub _3m: BtcCentsSatsUsdPattern2, - pub _3y: BtcCentsSatsUsdPattern2, - pub _4y: BtcCentsSatsUsdPattern2, - pub _5y: BtcCentsSatsUsdPattern2, - pub _6m: BtcCentsSatsUsdPattern2, - pub _6y: BtcCentsSatsUsdPattern2, - pub _8y: BtcCentsSatsUsdPattern2, + pub _10y: BtcCentsSatsUsdPattern3, + pub _1m: BtcCentsSatsUsdPattern3, + pub _1w: BtcCentsSatsUsdPattern3, + pub _1y: BtcCentsSatsUsdPattern3, + pub _2y: BtcCentsSatsUsdPattern3, + pub _3m: BtcCentsSatsUsdPattern3, + pub _3y: BtcCentsSatsUsdPattern3, + pub _4y: BtcCentsSatsUsdPattern3, + pub _5y: BtcCentsSatsUsdPattern3, + pub _6m: BtcCentsSatsUsdPattern3, + pub _6y: BtcCentsSatsUsdPattern3, + pub _8y: BtcCentsSatsUsdPattern3, } impl _10y1m1w1y2y3m3y4y5y6m6y8yPattern3 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - _10y: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "10y")), - _1m: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "1m")), - _1w: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "1w")), - _1y: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "1y")), - _2y: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "2y")), - _3m: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "3m")), - _3y: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "3y")), - _4y: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "4y")), - _5y: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "5y")), - _6m: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "6m")), - _6y: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "6y")), - _8y: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "8y")), + _10y: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "10y")), + _1m: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "1m")), + _1w: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "1w")), + _1y: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "1y")), + _2y: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "2y")), + _3m: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "3m")), + _3y: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "3y")), + _4y: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "4y")), + _5y: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "5y")), + _6m: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "6m")), + _6y: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "6y")), + _8y: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "8y")), } } } @@ -1072,23 +1072,23 @@ impl _10y1m1w1y2y3m3y4y5y6m6y8yPattern3 { /// Pattern struct for repeated tree structure. pub struct CapGrossInvestorLossMvrvNetPeakPriceProfitSellSoprPattern { pub cap: CentsDeltaToUsdPattern, - pub gross_pnl: BaseCumulativeSumPattern, + pub gross_pnl: BlockCumulativeSumPattern, pub investor: PricePattern, - pub loss: BaseCumulativeNegativeSumToPattern, + pub loss: BlockCumulativeNegativeSumToPattern, pub mvrv: SeriesPattern1, - pub net_pnl: BaseChangeCumulativeDeltaSumToPattern, - pub peak_regret: BaseCumulativeSumToPattern, + pub net_pnl: BlockChangeCumulativeDeltaSumToPattern, + pub peak_regret: BlockCumulativeSumToPattern, pub price: BpsCentsPercentilesRatioSatsSmaStdUsdPattern, - pub profit: BaseCumulativeSumToPattern, + pub profit: BlockCumulativeSumToPattern, pub profit_to_loss_ratio: _1m1w1y24hPattern, pub sell_side_risk_ratio: _1m1w1y24hPattern7, pub sopr: AdjustedRatioValuePattern, } /// Pattern struct for repeated tree structure. -pub struct AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 { +pub struct AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern { pub average: _1m1w1y24hPattern, - pub base: SeriesPattern1, + pub block: SeriesPattern18, pub cumulative: SeriesPattern1, pub max: _1m1w1y24hPattern, pub median: _1m1w1y24hPattern, @@ -1100,12 +1100,12 @@ pub struct AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 { pub sum: _1m1w1y24hPattern, } -impl AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 { +impl AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { average: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "average")), - base: SeriesPattern1::new(client.clone(), acc.clone()), + block: SeriesPattern18::new(client.clone(), acc.clone()), cumulative: SeriesPattern1::new(client.clone(), _m(&acc, "cumulative")), max: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "max")), median: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "median")), @@ -1228,7 +1228,7 @@ impl AverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern { /// Pattern struct for repeated tree structure. pub struct GrossInvestedInvestorLossNetNuplProfitSentimentPattern2 { - pub gross_pnl: CentsUsdPattern2, + pub gross_pnl: CentsUsdPattern3, pub invested_capital: InPattern, pub investor_cap_in_loss_raw: SeriesPattern18, pub investor_cap_in_profit_raw: SeriesPattern18, @@ -1306,11 +1306,11 @@ impl _1m1w1y24hBpsPercentRatioPattern { /// Pattern struct for repeated tree structure. pub struct CapLossMvrvNetPriceProfitSoprPattern { pub cap: CentsDeltaUsdPattern, - pub loss: BaseCumulativeNegativeSumPattern, + pub loss: BlockCumulativeNegativeSumPattern, pub mvrv: SeriesPattern1, - pub net_pnl: BaseCumulativeDeltaSumPattern, + pub net_pnl: BlockCumulativeDeltaSumPattern, pub price: BpsCentsRatioSatsUsdPattern, - pub profit: BaseCumulativeSumPattern, + pub profit: BlockCumulativeSumPattern, pub sopr: RatioValuePattern, } @@ -1319,11 +1319,11 @@ impl CapLossMvrvNetPriceProfitSoprPattern { pub fn new(client: Arc, acc: String) -> Self { Self { cap: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "realized_cap")), - loss: BaseCumulativeNegativeSumPattern::new(client.clone(), acc.clone()), + loss: BlockCumulativeNegativeSumPattern::new(client.clone(), acc.clone()), mvrv: SeriesPattern1::new(client.clone(), _m(&acc, "mvrv")), - net_pnl: BaseCumulativeDeltaSumPattern::new(client.clone(), _m(&acc, "net_realized_pnl")), + net_pnl: BlockCumulativeDeltaSumPattern::new(client.clone(), _m(&acc, "net_realized_pnl")), price: BpsCentsRatioSatsUsdPattern::new(client.clone(), _m(&acc, "realized_price")), - profit: BaseCumulativeSumPattern::new(client.clone(), _m(&acc, "realized_profit")), + profit: BlockCumulativeSumPattern::new(client.clone(), _m(&acc, "realized_profit")), sopr: RatioValuePattern::new(client.clone(), acc.clone()), } } @@ -1441,32 +1441,32 @@ impl ActivityAddrOutputsRealizedSupplyUnrealizedPattern { } /// Pattern struct for repeated tree structure. -pub struct AverageBaseCumulativeInSumPattern { +pub struct AverageBlockCumulativeInSumPattern { pub average: _1m1w1y24hPattern3, - pub base: BtcCentsSatsUsdPattern2, - pub cumulative: BtcCentsSatsUsdPattern2, - pub in_loss: AverageBaseCumulativeSumPattern3, - pub in_profit: AverageBaseCumulativeSumPattern3, + pub block: BtcCentsSatsUsdPattern2, + pub cumulative: BtcCentsSatsUsdPattern3, + pub in_loss: AverageBlockCumulativeSumPattern3, + pub in_profit: AverageBlockCumulativeSumPattern3, pub sum: _1m1w1y24hPattern4, } -impl AverageBaseCumulativeInSumPattern { +impl AverageBlockCumulativeInSumPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { average: _1m1w1y24hPattern3::new(client.clone(), _m(&acc, "average")), - base: BtcCentsSatsUsdPattern2::new(client.clone(), acc.clone()), - cumulative: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "cumulative")), - in_loss: AverageBaseCumulativeSumPattern3::new(client.clone(), _m(&acc, "in_loss")), - in_profit: AverageBaseCumulativeSumPattern3::new(client.clone(), _m(&acc, "in_profit")), + block: BtcCentsSatsUsdPattern2::new(client.clone(), acc.clone()), + cumulative: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "cumulative")), + in_loss: AverageBlockCumulativeSumPattern3::new(client.clone(), _m(&acc, "in_loss")), + in_profit: AverageBlockCumulativeSumPattern3::new(client.clone(), _m(&acc, "in_profit")), sum: _1m1w1y24hPattern4::new(client.clone(), _m(&acc, "sum")), } } } /// Pattern struct for repeated tree structure. -pub struct BaseChangeCumulativeDeltaSumToPattern { - pub base: CentsUsdPattern, +pub struct BlockChangeCumulativeDeltaSumToPattern { + pub block: CentsUsdPattern4, pub change_1m: ToPattern, pub cumulative: CentsUsdPattern, pub delta: AbsoluteRatePattern2, @@ -1474,11 +1474,11 @@ pub struct BaseChangeCumulativeDeltaSumToPattern { pub to_rcap: BpsPercentRatioPattern, } -impl BaseChangeCumulativeDeltaSumToPattern { +impl BlockChangeCumulativeDeltaSumToPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - base: CentsUsdPattern::new(client.clone(), _m(&acc, "realized_pnl")), + block: CentsUsdPattern4::new(client.clone(), _m(&acc, "realized_pnl")), change_1m: ToPattern::new(client.clone(), _m(&acc, "pnl_change_1m_to")), cumulative: CentsUsdPattern::new(client.clone(), _m(&acc, "realized_pnl_cumulative")), delta: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "realized_pnl_delta")), @@ -1563,11 +1563,11 @@ impl CentsNegativeToUsdPattern2 { /// Pattern struct for repeated tree structure. pub struct DeltaHalfInToTotalPattern { pub delta: AbsoluteRatePattern, - pub half: BtcCentsSatsUsdPattern2, + pub half: BtcCentsSatsUsdPattern3, pub in_loss: BtcCentsSatsToUsdPattern, pub in_profit: BtcCentsSatsToUsdPattern, pub to_circulating: BpsPercentRatioPattern3, - pub total: BtcCentsSatsUsdPattern2, + pub total: BtcCentsSatsUsdPattern3, } impl DeltaHalfInToTotalPattern { @@ -1575,11 +1575,11 @@ impl DeltaHalfInToTotalPattern { pub fn new(client: Arc, acc: String) -> Self { Self { delta: AbsoluteRatePattern::new(client.clone(), _m(&acc, "delta")), - half: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "half")), + half: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "half")), in_loss: BtcCentsSatsToUsdPattern::new(client.clone(), _m(&acc, "in_loss")), in_profit: BtcCentsSatsToUsdPattern::new(client.clone(), _m(&acc, "in_profit")), to_circulating: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_circulating")), - total: BtcCentsSatsUsdPattern2::new(client.clone(), acc.clone()), + total: BtcCentsSatsUsdPattern3::new(client.clone(), acc.clone()), } } } @@ -1587,11 +1587,11 @@ impl DeltaHalfInToTotalPattern { /// Pattern struct for repeated tree structure. pub struct DeltaHalfInToTotalPattern2 { pub delta: AbsoluteRatePattern, - pub half: BtcCentsSatsUsdPattern2, + pub half: BtcCentsSatsUsdPattern3, pub in_loss: BtcCentsSatsToUsdPattern3, pub in_profit: BtcCentsSatsToUsdPattern3, pub to_circulating: BpsPercentRatioPattern3, - pub total: BtcCentsSatsUsdPattern2, + pub total: BtcCentsSatsUsdPattern3, } impl DeltaHalfInToTotalPattern2 { @@ -1599,11 +1599,11 @@ impl DeltaHalfInToTotalPattern2 { pub fn new(client: Arc, acc: String) -> Self { Self { delta: AbsoluteRatePattern::new(client.clone(), _m(&acc, "delta")), - half: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "half")), + half: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "half")), in_loss: BtcCentsSatsToUsdPattern3::new(client.clone(), _m(&acc, "in_loss")), in_profit: BtcCentsSatsToUsdPattern3::new(client.clone(), _m(&acc, "in_profit")), to_circulating: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "to_circulating")), - total: BtcCentsSatsUsdPattern2::new(client.clone(), acc.clone()), + total: BtcCentsSatsUsdPattern3::new(client.clone(), acc.clone()), } } } @@ -1633,15 +1633,15 @@ impl Pct1Pct2Pct5Pct95Pct98Pct99Pattern { } /// Pattern struct for repeated tree structure. -pub struct _1m1w1y24hBasePattern { +pub struct _1m1w1y24hBlockPattern { pub _1m: SeriesPattern1, pub _1w: SeriesPattern1, pub _1y: SeriesPattern1, pub _24h: SeriesPattern1, - pub base: SeriesPattern18, + pub block: SeriesPattern18, } -impl _1m1w1y24hBasePattern { +impl _1m1w1y24hBlockPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { @@ -1649,7 +1649,7 @@ impl _1m1w1y24hBasePattern { _1w: SeriesPattern1::new(client.clone(), _m(&acc, "average_1w")), _1y: SeriesPattern1::new(client.clone(), _m(&acc, "average_1y")), _24h: SeriesPattern1::new(client.clone(), _m(&acc, "average_24h")), - base: SeriesPattern18::new(client.clone(), acc.clone()), + block: SeriesPattern18::new(client.clone(), acc.clone()), } } } @@ -1721,9 +1721,9 @@ impl ActivityOutputsRealizedSupplyUnrealizedPattern2 { } /// Pattern struct for repeated tree structure. -pub struct BaseCumulativeNegativeSumToPattern { - pub base: CentsUsdPattern2, - pub cumulative: CentsUsdPattern2, +pub struct BlockCumulativeNegativeSumToPattern { + pub block: CentsUsdPattern2, + pub cumulative: CentsUsdPattern3, pub negative: BaseSumPattern, pub sum: _1m1w1y24hPattern6, pub to_rcap: BpsPercentRatioPattern4, @@ -1820,10 +1820,10 @@ impl BtcCentsSatsToUsdPattern2 { /// Pattern struct for repeated tree structure. pub struct CapLossMvrvPriceProfitPattern { pub cap: CentsDeltaUsdPattern, - pub loss: BaseCumulativeSumPattern, + pub loss: BlockCumulativeSumPattern, pub mvrv: SeriesPattern1, pub price: BpsCentsRatioSatsUsdPattern, - pub profit: BaseCumulativeSumPattern, + pub profit: BlockCumulativeSumPattern, } impl CapLossMvrvPriceProfitPattern { @@ -1831,10 +1831,10 @@ impl CapLossMvrvPriceProfitPattern { pub fn new(client: Arc, acc: String) -> Self { Self { cap: CentsDeltaUsdPattern::new(client.clone(), _m(&acc, "realized_cap")), - loss: BaseCumulativeSumPattern::new(client.clone(), _m(&acc, "realized_loss")), + loss: BlockCumulativeSumPattern::new(client.clone(), _m(&acc, "realized_loss")), mvrv: SeriesPattern1::new(client.clone(), _m(&acc, "mvrv")), price: BpsCentsRatioSatsUsdPattern::new(client.clone(), _m(&acc, "realized_price")), - profit: BaseCumulativeSumPattern::new(client.clone(), _m(&acc, "realized_profit")), + profit: BlockCumulativeSumPattern::new(client.clone(), _m(&acc, "realized_profit")), } } } @@ -1864,10 +1864,10 @@ impl CentsToUsdPattern4 { /// Pattern struct for repeated tree structure. pub struct DeltaHalfInTotalPattern2 { pub delta: AbsoluteRatePattern, - pub half: BtcCentsSatsUsdPattern2, - pub in_loss: BtcCentsSatsUsdPattern2, - pub in_profit: BtcCentsSatsUsdPattern2, - pub total: BtcCentsSatsUsdPattern2, + pub half: BtcCentsSatsUsdPattern3, + pub in_loss: BtcCentsSatsUsdPattern3, + pub in_profit: BtcCentsSatsUsdPattern3, + pub total: BtcCentsSatsUsdPattern3, } impl DeltaHalfInTotalPattern2 { @@ -1875,10 +1875,10 @@ impl DeltaHalfInTotalPattern2 { pub fn new(client: Arc, acc: String) -> Self { Self { delta: AbsoluteRatePattern::new(client.clone(), _m(&acc, "delta")), - half: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "half")), - in_loss: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "in_loss")), - in_profit: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "in_profit")), - total: BtcCentsSatsUsdPattern2::new(client.clone(), acc.clone()), + half: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "half")), + in_loss: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "in_loss")), + in_profit: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "in_profit")), + total: BtcCentsSatsUsdPattern3::new(client.clone(), acc.clone()), } } } @@ -1976,20 +1976,20 @@ impl _1m1w1y24hPattern3 { /// Pattern struct for repeated tree structure. pub struct _1m1w1y24hPattern4 { - pub _1m: BtcCentsSatsUsdPattern2, - pub _1w: BtcCentsSatsUsdPattern2, - pub _1y: BtcCentsSatsUsdPattern2, - pub _24h: BtcCentsSatsUsdPattern2, + pub _1m: BtcCentsSatsUsdPattern3, + pub _1w: BtcCentsSatsUsdPattern3, + pub _1y: BtcCentsSatsUsdPattern3, + pub _24h: BtcCentsSatsUsdPattern3, } impl _1m1w1y24hPattern4 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - _1m: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "1m")), - _1w: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "1w")), - _1y: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "1y")), - _24h: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "24h")), + _1m: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "1m")), + _1w: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "1w")), + _1y: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "1y")), + _24h: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "24h")), } } } @@ -2036,20 +2036,20 @@ impl _1m1w1y24hPattern5 { /// Pattern struct for repeated tree structure. pub struct _1m1w1y24hPattern6 { - pub _1m: CentsUsdPattern2, - pub _1w: CentsUsdPattern2, - pub _1y: CentsUsdPattern2, - pub _24h: CentsUsdPattern2, + pub _1m: CentsUsdPattern3, + pub _1w: CentsUsdPattern3, + pub _1y: CentsUsdPattern3, + pub _24h: CentsUsdPattern3, } impl _1m1w1y24hPattern6 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - _1m: CentsUsdPattern2::new(client.clone(), _m(&acc, "1m")), - _1w: CentsUsdPattern2::new(client.clone(), _m(&acc, "1w")), - _1y: CentsUsdPattern2::new(client.clone(), _m(&acc, "1y")), - _24h: CentsUsdPattern2::new(client.clone(), _m(&acc, "24h")), + _1m: CentsUsdPattern3::new(client.clone(), _m(&acc, "1m")), + _1w: CentsUsdPattern3::new(client.clone(), _m(&acc, "1w")), + _1y: CentsUsdPattern3::new(client.clone(), _m(&acc, "1y")), + _24h: CentsUsdPattern3::new(client.clone(), _m(&acc, "24h")), } } } @@ -2063,19 +2063,19 @@ pub struct _1y2y4yAllPattern { } /// Pattern struct for repeated tree structure. -pub struct AverageBaseCumulativeSumPattern2 { +pub struct AverageBlockCumulativeSumPattern2 { pub average: _1m1w1y24hPattern, - pub base: SeriesPattern1, + pub block: SeriesPattern18, pub cumulative: SeriesPattern1, pub sum: _1m1w1y24hPattern, } -impl AverageBaseCumulativeSumPattern2 { +impl AverageBlockCumulativeSumPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { average: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "average")), - base: SeriesPattern1::new(client.clone(), acc.clone()), + block: SeriesPattern18::new(client.clone(), acc.clone()), cumulative: SeriesPattern1::new(client.clone(), _m(&acc, "cumulative")), sum: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "sum")), } @@ -2083,38 +2083,78 @@ impl AverageBaseCumulativeSumPattern2 { } /// Pattern struct for repeated tree structure. -pub struct AverageBaseCumulativeSumPattern3 { +pub struct AverageBlockCumulativeSumPattern3 { pub average: _1m1w1y24hPattern3, - pub base: BtcCentsSatsUsdPattern2, - pub cumulative: BtcCentsSatsUsdPattern2, + pub block: BtcCentsSatsUsdPattern2, + pub cumulative: BtcCentsSatsUsdPattern3, pub sum: _1m1w1y24hPattern4, } -impl AverageBaseCumulativeSumPattern3 { +impl AverageBlockCumulativeSumPattern3 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { average: _1m1w1y24hPattern3::new(client.clone(), _m(&acc, "average")), - base: BtcCentsSatsUsdPattern2::new(client.clone(), acc.clone()), - cumulative: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "cumulative")), + block: BtcCentsSatsUsdPattern2::new(client.clone(), acc.clone()), + cumulative: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "cumulative")), sum: _1m1w1y24hPattern4::new(client.clone(), _m(&acc, "sum")), } } } /// Pattern struct for repeated tree structure. -pub struct BaseCumulativeDeltaSumPattern { - pub base: CentsUsdPattern, +pub struct BlockCumulativeNegativeSumPattern { + pub block: CentsUsdPattern2, + pub cumulative: CentsUsdPattern3, + pub negative: BaseSumPattern, + pub sum: _1m1w1y24hPattern6, +} + +impl BlockCumulativeNegativeSumPattern { + /// Create a new pattern node with accumulated series name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + block: CentsUsdPattern2::new(client.clone(), _m(&acc, "realized_loss")), + cumulative: CentsUsdPattern3::new(client.clone(), _m(&acc, "realized_loss_cumulative")), + negative: BaseSumPattern::new(client.clone(), _m(&acc, "neg_realized_loss")), + sum: _1m1w1y24hPattern6::new(client.clone(), _m(&acc, "realized_loss_sum")), + } + } +} + +/// Pattern struct for repeated tree structure. +pub struct BlockCumulativeSumToPattern { + pub block: CentsUsdPattern2, + pub cumulative: CentsUsdPattern3, + pub sum: _1m1w1y24hPattern6, + pub to_rcap: BpsPercentRatioPattern4, +} + +impl BlockCumulativeSumToPattern { + /// Create a new pattern node with accumulated series name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + block: CentsUsdPattern2::new(client.clone(), acc.clone()), + cumulative: CentsUsdPattern3::new(client.clone(), _m(&acc, "cumulative")), + sum: _1m1w1y24hPattern6::new(client.clone(), _m(&acc, "sum")), + to_rcap: BpsPercentRatioPattern4::new(client.clone(), _m(&acc, "to_rcap")), + } + } +} + +/// Pattern struct for repeated tree structure. +pub struct BlockCumulativeDeltaSumPattern { + pub block: CentsUsdPattern4, pub cumulative: CentsUsdPattern, pub delta: AbsoluteRatePattern2, pub sum: _1m1w1y24hPattern5, } -impl BaseCumulativeDeltaSumPattern { +impl BlockCumulativeDeltaSumPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - base: CentsUsdPattern::new(client.clone(), acc.clone()), + block: CentsUsdPattern4::new(client.clone(), acc.clone()), cumulative: CentsUsdPattern::new(client.clone(), _m(&acc, "cumulative")), delta: AbsoluteRatePattern2::new(client.clone(), _m(&acc, "delta")), sum: _1m1w1y24hPattern5::new(client.clone(), _m(&acc, "sum")), @@ -2122,75 +2162,35 @@ impl BaseCumulativeDeltaSumPattern { } } -/// Pattern struct for repeated tree structure. -pub struct BaseCumulativeNegativeSumPattern { - pub base: CentsUsdPattern2, - pub cumulative: CentsUsdPattern2, - pub negative: BaseSumPattern, - pub sum: _1m1w1y24hPattern6, -} - -impl BaseCumulativeNegativeSumPattern { - /// Create a new pattern node with accumulated series name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - base: CentsUsdPattern2::new(client.clone(), _m(&acc, "realized_loss")), - cumulative: CentsUsdPattern2::new(client.clone(), _m(&acc, "realized_loss_cumulative")), - negative: BaseSumPattern::new(client.clone(), _m(&acc, "neg_realized_loss")), - sum: _1m1w1y24hPattern6::new(client.clone(), _m(&acc, "realized_loss_sum")), - } - } -} - -/// Pattern struct for repeated tree structure. -pub struct BaseCumulativeSumToPattern { - pub base: CentsUsdPattern2, - pub cumulative: CentsUsdPattern2, - pub sum: _1m1w1y24hPattern6, - pub to_rcap: BpsPercentRatioPattern4, -} - -impl BaseCumulativeSumToPattern { - /// Create a new pattern node with accumulated series name. - pub fn new(client: Arc, acc: String) -> Self { - Self { - base: CentsUsdPattern2::new(client.clone(), acc.clone()), - cumulative: CentsUsdPattern2::new(client.clone(), _m(&acc, "cumulative")), - sum: _1m1w1y24hPattern6::new(client.clone(), _m(&acc, "sum")), - to_rcap: BpsPercentRatioPattern4::new(client.clone(), _m(&acc, "to_rcap")), - } - } -} - /// Pattern struct for repeated tree structure. pub struct BothReactivatedReceivingSendingPattern { - pub both: _1m1w1y24hBasePattern, - pub reactivated: _1m1w1y24hBasePattern, - pub receiving: _1m1w1y24hBasePattern, - pub sending: _1m1w1y24hBasePattern, + pub both: _1m1w1y24hBlockPattern, + pub reactivated: _1m1w1y24hBlockPattern, + pub receiving: _1m1w1y24hBlockPattern, + pub sending: _1m1w1y24hBlockPattern, } impl BothReactivatedReceivingSendingPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - both: _1m1w1y24hBasePattern::new(client.clone(), _m(&acc, "both")), - reactivated: _1m1w1y24hBasePattern::new(client.clone(), _m(&acc, "reactivated")), - receiving: _1m1w1y24hBasePattern::new(client.clone(), _m(&acc, "receiving")), - sending: _1m1w1y24hBasePattern::new(client.clone(), _m(&acc, "sending")), + both: _1m1w1y24hBlockPattern::new(client.clone(), _m(&acc, "both")), + reactivated: _1m1w1y24hBlockPattern::new(client.clone(), _m(&acc, "reactivated")), + receiving: _1m1w1y24hBlockPattern::new(client.clone(), _m(&acc, "receiving")), + sending: _1m1w1y24hBlockPattern::new(client.clone(), _m(&acc, "sending")), } } } /// Pattern struct for repeated tree structure. -pub struct BtcCentsSatsUsdPattern2 { +pub struct BtcCentsSatsUsdPattern3 { pub btc: SeriesPattern1, pub cents: SeriesPattern1, pub sats: SeriesPattern1, pub usd: SeriesPattern1, } -impl BtcCentsSatsUsdPattern2 { +impl BtcCentsSatsUsdPattern3 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { @@ -2222,6 +2222,26 @@ impl BtcCentsSatsUsdPattern { } } +/// Pattern struct for repeated tree structure. +pub struct BtcCentsSatsUsdPattern2 { + pub btc: SeriesPattern18, + pub cents: SeriesPattern18, + pub sats: SeriesPattern18, + pub usd: SeriesPattern18, +} + +impl BtcCentsSatsUsdPattern2 { + /// Create a new pattern node with accumulated series name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + btc: SeriesPattern18::new(client.clone(), acc.clone()), + cents: SeriesPattern18::new(client.clone(), _m(&acc, "cents")), + sats: SeriesPattern18::new(client.clone(), _m(&acc, "sats")), + usd: SeriesPattern18::new(client.clone(), _m(&acc, "usd")), + } + } +} + /// Pattern struct for repeated tree structure. pub struct CentsDeltaToUsdPattern { pub cents: SeriesPattern1, @@ -2264,10 +2284,10 @@ impl CentsToUsdPattern3 { /// Pattern struct for repeated tree structure. pub struct CoindaysCoinyearsDormancyTransferPattern { - pub coindays_destroyed: AverageBaseCumulativeSumPattern, + pub coindays_destroyed: AverageBlockCumulativeSumPattern, pub coinyears_destroyed: SeriesPattern1, pub dormancy: _1m1w1y24hPattern, - pub transfer_volume: AverageBaseCumulativeInSumPattern, + pub transfer_volume: AverageBlockCumulativeInSumPattern, } /// Pattern struct for repeated tree structure. @@ -2275,7 +2295,7 @@ pub struct LossNetNuplProfitPattern { pub loss: CentsNegativeUsdPattern, pub net_pnl: CentsUsdPattern, pub nupl: BpsRatioPattern, - pub profit: CentsUsdPattern2, + pub profit: CentsUsdPattern3, } impl LossNetNuplProfitPattern { @@ -2285,7 +2305,7 @@ impl LossNetNuplProfitPattern { loss: CentsNegativeUsdPattern::new(client.clone(), acc.clone()), net_pnl: CentsUsdPattern::new(client.clone(), _m(&acc, "net_unrealized_pnl")), nupl: BpsRatioPattern::new(client.clone(), _m(&acc, "nupl")), - profit: CentsUsdPattern2::new(client.clone(), _m(&acc, "unrealized_profit")), + profit: CentsUsdPattern3::new(client.clone(), _m(&acc, "unrealized_profit")), } } } @@ -2311,19 +2331,19 @@ impl _1m1w1y24hPattern { } /// Pattern struct for repeated tree structure. -pub struct AverageBaseCumulativeSumPattern { +pub struct AverageBlockCumulativeSumPattern { pub average: _1m1w1y24hPattern, - pub base: SeriesPattern1, + pub block: SeriesPattern18, pub cumulative: SeriesPattern1, pub sum: _1m1w1y24hPattern, } -impl AverageBaseCumulativeSumPattern { +impl AverageBlockCumulativeSumPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { average: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "average")), - base: SeriesPattern1::new(client.clone(), acc.clone()), + block: SeriesPattern18::new(client.clone(), acc.clone()), cumulative: SeriesPattern1::new(client.clone(), _m(&acc, "cumulative")), sum: _1m1w1y24hPattern::new(client.clone(), _m(&acc, "sum")), } @@ -2334,22 +2354,22 @@ impl AverageBaseCumulativeSumPattern { pub struct AdjustedRatioValuePattern { pub adjusted: RatioTransferValuePattern, pub ratio: _1m1w1y24hPattern, - pub value_destroyed: AverageBaseCumulativeSumPattern, + pub value_destroyed: AverageBlockCumulativeSumPattern, } /// Pattern struct for repeated tree structure. -pub struct BaseCumulativeSumPattern { - pub base: CentsUsdPattern2, - pub cumulative: CentsUsdPattern2, +pub struct BlockCumulativeSumPattern { + pub block: CentsUsdPattern2, + pub cumulative: CentsUsdPattern3, pub sum: _1m1w1y24hPattern6, } -impl BaseCumulativeSumPattern { +impl BlockCumulativeSumPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - base: CentsUsdPattern2::new(client.clone(), acc.clone()), - cumulative: CentsUsdPattern2::new(client.clone(), _m(&acc, "cumulative")), + block: CentsUsdPattern2::new(client.clone(), acc.clone()), + cumulative: CentsUsdPattern3::new(client.clone(), _m(&acc, "cumulative")), sum: _1m1w1y24hPattern6::new(client.clone(), _m(&acc, "sum")), } } @@ -2357,18 +2377,18 @@ impl BaseCumulativeSumPattern { /// Pattern struct for repeated tree structure. pub struct BlocksDominanceRewardsPattern { - pub blocks_mined: AverageBaseCumulativeSumPattern2, + pub blocks_mined: AverageBlockCumulativeSumPattern2, pub dominance: _1m1w1y24hBpsPercentRatioPattern, - pub rewards: AverageBaseCumulativeSumPattern3, + pub rewards: AverageBlockCumulativeSumPattern3, } impl BlocksDominanceRewardsPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - blocks_mined: AverageBaseCumulativeSumPattern2::new(client.clone(), _m(&acc, "blocks_mined")), + blocks_mined: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "blocks_mined")), dominance: _1m1w1y24hBpsPercentRatioPattern::new(client.clone(), _m(&acc, "dominance")), - rewards: AverageBaseCumulativeSumPattern3::new(client.clone(), _m(&acc, "rewards")), + rewards: AverageBlockCumulativeSumPattern3::new(client.clone(), _m(&acc, "rewards")), } } } @@ -2556,8 +2576,8 @@ impl CumulativeRollingSumPattern { /// Pattern struct for repeated tree structure. pub struct DeltaHalfTotalPattern { pub delta: AbsoluteRatePattern, - pub half: BtcCentsSatsUsdPattern2, - pub total: BtcCentsSatsUsdPattern2, + pub half: BtcCentsSatsUsdPattern3, + pub total: BtcCentsSatsUsdPattern3, } impl DeltaHalfTotalPattern { @@ -2565,24 +2585,24 @@ impl DeltaHalfTotalPattern { pub fn new(client: Arc, acc: String) -> Self { Self { delta: AbsoluteRatePattern::new(client.clone(), _m(&acc, "delta")), - half: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "half")), - total: BtcCentsSatsUsdPattern2::new(client.clone(), acc.clone()), + half: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "half")), + total: BtcCentsSatsUsdPattern3::new(client.clone(), acc.clone()), } } } /// Pattern struct for repeated tree structure. pub struct GreedNetPainPattern { - pub greed_index: CentsUsdPattern2, + pub greed_index: CentsUsdPattern3, pub net: CentsUsdPattern, - pub pain_index: CentsUsdPattern2, + pub pain_index: CentsUsdPattern3, } /// Pattern struct for repeated tree structure. pub struct LossNuplProfitPattern { pub loss: CentsNegativeUsdPattern, pub nupl: BpsRatioPattern, - pub profit: CentsUsdPattern2, + pub profit: CentsUsdPattern3, } impl LossNuplProfitPattern { @@ -2591,7 +2611,7 @@ impl LossNuplProfitPattern { Self { loss: CentsNegativeUsdPattern::new(client.clone(), acc.clone()), nupl: BpsRatioPattern::new(client.clone(), _m(&acc, "nupl")), - profit: CentsUsdPattern2::new(client.clone(), _m(&acc, "unrealized_profit")), + profit: CentsUsdPattern3::new(client.clone(), _m(&acc, "unrealized_profit")), } } } @@ -2617,8 +2637,8 @@ impl NuplRealizedSupplyPattern { /// Pattern struct for repeated tree structure. pub struct RatioTransferValuePattern { pub ratio: _1m1w1y24hPattern, - pub transfer_volume: AverageBaseCumulativeSumPattern, - pub value_destroyed: AverageBaseCumulativeSumPattern, + pub transfer_volume: AverageBlockCumulativeSumPattern, + pub value_destroyed: AverageBlockCumulativeSumPattern, } /// Pattern struct for repeated tree structure. @@ -2674,7 +2694,7 @@ impl AbsoluteRatePattern2 { /// Pattern struct for repeated tree structure. pub struct AllSthPattern2 { pub all: BtcCentsDeltaSatsUsdPattern, - pub sth: BtcCentsSatsUsdPattern2, + pub sth: BtcCentsSatsUsdPattern3, } impl AllSthPattern2 { @@ -2682,7 +2702,7 @@ impl AllSthPattern2 { pub fn new(client: Arc, acc: String) -> Self { Self { all: BtcCentsDeltaSatsUsdPattern::new(client.clone(), _m(&acc, "supply")), - sth: BtcCentsSatsUsdPattern2::new(client.clone(), _m(&acc, "sth_supply")), + sth: BtcCentsSatsUsdPattern3::new(client.clone(), _m(&acc, "sth_supply")), } } } @@ -2737,7 +2757,7 @@ impl BaseDeltaPattern { /// Pattern struct for repeated tree structure. pub struct BlocksDominancePattern { - pub blocks_mined: AverageBaseCumulativeSumPattern2, + pub blocks_mined: AverageBlockCumulativeSumPattern2, pub dominance: BpsPercentRatioPattern3, } @@ -2745,7 +2765,7 @@ impl BlocksDominancePattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - blocks_mined: AverageBaseCumulativeSumPattern2::new(client.clone(), _m(&acc, "blocks_mined")), + blocks_mined: AverageBlockCumulativeSumPattern2::new(client.clone(), _m(&acc, "blocks_mined")), dominance: BpsPercentRatioPattern3::new(client.clone(), _m(&acc, "dominance")), } } @@ -2784,17 +2804,33 @@ impl BpsRatioPattern { } /// Pattern struct for repeated tree structure. -pub struct CentsUsdPattern2 { +pub struct CentsUsdPattern3 { pub cents: SeriesPattern1, pub usd: SeriesPattern1, } +impl CentsUsdPattern3 { + /// Create a new pattern node with accumulated series name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + cents: SeriesPattern1::new(client.clone(), _m(&acc, "cents")), + usd: SeriesPattern1::new(client.clone(), acc.clone()), + } + } +} + +/// Pattern struct for repeated tree structure. +pub struct CentsUsdPattern2 { + pub cents: SeriesPattern18, + pub usd: SeriesPattern18, +} + impl CentsUsdPattern2 { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - cents: SeriesPattern1::new(client.clone(), _m(&acc, "cents")), - usd: SeriesPattern1::new(client.clone(), acc.clone()), + cents: SeriesPattern18::new(client.clone(), _m(&acc, "cents")), + usd: SeriesPattern18::new(client.clone(), acc.clone()), } } } @@ -2815,34 +2851,50 @@ impl CentsUsdPattern { } } +/// Pattern struct for repeated tree structure. +pub struct CentsUsdPattern4 { + pub cents: SeriesPattern18, + pub usd: SeriesPattern18, +} + +impl CentsUsdPattern4 { + /// Create a new pattern node with accumulated series name. + pub fn new(client: Arc, acc: String) -> Self { + Self { + cents: SeriesPattern18::new(client.clone(), _m(&acc, "cents")), + usd: SeriesPattern18::new(client.clone(), acc.clone()), + } + } +} + /// Pattern struct for repeated tree structure. pub struct CoindaysTransferPattern { - pub coindays_destroyed: AverageBaseCumulativeSumPattern, - pub transfer_volume: AverageBaseCumulativeInSumPattern, + pub coindays_destroyed: AverageBlockCumulativeSumPattern, + pub transfer_volume: AverageBlockCumulativeInSumPattern, } impl CoindaysTransferPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - coindays_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), _m(&acc, "coindays_destroyed")), - transfer_volume: AverageBaseCumulativeInSumPattern::new(client.clone(), _m(&acc, "transfer_volume")), + coindays_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "coindays_destroyed")), + transfer_volume: AverageBlockCumulativeInSumPattern::new(client.clone(), _m(&acc, "transfer_volume")), } } } /// Pattern struct for repeated tree structure. pub struct InPattern { - pub in_loss: CentsUsdPattern2, - pub in_profit: CentsUsdPattern2, + pub in_loss: CentsUsdPattern3, + pub in_profit: CentsUsdPattern3, } impl InPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - in_loss: CentsUsdPattern2::new(client.clone(), _m(&acc, "loss")), - in_profit: CentsUsdPattern2::new(client.clone(), _m(&acc, "profit")), + in_loss: CentsUsdPattern3::new(client.clone(), _m(&acc, "loss")), + in_profit: CentsUsdPattern3::new(client.clone(), _m(&acc, "profit")), } } } @@ -2882,7 +2934,7 @@ impl PriceRatioPattern { /// Pattern struct for repeated tree structure. pub struct RatioValuePattern { pub ratio: _24hPattern, - pub value_destroyed: AverageBaseCumulativeSumPattern, + pub value_destroyed: AverageBlockCumulativeSumPattern, } impl RatioValuePattern { @@ -2890,7 +2942,7 @@ impl RatioValuePattern { pub fn new(client: Arc, acc: String) -> Self { Self { ratio: _24hPattern::new(client.clone(), _m(&acc, "sopr_24h")), - value_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), _m(&acc, "value_destroyed")), + value_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), _m(&acc, "value_destroyed")), } } } @@ -2961,14 +3013,14 @@ impl PricePattern { /// Pattern struct for repeated tree structure. pub struct TransferPattern { - pub transfer_volume: AverageBaseCumulativeSumPattern3, + pub transfer_volume: AverageBlockCumulativeSumPattern3, } impl TransferPattern { /// Create a new pattern node with accumulated series name. pub fn new(client: Arc, acc: String) -> Self { Self { - transfer_volume: AverageBaseCumulativeSumPattern3::new(client.clone(), acc.clone()), + transfer_volume: AverageBlockCumulativeSumPattern3::new(client.clone(), acc.clone()), } } } @@ -3044,7 +3096,7 @@ pub struct SeriesTree_Blocks { pub count: SeriesTree_Blocks_Count, pub lookback: SeriesTree_Blocks_Lookback, pub interval: SeriesTree_Blocks_Interval, - pub vbytes: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2, + pub vbytes: AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern, pub fullness: SeriesTree_Blocks_Fullness, pub halving: SeriesTree_Blocks_Halving, } @@ -3060,7 +3112,7 @@ impl SeriesTree_Blocks { 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: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2::new(client.clone(), "block_vbytes".to_string()), + 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")), } @@ -3176,14 +3228,14 @@ impl SeriesTree_Blocks_Weight { /// Series tree node. pub struct SeriesTree_Blocks_Count { pub target: _1m1w1y24hPattern, - pub total: AverageBaseCumulativeSumPattern2, + pub total: AverageBlockCumulativeSumPattern2, } impl SeriesTree_Blocks_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { target: _1m1w1y24hPattern::new(client.clone(), "block_count_target".to_string()), - total: AverageBaseCumulativeSumPattern2::new(client.clone(), "block_count".to_string()), + total: AverageBlockCumulativeSumPattern2::new(client.clone(), "block_count".to_string()), } } } @@ -3287,7 +3339,7 @@ impl SeriesTree_Blocks_Lookback { /// Series tree node. pub struct SeriesTree_Blocks_Interval { - pub base: SeriesPattern18, + pub block: SeriesPattern18, pub _24h: SeriesPattern1, pub _1w: SeriesPattern1, pub _1m: SeriesPattern1, @@ -3297,7 +3349,7 @@ pub struct SeriesTree_Blocks_Interval { impl SeriesTree_Blocks_Interval { pub fn new(client: Arc, base_path: String) -> Self { Self { - base: SeriesPattern18::new(client.clone(), "block_interval".to_string()), + block: SeriesPattern18::new(client.clone(), "block_interval".to_string()), _24h: SeriesPattern1::new(client.clone(), "block_interval_average_24h".to_string()), _1w: SeriesPattern1::new(client.clone(), "block_interval_average_1w".to_string()), _1m: SeriesPattern1::new(client.clone(), "block_interval_average_1m".to_string()), @@ -3396,14 +3448,14 @@ impl SeriesTree_Transactions_Raw { /// Series tree node. pub struct SeriesTree_Transactions_Count { - pub total: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2, + pub total: AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern, pub is_coinbase: SeriesPattern19, } impl SeriesTree_Transactions_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - total: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2::new(client.clone(), "tx_count".to_string()), + total: AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern::new(client.clone(), "tx_count".to_string()), is_coinbase: SeriesPattern19::new(client.clone(), "is_coinbase".to_string()), } } @@ -3462,24 +3514,24 @@ impl SeriesTree_Transactions_Fees { /// Series tree node. pub struct SeriesTree_Transactions_Versions { - pub v1: AverageBaseCumulativeSumPattern, - pub v2: AverageBaseCumulativeSumPattern, - pub v3: AverageBaseCumulativeSumPattern, + pub v1: AverageBlockCumulativeSumPattern, + pub v2: AverageBlockCumulativeSumPattern, + pub v3: AverageBlockCumulativeSumPattern, } impl SeriesTree_Transactions_Versions { pub fn new(client: Arc, base_path: String) -> Self { Self { - v1: AverageBaseCumulativeSumPattern::new(client.clone(), "tx_v1".to_string()), - v2: AverageBaseCumulativeSumPattern::new(client.clone(), "tx_v2".to_string()), - v3: AverageBaseCumulativeSumPattern::new(client.clone(), "tx_v3".to_string()), + 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()), } } } /// Series tree node. pub struct SeriesTree_Transactions_Volume { - pub transfer_volume: AverageBaseCumulativeSumPattern3, + pub transfer_volume: AverageBlockCumulativeSumPattern3, pub tx_per_sec: _1m1w1y24hPattern, pub outputs_per_sec: _1m1w1y24hPattern, pub inputs_per_sec: _1m1w1y24hPattern, @@ -3488,7 +3540,7 @@ pub struct SeriesTree_Transactions_Volume { impl SeriesTree_Transactions_Volume { pub fn new(client: Arc, base_path: String) -> Self { Self { - transfer_volume: AverageBaseCumulativeSumPattern3::new(client.clone(), "transfer_volume_bis".to_string()), + transfer_volume: AverageBlockCumulativeSumPattern3::new(client.clone(), "transfer_volume_bis".to_string()), tx_per_sec: _1m1w1y24hPattern::new(client.clone(), "tx_per_sec".to_string()), outputs_per_sec: _1m1w1y24hPattern::new(client.clone(), "outputs_per_sec".to_string()), inputs_per_sec: _1m1w1y24hPattern::new(client.clone(), "inputs_per_sec".to_string()), @@ -3868,29 +3920,29 @@ impl SeriesTree_Addrs_Activity { /// Series tree node. pub struct SeriesTree_Addrs_New { - pub all: AverageBaseCumulativeSumPattern, - pub p2pk65: AverageBaseCumulativeSumPattern, - pub p2pk33: AverageBaseCumulativeSumPattern, - pub p2pkh: AverageBaseCumulativeSumPattern, - pub p2sh: AverageBaseCumulativeSumPattern, - pub p2wpkh: AverageBaseCumulativeSumPattern, - pub p2wsh: AverageBaseCumulativeSumPattern, - pub p2tr: AverageBaseCumulativeSumPattern, - pub p2a: AverageBaseCumulativeSumPattern, + pub all: AverageBlockCumulativeSumPattern, + pub p2pk65: AverageBlockCumulativeSumPattern, + pub p2pk33: AverageBlockCumulativeSumPattern, + pub p2pkh: AverageBlockCumulativeSumPattern, + pub p2sh: AverageBlockCumulativeSumPattern, + pub p2wpkh: AverageBlockCumulativeSumPattern, + pub p2wsh: AverageBlockCumulativeSumPattern, + pub p2tr: AverageBlockCumulativeSumPattern, + pub p2a: AverageBlockCumulativeSumPattern, } impl SeriesTree_Addrs_New { pub fn new(client: Arc, base_path: String) -> Self { Self { - all: AverageBaseCumulativeSumPattern::new(client.clone(), "new_addr_count".to_string()), - p2pk65: AverageBaseCumulativeSumPattern::new(client.clone(), "p2pk65_new_addr_count".to_string()), - p2pk33: AverageBaseCumulativeSumPattern::new(client.clone(), "p2pk33_new_addr_count".to_string()), - p2pkh: AverageBaseCumulativeSumPattern::new(client.clone(), "p2pkh_new_addr_count".to_string()), - p2sh: AverageBaseCumulativeSumPattern::new(client.clone(), "p2sh_new_addr_count".to_string()), - p2wpkh: AverageBaseCumulativeSumPattern::new(client.clone(), "p2wpkh_new_addr_count".to_string()), - p2wsh: AverageBaseCumulativeSumPattern::new(client.clone(), "p2wsh_new_addr_count".to_string()), - p2tr: AverageBaseCumulativeSumPattern::new(client.clone(), "p2tr_new_addr_count".to_string()), - p2a: AverageBaseCumulativeSumPattern::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()), } } } @@ -4022,48 +4074,48 @@ impl SeriesTree_Scripts_Raw_Unknown { /// Series tree node. pub struct SeriesTree_Scripts_Count { - pub p2a: AverageBaseCumulativeSumPattern, - pub p2ms: AverageBaseCumulativeSumPattern, - pub p2pk33: AverageBaseCumulativeSumPattern, - pub p2pk65: AverageBaseCumulativeSumPattern, - pub p2pkh: AverageBaseCumulativeSumPattern, - pub p2sh: AverageBaseCumulativeSumPattern, - pub p2tr: AverageBaseCumulativeSumPattern, - pub p2wpkh: AverageBaseCumulativeSumPattern, - pub p2wsh: AverageBaseCumulativeSumPattern, - pub op_return: AverageBaseCumulativeSumPattern, - pub empty_output: AverageBaseCumulativeSumPattern, - pub unknown_output: AverageBaseCumulativeSumPattern, + pub p2a: AverageBlockCumulativeSumPattern, + pub p2ms: AverageBlockCumulativeSumPattern, + pub p2pk33: AverageBlockCumulativeSumPattern, + pub p2pk65: AverageBlockCumulativeSumPattern, + pub p2pkh: AverageBlockCumulativeSumPattern, + pub p2sh: AverageBlockCumulativeSumPattern, + pub p2tr: AverageBlockCumulativeSumPattern, + pub p2wpkh: AverageBlockCumulativeSumPattern, + pub p2wsh: AverageBlockCumulativeSumPattern, + pub op_return: AverageBlockCumulativeSumPattern, + pub empty_output: AverageBlockCumulativeSumPattern, + pub unknown_output: AverageBlockCumulativeSumPattern, } impl SeriesTree_Scripts_Count { pub fn new(client: Arc, base_path: String) -> Self { Self { - p2a: AverageBaseCumulativeSumPattern::new(client.clone(), "p2a_count".to_string()), - p2ms: AverageBaseCumulativeSumPattern::new(client.clone(), "p2ms_count".to_string()), - p2pk33: AverageBaseCumulativeSumPattern::new(client.clone(), "p2pk33_count".to_string()), - p2pk65: AverageBaseCumulativeSumPattern::new(client.clone(), "p2pk65_count".to_string()), - p2pkh: AverageBaseCumulativeSumPattern::new(client.clone(), "p2pkh_count".to_string()), - p2sh: AverageBaseCumulativeSumPattern::new(client.clone(), "p2sh_count".to_string()), - p2tr: AverageBaseCumulativeSumPattern::new(client.clone(), "p2tr_count".to_string()), - p2wpkh: AverageBaseCumulativeSumPattern::new(client.clone(), "p2wpkh_count".to_string()), - p2wsh: AverageBaseCumulativeSumPattern::new(client.clone(), "p2wsh_count".to_string()), - op_return: AverageBaseCumulativeSumPattern::new(client.clone(), "op_return_count".to_string()), - empty_output: AverageBaseCumulativeSumPattern::new(client.clone(), "empty_output_count".to_string()), - unknown_output: AverageBaseCumulativeSumPattern::new(client.clone(), "unknown_output_count".to_string()), + p2a: AverageBlockCumulativeSumPattern::new(client.clone(), "p2a_count".to_string()), + p2ms: AverageBlockCumulativeSumPattern::new(client.clone(), "p2ms_count".to_string()), + p2pk33: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk33_count".to_string()), + p2pk65: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pk65_count".to_string()), + p2pkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2pkh_count".to_string()), + p2sh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2sh_count".to_string()), + p2tr: AverageBlockCumulativeSumPattern::new(client.clone(), "p2tr_count".to_string()), + p2wpkh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wpkh_count".to_string()), + p2wsh: AverageBlockCumulativeSumPattern::new(client.clone(), "p2wsh_count".to_string()), + op_return: AverageBlockCumulativeSumPattern::new(client.clone(), "op_return_count".to_string()), + empty_output: AverageBlockCumulativeSumPattern::new(client.clone(), "empty_output_count".to_string()), + unknown_output: AverageBlockCumulativeSumPattern::new(client.clone(), "unknown_output_count".to_string()), } } } /// Series tree node. pub struct SeriesTree_Scripts_Value { - pub op_return: AverageBaseCumulativeSumPattern3, + pub op_return: AverageBlockCumulativeSumPattern3, } impl SeriesTree_Scripts_Value { pub fn new(client: Arc, base_path: String) -> Self { Self { - op_return: AverageBaseCumulativeSumPattern3::new(client.clone(), "op_return_value".to_string()), + op_return: AverageBlockCumulativeSumPattern3::new(client.clone(), "op_return_value".to_string()), } } } @@ -4085,7 +4137,7 @@ impl SeriesTree_Mining { /// Series tree node. pub struct SeriesTree_Mining_Rewards { - pub coinbase: AverageBaseCumulativeSumPattern3, + pub coinbase: AverageBlockCumulativeSumPattern3, pub subsidy: SeriesTree_Mining_Rewards_Subsidy, pub fees: SeriesTree_Mining_Rewards_Fees, pub unclaimed: SeriesTree_Mining_Rewards_Unclaimed, @@ -4094,7 +4146,7 @@ pub struct SeriesTree_Mining_Rewards { impl SeriesTree_Mining_Rewards { pub fn new(client: Arc, base_path: String) -> Self { Self { - coinbase: AverageBaseCumulativeSumPattern3::new(client.clone(), "coinbase".to_string()), + coinbase: AverageBlockCumulativeSumPattern3::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")), unclaimed: SeriesTree_Mining_Rewards_Unclaimed::new(client.clone(), format!("{base_path}_unclaimed")), @@ -4104,31 +4156,31 @@ impl SeriesTree_Mining_Rewards { /// Series tree node. pub struct SeriesTree_Mining_Rewards_Subsidy { - pub base: BtcCentsSatsUsdPattern2, - pub cumulative: BtcCentsSatsUsdPattern2, + pub block: BtcCentsSatsUsdPattern2, + pub cumulative: BtcCentsSatsUsdPattern3, pub sum: _1m1w1y24hPattern4, pub average: _1m1w1y24hPattern3, pub dominance: _1m1w1y24hBpsPercentRatioPattern, - pub sma_1y: CentsUsdPattern2, + pub sma_1y: CentsUsdPattern3, } impl SeriesTree_Mining_Rewards_Subsidy { pub fn new(client: Arc, base_path: String) -> Self { Self { - base: BtcCentsSatsUsdPattern2::new(client.clone(), "subsidy".to_string()), - cumulative: BtcCentsSatsUsdPattern2::new(client.clone(), "subsidy_cumulative".to_string()), + block: BtcCentsSatsUsdPattern2::new(client.clone(), "subsidy".to_string()), + cumulative: BtcCentsSatsUsdPattern3::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: _1m1w1y24hBpsPercentRatioPattern::new(client.clone(), "subsidy_dominance".to_string()), - sma_1y: CentsUsdPattern2::new(client.clone(), "subsidy_sma_1y".to_string()), + sma_1y: CentsUsdPattern3::new(client.clone(), "subsidy_sma_1y".to_string()), } } } /// Series tree node. pub struct SeriesTree_Mining_Rewards_Fees { - pub base: BtcCentsSatsUsdPattern2, - pub cumulative: BtcCentsSatsUsdPattern2, + pub block: BtcCentsSatsUsdPattern2, + pub cumulative: BtcCentsSatsUsdPattern3, pub sum: _1m1w1y24hPattern4, pub average: _1m1w1y24hPattern3, pub min: _1m1w1y24hPattern4, @@ -4145,8 +4197,8 @@ pub struct SeriesTree_Mining_Rewards_Fees { impl SeriesTree_Mining_Rewards_Fees { pub fn new(client: Arc, base_path: String) -> Self { Self { - base: BtcCentsSatsUsdPattern2::new(client.clone(), "fees".to_string()), - cumulative: BtcCentsSatsUsdPattern2::new(client.clone(), "fees_cumulative".to_string()), + block: BtcCentsSatsUsdPattern2::new(client.clone(), "fees".to_string()), + cumulative: BtcCentsSatsUsdPattern3::new(client.clone(), "fees_cumulative".to_string()), sum: _1m1w1y24hPattern4::new(client.clone(), "fees_sum".to_string()), average: _1m1w1y24hPattern3::new(client.clone(), "fees_average".to_string()), min: _1m1w1y24hPattern4::new(client.clone(), "fees_min".to_string()), @@ -4183,15 +4235,15 @@ impl SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio { /// Series tree node. pub struct SeriesTree_Mining_Rewards_Unclaimed { - pub base: BtcCentsSatsUsdPattern2, - pub cumulative: BtcCentsSatsUsdPattern2, + pub block: BtcCentsSatsUsdPattern2, + pub cumulative: BtcCentsSatsUsdPattern3, } impl SeriesTree_Mining_Rewards_Unclaimed { pub fn new(client: Arc, base_path: String) -> Self { Self { - base: BtcCentsSatsUsdPattern2::new(client.clone(), "unclaimed_rewards".to_string()), - cumulative: BtcCentsSatsUsdPattern2::new(client.clone(), "unclaimed_rewards_cumulative".to_string()), + block: BtcCentsSatsUsdPattern2::new(client.clone(), "unclaimed_rewards".to_string()), + cumulative: BtcCentsSatsUsdPattern3::new(client.clone(), "unclaimed_rewards_cumulative".to_string()), } } } @@ -4293,79 +4345,79 @@ impl SeriesTree_Cointime { /// Series tree node. pub struct SeriesTree_Cointime_Activity { - pub coinblocks_created: AverageBaseCumulativeSumPattern, - pub coinblocks_stored: AverageBaseCumulativeSumPattern, + pub coinblocks_created: AverageBlockCumulativeSumPattern, + pub coinblocks_stored: AverageBlockCumulativeSumPattern, pub liveliness: SeriesPattern1, pub vaultedness: SeriesPattern1, pub ratio: SeriesPattern1, - pub coinblocks_destroyed: AverageBaseCumulativeSumPattern, + pub coinblocks_destroyed: AverageBlockCumulativeSumPattern, } impl SeriesTree_Cointime_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - coinblocks_created: AverageBaseCumulativeSumPattern::new(client.clone(), "coinblocks_created".to_string()), - coinblocks_stored: AverageBaseCumulativeSumPattern::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()), - coinblocks_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), "coinblocks_destroyed".to_string()), + coinblocks_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "coinblocks_destroyed".to_string()), } } } /// Series tree node. pub struct SeriesTree_Cointime_Supply { - pub vaulted: BtcCentsSatsUsdPattern2, - pub active: BtcCentsSatsUsdPattern2, + pub vaulted: BtcCentsSatsUsdPattern3, + pub active: BtcCentsSatsUsdPattern3, } impl SeriesTree_Cointime_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - vaulted: BtcCentsSatsUsdPattern2::new(client.clone(), "vaulted_supply".to_string()), - active: BtcCentsSatsUsdPattern2::new(client.clone(), "active_supply".to_string()), + vaulted: BtcCentsSatsUsdPattern3::new(client.clone(), "vaulted_supply".to_string()), + active: BtcCentsSatsUsdPattern3::new(client.clone(), "active_supply".to_string()), } } } /// Series tree node. pub struct SeriesTree_Cointime_Value { - pub destroyed: AverageBaseCumulativeSumPattern, - pub created: AverageBaseCumulativeSumPattern, - pub stored: AverageBaseCumulativeSumPattern, - pub vocdd: AverageBaseCumulativeSumPattern, + pub destroyed: AverageBlockCumulativeSumPattern, + pub created: AverageBlockCumulativeSumPattern, + pub stored: AverageBlockCumulativeSumPattern, + pub vocdd: AverageBlockCumulativeSumPattern, } impl SeriesTree_Cointime_Value { pub fn new(client: Arc, base_path: String) -> Self { Self { - destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), "cointime_value_destroyed".to_string()), - created: AverageBaseCumulativeSumPattern::new(client.clone(), "cointime_value_created".to_string()), - stored: AverageBaseCumulativeSumPattern::new(client.clone(), "cointime_value_stored".to_string()), - vocdd: AverageBaseCumulativeSumPattern::new(client.clone(), "vocdd".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()), } } } /// Series tree node. pub struct SeriesTree_Cointime_Cap { - pub thermo: CentsUsdPattern2, - pub investor: CentsUsdPattern2, - pub vaulted: CentsUsdPattern2, - pub active: CentsUsdPattern2, - pub cointime: CentsUsdPattern2, + pub thermo: CentsUsdPattern3, + pub investor: CentsUsdPattern3, + pub vaulted: CentsUsdPattern3, + pub active: CentsUsdPattern3, + pub cointime: CentsUsdPattern3, pub aviv: BpsRatioPattern2, } impl SeriesTree_Cointime_Cap { pub fn new(client: Arc, base_path: String) -> Self { Self { - thermo: CentsUsdPattern2::new(client.clone(), "thermo_cap".to_string()), - investor: CentsUsdPattern2::new(client.clone(), "investor_cap".to_string()), - vaulted: CentsUsdPattern2::new(client.clone(), "vaulted_cap".to_string()), - active: CentsUsdPattern2::new(client.clone(), "active_cap".to_string()), - cointime: CentsUsdPattern2::new(client.clone(), "cointime_cap".to_string()), + thermo: CentsUsdPattern3::new(client.clone(), "thermo_cap".to_string()), + investor: CentsUsdPattern3::new(client.clone(), "investor_cap".to_string()), + vaulted: CentsUsdPattern3::new(client.clone(), "vaulted_cap".to_string()), + active: CentsUsdPattern3::new(client.clone(), "active_cap".to_string()), + cointime: CentsUsdPattern3::new(client.clone(), "cointime_cap".to_string()), aviv: BpsRatioPattern2::new(client.clone(), "aviv_ratio".to_string()), } } @@ -5590,35 +5642,35 @@ impl SeriesTree_Market_Dca_Class { /// Series tree node. pub struct SeriesTree_Market_Dca_Class_Stack { - pub from_2015: BtcCentsSatsUsdPattern2, - pub from_2016: BtcCentsSatsUsdPattern2, - pub from_2017: BtcCentsSatsUsdPattern2, - pub from_2018: BtcCentsSatsUsdPattern2, - pub from_2019: BtcCentsSatsUsdPattern2, - pub from_2020: BtcCentsSatsUsdPattern2, - pub from_2021: BtcCentsSatsUsdPattern2, - pub from_2022: BtcCentsSatsUsdPattern2, - pub from_2023: BtcCentsSatsUsdPattern2, - pub from_2024: BtcCentsSatsUsdPattern2, - pub from_2025: BtcCentsSatsUsdPattern2, - pub from_2026: BtcCentsSatsUsdPattern2, + pub from_2015: BtcCentsSatsUsdPattern3, + pub from_2016: BtcCentsSatsUsdPattern3, + pub from_2017: BtcCentsSatsUsdPattern3, + pub from_2018: BtcCentsSatsUsdPattern3, + pub from_2019: BtcCentsSatsUsdPattern3, + pub from_2020: BtcCentsSatsUsdPattern3, + pub from_2021: BtcCentsSatsUsdPattern3, + pub from_2022: BtcCentsSatsUsdPattern3, + pub from_2023: BtcCentsSatsUsdPattern3, + pub from_2024: BtcCentsSatsUsdPattern3, + pub from_2025: BtcCentsSatsUsdPattern3, + pub from_2026: BtcCentsSatsUsdPattern3, } impl SeriesTree_Market_Dca_Class_Stack { pub fn new(client: Arc, base_path: String) -> Self { Self { - from_2015: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2015".to_string()), - from_2016: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2016".to_string()), - from_2017: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2017".to_string()), - from_2018: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2018".to_string()), - from_2019: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2019".to_string()), - from_2020: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2020".to_string()), - from_2021: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2021".to_string()), - from_2022: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2022".to_string()), - from_2023: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2023".to_string()), - from_2024: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2024".to_string()), - from_2025: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2025".to_string()), - from_2026: BtcCentsSatsUsdPattern2::new(client.clone(), "dca_stack_from_2026".to_string()), + from_2015: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2015".to_string()), + from_2016: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2016".to_string()), + from_2017: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2017".to_string()), + from_2018: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2018".to_string()), + from_2019: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2019".to_string()), + from_2020: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2020".to_string()), + from_2021: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2021".to_string()), + from_2022: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2022".to_string()), + from_2023: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2023".to_string()), + from_2024: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2024".to_string()), + from_2025: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2025".to_string()), + from_2026: BtcCentsSatsUsdPattern3::new(client.clone(), "dca_stack_from_2026".to_string()), } } } @@ -6247,26 +6299,26 @@ impl SeriesTree_Prices_Spot { /// Series tree node. pub struct SeriesTree_Supply { pub state: SeriesPattern18, - pub circulating: BtcCentsSatsUsdPattern2, - pub burned: AverageBaseCumulativeSumPattern3, + pub circulating: BtcCentsSatsUsdPattern3, + pub burned: AverageBlockCumulativeSumPattern3, pub inflation_rate: BpsPercentRatioPattern, pub velocity: SeriesTree_Supply_Velocity, pub market_cap: CentsDeltaUsdPattern, pub market_minus_realized_cap_growth_rate: _1m1w1y24hPattern, - pub hodled_or_lost: BtcCentsSatsUsdPattern2, + pub hodled_or_lost: BtcCentsSatsUsdPattern3, } impl SeriesTree_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { state: SeriesPattern18::new(client.clone(), "supply_state".to_string()), - circulating: BtcCentsSatsUsdPattern2::new(client.clone(), "circulating_supply".to_string()), - burned: AverageBaseCumulativeSumPattern3::new(client.clone(), "unspendable_supply".to_string()), + circulating: BtcCentsSatsUsdPattern3::new(client.clone(), "circulating_supply".to_string()), + burned: AverageBlockCumulativeSumPattern3::new(client.clone(), "unspendable_supply".to_string()), inflation_rate: BpsPercentRatioPattern::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: BtcCentsSatsUsdPattern2::new(client.clone(), "hodled_or_lost_supply".to_string()), + hodled_or_lost: BtcCentsSatsUsdPattern3::new(client.clone(), "hodled_or_lost_supply".to_string()), } } } @@ -6365,8 +6417,8 @@ impl SeriesTree_Cohorts_Utxo_All { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_All_Supply { - pub total: BtcCentsSatsUsdPattern2, - pub half: BtcCentsSatsUsdPattern2, + pub total: BtcCentsSatsUsdPattern3, + pub half: BtcCentsSatsUsdPattern3, pub delta: AbsoluteRatePattern, pub in_profit: BtcCentsSatsToUsdPattern2, pub in_loss: BtcCentsSatsToUsdPattern2, @@ -6375,8 +6427,8 @@ pub struct SeriesTree_Cohorts_Utxo_All_Supply { impl SeriesTree_Cohorts_Utxo_All_Supply { pub fn new(client: Arc, base_path: String) -> Self { Self { - total: BtcCentsSatsUsdPattern2::new(client.clone(), "supply".to_string()), - half: BtcCentsSatsUsdPattern2::new(client.clone(), "supply_half".to_string()), + total: BtcCentsSatsUsdPattern3::new(client.clone(), "supply".to_string()), + half: BtcCentsSatsUsdPattern3::new(client.clone(), "supply_half".to_string()), delta: AbsoluteRatePattern::new(client.clone(), "supply_delta".to_string()), in_profit: BtcCentsSatsToUsdPattern2::new(client.clone(), "supply_in_profit".to_string()), in_loss: BtcCentsSatsToUsdPattern2::new(client.clone(), "supply_in_loss".to_string()), @@ -6386,8 +6438,8 @@ impl SeriesTree_Cohorts_Utxo_All_Supply { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_All_Activity { - pub transfer_volume: AverageBaseCumulativeInSumPattern, - pub coindays_destroyed: AverageBaseCumulativeSumPattern, + pub transfer_volume: AverageBlockCumulativeInSumPattern, + pub coindays_destroyed: AverageBlockCumulativeSumPattern, pub coinyears_destroyed: SeriesPattern1, pub dormancy: _1m1w1y24hPattern, } @@ -6395,8 +6447,8 @@ pub struct SeriesTree_Cohorts_Utxo_All_Activity { impl SeriesTree_Cohorts_Utxo_All_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - transfer_volume: AverageBaseCumulativeInSumPattern::new(client.clone(), "transfer_volume".to_string()), - coindays_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), "coindays_destroyed".to_string()), + transfer_volume: AverageBlockCumulativeInSumPattern::new(client.clone(), "transfer_volume".to_string()), + coindays_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "coindays_destroyed".to_string()), coinyears_destroyed: SeriesPattern1::new(client.clone(), "coinyears_destroyed".to_string()), dormancy: _1m1w1y24hPattern::new(client.clone(), "dormancy".to_string()), } @@ -6406,15 +6458,15 @@ impl SeriesTree_Cohorts_Utxo_All_Activity { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_All_Realized { pub cap: CentsDeltaToUsdPattern, - pub profit: BaseCumulativeSumToPattern, + pub profit: BlockCumulativeSumToPattern, pub loss: SeriesTree_Cohorts_Utxo_All_Realized_Loss, pub price: SeriesTree_Cohorts_Utxo_All_Realized_Price, pub mvrv: SeriesPattern1, - pub net_pnl: BaseChangeCumulativeDeltaSumToPattern, + pub net_pnl: BlockChangeCumulativeDeltaSumToPattern, pub sopr: SeriesTree_Cohorts_Utxo_All_Realized_Sopr, - pub gross_pnl: BaseCumulativeSumPattern, + pub gross_pnl: BlockCumulativeSumPattern, pub sell_side_risk_ratio: _1m1w1y24hPattern7, - pub peak_regret: BaseCumulativeSumToPattern, + pub peak_regret: BlockCumulativeSumToPattern, pub investor: PricePattern, pub profit_to_loss_ratio: _1m1w1y24hPattern, } @@ -6423,15 +6475,15 @@ impl SeriesTree_Cohorts_Utxo_All_Realized { pub fn new(client: Arc, base_path: String) -> Self { Self { cap: CentsDeltaToUsdPattern::new(client.clone(), "realized_cap".to_string()), - profit: BaseCumulativeSumToPattern::new(client.clone(), "realized_profit".to_string()), + profit: BlockCumulativeSumToPattern::new(client.clone(), "realized_profit".to_string()), loss: SeriesTree_Cohorts_Utxo_All_Realized_Loss::new(client.clone(), format!("{base_path}_loss")), price: SeriesTree_Cohorts_Utxo_All_Realized_Price::new(client.clone(), format!("{base_path}_price")), mvrv: SeriesPattern1::new(client.clone(), "mvrv".to_string()), - net_pnl: BaseChangeCumulativeDeltaSumToPattern::new(client.clone(), "net".to_string()), + net_pnl: BlockChangeCumulativeDeltaSumToPattern::new(client.clone(), "net".to_string()), sopr: SeriesTree_Cohorts_Utxo_All_Realized_Sopr::new(client.clone(), format!("{base_path}_sopr")), - gross_pnl: BaseCumulativeSumPattern::new(client.clone(), "realized_gross_pnl".to_string()), + gross_pnl: BlockCumulativeSumPattern::new(client.clone(), "realized_gross_pnl".to_string()), sell_side_risk_ratio: _1m1w1y24hPattern7::new(client.clone(), "sell_side_risk_ratio".to_string()), - peak_regret: BaseCumulativeSumToPattern::new(client.clone(), "realized_peak_regret".to_string()), + peak_regret: BlockCumulativeSumToPattern::new(client.clone(), "realized_peak_regret".to_string()), investor: PricePattern::new(client.clone(), "investor_price".to_string()), profit_to_loss_ratio: _1m1w1y24hPattern::new(client.clone(), "realized_profit_to_loss_ratio".to_string()), } @@ -6440,8 +6492,8 @@ impl SeriesTree_Cohorts_Utxo_All_Realized { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_All_Realized_Loss { - pub base: CentsUsdPattern2, - pub cumulative: CentsUsdPattern2, + pub block: CentsUsdPattern2, + pub cumulative: CentsUsdPattern3, pub sum: _1m1w1y24hPattern6, pub negative: BaseSumPattern, pub to_rcap: BpsPercentRatioPattern4, @@ -6450,8 +6502,8 @@ pub struct SeriesTree_Cohorts_Utxo_All_Realized_Loss { impl SeriesTree_Cohorts_Utxo_All_Realized_Loss { pub fn new(client: Arc, base_path: String) -> Self { Self { - base: CentsUsdPattern2::new(client.clone(), "realized_loss".to_string()), - cumulative: CentsUsdPattern2::new(client.clone(), "realized_loss_cumulative".to_string()), + block: CentsUsdPattern2::new(client.clone(), "realized_loss".to_string()), + cumulative: CentsUsdPattern3::new(client.clone(), "realized_loss_cumulative".to_string()), sum: _1m1w1y24hPattern6::new(client.clone(), "realized_loss_sum".to_string()), negative: BaseSumPattern::new(client.clone(), "neg_realized_loss".to_string()), to_rcap: BpsPercentRatioPattern4::new(client.clone(), "realized_loss_to_rcap".to_string()), @@ -6671,7 +6723,7 @@ impl SeriesTree_Cohorts_Utxo_All_Realized_Price_StdDev_1y { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_All_Realized_Sopr { - pub value_destroyed: AverageBaseCumulativeSumPattern, + pub value_destroyed: AverageBlockCumulativeSumPattern, pub ratio: _1m1w1y24hPattern, pub adjusted: SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted, } @@ -6679,7 +6731,7 @@ pub struct SeriesTree_Cohorts_Utxo_All_Realized_Sopr { impl SeriesTree_Cohorts_Utxo_All_Realized_Sopr { pub fn new(client: Arc, base_path: String) -> Self { Self { - value_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), "value_destroyed".to_string()), + value_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "value_destroyed".to_string()), ratio: _1m1w1y24hPattern::new(client.clone(), "sopr".to_string()), adjusted: SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted::new(client.clone(), format!("{base_path}_adjusted")), } @@ -6689,16 +6741,16 @@ impl SeriesTree_Cohorts_Utxo_All_Realized_Sopr { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted { pub ratio: _1m1w1y24hPattern, - pub transfer_volume: AverageBaseCumulativeSumPattern, - pub value_destroyed: AverageBaseCumulativeSumPattern, + pub transfer_volume: AverageBlockCumulativeSumPattern, + pub value_destroyed: AverageBlockCumulativeSumPattern, } impl SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted { pub fn new(client: Arc, base_path: String) -> Self { Self { ratio: _1m1w1y24hPattern::new(client.clone(), "asopr".to_string()), - transfer_volume: AverageBaseCumulativeSumPattern::new(client.clone(), "adj_value_created".to_string()), - value_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), "adj_value_destroyed".to_string()), + transfer_volume: AverageBlockCumulativeSumPattern::new(client.clone(), "adj_value_created".to_string()), + value_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "adj_value_destroyed".to_string()), } } } @@ -6734,7 +6786,7 @@ pub struct SeriesTree_Cohorts_Utxo_All_Unrealized { pub profit: SeriesTree_Cohorts_Utxo_All_Unrealized_Profit, pub loss: SeriesTree_Cohorts_Utxo_All_Unrealized_Loss, pub net_pnl: SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl, - pub gross_pnl: CentsUsdPattern2, + pub gross_pnl: CentsUsdPattern3, pub invested_capital: InPattern, pub investor_cap_in_profit_raw: SeriesPattern18, pub investor_cap_in_loss_raw: SeriesPattern18, @@ -6748,7 +6800,7 @@ impl SeriesTree_Cohorts_Utxo_All_Unrealized { profit: SeriesTree_Cohorts_Utxo_All_Unrealized_Profit::new(client.clone(), format!("{base_path}_profit")), loss: SeriesTree_Cohorts_Utxo_All_Unrealized_Loss::new(client.clone(), format!("{base_path}_loss")), net_pnl: SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl::new(client.clone(), format!("{base_path}_net_pnl")), - gross_pnl: CentsUsdPattern2::new(client.clone(), "unrealized_gross_pnl".to_string()), + gross_pnl: CentsUsdPattern3::new(client.clone(), "unrealized_gross_pnl".to_string()), invested_capital: InPattern::new(client.clone(), "invested_capital_in".to_string()), investor_cap_in_profit_raw: SeriesPattern18::new(client.clone(), "investor_cap_in_profit_raw".to_string()), investor_cap_in_loss_raw: SeriesPattern18::new(client.clone(), "investor_cap_in_loss_raw".to_string()), @@ -6816,16 +6868,16 @@ impl SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_All_Unrealized_Sentiment { - pub pain_index: CentsUsdPattern2, - pub greed_index: CentsUsdPattern2, + pub pain_index: CentsUsdPattern3, + pub greed_index: CentsUsdPattern3, pub net: CentsUsdPattern, } impl SeriesTree_Cohorts_Utxo_All_Unrealized_Sentiment { pub fn new(client: Arc, base_path: String) -> Self { Self { - pain_index: CentsUsdPattern2::new(client.clone(), "pain_index".to_string()), - greed_index: CentsUsdPattern2::new(client.clone(), "greed_index".to_string()), + pain_index: CentsUsdPattern3::new(client.clone(), "pain_index".to_string()), + greed_index: CentsUsdPattern3::new(client.clone(), "greed_index".to_string()), net: CentsUsdPattern::new(client.clone(), "net_sentiment".to_string()), } } @@ -6856,8 +6908,8 @@ impl SeriesTree_Cohorts_Utxo_Sth { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth_Activity { - pub transfer_volume: AverageBaseCumulativeInSumPattern, - pub coindays_destroyed: AverageBaseCumulativeSumPattern, + pub transfer_volume: AverageBlockCumulativeInSumPattern, + pub coindays_destroyed: AverageBlockCumulativeSumPattern, pub coinyears_destroyed: SeriesPattern1, pub dormancy: _1m1w1y24hPattern, } @@ -6865,8 +6917,8 @@ pub struct SeriesTree_Cohorts_Utxo_Sth_Activity { impl SeriesTree_Cohorts_Utxo_Sth_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - transfer_volume: AverageBaseCumulativeInSumPattern::new(client.clone(), "sth_transfer_volume".to_string()), - coindays_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), "sth_coindays_destroyed".to_string()), + transfer_volume: AverageBlockCumulativeInSumPattern::new(client.clone(), "sth_transfer_volume".to_string()), + coindays_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "sth_coindays_destroyed".to_string()), coinyears_destroyed: SeriesPattern1::new(client.clone(), "sth_coinyears_destroyed".to_string()), dormancy: _1m1w1y24hPattern::new(client.clone(), "sth_dormancy".to_string()), } @@ -6876,15 +6928,15 @@ impl SeriesTree_Cohorts_Utxo_Sth_Activity { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth_Realized { pub cap: CentsDeltaToUsdPattern, - pub profit: BaseCumulativeSumToPattern, + pub profit: BlockCumulativeSumToPattern, pub loss: SeriesTree_Cohorts_Utxo_Sth_Realized_Loss, pub price: SeriesTree_Cohorts_Utxo_Sth_Realized_Price, pub mvrv: SeriesPattern1, - pub net_pnl: BaseChangeCumulativeDeltaSumToPattern, + pub net_pnl: BlockChangeCumulativeDeltaSumToPattern, pub sopr: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr, - pub gross_pnl: BaseCumulativeSumPattern, + pub gross_pnl: BlockCumulativeSumPattern, pub sell_side_risk_ratio: _1m1w1y24hPattern7, - pub peak_regret: BaseCumulativeSumToPattern, + pub peak_regret: BlockCumulativeSumToPattern, pub investor: PricePattern, pub profit_to_loss_ratio: _1m1w1y24hPattern, } @@ -6893,15 +6945,15 @@ impl SeriesTree_Cohorts_Utxo_Sth_Realized { pub fn new(client: Arc, base_path: String) -> Self { Self { cap: CentsDeltaToUsdPattern::new(client.clone(), "sth_realized_cap".to_string()), - profit: BaseCumulativeSumToPattern::new(client.clone(), "sth_realized_profit".to_string()), + profit: BlockCumulativeSumToPattern::new(client.clone(), "sth_realized_profit".to_string()), loss: SeriesTree_Cohorts_Utxo_Sth_Realized_Loss::new(client.clone(), format!("{base_path}_loss")), price: SeriesTree_Cohorts_Utxo_Sth_Realized_Price::new(client.clone(), format!("{base_path}_price")), mvrv: SeriesPattern1::new(client.clone(), "sth_mvrv".to_string()), - net_pnl: BaseChangeCumulativeDeltaSumToPattern::new(client.clone(), "sth_net".to_string()), + net_pnl: BlockChangeCumulativeDeltaSumToPattern::new(client.clone(), "sth_net".to_string()), sopr: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr::new(client.clone(), format!("{base_path}_sopr")), - gross_pnl: BaseCumulativeSumPattern::new(client.clone(), "sth_realized_gross_pnl".to_string()), + gross_pnl: BlockCumulativeSumPattern::new(client.clone(), "sth_realized_gross_pnl".to_string()), sell_side_risk_ratio: _1m1w1y24hPattern7::new(client.clone(), "sth_sell_side_risk_ratio".to_string()), - peak_regret: BaseCumulativeSumToPattern::new(client.clone(), "sth_realized_peak_regret".to_string()), + peak_regret: BlockCumulativeSumToPattern::new(client.clone(), "sth_realized_peak_regret".to_string()), investor: PricePattern::new(client.clone(), "sth_investor_price".to_string()), profit_to_loss_ratio: _1m1w1y24hPattern::new(client.clone(), "sth_realized_profit_to_loss_ratio".to_string()), } @@ -6910,8 +6962,8 @@ impl SeriesTree_Cohorts_Utxo_Sth_Realized { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth_Realized_Loss { - pub base: CentsUsdPattern2, - pub cumulative: CentsUsdPattern2, + pub block: CentsUsdPattern2, + pub cumulative: CentsUsdPattern3, pub sum: _1m1w1y24hPattern6, pub negative: BaseSumPattern, pub to_rcap: BpsPercentRatioPattern4, @@ -6920,8 +6972,8 @@ pub struct SeriesTree_Cohorts_Utxo_Sth_Realized_Loss { impl SeriesTree_Cohorts_Utxo_Sth_Realized_Loss { pub fn new(client: Arc, base_path: String) -> Self { Self { - base: CentsUsdPattern2::new(client.clone(), "sth_realized_loss".to_string()), - cumulative: CentsUsdPattern2::new(client.clone(), "sth_realized_loss_cumulative".to_string()), + block: CentsUsdPattern2::new(client.clone(), "sth_realized_loss".to_string()), + cumulative: CentsUsdPattern3::new(client.clone(), "sth_realized_loss_cumulative".to_string()), sum: _1m1w1y24hPattern6::new(client.clone(), "sth_realized_loss_sum".to_string()), negative: BaseSumPattern::new(client.clone(), "sth_neg_realized_loss".to_string()), to_rcap: BpsPercentRatioPattern4::new(client.clone(), "sth_realized_loss_to_rcap".to_string()), @@ -7141,7 +7193,7 @@ impl SeriesTree_Cohorts_Utxo_Sth_Realized_Price_StdDev_1y { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr { - pub value_destroyed: AverageBaseCumulativeSumPattern, + pub value_destroyed: AverageBlockCumulativeSumPattern, pub ratio: _1m1w1y24hPattern, pub adjusted: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted, } @@ -7149,7 +7201,7 @@ pub struct SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr { impl SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr { pub fn new(client: Arc, base_path: String) -> Self { Self { - value_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), "sth_value_destroyed".to_string()), + value_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "sth_value_destroyed".to_string()), ratio: _1m1w1y24hPattern::new(client.clone(), "sth_sopr".to_string()), adjusted: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted::new(client.clone(), format!("{base_path}_adjusted")), } @@ -7159,16 +7211,16 @@ impl SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted { pub ratio: _1m1w1y24hPattern, - pub transfer_volume: AverageBaseCumulativeSumPattern, - pub value_destroyed: AverageBaseCumulativeSumPattern, + pub transfer_volume: AverageBlockCumulativeSumPattern, + pub value_destroyed: AverageBlockCumulativeSumPattern, } impl SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted { pub fn new(client: Arc, base_path: String) -> Self { Self { ratio: _1m1w1y24hPattern::new(client.clone(), "sth_asopr".to_string()), - transfer_volume: AverageBaseCumulativeSumPattern::new(client.clone(), "sth_adj_value_created".to_string()), - value_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), "sth_adj_value_destroyed".to_string()), + transfer_volume: AverageBlockCumulativeSumPattern::new(client.clone(), "sth_adj_value_created".to_string()), + value_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "sth_adj_value_destroyed".to_string()), } } } @@ -7204,7 +7256,7 @@ pub struct SeriesTree_Cohorts_Utxo_Sth_Unrealized { pub profit: CentsToUsdPattern4, pub loss: CentsNegativeToUsdPattern2, pub net_pnl: CentsToUsdPattern3, - pub gross_pnl: CentsUsdPattern2, + pub gross_pnl: CentsUsdPattern3, pub invested_capital: InPattern, pub investor_cap_in_profit_raw: SeriesPattern18, pub investor_cap_in_loss_raw: SeriesPattern18, @@ -7218,7 +7270,7 @@ impl SeriesTree_Cohorts_Utxo_Sth_Unrealized { profit: CentsToUsdPattern4::new(client.clone(), "sth_unrealized_profit".to_string()), loss: CentsNegativeToUsdPattern2::new(client.clone(), "sth".to_string()), net_pnl: CentsToUsdPattern3::new(client.clone(), "sth_net_unrealized_pnl".to_string()), - gross_pnl: CentsUsdPattern2::new(client.clone(), "sth_unrealized_gross_pnl".to_string()), + gross_pnl: CentsUsdPattern3::new(client.clone(), "sth_unrealized_gross_pnl".to_string()), invested_capital: InPattern::new(client.clone(), "sth_invested_capital_in".to_string()), investor_cap_in_profit_raw: SeriesPattern18::new(client.clone(), "sth_investor_cap_in_profit_raw".to_string()), investor_cap_in_loss_raw: SeriesPattern18::new(client.clone(), "sth_investor_cap_in_loss_raw".to_string()), @@ -7229,16 +7281,16 @@ impl SeriesTree_Cohorts_Utxo_Sth_Unrealized { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Sth_Unrealized_Sentiment { - pub pain_index: CentsUsdPattern2, - pub greed_index: CentsUsdPattern2, + pub pain_index: CentsUsdPattern3, + pub greed_index: CentsUsdPattern3, pub net: CentsUsdPattern, } impl SeriesTree_Cohorts_Utxo_Sth_Unrealized_Sentiment { pub fn new(client: Arc, base_path: String) -> Self { Self { - pain_index: CentsUsdPattern2::new(client.clone(), "sth_pain_index".to_string()), - greed_index: CentsUsdPattern2::new(client.clone(), "sth_greed_index".to_string()), + pain_index: CentsUsdPattern3::new(client.clone(), "sth_pain_index".to_string()), + greed_index: CentsUsdPattern3::new(client.clone(), "sth_greed_index".to_string()), net: CentsUsdPattern::new(client.clone(), "sth_net_sentiment".to_string()), } } @@ -7269,8 +7321,8 @@ impl SeriesTree_Cohorts_Utxo_Lth { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Lth_Activity { - pub transfer_volume: AverageBaseCumulativeInSumPattern, - pub coindays_destroyed: AverageBaseCumulativeSumPattern, + pub transfer_volume: AverageBlockCumulativeInSumPattern, + pub coindays_destroyed: AverageBlockCumulativeSumPattern, pub coinyears_destroyed: SeriesPattern1, pub dormancy: _1m1w1y24hPattern, } @@ -7278,8 +7330,8 @@ pub struct SeriesTree_Cohorts_Utxo_Lth_Activity { impl SeriesTree_Cohorts_Utxo_Lth_Activity { pub fn new(client: Arc, base_path: String) -> Self { Self { - transfer_volume: AverageBaseCumulativeInSumPattern::new(client.clone(), "lth_transfer_volume".to_string()), - coindays_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), "lth_coindays_destroyed".to_string()), + transfer_volume: AverageBlockCumulativeInSumPattern::new(client.clone(), "lth_transfer_volume".to_string()), + coindays_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "lth_coindays_destroyed".to_string()), coinyears_destroyed: SeriesPattern1::new(client.clone(), "lth_coinyears_destroyed".to_string()), dormancy: _1m1w1y24hPattern::new(client.clone(), "lth_dormancy".to_string()), } @@ -7289,15 +7341,15 @@ impl SeriesTree_Cohorts_Utxo_Lth_Activity { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Lth_Realized { pub cap: CentsDeltaToUsdPattern, - pub profit: BaseCumulativeSumToPattern, + pub profit: BlockCumulativeSumToPattern, pub loss: SeriesTree_Cohorts_Utxo_Lth_Realized_Loss, pub price: SeriesTree_Cohorts_Utxo_Lth_Realized_Price, pub mvrv: SeriesPattern1, - pub net_pnl: BaseChangeCumulativeDeltaSumToPattern, + pub net_pnl: BlockChangeCumulativeDeltaSumToPattern, pub sopr: SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr, - pub gross_pnl: BaseCumulativeSumPattern, + pub gross_pnl: BlockCumulativeSumPattern, pub sell_side_risk_ratio: _1m1w1y24hPattern7, - pub peak_regret: BaseCumulativeSumToPattern, + pub peak_regret: BlockCumulativeSumToPattern, pub investor: PricePattern, pub profit_to_loss_ratio: _1m1w1y24hPattern, } @@ -7306,15 +7358,15 @@ impl SeriesTree_Cohorts_Utxo_Lth_Realized { pub fn new(client: Arc, base_path: String) -> Self { Self { cap: CentsDeltaToUsdPattern::new(client.clone(), "lth_realized_cap".to_string()), - profit: BaseCumulativeSumToPattern::new(client.clone(), "lth_realized_profit".to_string()), + profit: BlockCumulativeSumToPattern::new(client.clone(), "lth_realized_profit".to_string()), loss: SeriesTree_Cohorts_Utxo_Lth_Realized_Loss::new(client.clone(), format!("{base_path}_loss")), price: SeriesTree_Cohorts_Utxo_Lth_Realized_Price::new(client.clone(), format!("{base_path}_price")), mvrv: SeriesPattern1::new(client.clone(), "lth_mvrv".to_string()), - net_pnl: BaseChangeCumulativeDeltaSumToPattern::new(client.clone(), "lth_net".to_string()), + net_pnl: BlockChangeCumulativeDeltaSumToPattern::new(client.clone(), "lth_net".to_string()), sopr: SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr::new(client.clone(), format!("{base_path}_sopr")), - gross_pnl: BaseCumulativeSumPattern::new(client.clone(), "lth_realized_gross_pnl".to_string()), + gross_pnl: BlockCumulativeSumPattern::new(client.clone(), "lth_realized_gross_pnl".to_string()), sell_side_risk_ratio: _1m1w1y24hPattern7::new(client.clone(), "lth_sell_side_risk_ratio".to_string()), - peak_regret: BaseCumulativeSumToPattern::new(client.clone(), "lth_realized_peak_regret".to_string()), + peak_regret: BlockCumulativeSumToPattern::new(client.clone(), "lth_realized_peak_regret".to_string()), investor: PricePattern::new(client.clone(), "lth_investor_price".to_string()), profit_to_loss_ratio: _1m1w1y24hPattern::new(client.clone(), "lth_realized_profit_to_loss_ratio".to_string()), } @@ -7323,8 +7375,8 @@ impl SeriesTree_Cohorts_Utxo_Lth_Realized { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Lth_Realized_Loss { - pub base: CentsUsdPattern2, - pub cumulative: CentsUsdPattern2, + pub block: CentsUsdPattern2, + pub cumulative: CentsUsdPattern3, pub sum: _1m1w1y24hPattern6, pub negative: BaseSumPattern, pub to_rcap: BpsPercentRatioPattern4, @@ -7333,8 +7385,8 @@ pub struct SeriesTree_Cohorts_Utxo_Lth_Realized_Loss { impl SeriesTree_Cohorts_Utxo_Lth_Realized_Loss { pub fn new(client: Arc, base_path: String) -> Self { Self { - base: CentsUsdPattern2::new(client.clone(), "lth_realized_loss".to_string()), - cumulative: CentsUsdPattern2::new(client.clone(), "lth_realized_loss_cumulative".to_string()), + block: CentsUsdPattern2::new(client.clone(), "lth_realized_loss".to_string()), + cumulative: CentsUsdPattern3::new(client.clone(), "lth_realized_loss_cumulative".to_string()), sum: _1m1w1y24hPattern6::new(client.clone(), "lth_realized_loss_sum".to_string()), negative: BaseSumPattern::new(client.clone(), "lth_neg_realized_loss".to_string()), to_rcap: BpsPercentRatioPattern4::new(client.clone(), "lth_realized_loss_to_rcap".to_string()), @@ -7554,14 +7606,14 @@ impl SeriesTree_Cohorts_Utxo_Lth_Realized_Price_StdDev_1y { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr { - pub value_destroyed: AverageBaseCumulativeSumPattern, + pub value_destroyed: AverageBlockCumulativeSumPattern, pub ratio: _1m1w1y24hPattern, } impl SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr { pub fn new(client: Arc, base_path: String) -> Self { Self { - value_destroyed: AverageBaseCumulativeSumPattern::new(client.clone(), "lth_value_destroyed".to_string()), + value_destroyed: AverageBlockCumulativeSumPattern::new(client.clone(), "lth_value_destroyed".to_string()), ratio: _1m1w1y24hPattern::new(client.clone(), "lth_sopr".to_string()), } } @@ -7598,7 +7650,7 @@ pub struct SeriesTree_Cohorts_Utxo_Lth_Unrealized { pub profit: CentsToUsdPattern4, pub loss: CentsNegativeToUsdPattern2, pub net_pnl: CentsToUsdPattern3, - pub gross_pnl: CentsUsdPattern2, + pub gross_pnl: CentsUsdPattern3, pub invested_capital: InPattern, pub investor_cap_in_profit_raw: SeriesPattern18, pub investor_cap_in_loss_raw: SeriesPattern18, @@ -7612,7 +7664,7 @@ impl SeriesTree_Cohorts_Utxo_Lth_Unrealized { profit: CentsToUsdPattern4::new(client.clone(), "lth_unrealized_profit".to_string()), loss: CentsNegativeToUsdPattern2::new(client.clone(), "lth".to_string()), net_pnl: CentsToUsdPattern3::new(client.clone(), "lth_net_unrealized_pnl".to_string()), - gross_pnl: CentsUsdPattern2::new(client.clone(), "lth_unrealized_gross_pnl".to_string()), + gross_pnl: CentsUsdPattern3::new(client.clone(), "lth_unrealized_gross_pnl".to_string()), invested_capital: InPattern::new(client.clone(), "lth_invested_capital_in".to_string()), investor_cap_in_profit_raw: SeriesPattern18::new(client.clone(), "lth_investor_cap_in_profit_raw".to_string()), investor_cap_in_loss_raw: SeriesPattern18::new(client.clone(), "lth_investor_cap_in_loss_raw".to_string()), @@ -7623,16 +7675,16 @@ impl SeriesTree_Cohorts_Utxo_Lth_Unrealized { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Lth_Unrealized_Sentiment { - pub pain_index: CentsUsdPattern2, - pub greed_index: CentsUsdPattern2, + pub pain_index: CentsUsdPattern3, + pub greed_index: CentsUsdPattern3, pub net: CentsUsdPattern, } impl SeriesTree_Cohorts_Utxo_Lth_Unrealized_Sentiment { pub fn new(client: Arc, base_path: String) -> Self { Self { - pain_index: CentsUsdPattern2::new(client.clone(), "lth_pain_index".to_string()), - greed_index: CentsUsdPattern2::new(client.clone(), "lth_greed_index".to_string()), + pain_index: CentsUsdPattern3::new(client.clone(), "lth_pain_index".to_string()), + greed_index: CentsUsdPattern3::new(client.clone(), "lth_greed_index".to_string()), net: CentsUsdPattern::new(client.clone(), "lth_net_sentiment".to_string()), } } @@ -8149,53 +8201,53 @@ impl SeriesTree_Cohorts_Utxo_Profitability_Loss { /// Series tree node. pub struct SeriesTree_Cohorts_Utxo_Matured { - pub under_1h: AverageBaseCumulativeSumPattern3, - pub _1h_to_1d: AverageBaseCumulativeSumPattern3, - pub _1d_to_1w: AverageBaseCumulativeSumPattern3, - pub _1w_to_1m: AverageBaseCumulativeSumPattern3, - pub _1m_to_2m: AverageBaseCumulativeSumPattern3, - pub _2m_to_3m: AverageBaseCumulativeSumPattern3, - pub _3m_to_4m: AverageBaseCumulativeSumPattern3, - pub _4m_to_5m: AverageBaseCumulativeSumPattern3, - pub _5m_to_6m: AverageBaseCumulativeSumPattern3, - pub _6m_to_1y: AverageBaseCumulativeSumPattern3, - pub _1y_to_2y: AverageBaseCumulativeSumPattern3, - pub _2y_to_3y: AverageBaseCumulativeSumPattern3, - pub _3y_to_4y: AverageBaseCumulativeSumPattern3, - pub _4y_to_5y: AverageBaseCumulativeSumPattern3, - pub _5y_to_6y: AverageBaseCumulativeSumPattern3, - pub _6y_to_7y: AverageBaseCumulativeSumPattern3, - pub _7y_to_8y: AverageBaseCumulativeSumPattern3, - pub _8y_to_10y: AverageBaseCumulativeSumPattern3, - pub _10y_to_12y: AverageBaseCumulativeSumPattern3, - pub _12y_to_15y: AverageBaseCumulativeSumPattern3, - pub over_15y: AverageBaseCumulativeSumPattern3, + pub under_1h: AverageBlockCumulativeSumPattern3, + pub _1h_to_1d: AverageBlockCumulativeSumPattern3, + pub _1d_to_1w: AverageBlockCumulativeSumPattern3, + pub _1w_to_1m: AverageBlockCumulativeSumPattern3, + pub _1m_to_2m: AverageBlockCumulativeSumPattern3, + pub _2m_to_3m: AverageBlockCumulativeSumPattern3, + pub _3m_to_4m: AverageBlockCumulativeSumPattern3, + pub _4m_to_5m: AverageBlockCumulativeSumPattern3, + pub _5m_to_6m: AverageBlockCumulativeSumPattern3, + pub _6m_to_1y: AverageBlockCumulativeSumPattern3, + pub _1y_to_2y: AverageBlockCumulativeSumPattern3, + pub _2y_to_3y: AverageBlockCumulativeSumPattern3, + pub _3y_to_4y: AverageBlockCumulativeSumPattern3, + pub _4y_to_5y: AverageBlockCumulativeSumPattern3, + pub _5y_to_6y: AverageBlockCumulativeSumPattern3, + pub _6y_to_7y: AverageBlockCumulativeSumPattern3, + pub _7y_to_8y: AverageBlockCumulativeSumPattern3, + pub _8y_to_10y: AverageBlockCumulativeSumPattern3, + pub _10y_to_12y: AverageBlockCumulativeSumPattern3, + pub _12y_to_15y: AverageBlockCumulativeSumPattern3, + pub over_15y: AverageBlockCumulativeSumPattern3, } impl SeriesTree_Cohorts_Utxo_Matured { pub fn new(client: Arc, base_path: String) -> Self { Self { - under_1h: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_under_1h_old_matured_supply".to_string()), - _1h_to_1d: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_1h_to_1d_old_matured_supply".to_string()), - _1d_to_1w: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_1d_to_1w_old_matured_supply".to_string()), - _1w_to_1m: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_1w_to_1m_old_matured_supply".to_string()), - _1m_to_2m: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_1m_to_2m_old_matured_supply".to_string()), - _2m_to_3m: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_2m_to_3m_old_matured_supply".to_string()), - _3m_to_4m: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_3m_to_4m_old_matured_supply".to_string()), - _4m_to_5m: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_4m_to_5m_old_matured_supply".to_string()), - _5m_to_6m: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_5m_to_6m_old_matured_supply".to_string()), - _6m_to_1y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_6m_to_1y_old_matured_supply".to_string()), - _1y_to_2y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_1y_to_2y_old_matured_supply".to_string()), - _2y_to_3y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_2y_to_3y_old_matured_supply".to_string()), - _3y_to_4y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_3y_to_4y_old_matured_supply".to_string()), - _4y_to_5y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_4y_to_5y_old_matured_supply".to_string()), - _5y_to_6y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_5y_to_6y_old_matured_supply".to_string()), - _6y_to_7y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_6y_to_7y_old_matured_supply".to_string()), - _7y_to_8y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_7y_to_8y_old_matured_supply".to_string()), - _8y_to_10y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_8y_to_10y_old_matured_supply".to_string()), - _10y_to_12y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_10y_to_12y_old_matured_supply".to_string()), - _12y_to_15y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_12y_to_15y_old_matured_supply".to_string()), - over_15y: AverageBaseCumulativeSumPattern3::new(client.clone(), "utxos_over_15y_old_matured_supply".to_string()), + under_1h: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_under_1h_old_matured_supply".to_string()), + _1h_to_1d: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_1h_to_1d_old_matured_supply".to_string()), + _1d_to_1w: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_1d_to_1w_old_matured_supply".to_string()), + _1w_to_1m: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_1w_to_1m_old_matured_supply".to_string()), + _1m_to_2m: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_1m_to_2m_old_matured_supply".to_string()), + _2m_to_3m: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_2m_to_3m_old_matured_supply".to_string()), + _3m_to_4m: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_3m_to_4m_old_matured_supply".to_string()), + _4m_to_5m: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_4m_to_5m_old_matured_supply".to_string()), + _5m_to_6m: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_5m_to_6m_old_matured_supply".to_string()), + _6m_to_1y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_6m_to_1y_old_matured_supply".to_string()), + _1y_to_2y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_1y_to_2y_old_matured_supply".to_string()), + _2y_to_3y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_2y_to_3y_old_matured_supply".to_string()), + _3y_to_4y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_3y_to_4y_old_matured_supply".to_string()), + _4y_to_5y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_4y_to_5y_old_matured_supply".to_string()), + _5y_to_6y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_5y_to_6y_old_matured_supply".to_string()), + _6y_to_7y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_6y_to_7y_old_matured_supply".to_string()), + _7y_to_8y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_7y_to_8y_old_matured_supply".to_string()), + _8y_to_10y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_8y_to_10y_old_matured_supply".to_string()), + _10y_to_12y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_10y_to_12y_old_matured_supply".to_string()), + _12y_to_15y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_12y_to_15y_old_matured_supply".to_string()), + over_15y: AverageBlockCumulativeSumPattern3::new(client.clone(), "utxos_over_15y_old_matured_supply".to_string()), } } } diff --git a/crates/brk_computer/src/internal/per_block/amount/lazy_rolling_avg.rs b/crates/brk_computer/src/internal/per_block/amount/lazy_rolling_avg.rs index 801037aeb..0c90ba63a 100644 --- a/crates/brk_computer/src/internal/per_block/amount/lazy_rolling_avg.rs +++ b/crates/brk_computer/src/internal/per_block/amount/lazy_rolling_avg.rs @@ -6,7 +6,7 @@ use vecdb::{DeltaAvg, LazyDeltaVec, LazyVecFrom1, ReadableCloneableVec}; use crate::{ indexes, internal::{ - CachedWindowStarts, DerivedResolutions, AvgCentsToUsd, AvgSatsToBtc, LazyPerBlock, + AvgCentsToUsd, AvgSatsToBtc, CachedWindowStarts, DerivedResolutions, LazyPerBlock, LazyRollingAvgFromHeight, Resolutions, Windows, }, }; diff --git a/crates/brk_computer/src/internal/per_block/computed/cumulative_rolling.rs b/crates/brk_computer/src/internal/per_block/computed/cumulative_rolling.rs index 81ef633dd..dd5e1aa26 100644 --- a/crates/brk_computer/src/internal/per_block/computed/cumulative_rolling.rs +++ b/crates/brk_computer/src/internal/per_block/computed/cumulative_rolling.rs @@ -29,7 +29,6 @@ where T: NumericValue + JsonSchema, C: NumericValue + JsonSchema, { - #[traversable(hidden)] pub block: M::Stored>>, pub cumulative: PerBlock, pub sum: LazyRollingSumsFromHeight, diff --git a/crates/brk_computer/src/internal/per_block/computed/full.rs b/crates/brk_computer/src/internal/per_block/computed/full.rs index 7a3d9eaa1..761c1166f 100644 --- a/crates/brk_computer/src/internal/per_block/computed/full.rs +++ b/crates/brk_computer/src/internal/per_block/computed/full.rs @@ -10,7 +10,7 @@ use vecdb::{Database, EagerVec, Exit, ImportableVec, PcoVec, Rw, StorageMode}; use crate::{ indexes, - internal::{CachedWindowStarts, PerBlock, NumericValue, RollingComplete, WindowStarts}, + internal::{CachedWindowStarts, NumericValue, PerBlock, RollingComplete, WindowStarts}, }; #[derive(Traversable)] @@ -18,7 +18,6 @@ pub struct PerBlockFull where T: NumericValue + JsonSchema, { - #[traversable(hidden)] pub block: M::Stored>>, pub cumulative: PerBlock, #[traversable(flatten)] @@ -71,8 +70,7 @@ where self.cumulative .height .compute_cumulative(max_from, &self.block, exit)?; - self.rolling - .compute(max_from, windows, &self.block, exit)?; + self.rolling.compute(max_from, windows, &self.block, exit)?; Ok(()) } } diff --git a/crates/brk_computer/src/internal/per_block/computed/rolling_average.rs b/crates/brk_computer/src/internal/per_block/computed/rolling_average.rs index bc6e624b2..6f0bb03c0 100644 --- a/crates/brk_computer/src/internal/per_block/computed/rolling_average.rs +++ b/crates/brk_computer/src/internal/per_block/computed/rolling_average.rs @@ -19,7 +19,6 @@ pub struct PerBlockRollingAverage where T: NumericValue + JsonSchema, { - #[traversable(hidden)] pub block: M::Stored>>, #[traversable(hidden)] pub cumulative: M::Stored>>, diff --git a/modules/brk-client/index.js b/modules/brk-client/index.js index 56088b327..7862b70c0 100644 --- a/modules/brk-client/index.js +++ b/modules/brk-client/index.js @@ -1746,18 +1746,18 @@ function create_10y1m1w1y2y3m3y4y5y6m6y8yPattern2(client, acc) { /** * @typedef {Object} _10y1m1w1y2y3m3y4y5y6m6y8yPattern3 - * @property {BtcCentsSatsUsdPattern2} _10y - * @property {BtcCentsSatsUsdPattern2} _1m - * @property {BtcCentsSatsUsdPattern2} _1w - * @property {BtcCentsSatsUsdPattern2} _1y - * @property {BtcCentsSatsUsdPattern2} _2y - * @property {BtcCentsSatsUsdPattern2} _3m - * @property {BtcCentsSatsUsdPattern2} _3y - * @property {BtcCentsSatsUsdPattern2} _4y - * @property {BtcCentsSatsUsdPattern2} _5y - * @property {BtcCentsSatsUsdPattern2} _6m - * @property {BtcCentsSatsUsdPattern2} _6y - * @property {BtcCentsSatsUsdPattern2} _8y + * @property {BtcCentsSatsUsdPattern3} _10y + * @property {BtcCentsSatsUsdPattern3} _1m + * @property {BtcCentsSatsUsdPattern3} _1w + * @property {BtcCentsSatsUsdPattern3} _1y + * @property {BtcCentsSatsUsdPattern3} _2y + * @property {BtcCentsSatsUsdPattern3} _3m + * @property {BtcCentsSatsUsdPattern3} _3y + * @property {BtcCentsSatsUsdPattern3} _4y + * @property {BtcCentsSatsUsdPattern3} _5y + * @property {BtcCentsSatsUsdPattern3} _6m + * @property {BtcCentsSatsUsdPattern3} _6y + * @property {BtcCentsSatsUsdPattern3} _8y */ /** @@ -1768,41 +1768,41 @@ function create_10y1m1w1y2y3m3y4y5y6m6y8yPattern2(client, acc) { */ function create_10y1m1w1y2y3m3y4y5y6m6y8yPattern3(client, acc) { return { - _10y: createBtcCentsSatsUsdPattern2(client, _m(acc, '10y')), - _1m: createBtcCentsSatsUsdPattern2(client, _m(acc, '1m')), - _1w: createBtcCentsSatsUsdPattern2(client, _m(acc, '1w')), - _1y: createBtcCentsSatsUsdPattern2(client, _m(acc, '1y')), - _2y: createBtcCentsSatsUsdPattern2(client, _m(acc, '2y')), - _3m: createBtcCentsSatsUsdPattern2(client, _m(acc, '3m')), - _3y: createBtcCentsSatsUsdPattern2(client, _m(acc, '3y')), - _4y: createBtcCentsSatsUsdPattern2(client, _m(acc, '4y')), - _5y: createBtcCentsSatsUsdPattern2(client, _m(acc, '5y')), - _6m: createBtcCentsSatsUsdPattern2(client, _m(acc, '6m')), - _6y: createBtcCentsSatsUsdPattern2(client, _m(acc, '6y')), - _8y: createBtcCentsSatsUsdPattern2(client, _m(acc, '8y')), + _10y: createBtcCentsSatsUsdPattern3(client, _m(acc, '10y')), + _1m: createBtcCentsSatsUsdPattern3(client, _m(acc, '1m')), + _1w: createBtcCentsSatsUsdPattern3(client, _m(acc, '1w')), + _1y: createBtcCentsSatsUsdPattern3(client, _m(acc, '1y')), + _2y: createBtcCentsSatsUsdPattern3(client, _m(acc, '2y')), + _3m: createBtcCentsSatsUsdPattern3(client, _m(acc, '3m')), + _3y: createBtcCentsSatsUsdPattern3(client, _m(acc, '3y')), + _4y: createBtcCentsSatsUsdPattern3(client, _m(acc, '4y')), + _5y: createBtcCentsSatsUsdPattern3(client, _m(acc, '5y')), + _6m: createBtcCentsSatsUsdPattern3(client, _m(acc, '6m')), + _6y: createBtcCentsSatsUsdPattern3(client, _m(acc, '6y')), + _8y: createBtcCentsSatsUsdPattern3(client, _m(acc, '8y')), }; } /** * @typedef {Object} CapGrossInvestorLossMvrvNetPeakPriceProfitSellSoprPattern * @property {CentsDeltaToUsdPattern} cap - * @property {BaseCumulativeSumPattern} grossPnl + * @property {BlockCumulativeSumPattern} grossPnl * @property {PricePattern} investor - * @property {BaseCumulativeNegativeSumToPattern} loss + * @property {BlockCumulativeNegativeSumToPattern} loss * @property {SeriesPattern1} mvrv - * @property {BaseChangeCumulativeDeltaSumToPattern} netPnl - * @property {BaseCumulativeSumToPattern} peakRegret + * @property {BlockChangeCumulativeDeltaSumToPattern} netPnl + * @property {BlockCumulativeSumToPattern} peakRegret * @property {BpsCentsPercentilesRatioSatsSmaStdUsdPattern} price - * @property {BaseCumulativeSumToPattern} profit + * @property {BlockCumulativeSumToPattern} profit * @property {_1m1w1y24hPattern} profitToLossRatio * @property {_1m1w1y24hPattern7} sellSideRiskRatio * @property {AdjustedRatioValuePattern} sopr */ /** - * @typedef {Object} AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 + * @typedef {Object} AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern * @property {_1m1w1y24hPattern} average - * @property {SeriesPattern1} base + * @property {SeriesPattern18} block * @property {SeriesPattern1} cumulative * @property {_1m1w1y24hPattern} max * @property {_1m1w1y24hPattern} median @@ -1815,15 +1815,15 @@ function create_10y1m1w1y2y3m3y4y5y6m6y8yPattern3(client, acc) { */ /** - * Create a AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 pattern node + * Create a AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2} + * @returns {AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} */ -function createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(client, acc) { +function createAverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) { return { average: create_1m1w1y24hPattern(client, _m(acc, 'average')), - base: createSeriesPattern1(client, acc), + block: createSeriesPattern18(client, acc), cumulative: createSeriesPattern1(client, _m(acc, 'cumulative')), max: create_1m1w1y24hPattern(client, _m(acc, 'max')), median: create_1m1w1y24hPattern(client, _m(acc, 'median')), @@ -1956,7 +1956,7 @@ function createAverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) { /** * @typedef {Object} GrossInvestedInvestorLossNetNuplProfitSentimentPattern2 - * @property {CentsUsdPattern2} grossPnl + * @property {CentsUsdPattern3} grossPnl * @property {InPattern} investedCapital * @property {SeriesPattern18} investorCapInLossRaw * @property {SeriesPattern18} investorCapInProfitRaw @@ -2040,11 +2040,11 @@ function create_1m1w1y24hBpsPercentRatioPattern(client, acc) { /** * @typedef {Object} CapLossMvrvNetPriceProfitSoprPattern * @property {CentsDeltaUsdPattern} cap - * @property {BaseCumulativeNegativeSumPattern} loss + * @property {BlockCumulativeNegativeSumPattern} loss * @property {SeriesPattern1} mvrv - * @property {BaseCumulativeDeltaSumPattern} netPnl + * @property {BlockCumulativeDeltaSumPattern} netPnl * @property {BpsCentsRatioSatsUsdPattern} price - * @property {BaseCumulativeSumPattern} profit + * @property {BlockCumulativeSumPattern} profit * @property {RatioValuePattern} sopr */ @@ -2057,11 +2057,11 @@ function create_1m1w1y24hBpsPercentRatioPattern(client, acc) { function createCapLossMvrvNetPriceProfitSoprPattern(client, acc) { return { cap: createCentsDeltaUsdPattern(client, _m(acc, 'realized_cap')), - loss: createBaseCumulativeNegativeSumPattern(client, acc), + loss: createBlockCumulativeNegativeSumPattern(client, acc), mvrv: createSeriesPattern1(client, _m(acc, 'mvrv')), - netPnl: createBaseCumulativeDeltaSumPattern(client, _m(acc, 'net_realized_pnl')), + netPnl: createBlockCumulativeDeltaSumPattern(client, _m(acc, 'net_realized_pnl')), price: createBpsCentsRatioSatsUsdPattern(client, _m(acc, 'realized_price')), - profit: createBaseCumulativeSumPattern(client, _m(acc, 'realized_profit')), + profit: createBlockCumulativeSumPattern(client, _m(acc, 'realized_profit')), sopr: createRatioValuePattern(client, acc), }; } @@ -2192,35 +2192,35 @@ function createActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, acc) { } /** - * @typedef {Object} AverageBaseCumulativeInSumPattern + * @typedef {Object} AverageBlockCumulativeInSumPattern * @property {_1m1w1y24hPattern3} average - * @property {BtcCentsSatsUsdPattern2} base - * @property {BtcCentsSatsUsdPattern2} cumulative - * @property {AverageBaseCumulativeSumPattern3} inLoss - * @property {AverageBaseCumulativeSumPattern3} inProfit + * @property {BtcCentsSatsUsdPattern2} block + * @property {BtcCentsSatsUsdPattern3} cumulative + * @property {AverageBlockCumulativeSumPattern3} inLoss + * @property {AverageBlockCumulativeSumPattern3} inProfit * @property {_1m1w1y24hPattern4} sum */ /** - * Create a AverageBaseCumulativeInSumPattern pattern node + * Create a AverageBlockCumulativeInSumPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {AverageBaseCumulativeInSumPattern} + * @returns {AverageBlockCumulativeInSumPattern} */ -function createAverageBaseCumulativeInSumPattern(client, acc) { +function createAverageBlockCumulativeInSumPattern(client, acc) { return { average: create_1m1w1y24hPattern3(client, _m(acc, 'average')), - base: createBtcCentsSatsUsdPattern2(client, acc), - cumulative: createBtcCentsSatsUsdPattern2(client, _m(acc, 'cumulative')), - inLoss: createAverageBaseCumulativeSumPattern3(client, _m(acc, 'in_loss')), - inProfit: createAverageBaseCumulativeSumPattern3(client, _m(acc, 'in_profit')), + block: createBtcCentsSatsUsdPattern2(client, acc), + cumulative: createBtcCentsSatsUsdPattern3(client, _m(acc, 'cumulative')), + inLoss: createAverageBlockCumulativeSumPattern3(client, _m(acc, 'in_loss')), + inProfit: createAverageBlockCumulativeSumPattern3(client, _m(acc, 'in_profit')), sum: create_1m1w1y24hPattern4(client, _m(acc, 'sum')), }; } /** - * @typedef {Object} BaseChangeCumulativeDeltaSumToPattern - * @property {CentsUsdPattern} base + * @typedef {Object} BlockChangeCumulativeDeltaSumToPattern + * @property {CentsUsdPattern4} block * @property {ToPattern} change1m * @property {CentsUsdPattern} cumulative * @property {AbsoluteRatePattern2} delta @@ -2229,14 +2229,14 @@ function createAverageBaseCumulativeInSumPattern(client, acc) { */ /** - * Create a BaseChangeCumulativeDeltaSumToPattern pattern node + * Create a BlockChangeCumulativeDeltaSumToPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BaseChangeCumulativeDeltaSumToPattern} + * @returns {BlockChangeCumulativeDeltaSumToPattern} */ -function createBaseChangeCumulativeDeltaSumToPattern(client, acc) { +function createBlockChangeCumulativeDeltaSumToPattern(client, acc) { return { - base: createCentsUsdPattern(client, _m(acc, 'realized_pnl')), + block: createCentsUsdPattern4(client, _m(acc, 'realized_pnl')), change1m: createToPattern(client, _m(acc, 'pnl_change_1m_to')), cumulative: createCentsUsdPattern(client, _m(acc, 'realized_pnl_cumulative')), delta: createAbsoluteRatePattern2(client, _m(acc, 'realized_pnl_delta')), @@ -2329,11 +2329,11 @@ function createCentsNegativeToUsdPattern2(client, acc) { /** * @typedef {Object} DeltaHalfInToTotalPattern * @property {AbsoluteRatePattern} delta - * @property {BtcCentsSatsUsdPattern2} half + * @property {BtcCentsSatsUsdPattern3} half * @property {BtcCentsSatsToUsdPattern} inLoss * @property {BtcCentsSatsToUsdPattern} inProfit * @property {BpsPercentRatioPattern3} toCirculating - * @property {BtcCentsSatsUsdPattern2} total + * @property {BtcCentsSatsUsdPattern3} total */ /** @@ -2345,22 +2345,22 @@ function createCentsNegativeToUsdPattern2(client, acc) { function createDeltaHalfInToTotalPattern(client, acc) { return { delta: createAbsoluteRatePattern(client, _m(acc, 'delta')), - half: createBtcCentsSatsUsdPattern2(client, _m(acc, 'half')), + half: createBtcCentsSatsUsdPattern3(client, _m(acc, 'half')), inLoss: createBtcCentsSatsToUsdPattern(client, _m(acc, 'in_loss')), inProfit: createBtcCentsSatsToUsdPattern(client, _m(acc, 'in_profit')), toCirculating: createBpsPercentRatioPattern3(client, _m(acc, 'to_circulating')), - total: createBtcCentsSatsUsdPattern2(client, acc), + total: createBtcCentsSatsUsdPattern3(client, acc), }; } /** * @typedef {Object} DeltaHalfInToTotalPattern2 * @property {AbsoluteRatePattern} delta - * @property {BtcCentsSatsUsdPattern2} half + * @property {BtcCentsSatsUsdPattern3} half * @property {BtcCentsSatsToUsdPattern3} inLoss * @property {BtcCentsSatsToUsdPattern3} inProfit * @property {BpsPercentRatioPattern3} toCirculating - * @property {BtcCentsSatsUsdPattern2} total + * @property {BtcCentsSatsUsdPattern3} total */ /** @@ -2372,11 +2372,11 @@ function createDeltaHalfInToTotalPattern(client, acc) { function createDeltaHalfInToTotalPattern2(client, acc) { return { delta: createAbsoluteRatePattern(client, _m(acc, 'delta')), - half: createBtcCentsSatsUsdPattern2(client, _m(acc, 'half')), + half: createBtcCentsSatsUsdPattern3(client, _m(acc, 'half')), inLoss: createBtcCentsSatsToUsdPattern3(client, _m(acc, 'in_loss')), inProfit: createBtcCentsSatsToUsdPattern3(client, _m(acc, 'in_profit')), toCirculating: createBpsPercentRatioPattern3(client, _m(acc, 'to_circulating')), - total: createBtcCentsSatsUsdPattern2(client, acc), + total: createBtcCentsSatsUsdPattern3(client, acc), }; } @@ -2408,27 +2408,27 @@ function createPct1Pct2Pct5Pct95Pct98Pct99Pattern(client, acc) { } /** - * @typedef {Object} _1m1w1y24hBasePattern + * @typedef {Object} _1m1w1y24hBlockPattern * @property {SeriesPattern1} _1m * @property {SeriesPattern1} _1w * @property {SeriesPattern1} _1y * @property {SeriesPattern1} _24h - * @property {SeriesPattern18} base + * @property {SeriesPattern18} block */ /** - * Create a _1m1w1y24hBasePattern pattern node + * Create a _1m1w1y24hBlockPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {_1m1w1y24hBasePattern} + * @returns {_1m1w1y24hBlockPattern} */ -function create_1m1w1y24hBasePattern(client, acc) { +function create_1m1w1y24hBlockPattern(client, acc) { return { _1m: createSeriesPattern1(client, _m(acc, 'average_1m')), _1w: createSeriesPattern1(client, _m(acc, 'average_1w')), _1y: createSeriesPattern1(client, _m(acc, 'average_1y')), _24h: createSeriesPattern1(client, _m(acc, 'average_24h')), - base: createSeriesPattern18(client, acc), + block: createSeriesPattern18(client, acc), }; } @@ -2508,9 +2508,9 @@ function createActivityOutputsRealizedSupplyUnrealizedPattern2(client, acc) { } /** - * @typedef {Object} BaseCumulativeNegativeSumToPattern - * @property {CentsUsdPattern2} base - * @property {CentsUsdPattern2} cumulative + * @typedef {Object} BlockCumulativeNegativeSumToPattern + * @property {CentsUsdPattern2} block + * @property {CentsUsdPattern3} cumulative * @property {BaseSumPattern} negative * @property {_1m1w1y24hPattern6} sum * @property {BpsPercentRatioPattern4} toRcap @@ -2619,10 +2619,10 @@ function createBtcCentsSatsToUsdPattern2(client, acc) { /** * @typedef {Object} CapLossMvrvPriceProfitPattern * @property {CentsDeltaUsdPattern} cap - * @property {BaseCumulativeSumPattern} loss + * @property {BlockCumulativeSumPattern} loss * @property {SeriesPattern1} mvrv * @property {BpsCentsRatioSatsUsdPattern} price - * @property {BaseCumulativeSumPattern} profit + * @property {BlockCumulativeSumPattern} profit */ /** @@ -2634,10 +2634,10 @@ function createBtcCentsSatsToUsdPattern2(client, acc) { function createCapLossMvrvPriceProfitPattern(client, acc) { return { cap: createCentsDeltaUsdPattern(client, _m(acc, 'realized_cap')), - loss: createBaseCumulativeSumPattern(client, _m(acc, 'realized_loss')), + loss: createBlockCumulativeSumPattern(client, _m(acc, 'realized_loss')), mvrv: createSeriesPattern1(client, _m(acc, 'mvrv')), price: createBpsCentsRatioSatsUsdPattern(client, _m(acc, 'realized_price')), - profit: createBaseCumulativeSumPattern(client, _m(acc, 'realized_profit')), + profit: createBlockCumulativeSumPattern(client, _m(acc, 'realized_profit')), }; } @@ -2669,10 +2669,10 @@ function createCentsToUsdPattern4(client, acc) { /** * @typedef {Object} DeltaHalfInTotalPattern2 * @property {AbsoluteRatePattern} delta - * @property {BtcCentsSatsUsdPattern2} half - * @property {BtcCentsSatsUsdPattern2} inLoss - * @property {BtcCentsSatsUsdPattern2} inProfit - * @property {BtcCentsSatsUsdPattern2} total + * @property {BtcCentsSatsUsdPattern3} half + * @property {BtcCentsSatsUsdPattern3} inLoss + * @property {BtcCentsSatsUsdPattern3} inProfit + * @property {BtcCentsSatsUsdPattern3} total */ /** @@ -2684,10 +2684,10 @@ function createCentsToUsdPattern4(client, acc) { function createDeltaHalfInTotalPattern2(client, acc) { return { delta: createAbsoluteRatePattern(client, _m(acc, 'delta')), - half: createBtcCentsSatsUsdPattern2(client, _m(acc, 'half')), - inLoss: createBtcCentsSatsUsdPattern2(client, _m(acc, 'in_loss')), - inProfit: createBtcCentsSatsUsdPattern2(client, _m(acc, 'in_profit')), - total: createBtcCentsSatsUsdPattern2(client, acc), + half: createBtcCentsSatsUsdPattern3(client, _m(acc, 'half')), + inLoss: createBtcCentsSatsUsdPattern3(client, _m(acc, 'in_loss')), + inProfit: createBtcCentsSatsUsdPattern3(client, _m(acc, 'in_profit')), + total: createBtcCentsSatsUsdPattern3(client, acc), }; } @@ -2796,10 +2796,10 @@ function create_1m1w1y24hPattern3(client, acc) { /** * @typedef {Object} _1m1w1y24hPattern4 - * @property {BtcCentsSatsUsdPattern2} _1m - * @property {BtcCentsSatsUsdPattern2} _1w - * @property {BtcCentsSatsUsdPattern2} _1y - * @property {BtcCentsSatsUsdPattern2} _24h + * @property {BtcCentsSatsUsdPattern3} _1m + * @property {BtcCentsSatsUsdPattern3} _1w + * @property {BtcCentsSatsUsdPattern3} _1y + * @property {BtcCentsSatsUsdPattern3} _24h */ /** @@ -2810,10 +2810,10 @@ function create_1m1w1y24hPattern3(client, acc) { */ function create_1m1w1y24hPattern4(client, acc) { return { - _1m: createBtcCentsSatsUsdPattern2(client, _m(acc, '1m')), - _1w: createBtcCentsSatsUsdPattern2(client, _m(acc, '1w')), - _1y: createBtcCentsSatsUsdPattern2(client, _m(acc, '1y')), - _24h: createBtcCentsSatsUsdPattern2(client, _m(acc, '24h')), + _1m: createBtcCentsSatsUsdPattern3(client, _m(acc, '1m')), + _1w: createBtcCentsSatsUsdPattern3(client, _m(acc, '1w')), + _1y: createBtcCentsSatsUsdPattern3(client, _m(acc, '1y')), + _24h: createBtcCentsSatsUsdPattern3(client, _m(acc, '24h')), }; } @@ -2865,10 +2865,10 @@ function create_1m1w1y24hPattern5(client, acc) { /** * @typedef {Object} _1m1w1y24hPattern6 - * @property {CentsUsdPattern2} _1m - * @property {CentsUsdPattern2} _1w - * @property {CentsUsdPattern2} _1y - * @property {CentsUsdPattern2} _24h + * @property {CentsUsdPattern3} _1m + * @property {CentsUsdPattern3} _1w + * @property {CentsUsdPattern3} _1y + * @property {CentsUsdPattern3} _24h */ /** @@ -2879,10 +2879,10 @@ function create_1m1w1y24hPattern5(client, acc) { */ function create_1m1w1y24hPattern6(client, acc) { return { - _1m: createCentsUsdPattern2(client, _m(acc, '1m')), - _1w: createCentsUsdPattern2(client, _m(acc, '1w')), - _1y: createCentsUsdPattern2(client, _m(acc, '1y')), - _24h: createCentsUsdPattern2(client, _m(acc, '24h')), + _1m: createCentsUsdPattern3(client, _m(acc, '1m')), + _1w: createCentsUsdPattern3(client, _m(acc, '1w')), + _1y: createCentsUsdPattern3(client, _m(acc, '1y')), + _24h: createCentsUsdPattern3(client, _m(acc, '24h')), }; } @@ -2895,126 +2895,126 @@ function create_1m1w1y24hPattern6(client, acc) { */ /** - * @typedef {Object} AverageBaseCumulativeSumPattern2 + * @typedef {Object} AverageBlockCumulativeSumPattern2 * @property {_1m1w1y24hPattern} average - * @property {SeriesPattern1} base + * @property {SeriesPattern18} block * @property {SeriesPattern1} cumulative * @property {_1m1w1y24hPattern} sum */ /** - * Create a AverageBaseCumulativeSumPattern2 pattern node + * Create a AverageBlockCumulativeSumPattern2 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {AverageBaseCumulativeSumPattern2} + * @returns {AverageBlockCumulativeSumPattern2} */ -function createAverageBaseCumulativeSumPattern2(client, acc) { +function createAverageBlockCumulativeSumPattern2(client, acc) { return { average: create_1m1w1y24hPattern(client, _m(acc, 'average')), - base: createSeriesPattern1(client, acc), + block: createSeriesPattern18(client, acc), cumulative: createSeriesPattern1(client, _m(acc, 'cumulative')), sum: create_1m1w1y24hPattern(client, _m(acc, 'sum')), }; } /** - * @typedef {Object} AverageBaseCumulativeSumPattern3 + * @typedef {Object} AverageBlockCumulativeSumPattern3 * @property {_1m1w1y24hPattern3} average - * @property {BtcCentsSatsUsdPattern2} base - * @property {BtcCentsSatsUsdPattern2} cumulative + * @property {BtcCentsSatsUsdPattern2} block + * @property {BtcCentsSatsUsdPattern3} cumulative * @property {_1m1w1y24hPattern4} sum */ /** - * Create a AverageBaseCumulativeSumPattern3 pattern node + * Create a AverageBlockCumulativeSumPattern3 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {AverageBaseCumulativeSumPattern3} + * @returns {AverageBlockCumulativeSumPattern3} */ -function createAverageBaseCumulativeSumPattern3(client, acc) { +function createAverageBlockCumulativeSumPattern3(client, acc) { return { average: create_1m1w1y24hPattern3(client, _m(acc, 'average')), - base: createBtcCentsSatsUsdPattern2(client, acc), - cumulative: createBtcCentsSatsUsdPattern2(client, _m(acc, 'cumulative')), + block: createBtcCentsSatsUsdPattern2(client, acc), + cumulative: createBtcCentsSatsUsdPattern3(client, _m(acc, 'cumulative')), sum: create_1m1w1y24hPattern4(client, _m(acc, 'sum')), }; } /** - * @typedef {Object} BaseCumulativeDeltaSumPattern - * @property {CentsUsdPattern} base + * @typedef {Object} BlockCumulativeNegativeSumPattern + * @property {CentsUsdPattern2} block + * @property {CentsUsdPattern3} cumulative + * @property {BaseSumPattern} negative + * @property {_1m1w1y24hPattern6} sum + */ + +/** + * Create a BlockCumulativeNegativeSumPattern pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated series name + * @returns {BlockCumulativeNegativeSumPattern} + */ +function createBlockCumulativeNegativeSumPattern(client, acc) { + return { + block: createCentsUsdPattern2(client, _m(acc, 'realized_loss')), + cumulative: createCentsUsdPattern3(client, _m(acc, 'realized_loss_cumulative')), + negative: createBaseSumPattern(client, _m(acc, 'neg_realized_loss')), + sum: create_1m1w1y24hPattern6(client, _m(acc, 'realized_loss_sum')), + }; +} + +/** + * @typedef {Object} BlockCumulativeSumToPattern + * @property {CentsUsdPattern2} block + * @property {CentsUsdPattern3} cumulative + * @property {_1m1w1y24hPattern6} sum + * @property {BpsPercentRatioPattern4} toRcap + */ + +/** + * Create a BlockCumulativeSumToPattern pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated series name + * @returns {BlockCumulativeSumToPattern} + */ +function createBlockCumulativeSumToPattern(client, acc) { + return { + block: createCentsUsdPattern2(client, acc), + cumulative: createCentsUsdPattern3(client, _m(acc, 'cumulative')), + sum: create_1m1w1y24hPattern6(client, _m(acc, 'sum')), + toRcap: createBpsPercentRatioPattern4(client, _m(acc, 'to_rcap')), + }; +} + +/** + * @typedef {Object} BlockCumulativeDeltaSumPattern + * @property {CentsUsdPattern4} block * @property {CentsUsdPattern} cumulative * @property {AbsoluteRatePattern2} delta * @property {_1m1w1y24hPattern5} sum */ /** - * Create a BaseCumulativeDeltaSumPattern pattern node + * Create a BlockCumulativeDeltaSumPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BaseCumulativeDeltaSumPattern} + * @returns {BlockCumulativeDeltaSumPattern} */ -function createBaseCumulativeDeltaSumPattern(client, acc) { +function createBlockCumulativeDeltaSumPattern(client, acc) { return { - base: createCentsUsdPattern(client, acc), + block: createCentsUsdPattern4(client, acc), cumulative: createCentsUsdPattern(client, _m(acc, 'cumulative')), delta: createAbsoluteRatePattern2(client, _m(acc, 'delta')), sum: create_1m1w1y24hPattern5(client, _m(acc, 'sum')), }; } -/** - * @typedef {Object} BaseCumulativeNegativeSumPattern - * @property {CentsUsdPattern2} base - * @property {CentsUsdPattern2} cumulative - * @property {BaseSumPattern} negative - * @property {_1m1w1y24hPattern6} sum - */ - -/** - * Create a BaseCumulativeNegativeSumPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated series name - * @returns {BaseCumulativeNegativeSumPattern} - */ -function createBaseCumulativeNegativeSumPattern(client, acc) { - return { - base: createCentsUsdPattern2(client, _m(acc, 'realized_loss')), - cumulative: createCentsUsdPattern2(client, _m(acc, 'realized_loss_cumulative')), - negative: createBaseSumPattern(client, _m(acc, 'neg_realized_loss')), - sum: create_1m1w1y24hPattern6(client, _m(acc, 'realized_loss_sum')), - }; -} - -/** - * @typedef {Object} BaseCumulativeSumToPattern - * @property {CentsUsdPattern2} base - * @property {CentsUsdPattern2} cumulative - * @property {_1m1w1y24hPattern6} sum - * @property {BpsPercentRatioPattern4} toRcap - */ - -/** - * Create a BaseCumulativeSumToPattern pattern node - * @param {BrkClientBase} client - * @param {string} acc - Accumulated series name - * @returns {BaseCumulativeSumToPattern} - */ -function createBaseCumulativeSumToPattern(client, acc) { - return { - base: createCentsUsdPattern2(client, acc), - cumulative: createCentsUsdPattern2(client, _m(acc, 'cumulative')), - sum: create_1m1w1y24hPattern6(client, _m(acc, 'sum')), - toRcap: createBpsPercentRatioPattern4(client, _m(acc, 'to_rcap')), - }; -} - /** * @typedef {Object} BothReactivatedReceivingSendingPattern - * @property {_1m1w1y24hBasePattern} both - * @property {_1m1w1y24hBasePattern} reactivated - * @property {_1m1w1y24hBasePattern} receiving - * @property {_1m1w1y24hBasePattern} sending + * @property {_1m1w1y24hBlockPattern} both + * @property {_1m1w1y24hBlockPattern} reactivated + * @property {_1m1w1y24hBlockPattern} receiving + * @property {_1m1w1y24hBlockPattern} sending */ /** @@ -3025,15 +3025,15 @@ function createBaseCumulativeSumToPattern(client, acc) { */ function createBothReactivatedReceivingSendingPattern(client, acc) { return { - both: create_1m1w1y24hBasePattern(client, _m(acc, 'both')), - reactivated: create_1m1w1y24hBasePattern(client, _m(acc, 'reactivated')), - receiving: create_1m1w1y24hBasePattern(client, _m(acc, 'receiving')), - sending: create_1m1w1y24hBasePattern(client, _m(acc, 'sending')), + both: create_1m1w1y24hBlockPattern(client, _m(acc, 'both')), + reactivated: create_1m1w1y24hBlockPattern(client, _m(acc, 'reactivated')), + receiving: create_1m1w1y24hBlockPattern(client, _m(acc, 'receiving')), + sending: create_1m1w1y24hBlockPattern(client, _m(acc, 'sending')), }; } /** - * @typedef {Object} BtcCentsSatsUsdPattern2 + * @typedef {Object} BtcCentsSatsUsdPattern3 * @property {SeriesPattern1} btc * @property {SeriesPattern1} cents * @property {SeriesPattern1} sats @@ -3041,12 +3041,12 @@ function createBothReactivatedReceivingSendingPattern(client, acc) { */ /** - * Create a BtcCentsSatsUsdPattern2 pattern node + * Create a BtcCentsSatsUsdPattern3 pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BtcCentsSatsUsdPattern2} + * @returns {BtcCentsSatsUsdPattern3} */ -function createBtcCentsSatsUsdPattern2(client, acc) { +function createBtcCentsSatsUsdPattern3(client, acc) { return { btc: createSeriesPattern1(client, acc), cents: createSeriesPattern1(client, _m(acc, 'cents')), @@ -3078,6 +3078,29 @@ function createBtcCentsSatsUsdPattern(client, acc) { }; } +/** + * @typedef {Object} BtcCentsSatsUsdPattern2 + * @property {SeriesPattern18} btc + * @property {SeriesPattern18} cents + * @property {SeriesPattern18} sats + * @property {SeriesPattern18} usd + */ + +/** + * Create a BtcCentsSatsUsdPattern2 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated series name + * @returns {BtcCentsSatsUsdPattern2} + */ +function createBtcCentsSatsUsdPattern2(client, acc) { + return { + btc: createSeriesPattern18(client, acc), + cents: createSeriesPattern18(client, _m(acc, 'cents')), + sats: createSeriesPattern18(client, _m(acc, 'sats')), + usd: createSeriesPattern18(client, _m(acc, 'usd')), + }; +} + /** * @typedef {Object} CentsDeltaToUsdPattern * @property {SeriesPattern1} cents @@ -3126,10 +3149,10 @@ function createCentsToUsdPattern3(client, acc) { /** * @typedef {Object} CoindaysCoinyearsDormancyTransferPattern - * @property {AverageBaseCumulativeSumPattern} coindaysDestroyed + * @property {AverageBlockCumulativeSumPattern} coindaysDestroyed * @property {SeriesPattern1} coinyearsDestroyed * @property {_1m1w1y24hPattern} dormancy - * @property {AverageBaseCumulativeInSumPattern} transferVolume + * @property {AverageBlockCumulativeInSumPattern} transferVolume */ /** @@ -3137,7 +3160,7 @@ function createCentsToUsdPattern3(client, acc) { * @property {CentsNegativeUsdPattern} loss * @property {CentsUsdPattern} netPnl * @property {BpsRatioPattern} nupl - * @property {CentsUsdPattern2} profit + * @property {CentsUsdPattern3} profit */ /** @@ -3151,7 +3174,7 @@ function createLossNetNuplProfitPattern(client, acc) { loss: createCentsNegativeUsdPattern(client, acc), netPnl: createCentsUsdPattern(client, _m(acc, 'net_unrealized_pnl')), nupl: createBpsRatioPattern(client, _m(acc, 'nupl')), - profit: createCentsUsdPattern2(client, _m(acc, 'unrealized_profit')), + profit: createCentsUsdPattern3(client, _m(acc, 'unrealized_profit')), }; } @@ -3182,24 +3205,24 @@ function create_1m1w1y24hPattern(client, acc) { /** * @template T - * @typedef {Object} AverageBaseCumulativeSumPattern + * @typedef {Object} AverageBlockCumulativeSumPattern * @property {_1m1w1y24hPattern} average - * @property {SeriesPattern1} base + * @property {SeriesPattern18} block * @property {SeriesPattern1} cumulative * @property {_1m1w1y24hPattern} sum */ /** - * Create a AverageBaseCumulativeSumPattern pattern node + * Create a AverageBlockCumulativeSumPattern pattern node * @template T * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {AverageBaseCumulativeSumPattern} + * @returns {AverageBlockCumulativeSumPattern} */ -function createAverageBaseCumulativeSumPattern(client, acc) { +function createAverageBlockCumulativeSumPattern(client, acc) { return { average: create_1m1w1y24hPattern(client, _m(acc, 'average')), - base: createSeriesPattern1(client, acc), + block: createSeriesPattern18(client, acc), cumulative: createSeriesPattern1(client, _m(acc, 'cumulative')), sum: create_1m1w1y24hPattern(client, _m(acc, 'sum')), }; @@ -3209,35 +3232,35 @@ function createAverageBaseCumulativeSumPattern(client, acc) { * @typedef {Object} AdjustedRatioValuePattern * @property {RatioTransferValuePattern} adjusted * @property {_1m1w1y24hPattern} ratio - * @property {AverageBaseCumulativeSumPattern} valueDestroyed + * @property {AverageBlockCumulativeSumPattern} valueDestroyed */ /** - * @typedef {Object} BaseCumulativeSumPattern - * @property {CentsUsdPattern2} base - * @property {CentsUsdPattern2} cumulative + * @typedef {Object} BlockCumulativeSumPattern + * @property {CentsUsdPattern2} block + * @property {CentsUsdPattern3} cumulative * @property {_1m1w1y24hPattern6} sum */ /** - * Create a BaseCumulativeSumPattern pattern node + * Create a BlockCumulativeSumPattern pattern node * @param {BrkClientBase} client * @param {string} acc - Accumulated series name - * @returns {BaseCumulativeSumPattern} + * @returns {BlockCumulativeSumPattern} */ -function createBaseCumulativeSumPattern(client, acc) { +function createBlockCumulativeSumPattern(client, acc) { return { - base: createCentsUsdPattern2(client, acc), - cumulative: createCentsUsdPattern2(client, _m(acc, 'cumulative')), + block: createCentsUsdPattern2(client, acc), + cumulative: createCentsUsdPattern3(client, _m(acc, 'cumulative')), sum: create_1m1w1y24hPattern6(client, _m(acc, 'sum')), }; } /** * @typedef {Object} BlocksDominanceRewardsPattern - * @property {AverageBaseCumulativeSumPattern2} blocksMined + * @property {AverageBlockCumulativeSumPattern2} blocksMined * @property {_1m1w1y24hBpsPercentRatioPattern} dominance - * @property {AverageBaseCumulativeSumPattern3} rewards + * @property {AverageBlockCumulativeSumPattern3} rewards */ /** @@ -3248,9 +3271,9 @@ function createBaseCumulativeSumPattern(client, acc) { */ function createBlocksDominanceRewardsPattern(client, acc) { return { - blocksMined: createAverageBaseCumulativeSumPattern2(client, _m(acc, 'blocks_mined')), + blocksMined: createAverageBlockCumulativeSumPattern2(client, _m(acc, 'blocks_mined')), dominance: create_1m1w1y24hBpsPercentRatioPattern(client, _m(acc, 'dominance')), - rewards: createAverageBaseCumulativeSumPattern3(client, _m(acc, 'rewards')), + rewards: createAverageBlockCumulativeSumPattern3(client, _m(acc, 'rewards')), }; } @@ -3468,8 +3491,8 @@ function createCumulativeRollingSumPattern(client, acc) { /** * @typedef {Object} DeltaHalfTotalPattern * @property {AbsoluteRatePattern} delta - * @property {BtcCentsSatsUsdPattern2} half - * @property {BtcCentsSatsUsdPattern2} total + * @property {BtcCentsSatsUsdPattern3} half + * @property {BtcCentsSatsUsdPattern3} total */ /** @@ -3481,23 +3504,23 @@ function createCumulativeRollingSumPattern(client, acc) { function createDeltaHalfTotalPattern(client, acc) { return { delta: createAbsoluteRatePattern(client, _m(acc, 'delta')), - half: createBtcCentsSatsUsdPattern2(client, _m(acc, 'half')), - total: createBtcCentsSatsUsdPattern2(client, acc), + half: createBtcCentsSatsUsdPattern3(client, _m(acc, 'half')), + total: createBtcCentsSatsUsdPattern3(client, acc), }; } /** * @typedef {Object} GreedNetPainPattern - * @property {CentsUsdPattern2} greedIndex + * @property {CentsUsdPattern3} greedIndex * @property {CentsUsdPattern} net - * @property {CentsUsdPattern2} painIndex + * @property {CentsUsdPattern3} painIndex */ /** * @typedef {Object} LossNuplProfitPattern * @property {CentsNegativeUsdPattern} loss * @property {BpsRatioPattern} nupl - * @property {CentsUsdPattern2} profit + * @property {CentsUsdPattern3} profit */ /** @@ -3510,7 +3533,7 @@ function createLossNuplProfitPattern(client, acc) { return { loss: createCentsNegativeUsdPattern(client, acc), nupl: createBpsRatioPattern(client, _m(acc, 'nupl')), - profit: createCentsUsdPattern2(client, _m(acc, 'unrealized_profit')), + profit: createCentsUsdPattern3(client, _m(acc, 'unrealized_profit')), }; } @@ -3538,8 +3561,8 @@ function createNuplRealizedSupplyPattern(client, acc) { /** * @typedef {Object} RatioTransferValuePattern * @property {_1m1w1y24hPattern} ratio - * @property {AverageBaseCumulativeSumPattern} transferVolume - * @property {AverageBaseCumulativeSumPattern} valueDestroyed + * @property {AverageBlockCumulativeSumPattern} transferVolume + * @property {AverageBlockCumulativeSumPattern} valueDestroyed */ /** @@ -3606,7 +3629,7 @@ function createAbsoluteRatePattern2(client, acc) { /** * @typedef {Object} AllSthPattern2 * @property {BtcCentsDeltaSatsUsdPattern} all - * @property {BtcCentsSatsUsdPattern2} sth + * @property {BtcCentsSatsUsdPattern3} sth */ /** @@ -3618,7 +3641,7 @@ function createAbsoluteRatePattern2(client, acc) { function createAllSthPattern2(client, acc) { return { all: createBtcCentsDeltaSatsUsdPattern(client, _m(acc, 'supply')), - sth: createBtcCentsSatsUsdPattern2(client, _m(acc, 'sth_supply')), + sth: createBtcCentsSatsUsdPattern3(client, _m(acc, 'sth_supply')), }; } @@ -3681,7 +3704,7 @@ function createBaseDeltaPattern(client, acc) { /** * @typedef {Object} BlocksDominancePattern - * @property {AverageBaseCumulativeSumPattern2} blocksMined + * @property {AverageBlockCumulativeSumPattern2} blocksMined * @property {BpsPercentRatioPattern3} dominance */ @@ -3693,7 +3716,7 @@ function createBaseDeltaPattern(client, acc) { */ function createBlocksDominancePattern(client, acc) { return { - blocksMined: createAverageBaseCumulativeSumPattern2(client, _m(acc, 'blocks_mined')), + blocksMined: createAverageBlockCumulativeSumPattern2(client, _m(acc, 'blocks_mined')), dominance: createBpsPercentRatioPattern3(client, _m(acc, 'dominance')), }; } @@ -3737,11 +3760,30 @@ function createBpsRatioPattern(client, acc) { } /** - * @typedef {Object} CentsUsdPattern2 + * @typedef {Object} CentsUsdPattern3 * @property {SeriesPattern1} cents * @property {SeriesPattern1} usd */ +/** + * Create a CentsUsdPattern3 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated series name + * @returns {CentsUsdPattern3} + */ +function createCentsUsdPattern3(client, acc) { + return { + cents: createSeriesPattern1(client, _m(acc, 'cents')), + usd: createSeriesPattern1(client, acc), + }; +} + +/** + * @typedef {Object} CentsUsdPattern2 + * @property {SeriesPattern18} cents + * @property {SeriesPattern18} usd + */ + /** * Create a CentsUsdPattern2 pattern node * @param {BrkClientBase} client @@ -3750,8 +3792,8 @@ function createBpsRatioPattern(client, acc) { */ function createCentsUsdPattern2(client, acc) { return { - cents: createSeriesPattern1(client, _m(acc, 'cents')), - usd: createSeriesPattern1(client, acc), + cents: createSeriesPattern18(client, _m(acc, 'cents')), + usd: createSeriesPattern18(client, acc), }; } @@ -3774,10 +3816,29 @@ function createCentsUsdPattern(client, acc) { }; } +/** + * @typedef {Object} CentsUsdPattern4 + * @property {SeriesPattern18} cents + * @property {SeriesPattern18} usd + */ + +/** + * Create a CentsUsdPattern4 pattern node + * @param {BrkClientBase} client + * @param {string} acc - Accumulated series name + * @returns {CentsUsdPattern4} + */ +function createCentsUsdPattern4(client, acc) { + return { + cents: createSeriesPattern18(client, _m(acc, 'cents')), + usd: createSeriesPattern18(client, acc), + }; +} + /** * @typedef {Object} CoindaysTransferPattern - * @property {AverageBaseCumulativeSumPattern} coindaysDestroyed - * @property {AverageBaseCumulativeInSumPattern} transferVolume + * @property {AverageBlockCumulativeSumPattern} coindaysDestroyed + * @property {AverageBlockCumulativeInSumPattern} transferVolume */ /** @@ -3788,15 +3849,15 @@ function createCentsUsdPattern(client, acc) { */ function createCoindaysTransferPattern(client, acc) { return { - coindaysDestroyed: createAverageBaseCumulativeSumPattern(client, _m(acc, 'coindays_destroyed')), - transferVolume: createAverageBaseCumulativeInSumPattern(client, _m(acc, 'transfer_volume')), + coindaysDestroyed: createAverageBlockCumulativeSumPattern(client, _m(acc, 'coindays_destroyed')), + transferVolume: createAverageBlockCumulativeInSumPattern(client, _m(acc, 'transfer_volume')), }; } /** * @typedef {Object} InPattern - * @property {CentsUsdPattern2} inLoss - * @property {CentsUsdPattern2} inProfit + * @property {CentsUsdPattern3} inLoss + * @property {CentsUsdPattern3} inProfit */ /** @@ -3807,8 +3868,8 @@ function createCoindaysTransferPattern(client, acc) { */ function createInPattern(client, acc) { return { - inLoss: createCentsUsdPattern2(client, _m(acc, 'loss')), - inProfit: createCentsUsdPattern2(client, _m(acc, 'profit')), + inLoss: createCentsUsdPattern3(client, _m(acc, 'loss')), + inProfit: createCentsUsdPattern3(client, _m(acc, 'profit')), }; } @@ -3854,7 +3915,7 @@ function createPriceRatioPattern(client, acc, disc) { /** * @typedef {Object} RatioValuePattern * @property {_24hPattern} ratio - * @property {AverageBaseCumulativeSumPattern} valueDestroyed + * @property {AverageBlockCumulativeSumPattern} valueDestroyed */ /** @@ -3866,7 +3927,7 @@ function createPriceRatioPattern(client, acc, disc) { function createRatioValuePattern(client, acc) { return { ratio: create_24hPattern(client, _m(acc, 'sopr_24h')), - valueDestroyed: createAverageBaseCumulativeSumPattern(client, _m(acc, 'value_destroyed')), + valueDestroyed: createAverageBlockCumulativeSumPattern(client, _m(acc, 'value_destroyed')), }; } @@ -3948,7 +4009,7 @@ function createPricePattern(client, acc) { /** * @typedef {Object} TransferPattern - * @property {AverageBaseCumulativeSumPattern3} transferVolume + * @property {AverageBlockCumulativeSumPattern3} transferVolume */ /** @@ -3959,7 +4020,7 @@ function createPricePattern(client, acc) { */ function createTransferPattern(client, acc) { return { - transferVolume: createAverageBaseCumulativeSumPattern3(client, acc), + transferVolume: createAverageBlockCumulativeSumPattern3(client, acc), }; } @@ -4013,7 +4074,7 @@ function createUnspentPattern(client, acc) { * @property {SeriesTree_Blocks_Count} count * @property {SeriesTree_Blocks_Lookback} lookback * @property {SeriesTree_Blocks_Interval} interval - * @property {AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2} vbytes + * @property {AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} vbytes * @property {SeriesTree_Blocks_Fullness} fullness * @property {SeriesTree_Blocks_Halving} halving */ @@ -4068,7 +4129,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Blocks_Count * @property {_1m1w1y24hPattern} target - * @property {AverageBaseCumulativeSumPattern2} total + * @property {AverageBlockCumulativeSumPattern2} total */ /** @@ -4120,7 +4181,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Blocks_Interval - * @property {SeriesPattern18} base + * @property {SeriesPattern18} block * @property {SeriesPattern1} _24h * @property {SeriesPattern1} _1w * @property {SeriesPattern1} _1m @@ -4167,7 +4228,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Transactions_Count - * @property {AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2} total + * @property {AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} total * @property {SeriesPattern19} isCoinbase */ @@ -4194,14 +4255,14 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Transactions_Versions - * @property {AverageBaseCumulativeSumPattern} v1 - * @property {AverageBaseCumulativeSumPattern} v2 - * @property {AverageBaseCumulativeSumPattern} v3 + * @property {AverageBlockCumulativeSumPattern} v1 + * @property {AverageBlockCumulativeSumPattern} v2 + * @property {AverageBlockCumulativeSumPattern} v3 */ /** * @typedef {Object} SeriesTree_Transactions_Volume - * @property {AverageBaseCumulativeSumPattern3} transferVolume + * @property {AverageBlockCumulativeSumPattern3} transferVolume * @property {_1m1w1y24hPattern} txPerSec * @property {_1m1w1y24hPattern} outputsPerSec * @property {_1m1w1y24hPattern} inputsPerSec @@ -4364,15 +4425,15 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Addrs_New - * @property {AverageBaseCumulativeSumPattern} all - * @property {AverageBaseCumulativeSumPattern} p2pk65 - * @property {AverageBaseCumulativeSumPattern} p2pk33 - * @property {AverageBaseCumulativeSumPattern} p2pkh - * @property {AverageBaseCumulativeSumPattern} p2sh - * @property {AverageBaseCumulativeSumPattern} p2wpkh - * @property {AverageBaseCumulativeSumPattern} p2wsh - * @property {AverageBaseCumulativeSumPattern} p2tr - * @property {AverageBaseCumulativeSumPattern} p2a + * @property {AverageBlockCumulativeSumPattern} all + * @property {AverageBlockCumulativeSumPattern} p2pk65 + * @property {AverageBlockCumulativeSumPattern} p2pk33 + * @property {AverageBlockCumulativeSumPattern} p2pkh + * @property {AverageBlockCumulativeSumPattern} p2sh + * @property {AverageBlockCumulativeSumPattern} p2wpkh + * @property {AverageBlockCumulativeSumPattern} p2wsh + * @property {AverageBlockCumulativeSumPattern} p2tr + * @property {AverageBlockCumulativeSumPattern} p2a */ /** @@ -4429,23 +4490,23 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Scripts_Count - * @property {AverageBaseCumulativeSumPattern} p2a - * @property {AverageBaseCumulativeSumPattern} p2ms - * @property {AverageBaseCumulativeSumPattern} p2pk33 - * @property {AverageBaseCumulativeSumPattern} p2pk65 - * @property {AverageBaseCumulativeSumPattern} p2pkh - * @property {AverageBaseCumulativeSumPattern} p2sh - * @property {AverageBaseCumulativeSumPattern} p2tr - * @property {AverageBaseCumulativeSumPattern} p2wpkh - * @property {AverageBaseCumulativeSumPattern} p2wsh - * @property {AverageBaseCumulativeSumPattern} opReturn - * @property {AverageBaseCumulativeSumPattern} emptyOutput - * @property {AverageBaseCumulativeSumPattern} unknownOutput + * @property {AverageBlockCumulativeSumPattern} p2a + * @property {AverageBlockCumulativeSumPattern} p2ms + * @property {AverageBlockCumulativeSumPattern} p2pk33 + * @property {AverageBlockCumulativeSumPattern} p2pk65 + * @property {AverageBlockCumulativeSumPattern} p2pkh + * @property {AverageBlockCumulativeSumPattern} p2sh + * @property {AverageBlockCumulativeSumPattern} p2tr + * @property {AverageBlockCumulativeSumPattern} p2wpkh + * @property {AverageBlockCumulativeSumPattern} p2wsh + * @property {AverageBlockCumulativeSumPattern} opReturn + * @property {AverageBlockCumulativeSumPattern} emptyOutput + * @property {AverageBlockCumulativeSumPattern} unknownOutput */ /** * @typedef {Object} SeriesTree_Scripts_Value - * @property {AverageBaseCumulativeSumPattern3} opReturn + * @property {AverageBlockCumulativeSumPattern3} opReturn */ /** @@ -4456,7 +4517,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Mining_Rewards - * @property {AverageBaseCumulativeSumPattern3} coinbase + * @property {AverageBlockCumulativeSumPattern3} coinbase * @property {SeriesTree_Mining_Rewards_Subsidy} subsidy * @property {SeriesTree_Mining_Rewards_Fees} fees * @property {SeriesTree_Mining_Rewards_Unclaimed} unclaimed @@ -4464,18 +4525,18 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Mining_Rewards_Subsidy - * @property {BtcCentsSatsUsdPattern2} base - * @property {BtcCentsSatsUsdPattern2} cumulative + * @property {BtcCentsSatsUsdPattern2} block + * @property {BtcCentsSatsUsdPattern3} cumulative * @property {_1m1w1y24hPattern4} sum * @property {_1m1w1y24hPattern3} average * @property {_1m1w1y24hBpsPercentRatioPattern} dominance - * @property {CentsUsdPattern2} sma1y + * @property {CentsUsdPattern3} sma1y */ /** * @typedef {Object} SeriesTree_Mining_Rewards_Fees - * @property {BtcCentsSatsUsdPattern2} base - * @property {BtcCentsSatsUsdPattern2} cumulative + * @property {BtcCentsSatsUsdPattern2} block + * @property {BtcCentsSatsUsdPattern3} cumulative * @property {_1m1w1y24hPattern4} sum * @property {_1m1w1y24hPattern3} average * @property {_1m1w1y24hPattern4} min @@ -4499,8 +4560,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Mining_Rewards_Unclaimed - * @property {BtcCentsSatsUsdPattern2} base - * @property {BtcCentsSatsUsdPattern2} cumulative + * @property {BtcCentsSatsUsdPattern2} block + * @property {BtcCentsSatsUsdPattern3} cumulative */ /** @@ -4545,35 +4606,35 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cointime_Activity - * @property {AverageBaseCumulativeSumPattern} coinblocksCreated - * @property {AverageBaseCumulativeSumPattern} coinblocksStored + * @property {AverageBlockCumulativeSumPattern} coinblocksCreated + * @property {AverageBlockCumulativeSumPattern} coinblocksStored * @property {SeriesPattern1} liveliness * @property {SeriesPattern1} vaultedness * @property {SeriesPattern1} ratio - * @property {AverageBaseCumulativeSumPattern} coinblocksDestroyed + * @property {AverageBlockCumulativeSumPattern} coinblocksDestroyed */ /** * @typedef {Object} SeriesTree_Cointime_Supply - * @property {BtcCentsSatsUsdPattern2} vaulted - * @property {BtcCentsSatsUsdPattern2} active + * @property {BtcCentsSatsUsdPattern3} vaulted + * @property {BtcCentsSatsUsdPattern3} active */ /** * @typedef {Object} SeriesTree_Cointime_Value - * @property {AverageBaseCumulativeSumPattern} destroyed - * @property {AverageBaseCumulativeSumPattern} created - * @property {AverageBaseCumulativeSumPattern} stored - * @property {AverageBaseCumulativeSumPattern} vocdd + * @property {AverageBlockCumulativeSumPattern} destroyed + * @property {AverageBlockCumulativeSumPattern} created + * @property {AverageBlockCumulativeSumPattern} stored + * @property {AverageBlockCumulativeSumPattern} vocdd */ /** * @typedef {Object} SeriesTree_Cointime_Cap - * @property {CentsUsdPattern2} thermo - * @property {CentsUsdPattern2} investor - * @property {CentsUsdPattern2} vaulted - * @property {CentsUsdPattern2} active - * @property {CentsUsdPattern2} cointime + * @property {CentsUsdPattern3} thermo + * @property {CentsUsdPattern3} investor + * @property {CentsUsdPattern3} vaulted + * @property {CentsUsdPattern3} active + * @property {CentsUsdPattern3} cointime * @property {BpsRatioPattern2} aviv */ @@ -5099,18 +5160,18 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Market_Dca_Class_Stack - * @property {BtcCentsSatsUsdPattern2} from2015 - * @property {BtcCentsSatsUsdPattern2} from2016 - * @property {BtcCentsSatsUsdPattern2} from2017 - * @property {BtcCentsSatsUsdPattern2} from2018 - * @property {BtcCentsSatsUsdPattern2} from2019 - * @property {BtcCentsSatsUsdPattern2} from2020 - * @property {BtcCentsSatsUsdPattern2} from2021 - * @property {BtcCentsSatsUsdPattern2} from2022 - * @property {BtcCentsSatsUsdPattern2} from2023 - * @property {BtcCentsSatsUsdPattern2} from2024 - * @property {BtcCentsSatsUsdPattern2} from2025 - * @property {BtcCentsSatsUsdPattern2} from2026 + * @property {BtcCentsSatsUsdPattern3} from2015 + * @property {BtcCentsSatsUsdPattern3} from2016 + * @property {BtcCentsSatsUsdPattern3} from2017 + * @property {BtcCentsSatsUsdPattern3} from2018 + * @property {BtcCentsSatsUsdPattern3} from2019 + * @property {BtcCentsSatsUsdPattern3} from2020 + * @property {BtcCentsSatsUsdPattern3} from2021 + * @property {BtcCentsSatsUsdPattern3} from2022 + * @property {BtcCentsSatsUsdPattern3} from2023 + * @property {BtcCentsSatsUsdPattern3} from2024 + * @property {BtcCentsSatsUsdPattern3} from2025 + * @property {BtcCentsSatsUsdPattern3} from2026 */ /** @@ -5404,13 +5465,13 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Supply * @property {SeriesPattern18} state - * @property {BtcCentsSatsUsdPattern2} circulating - * @property {AverageBaseCumulativeSumPattern3} burned + * @property {BtcCentsSatsUsdPattern3} circulating + * @property {AverageBlockCumulativeSumPattern3} burned * @property {BpsPercentRatioPattern} inflationRate * @property {SeriesTree_Supply_Velocity} velocity * @property {CentsDeltaUsdPattern} marketCap * @property {_1m1w1y24hPattern} marketMinusRealizedCapGrowthRate - * @property {BtcCentsSatsUsdPattern2} hodledOrLost + * @property {BtcCentsSatsUsdPattern3} hodledOrLost */ /** @@ -5455,8 +5516,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Supply - * @property {BtcCentsSatsUsdPattern2} total - * @property {BtcCentsSatsUsdPattern2} half + * @property {BtcCentsSatsUsdPattern3} total + * @property {BtcCentsSatsUsdPattern3} half * @property {AbsoluteRatePattern} delta * @property {BtcCentsSatsToUsdPattern2} inProfit * @property {BtcCentsSatsToUsdPattern2} inLoss @@ -5464,8 +5525,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Activity - * @property {AverageBaseCumulativeInSumPattern} transferVolume - * @property {AverageBaseCumulativeSumPattern} coindaysDestroyed + * @property {AverageBlockCumulativeInSumPattern} transferVolume + * @property {AverageBlockCumulativeSumPattern} coindaysDestroyed * @property {SeriesPattern1} coinyearsDestroyed * @property {_1m1w1y24hPattern} dormancy */ @@ -5473,23 +5534,23 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Realized * @property {CentsDeltaToUsdPattern} cap - * @property {BaseCumulativeSumToPattern} profit + * @property {BlockCumulativeSumToPattern} profit * @property {SeriesTree_Cohorts_Utxo_All_Realized_Loss} loss * @property {SeriesTree_Cohorts_Utxo_All_Realized_Price} price * @property {SeriesPattern1} mvrv - * @property {BaseChangeCumulativeDeltaSumToPattern} netPnl + * @property {BlockChangeCumulativeDeltaSumToPattern} netPnl * @property {SeriesTree_Cohorts_Utxo_All_Realized_Sopr} sopr - * @property {BaseCumulativeSumPattern} grossPnl + * @property {BlockCumulativeSumPattern} grossPnl * @property {_1m1w1y24hPattern7} sellSideRiskRatio - * @property {BaseCumulativeSumToPattern} peakRegret + * @property {BlockCumulativeSumToPattern} peakRegret * @property {PricePattern} investor * @property {_1m1w1y24hPattern} profitToLossRatio */ /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Realized_Loss - * @property {CentsUsdPattern2} base - * @property {CentsUsdPattern2} cumulative + * @property {CentsUsdPattern2} block + * @property {CentsUsdPattern3} cumulative * @property {_1m1w1y24hPattern6} sum * @property {BaseSumPattern} negative * @property {BpsPercentRatioPattern4} toRcap @@ -5593,7 +5654,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Realized_Sopr - * @property {AverageBaseCumulativeSumPattern} valueDestroyed + * @property {AverageBlockCumulativeSumPattern} valueDestroyed * @property {_1m1w1y24hPattern} ratio * @property {SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted} adjusted */ @@ -5601,8 +5662,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted * @property {_1m1w1y24hPattern} ratio - * @property {AverageBaseCumulativeSumPattern} transferVolume - * @property {AverageBaseCumulativeSumPattern} valueDestroyed + * @property {AverageBlockCumulativeSumPattern} transferVolume + * @property {AverageBlockCumulativeSumPattern} valueDestroyed */ /** @@ -5622,7 +5683,7 @@ function createUnspentPattern(client, acc) { * @property {SeriesTree_Cohorts_Utxo_All_Unrealized_Profit} profit * @property {SeriesTree_Cohorts_Utxo_All_Unrealized_Loss} loss * @property {SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl} netPnl - * @property {CentsUsdPattern2} grossPnl + * @property {CentsUsdPattern3} grossPnl * @property {InPattern} investedCapital * @property {SeriesPattern18} investorCapInProfitRaw * @property {SeriesPattern18} investorCapInLossRaw @@ -5655,8 +5716,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Unrealized_Sentiment - * @property {CentsUsdPattern2} painIndex - * @property {CentsUsdPattern2} greedIndex + * @property {CentsUsdPattern3} painIndex + * @property {CentsUsdPattern3} greedIndex * @property {CentsUsdPattern} net */ @@ -5672,8 +5733,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_Activity - * @property {AverageBaseCumulativeInSumPattern} transferVolume - * @property {AverageBaseCumulativeSumPattern} coindaysDestroyed + * @property {AverageBlockCumulativeInSumPattern} transferVolume + * @property {AverageBlockCumulativeSumPattern} coindaysDestroyed * @property {SeriesPattern1} coinyearsDestroyed * @property {_1m1w1y24hPattern} dormancy */ @@ -5681,23 +5742,23 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_Realized * @property {CentsDeltaToUsdPattern} cap - * @property {BaseCumulativeSumToPattern} profit + * @property {BlockCumulativeSumToPattern} profit * @property {SeriesTree_Cohorts_Utxo_Sth_Realized_Loss} loss * @property {SeriesTree_Cohorts_Utxo_Sth_Realized_Price} price * @property {SeriesPattern1} mvrv - * @property {BaseChangeCumulativeDeltaSumToPattern} netPnl + * @property {BlockChangeCumulativeDeltaSumToPattern} netPnl * @property {SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr} sopr - * @property {BaseCumulativeSumPattern} grossPnl + * @property {BlockCumulativeSumPattern} grossPnl * @property {_1m1w1y24hPattern7} sellSideRiskRatio - * @property {BaseCumulativeSumToPattern} peakRegret + * @property {BlockCumulativeSumToPattern} peakRegret * @property {PricePattern} investor * @property {_1m1w1y24hPattern} profitToLossRatio */ /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_Realized_Loss - * @property {CentsUsdPattern2} base - * @property {CentsUsdPattern2} cumulative + * @property {CentsUsdPattern2} block + * @property {CentsUsdPattern3} cumulative * @property {_1m1w1y24hPattern6} sum * @property {BaseSumPattern} negative * @property {BpsPercentRatioPattern4} toRcap @@ -5801,7 +5862,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr - * @property {AverageBaseCumulativeSumPattern} valueDestroyed + * @property {AverageBlockCumulativeSumPattern} valueDestroyed * @property {_1m1w1y24hPattern} ratio * @property {SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted} adjusted */ @@ -5809,8 +5870,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted * @property {_1m1w1y24hPattern} ratio - * @property {AverageBaseCumulativeSumPattern} transferVolume - * @property {AverageBaseCumulativeSumPattern} valueDestroyed + * @property {AverageBlockCumulativeSumPattern} transferVolume + * @property {AverageBlockCumulativeSumPattern} valueDestroyed */ /** @@ -5830,7 +5891,7 @@ function createUnspentPattern(client, acc) { * @property {CentsToUsdPattern4} profit * @property {CentsNegativeToUsdPattern2} loss * @property {CentsToUsdPattern3} netPnl - * @property {CentsUsdPattern2} grossPnl + * @property {CentsUsdPattern3} grossPnl * @property {InPattern} investedCapital * @property {SeriesPattern18} investorCapInProfitRaw * @property {SeriesPattern18} investorCapInLossRaw @@ -5839,8 +5900,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth_Unrealized_Sentiment - * @property {CentsUsdPattern2} painIndex - * @property {CentsUsdPattern2} greedIndex + * @property {CentsUsdPattern3} painIndex + * @property {CentsUsdPattern3} greedIndex * @property {CentsUsdPattern} net */ @@ -5856,8 +5917,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth_Activity - * @property {AverageBaseCumulativeInSumPattern} transferVolume - * @property {AverageBaseCumulativeSumPattern} coindaysDestroyed + * @property {AverageBlockCumulativeInSumPattern} transferVolume + * @property {AverageBlockCumulativeSumPattern} coindaysDestroyed * @property {SeriesPattern1} coinyearsDestroyed * @property {_1m1w1y24hPattern} dormancy */ @@ -5865,23 +5926,23 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth_Realized * @property {CentsDeltaToUsdPattern} cap - * @property {BaseCumulativeSumToPattern} profit + * @property {BlockCumulativeSumToPattern} profit * @property {SeriesTree_Cohorts_Utxo_Lth_Realized_Loss} loss * @property {SeriesTree_Cohorts_Utxo_Lth_Realized_Price} price * @property {SeriesPattern1} mvrv - * @property {BaseChangeCumulativeDeltaSumToPattern} netPnl + * @property {BlockChangeCumulativeDeltaSumToPattern} netPnl * @property {SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr} sopr - * @property {BaseCumulativeSumPattern} grossPnl + * @property {BlockCumulativeSumPattern} grossPnl * @property {_1m1w1y24hPattern7} sellSideRiskRatio - * @property {BaseCumulativeSumToPattern} peakRegret + * @property {BlockCumulativeSumToPattern} peakRegret * @property {PricePattern} investor * @property {_1m1w1y24hPattern} profitToLossRatio */ /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth_Realized_Loss - * @property {CentsUsdPattern2} base - * @property {CentsUsdPattern2} cumulative + * @property {CentsUsdPattern2} block + * @property {CentsUsdPattern3} cumulative * @property {_1m1w1y24hPattern6} sum * @property {BaseSumPattern} negative * @property {BpsPercentRatioPattern4} toRcap @@ -5985,7 +6046,7 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr - * @property {AverageBaseCumulativeSumPattern} valueDestroyed + * @property {AverageBlockCumulativeSumPattern} valueDestroyed * @property {_1m1w1y24hPattern} ratio */ @@ -6006,7 +6067,7 @@ function createUnspentPattern(client, acc) { * @property {CentsToUsdPattern4} profit * @property {CentsNegativeToUsdPattern2} loss * @property {CentsToUsdPattern3} netPnl - * @property {CentsUsdPattern2} grossPnl + * @property {CentsUsdPattern3} grossPnl * @property {InPattern} investedCapital * @property {SeriesPattern18} investorCapInProfitRaw * @property {SeriesPattern18} investorCapInLossRaw @@ -6015,8 +6076,8 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth_Unrealized_Sentiment - * @property {CentsUsdPattern2} painIndex - * @property {CentsUsdPattern2} greedIndex + * @property {CentsUsdPattern3} painIndex + * @property {CentsUsdPattern3} greedIndex * @property {CentsUsdPattern} net */ @@ -6257,27 +6318,27 @@ function createUnspentPattern(client, acc) { /** * @typedef {Object} SeriesTree_Cohorts_Utxo_Matured - * @property {AverageBaseCumulativeSumPattern3} under1h - * @property {AverageBaseCumulativeSumPattern3} _1hTo1d - * @property {AverageBaseCumulativeSumPattern3} _1dTo1w - * @property {AverageBaseCumulativeSumPattern3} _1wTo1m - * @property {AverageBaseCumulativeSumPattern3} _1mTo2m - * @property {AverageBaseCumulativeSumPattern3} _2mTo3m - * @property {AverageBaseCumulativeSumPattern3} _3mTo4m - * @property {AverageBaseCumulativeSumPattern3} _4mTo5m - * @property {AverageBaseCumulativeSumPattern3} _5mTo6m - * @property {AverageBaseCumulativeSumPattern3} _6mTo1y - * @property {AverageBaseCumulativeSumPattern3} _1yTo2y - * @property {AverageBaseCumulativeSumPattern3} _2yTo3y - * @property {AverageBaseCumulativeSumPattern3} _3yTo4y - * @property {AverageBaseCumulativeSumPattern3} _4yTo5y - * @property {AverageBaseCumulativeSumPattern3} _5yTo6y - * @property {AverageBaseCumulativeSumPattern3} _6yTo7y - * @property {AverageBaseCumulativeSumPattern3} _7yTo8y - * @property {AverageBaseCumulativeSumPattern3} _8yTo10y - * @property {AverageBaseCumulativeSumPattern3} _10yTo12y - * @property {AverageBaseCumulativeSumPattern3} _12yTo15y - * @property {AverageBaseCumulativeSumPattern3} over15y + * @property {AverageBlockCumulativeSumPattern3} under1h + * @property {AverageBlockCumulativeSumPattern3} _1hTo1d + * @property {AverageBlockCumulativeSumPattern3} _1dTo1w + * @property {AverageBlockCumulativeSumPattern3} _1wTo1m + * @property {AverageBlockCumulativeSumPattern3} _1mTo2m + * @property {AverageBlockCumulativeSumPattern3} _2mTo3m + * @property {AverageBlockCumulativeSumPattern3} _3mTo4m + * @property {AverageBlockCumulativeSumPattern3} _4mTo5m + * @property {AverageBlockCumulativeSumPattern3} _5mTo6m + * @property {AverageBlockCumulativeSumPattern3} _6mTo1y + * @property {AverageBlockCumulativeSumPattern3} _1yTo2y + * @property {AverageBlockCumulativeSumPattern3} _2yTo3y + * @property {AverageBlockCumulativeSumPattern3} _3yTo4y + * @property {AverageBlockCumulativeSumPattern3} _4yTo5y + * @property {AverageBlockCumulativeSumPattern3} _5yTo6y + * @property {AverageBlockCumulativeSumPattern3} _6yTo7y + * @property {AverageBlockCumulativeSumPattern3} _7yTo8y + * @property {AverageBlockCumulativeSumPattern3} _8yTo10y + * @property {AverageBlockCumulativeSumPattern3} _10yTo12y + * @property {AverageBlockCumulativeSumPattern3} _12yTo15y + * @property {AverageBlockCumulativeSumPattern3} over15y */ /** @@ -7577,7 +7638,7 @@ class BrkClient extends BrkClientBase { }, count: { target: create_1m1w1y24hPattern(this, 'block_count_target'), - total: createAverageBaseCumulativeSumPattern2(this, 'block_count'), + total: createAverageBlockCumulativeSumPattern2(this, 'block_count'), }, lookback: { _1h: createSeriesPattern18(this, 'height_1h_ago'), @@ -7625,13 +7686,13 @@ class BrkClient extends BrkClientBase { _26y: createSeriesPattern18(this, 'height_26y_ago'), }, interval: { - base: createSeriesPattern18(this, 'block_interval'), + block: createSeriesPattern18(this, 'block_interval'), _24h: createSeriesPattern1(this, 'block_interval_average_24h'), _1w: createSeriesPattern1(this, 'block_interval_average_1w'), _1m: createSeriesPattern1(this, 'block_interval_average_1m'), _1y: createSeriesPattern1(this, 'block_interval_average_1y'), }, - vbytes: createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(this, 'block_vbytes'), + vbytes: createAverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(this, 'block_vbytes'), fullness: { bps: createSeriesPattern18(this, 'block_fullness_bps'), ratio: createSeriesPattern18(this, 'block_fullness_ratio'), @@ -7657,7 +7718,7 @@ class BrkClient extends BrkClientBase { firstTxoutIndex: createSeriesPattern19(this, 'first_txout_index'), }, count: { - total: createAverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(this, 'tx_count'), + total: createAverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(this, 'tx_count'), isCoinbase: createSeriesPattern19(this, 'is_coinbase'), }, size: { @@ -7675,12 +7736,12 @@ class BrkClient extends BrkClientBase { feeRate: create_6bBlockTxPattern(this, 'fee_rate'), }, versions: { - v1: createAverageBaseCumulativeSumPattern(this, 'tx_v1'), - v2: createAverageBaseCumulativeSumPattern(this, 'tx_v2'), - v3: createAverageBaseCumulativeSumPattern(this, 'tx_v3'), + v1: createAverageBlockCumulativeSumPattern(this, 'tx_v1'), + v2: createAverageBlockCumulativeSumPattern(this, 'tx_v2'), + v3: createAverageBlockCumulativeSumPattern(this, 'tx_v3'), }, volume: { - transferVolume: createAverageBaseCumulativeSumPattern3(this, 'transfer_volume_bis'), + transferVolume: createAverageBlockCumulativeSumPattern3(this, 'transfer_volume_bis'), txPerSec: create_1m1w1y24hPattern(this, 'tx_per_sec'), outputsPerSec: create_1m1w1y24hPattern(this, 'outputs_per_sec'), inputsPerSec: create_1m1w1y24hPattern(this, 'inputs_per_sec'), @@ -7782,15 +7843,15 @@ class BrkClient extends BrkClientBase { }, total: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3(this, 'total_addr_count'), new: { - all: createAverageBaseCumulativeSumPattern(this, 'new_addr_count'), - p2pk65: createAverageBaseCumulativeSumPattern(this, 'p2pk65_new_addr_count'), - p2pk33: createAverageBaseCumulativeSumPattern(this, 'p2pk33_new_addr_count'), - p2pkh: createAverageBaseCumulativeSumPattern(this, 'p2pkh_new_addr_count'), - p2sh: createAverageBaseCumulativeSumPattern(this, 'p2sh_new_addr_count'), - p2wpkh: createAverageBaseCumulativeSumPattern(this, 'p2wpkh_new_addr_count'), - p2wsh: createAverageBaseCumulativeSumPattern(this, 'p2wsh_new_addr_count'), - p2tr: createAverageBaseCumulativeSumPattern(this, 'p2tr_new_addr_count'), - p2a: createAverageBaseCumulativeSumPattern(this, 'p2a_new_addr_count'), + all: createAverageBlockCumulativeSumPattern(this, 'new_addr_count'), + p2pk65: createAverageBlockCumulativeSumPattern(this, 'p2pk65_new_addr_count'), + p2pk33: createAverageBlockCumulativeSumPattern(this, 'p2pk33_new_addr_count'), + p2pkh: createAverageBlockCumulativeSumPattern(this, 'p2pkh_new_addr_count'), + p2sh: createAverageBlockCumulativeSumPattern(this, 'p2sh_new_addr_count'), + p2wpkh: createAverageBlockCumulativeSumPattern(this, 'p2wpkh_new_addr_count'), + p2wsh: createAverageBlockCumulativeSumPattern(this, 'p2wsh_new_addr_count'), + p2tr: createAverageBlockCumulativeSumPattern(this, 'p2tr_new_addr_count'), + p2a: createAverageBlockCumulativeSumPattern(this, 'p2a_new_addr_count'), }, delta: { all: createAbsoluteRatePattern(this, 'addr_count'), @@ -7824,37 +7885,37 @@ class BrkClient extends BrkClientBase { }, }, count: { - p2a: createAverageBaseCumulativeSumPattern(this, 'p2a_count'), - p2ms: createAverageBaseCumulativeSumPattern(this, 'p2ms_count'), - p2pk33: createAverageBaseCumulativeSumPattern(this, 'p2pk33_count'), - p2pk65: createAverageBaseCumulativeSumPattern(this, 'p2pk65_count'), - p2pkh: createAverageBaseCumulativeSumPattern(this, 'p2pkh_count'), - p2sh: createAverageBaseCumulativeSumPattern(this, 'p2sh_count'), - p2tr: createAverageBaseCumulativeSumPattern(this, 'p2tr_count'), - p2wpkh: createAverageBaseCumulativeSumPattern(this, 'p2wpkh_count'), - p2wsh: createAverageBaseCumulativeSumPattern(this, 'p2wsh_count'), - opReturn: createAverageBaseCumulativeSumPattern(this, 'op_return_count'), - emptyOutput: createAverageBaseCumulativeSumPattern(this, 'empty_output_count'), - unknownOutput: createAverageBaseCumulativeSumPattern(this, 'unknown_output_count'), + p2a: createAverageBlockCumulativeSumPattern(this, 'p2a_count'), + p2ms: createAverageBlockCumulativeSumPattern(this, 'p2ms_count'), + p2pk33: createAverageBlockCumulativeSumPattern(this, 'p2pk33_count'), + p2pk65: createAverageBlockCumulativeSumPattern(this, 'p2pk65_count'), + p2pkh: createAverageBlockCumulativeSumPattern(this, 'p2pkh_count'), + p2sh: createAverageBlockCumulativeSumPattern(this, 'p2sh_count'), + p2tr: createAverageBlockCumulativeSumPattern(this, 'p2tr_count'), + p2wpkh: createAverageBlockCumulativeSumPattern(this, 'p2wpkh_count'), + p2wsh: createAverageBlockCumulativeSumPattern(this, 'p2wsh_count'), + opReturn: createAverageBlockCumulativeSumPattern(this, 'op_return_count'), + emptyOutput: createAverageBlockCumulativeSumPattern(this, 'empty_output_count'), + unknownOutput: createAverageBlockCumulativeSumPattern(this, 'unknown_output_count'), }, value: { - opReturn: createAverageBaseCumulativeSumPattern3(this, 'op_return_value'), + opReturn: createAverageBlockCumulativeSumPattern3(this, 'op_return_value'), }, }, mining: { rewards: { - coinbase: createAverageBaseCumulativeSumPattern3(this, 'coinbase'), + coinbase: createAverageBlockCumulativeSumPattern3(this, 'coinbase'), subsidy: { - base: createBtcCentsSatsUsdPattern2(this, 'subsidy'), - cumulative: createBtcCentsSatsUsdPattern2(this, 'subsidy_cumulative'), + block: createBtcCentsSatsUsdPattern2(this, 'subsidy'), + cumulative: createBtcCentsSatsUsdPattern3(this, 'subsidy_cumulative'), sum: create_1m1w1y24hPattern4(this, 'subsidy_sum'), average: create_1m1w1y24hPattern3(this, 'subsidy_average'), dominance: create_1m1w1y24hBpsPercentRatioPattern(this, 'subsidy_dominance'), - sma1y: createCentsUsdPattern2(this, 'subsidy_sma_1y'), + sma1y: createCentsUsdPattern3(this, 'subsidy_sma_1y'), }, fees: { - base: createBtcCentsSatsUsdPattern2(this, 'fees'), - cumulative: createBtcCentsSatsUsdPattern2(this, 'fees_cumulative'), + block: createBtcCentsSatsUsdPattern2(this, 'fees'), + cumulative: createBtcCentsSatsUsdPattern3(this, 'fees_cumulative'), sum: create_1m1w1y24hPattern4(this, 'fees_sum'), average: create_1m1w1y24hPattern3(this, 'fees_average'), min: create_1m1w1y24hPattern4(this, 'fees_min'), @@ -7873,8 +7934,8 @@ class BrkClient extends BrkClientBase { }, }, unclaimed: { - base: createBtcCentsSatsUsdPattern2(this, 'unclaimed_rewards'), - cumulative: createBtcCentsSatsUsdPattern2(this, 'unclaimed_rewards_cumulative'), + block: createBtcCentsSatsUsdPattern2(this, 'unclaimed_rewards'), + cumulative: createBtcCentsSatsUsdPattern3(this, 'unclaimed_rewards_cumulative'), }, }, hashrate: { @@ -7899,29 +7960,29 @@ class BrkClient extends BrkClientBase { }, cointime: { activity: { - coinblocksCreated: createAverageBaseCumulativeSumPattern(this, 'coinblocks_created'), - coinblocksStored: createAverageBaseCumulativeSumPattern(this, 'coinblocks_stored'), + coinblocksCreated: createAverageBlockCumulativeSumPattern(this, 'coinblocks_created'), + coinblocksStored: createAverageBlockCumulativeSumPattern(this, 'coinblocks_stored'), liveliness: createSeriesPattern1(this, 'liveliness'), vaultedness: createSeriesPattern1(this, 'vaultedness'), ratio: createSeriesPattern1(this, 'activity_to_vaultedness'), - coinblocksDestroyed: createAverageBaseCumulativeSumPattern(this, 'coinblocks_destroyed'), + coinblocksDestroyed: createAverageBlockCumulativeSumPattern(this, 'coinblocks_destroyed'), }, supply: { - vaulted: createBtcCentsSatsUsdPattern2(this, 'vaulted_supply'), - active: createBtcCentsSatsUsdPattern2(this, 'active_supply'), + vaulted: createBtcCentsSatsUsdPattern3(this, 'vaulted_supply'), + active: createBtcCentsSatsUsdPattern3(this, 'active_supply'), }, value: { - destroyed: createAverageBaseCumulativeSumPattern(this, 'cointime_value_destroyed'), - created: createAverageBaseCumulativeSumPattern(this, 'cointime_value_created'), - stored: createAverageBaseCumulativeSumPattern(this, 'cointime_value_stored'), - vocdd: createAverageBaseCumulativeSumPattern(this, 'vocdd'), + destroyed: createAverageBlockCumulativeSumPattern(this, 'cointime_value_destroyed'), + created: createAverageBlockCumulativeSumPattern(this, 'cointime_value_created'), + stored: createAverageBlockCumulativeSumPattern(this, 'cointime_value_stored'), + vocdd: createAverageBlockCumulativeSumPattern(this, 'vocdd'), }, cap: { - thermo: createCentsUsdPattern2(this, 'thermo_cap'), - investor: createCentsUsdPattern2(this, 'investor_cap'), - vaulted: createCentsUsdPattern2(this, 'vaulted_cap'), - active: createCentsUsdPattern2(this, 'active_cap'), - cointime: createCentsUsdPattern2(this, 'cointime_cap'), + thermo: createCentsUsdPattern3(this, 'thermo_cap'), + investor: createCentsUsdPattern3(this, 'investor_cap'), + vaulted: createCentsUsdPattern3(this, 'vaulted_cap'), + active: createCentsUsdPattern3(this, 'active_cap'), + cointime: createCentsUsdPattern3(this, 'cointime_cap'), aviv: createBpsRatioPattern2(this, 'aviv_ratio'), }, prices: { @@ -8269,18 +8330,18 @@ class BrkClient extends BrkClientBase { }, class: { stack: { - from2015: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2015'), - from2016: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2016'), - from2017: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2017'), - from2018: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2018'), - from2019: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2019'), - from2020: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2020'), - from2021: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2021'), - from2022: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2022'), - from2023: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2023'), - from2024: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2024'), - from2025: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2025'), - from2026: createBtcCentsSatsUsdPattern2(this, 'dca_stack_from_2026'), + from2015: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2015'), + from2016: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2016'), + from2017: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2017'), + from2018: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2018'), + from2019: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2019'), + from2020: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2020'), + from2021: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2021'), + from2022: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2022'), + from2023: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2023'), + from2024: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2024'), + from2025: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2025'), + from2026: createBtcCentsSatsUsdPattern3(this, 'dca_stack_from_2026'), }, costBasis: { from2015: createCentsSatsUsdPattern(this, 'dca_cost_basis_from_2015'), @@ -8535,8 +8596,8 @@ class BrkClient extends BrkClientBase { }, supply: { state: createSeriesPattern18(this, 'supply_state'), - circulating: createBtcCentsSatsUsdPattern2(this, 'circulating_supply'), - burned: createAverageBaseCumulativeSumPattern3(this, 'unspendable_supply'), + circulating: createBtcCentsSatsUsdPattern3(this, 'circulating_supply'), + burned: createAverageBlockCumulativeSumPattern3(this, 'unspendable_supply'), inflationRate: createBpsPercentRatioPattern(this, 'inflation_rate'), velocity: { native: createSeriesPattern1(this, 'velocity'), @@ -8544,31 +8605,31 @@ class BrkClient extends BrkClientBase { }, marketCap: createCentsDeltaUsdPattern(this, 'market_cap'), marketMinusRealizedCapGrowthRate: create_1m1w1y24hPattern(this, 'market_minus_realized_cap_growth_rate'), - hodledOrLost: createBtcCentsSatsUsdPattern2(this, 'hodled_or_lost_supply'), + hodledOrLost: createBtcCentsSatsUsdPattern3(this, 'hodled_or_lost_supply'), }, cohorts: { utxo: { all: { supply: { - total: createBtcCentsSatsUsdPattern2(this, 'supply'), - half: createBtcCentsSatsUsdPattern2(this, 'supply_half'), + total: createBtcCentsSatsUsdPattern3(this, 'supply'), + half: createBtcCentsSatsUsdPattern3(this, 'supply_half'), delta: createAbsoluteRatePattern(this, 'supply_delta'), inProfit: createBtcCentsSatsToUsdPattern2(this, 'supply_in_profit'), inLoss: createBtcCentsSatsToUsdPattern2(this, 'supply_in_loss'), }, outputs: createUnspentPattern(this, 'utxo_count'), activity: { - transferVolume: createAverageBaseCumulativeInSumPattern(this, 'transfer_volume'), - coindaysDestroyed: createAverageBaseCumulativeSumPattern(this, 'coindays_destroyed'), + transferVolume: createAverageBlockCumulativeInSumPattern(this, 'transfer_volume'), + coindaysDestroyed: createAverageBlockCumulativeSumPattern(this, 'coindays_destroyed'), coinyearsDestroyed: createSeriesPattern1(this, 'coinyears_destroyed'), dormancy: create_1m1w1y24hPattern(this, 'dormancy'), }, realized: { cap: createCentsDeltaToUsdPattern(this, 'realized_cap'), - profit: createBaseCumulativeSumToPattern(this, 'realized_profit'), + profit: createBlockCumulativeSumToPattern(this, 'realized_profit'), loss: { - base: createCentsUsdPattern2(this, 'realized_loss'), - cumulative: createCentsUsdPattern2(this, 'realized_loss_cumulative'), + block: createCentsUsdPattern2(this, 'realized_loss'), + cumulative: createCentsUsdPattern3(this, 'realized_loss_cumulative'), sum: create_1m1w1y24hPattern6(this, 'realized_loss_sum'), negative: createBaseSumPattern(this, 'neg_realized_loss'), toRcap: createBpsPercentRatioPattern4(this, 'realized_loss_to_rcap'), @@ -8653,19 +8714,19 @@ class BrkClient extends BrkClientBase { }, }, mvrv: createSeriesPattern1(this, 'mvrv'), - netPnl: createBaseChangeCumulativeDeltaSumToPattern(this, 'net'), + netPnl: createBlockChangeCumulativeDeltaSumToPattern(this, 'net'), sopr: { - valueDestroyed: createAverageBaseCumulativeSumPattern(this, 'value_destroyed'), + valueDestroyed: createAverageBlockCumulativeSumPattern(this, 'value_destroyed'), ratio: create_1m1w1y24hPattern(this, 'sopr'), adjusted: { ratio: create_1m1w1y24hPattern(this, 'asopr'), - transferVolume: createAverageBaseCumulativeSumPattern(this, 'adj_value_created'), - valueDestroyed: createAverageBaseCumulativeSumPattern(this, 'adj_value_destroyed'), + transferVolume: createAverageBlockCumulativeSumPattern(this, 'adj_value_created'), + valueDestroyed: createAverageBlockCumulativeSumPattern(this, 'adj_value_destroyed'), }, }, - grossPnl: createBaseCumulativeSumPattern(this, 'realized_gross_pnl'), + grossPnl: createBlockCumulativeSumPattern(this, 'realized_gross_pnl'), sellSideRiskRatio: create_1m1w1y24hPattern7(this, 'sell_side_risk_ratio'), - peakRegret: createBaseCumulativeSumToPattern(this, 'realized_peak_regret'), + peakRegret: createBlockCumulativeSumToPattern(this, 'realized_peak_regret'), investor: createPricePattern(this, 'investor_price'), profitToLossRatio: create_1m1w1y24hPattern(this, 'realized_profit_to_loss_ratio'), }, @@ -8698,13 +8759,13 @@ class BrkClient extends BrkClientBase { cents: createSeriesPattern1(this, 'net_unrealized_pnl_cents'), toOwnGrossPnl: createBpsPercentRatioPattern(this, 'net_unrealized_pnl_to_own_gross_pnl'), }, - grossPnl: createCentsUsdPattern2(this, 'unrealized_gross_pnl'), + grossPnl: createCentsUsdPattern3(this, 'unrealized_gross_pnl'), investedCapital: createInPattern(this, 'invested_capital_in'), investorCapInProfitRaw: createSeriesPattern18(this, 'investor_cap_in_profit_raw'), investorCapInLossRaw: createSeriesPattern18(this, 'investor_cap_in_loss_raw'), sentiment: { - painIndex: createCentsUsdPattern2(this, 'pain_index'), - greedIndex: createCentsUsdPattern2(this, 'greed_index'), + painIndex: createCentsUsdPattern3(this, 'pain_index'), + greedIndex: createCentsUsdPattern3(this, 'greed_index'), net: createCentsUsdPattern(this, 'net_sentiment'), }, }, @@ -8713,17 +8774,17 @@ class BrkClient extends BrkClientBase { supply: createDeltaHalfInToTotalPattern2(this, 'sth_supply'), outputs: createUnspentPattern(this, 'sth_utxo_count'), activity: { - transferVolume: createAverageBaseCumulativeInSumPattern(this, 'sth_transfer_volume'), - coindaysDestroyed: createAverageBaseCumulativeSumPattern(this, 'sth_coindays_destroyed'), + transferVolume: createAverageBlockCumulativeInSumPattern(this, 'sth_transfer_volume'), + coindaysDestroyed: createAverageBlockCumulativeSumPattern(this, 'sth_coindays_destroyed'), coinyearsDestroyed: createSeriesPattern1(this, 'sth_coinyears_destroyed'), dormancy: create_1m1w1y24hPattern(this, 'sth_dormancy'), }, realized: { cap: createCentsDeltaToUsdPattern(this, 'sth_realized_cap'), - profit: createBaseCumulativeSumToPattern(this, 'sth_realized_profit'), + profit: createBlockCumulativeSumToPattern(this, 'sth_realized_profit'), loss: { - base: createCentsUsdPattern2(this, 'sth_realized_loss'), - cumulative: createCentsUsdPattern2(this, 'sth_realized_loss_cumulative'), + block: createCentsUsdPattern2(this, 'sth_realized_loss'), + cumulative: createCentsUsdPattern3(this, 'sth_realized_loss_cumulative'), sum: create_1m1w1y24hPattern6(this, 'sth_realized_loss_sum'), negative: createBaseSumPattern(this, 'sth_neg_realized_loss'), toRcap: createBpsPercentRatioPattern4(this, 'sth_realized_loss_to_rcap'), @@ -8808,19 +8869,19 @@ class BrkClient extends BrkClientBase { }, }, mvrv: createSeriesPattern1(this, 'sth_mvrv'), - netPnl: createBaseChangeCumulativeDeltaSumToPattern(this, 'sth_net'), + netPnl: createBlockChangeCumulativeDeltaSumToPattern(this, 'sth_net'), sopr: { - valueDestroyed: createAverageBaseCumulativeSumPattern(this, 'sth_value_destroyed'), + valueDestroyed: createAverageBlockCumulativeSumPattern(this, 'sth_value_destroyed'), ratio: create_1m1w1y24hPattern(this, 'sth_sopr'), adjusted: { ratio: create_1m1w1y24hPattern(this, 'sth_asopr'), - transferVolume: createAverageBaseCumulativeSumPattern(this, 'sth_adj_value_created'), - valueDestroyed: createAverageBaseCumulativeSumPattern(this, 'sth_adj_value_destroyed'), + transferVolume: createAverageBlockCumulativeSumPattern(this, 'sth_adj_value_created'), + valueDestroyed: createAverageBlockCumulativeSumPattern(this, 'sth_adj_value_destroyed'), }, }, - grossPnl: createBaseCumulativeSumPattern(this, 'sth_realized_gross_pnl'), + grossPnl: createBlockCumulativeSumPattern(this, 'sth_realized_gross_pnl'), sellSideRiskRatio: create_1m1w1y24hPattern7(this, 'sth_sell_side_risk_ratio'), - peakRegret: createBaseCumulativeSumToPattern(this, 'sth_realized_peak_regret'), + peakRegret: createBlockCumulativeSumToPattern(this, 'sth_realized_peak_regret'), investor: createPricePattern(this, 'sth_investor_price'), profitToLossRatio: create_1m1w1y24hPattern(this, 'sth_realized_profit_to_loss_ratio'), }, @@ -8838,13 +8899,13 @@ class BrkClient extends BrkClientBase { profit: createCentsToUsdPattern4(this, 'sth_unrealized_profit'), loss: createCentsNegativeToUsdPattern2(this, 'sth'), netPnl: createCentsToUsdPattern3(this, 'sth_net_unrealized_pnl'), - grossPnl: createCentsUsdPattern2(this, 'sth_unrealized_gross_pnl'), + grossPnl: createCentsUsdPattern3(this, 'sth_unrealized_gross_pnl'), investedCapital: createInPattern(this, 'sth_invested_capital_in'), investorCapInProfitRaw: createSeriesPattern18(this, 'sth_investor_cap_in_profit_raw'), investorCapInLossRaw: createSeriesPattern18(this, 'sth_investor_cap_in_loss_raw'), sentiment: { - painIndex: createCentsUsdPattern2(this, 'sth_pain_index'), - greedIndex: createCentsUsdPattern2(this, 'sth_greed_index'), + painIndex: createCentsUsdPattern3(this, 'sth_pain_index'), + greedIndex: createCentsUsdPattern3(this, 'sth_greed_index'), net: createCentsUsdPattern(this, 'sth_net_sentiment'), }, }, @@ -8853,17 +8914,17 @@ class BrkClient extends BrkClientBase { supply: createDeltaHalfInToTotalPattern2(this, 'lth_supply'), outputs: createUnspentPattern(this, 'lth_utxo_count'), activity: { - transferVolume: createAverageBaseCumulativeInSumPattern(this, 'lth_transfer_volume'), - coindaysDestroyed: createAverageBaseCumulativeSumPattern(this, 'lth_coindays_destroyed'), + transferVolume: createAverageBlockCumulativeInSumPattern(this, 'lth_transfer_volume'), + coindaysDestroyed: createAverageBlockCumulativeSumPattern(this, 'lth_coindays_destroyed'), coinyearsDestroyed: createSeriesPattern1(this, 'lth_coinyears_destroyed'), dormancy: create_1m1w1y24hPattern(this, 'lth_dormancy'), }, realized: { cap: createCentsDeltaToUsdPattern(this, 'lth_realized_cap'), - profit: createBaseCumulativeSumToPattern(this, 'lth_realized_profit'), + profit: createBlockCumulativeSumToPattern(this, 'lth_realized_profit'), loss: { - base: createCentsUsdPattern2(this, 'lth_realized_loss'), - cumulative: createCentsUsdPattern2(this, 'lth_realized_loss_cumulative'), + block: createCentsUsdPattern2(this, 'lth_realized_loss'), + cumulative: createCentsUsdPattern3(this, 'lth_realized_loss_cumulative'), sum: create_1m1w1y24hPattern6(this, 'lth_realized_loss_sum'), negative: createBaseSumPattern(this, 'lth_neg_realized_loss'), toRcap: createBpsPercentRatioPattern4(this, 'lth_realized_loss_to_rcap'), @@ -8948,14 +9009,14 @@ class BrkClient extends BrkClientBase { }, }, mvrv: createSeriesPattern1(this, 'lth_mvrv'), - netPnl: createBaseChangeCumulativeDeltaSumToPattern(this, 'lth_net'), + netPnl: createBlockChangeCumulativeDeltaSumToPattern(this, 'lth_net'), sopr: { - valueDestroyed: createAverageBaseCumulativeSumPattern(this, 'lth_value_destroyed'), + valueDestroyed: createAverageBlockCumulativeSumPattern(this, 'lth_value_destroyed'), ratio: create_1m1w1y24hPattern(this, 'lth_sopr'), }, - grossPnl: createBaseCumulativeSumPattern(this, 'lth_realized_gross_pnl'), + grossPnl: createBlockCumulativeSumPattern(this, 'lth_realized_gross_pnl'), sellSideRiskRatio: create_1m1w1y24hPattern7(this, 'lth_sell_side_risk_ratio'), - peakRegret: createBaseCumulativeSumToPattern(this, 'lth_realized_peak_regret'), + peakRegret: createBlockCumulativeSumToPattern(this, 'lth_realized_peak_regret'), investor: createPricePattern(this, 'lth_investor_price'), profitToLossRatio: create_1m1w1y24hPattern(this, 'lth_realized_profit_to_loss_ratio'), }, @@ -8973,13 +9034,13 @@ class BrkClient extends BrkClientBase { profit: createCentsToUsdPattern4(this, 'lth_unrealized_profit'), loss: createCentsNegativeToUsdPattern2(this, 'lth'), netPnl: createCentsToUsdPattern3(this, 'lth_net_unrealized_pnl'), - grossPnl: createCentsUsdPattern2(this, 'lth_unrealized_gross_pnl'), + grossPnl: createCentsUsdPattern3(this, 'lth_unrealized_gross_pnl'), investedCapital: createInPattern(this, 'lth_invested_capital_in'), investorCapInProfitRaw: createSeriesPattern18(this, 'lth_investor_cap_in_profit_raw'), investorCapInLossRaw: createSeriesPattern18(this, 'lth_investor_cap_in_loss_raw'), sentiment: { - painIndex: createCentsUsdPattern2(this, 'lth_pain_index'), - greedIndex: createCentsUsdPattern2(this, 'lth_greed_index'), + painIndex: createCentsUsdPattern3(this, 'lth_pain_index'), + greedIndex: createCentsUsdPattern3(this, 'lth_greed_index'), net: createCentsUsdPattern(this, 'lth_net_sentiment'), }, }, @@ -9191,27 +9252,27 @@ class BrkClient extends BrkClientBase { }, }, matured: { - under1h: createAverageBaseCumulativeSumPattern3(this, 'utxos_under_1h_old_matured_supply'), - _1hTo1d: createAverageBaseCumulativeSumPattern3(this, 'utxos_1h_to_1d_old_matured_supply'), - _1dTo1w: createAverageBaseCumulativeSumPattern3(this, 'utxos_1d_to_1w_old_matured_supply'), - _1wTo1m: createAverageBaseCumulativeSumPattern3(this, 'utxos_1w_to_1m_old_matured_supply'), - _1mTo2m: createAverageBaseCumulativeSumPattern3(this, 'utxos_1m_to_2m_old_matured_supply'), - _2mTo3m: createAverageBaseCumulativeSumPattern3(this, 'utxos_2m_to_3m_old_matured_supply'), - _3mTo4m: createAverageBaseCumulativeSumPattern3(this, 'utxos_3m_to_4m_old_matured_supply'), - _4mTo5m: createAverageBaseCumulativeSumPattern3(this, 'utxos_4m_to_5m_old_matured_supply'), - _5mTo6m: createAverageBaseCumulativeSumPattern3(this, 'utxos_5m_to_6m_old_matured_supply'), - _6mTo1y: createAverageBaseCumulativeSumPattern3(this, 'utxos_6m_to_1y_old_matured_supply'), - _1yTo2y: createAverageBaseCumulativeSumPattern3(this, 'utxos_1y_to_2y_old_matured_supply'), - _2yTo3y: createAverageBaseCumulativeSumPattern3(this, 'utxos_2y_to_3y_old_matured_supply'), - _3yTo4y: createAverageBaseCumulativeSumPattern3(this, 'utxos_3y_to_4y_old_matured_supply'), - _4yTo5y: createAverageBaseCumulativeSumPattern3(this, 'utxos_4y_to_5y_old_matured_supply'), - _5yTo6y: createAverageBaseCumulativeSumPattern3(this, 'utxos_5y_to_6y_old_matured_supply'), - _6yTo7y: createAverageBaseCumulativeSumPattern3(this, 'utxos_6y_to_7y_old_matured_supply'), - _7yTo8y: createAverageBaseCumulativeSumPattern3(this, 'utxos_7y_to_8y_old_matured_supply'), - _8yTo10y: createAverageBaseCumulativeSumPattern3(this, 'utxos_8y_to_10y_old_matured_supply'), - _10yTo12y: createAverageBaseCumulativeSumPattern3(this, 'utxos_10y_to_12y_old_matured_supply'), - _12yTo15y: createAverageBaseCumulativeSumPattern3(this, 'utxos_12y_to_15y_old_matured_supply'), - over15y: createAverageBaseCumulativeSumPattern3(this, 'utxos_over_15y_old_matured_supply'), + under1h: createAverageBlockCumulativeSumPattern3(this, 'utxos_under_1h_old_matured_supply'), + _1hTo1d: createAverageBlockCumulativeSumPattern3(this, 'utxos_1h_to_1d_old_matured_supply'), + _1dTo1w: createAverageBlockCumulativeSumPattern3(this, 'utxos_1d_to_1w_old_matured_supply'), + _1wTo1m: createAverageBlockCumulativeSumPattern3(this, 'utxos_1w_to_1m_old_matured_supply'), + _1mTo2m: createAverageBlockCumulativeSumPattern3(this, 'utxos_1m_to_2m_old_matured_supply'), + _2mTo3m: createAverageBlockCumulativeSumPattern3(this, 'utxos_2m_to_3m_old_matured_supply'), + _3mTo4m: createAverageBlockCumulativeSumPattern3(this, 'utxos_3m_to_4m_old_matured_supply'), + _4mTo5m: createAverageBlockCumulativeSumPattern3(this, 'utxos_4m_to_5m_old_matured_supply'), + _5mTo6m: createAverageBlockCumulativeSumPattern3(this, 'utxos_5m_to_6m_old_matured_supply'), + _6mTo1y: createAverageBlockCumulativeSumPattern3(this, 'utxos_6m_to_1y_old_matured_supply'), + _1yTo2y: createAverageBlockCumulativeSumPattern3(this, 'utxos_1y_to_2y_old_matured_supply'), + _2yTo3y: createAverageBlockCumulativeSumPattern3(this, 'utxos_2y_to_3y_old_matured_supply'), + _3yTo4y: createAverageBlockCumulativeSumPattern3(this, 'utxos_3y_to_4y_old_matured_supply'), + _4yTo5y: createAverageBlockCumulativeSumPattern3(this, 'utxos_4y_to_5y_old_matured_supply'), + _5yTo6y: createAverageBlockCumulativeSumPattern3(this, 'utxos_5y_to_6y_old_matured_supply'), + _6yTo7y: createAverageBlockCumulativeSumPattern3(this, 'utxos_6y_to_7y_old_matured_supply'), + _7yTo8y: createAverageBlockCumulativeSumPattern3(this, 'utxos_7y_to_8y_old_matured_supply'), + _8yTo10y: createAverageBlockCumulativeSumPattern3(this, 'utxos_8y_to_10y_old_matured_supply'), + _10yTo12y: createAverageBlockCumulativeSumPattern3(this, 'utxos_10y_to_12y_old_matured_supply'), + _12yTo15y: createAverageBlockCumulativeSumPattern3(this, 'utxos_12y_to_15y_old_matured_supply'), + over15y: createAverageBlockCumulativeSumPattern3(this, 'utxos_over_15y_old_matured_supply'), }, }, addr: { diff --git a/packages/brk_client/brk_client/__init__.py b/packages/brk_client/brk_client/__init__.py index 94773dbfc..709e61b86 100644 --- a/packages/brk_client/brk_client/__init__.py +++ b/packages/brk_client/brk_client/__init__.py @@ -2208,30 +2208,30 @@ class _10y1m1w1y2y3m3y4y5y6m6y8yPattern3: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self._10y: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '10y')) - self._1m: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '1m')) - self._1w: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '1w')) - self._1y: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '1y')) - self._2y: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '2y')) - self._3m: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '3m')) - self._3y: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '3y')) - self._4y: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '4y')) - self._5y: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '5y')) - self._6m: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '6m')) - self._6y: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '6y')) - self._8y: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '8y')) + self._10y: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '10y')) + self._1m: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '1m')) + self._1w: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '1w')) + self._1y: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '1y')) + self._2y: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '2y')) + self._3m: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '3m')) + self._3y: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '3y')) + self._4y: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '4y')) + self._5y: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '5y')) + self._6m: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '6m')) + self._6y: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '6y')) + self._8y: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '8y')) class CapGrossInvestorLossMvrvNetPeakPriceProfitSellSoprPattern: """Pattern struct for repeated tree structure.""" pass -class AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2: +class AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.average: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, _m(acc, 'average')) - self.base: SeriesPattern1[StoredU64] = SeriesPattern1(client, acc) + self.block: SeriesPattern18[StoredU64] = SeriesPattern18(client, acc) self.cumulative: SeriesPattern1[StoredU64] = SeriesPattern1(client, _m(acc, 'cumulative')) self.max: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'max')) self.median: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'median')) @@ -2332,11 +2332,11 @@ class CapLossMvrvNetPriceProfitSoprPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.cap: CentsDeltaUsdPattern = CentsDeltaUsdPattern(client, _m(acc, 'realized_cap')) - self.loss: BaseCumulativeNegativeSumPattern = BaseCumulativeNegativeSumPattern(client, acc) + self.loss: BlockCumulativeNegativeSumPattern = BlockCumulativeNegativeSumPattern(client, acc) self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'mvrv')) - self.net_pnl: BaseCumulativeDeltaSumPattern = BaseCumulativeDeltaSumPattern(client, _m(acc, 'net_realized_pnl')) + self.net_pnl: BlockCumulativeDeltaSumPattern = BlockCumulativeDeltaSumPattern(client, _m(acc, 'net_realized_pnl')) self.price: BpsCentsRatioSatsUsdPattern = BpsCentsRatioSatsUsdPattern(client, _m(acc, 'realized_price')) - self.profit: BaseCumulativeSumPattern = BaseCumulativeSumPattern(client, _m(acc, 'realized_profit')) + self.profit: BlockCumulativeSumPattern = BlockCumulativeSumPattern(client, _m(acc, 'realized_profit')) self.sopr: RatioValuePattern = RatioValuePattern(client, acc) class InMaxMinPerSupplyPattern: @@ -2393,24 +2393,24 @@ class ActivityAddrOutputsRealizedSupplyUnrealizedPattern: self.supply: DeltaHalfTotalPattern = DeltaHalfTotalPattern(client, _m(acc, 'supply')) self.unrealized: NuplPattern = NuplPattern(client, _m(acc, 'nupl')) -class AverageBaseCumulativeInSumPattern: +class AverageBlockCumulativeInSumPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.average: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, _m(acc, 'average')) - self.base: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, acc) - self.cumulative: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, 'cumulative')) - self.in_loss: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, _m(acc, 'in_loss')) - self.in_profit: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, _m(acc, 'in_profit')) + self.block: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, acc) + self.cumulative: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, 'cumulative')) + self.in_loss: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, _m(acc, 'in_loss')) + self.in_profit: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, _m(acc, 'in_profit')) self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, _m(acc, 'sum')) -class BaseChangeCumulativeDeltaSumToPattern: +class BlockChangeCumulativeDeltaSumToPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.base: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'realized_pnl')) + self.block: CentsUsdPattern4 = CentsUsdPattern4(client, _m(acc, 'realized_pnl')) self.change_1m: ToPattern = ToPattern(client, _m(acc, 'pnl_change_1m_to')) self.cumulative: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'realized_pnl_cumulative')) self.delta: AbsoluteRatePattern2 = AbsoluteRatePattern2(client, _m(acc, 'realized_pnl_delta')) @@ -2459,11 +2459,11 @@ class DeltaHalfInToTotalPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.delta: AbsoluteRatePattern = AbsoluteRatePattern(client, _m(acc, 'delta')) - self.half: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, 'half')) + self.half: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, 'half')) self.in_loss: BtcCentsSatsToUsdPattern = BtcCentsSatsToUsdPattern(client, _m(acc, 'in_loss')) self.in_profit: BtcCentsSatsToUsdPattern = BtcCentsSatsToUsdPattern(client, _m(acc, 'in_profit')) self.to_circulating: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_circulating')) - self.total: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, acc) + self.total: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, acc) class DeltaHalfInToTotalPattern2: """Pattern struct for repeated tree structure.""" @@ -2471,11 +2471,11 @@ class DeltaHalfInToTotalPattern2: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.delta: AbsoluteRatePattern = AbsoluteRatePattern(client, _m(acc, 'delta')) - self.half: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, 'half')) + self.half: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, 'half')) self.in_loss: BtcCentsSatsToUsdPattern3 = BtcCentsSatsToUsdPattern3(client, _m(acc, 'in_loss')) self.in_profit: BtcCentsSatsToUsdPattern3 = BtcCentsSatsToUsdPattern3(client, _m(acc, 'in_profit')) self.to_circulating: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'to_circulating')) - self.total: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, acc) + self.total: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, acc) class Pct1Pct2Pct5Pct95Pct98Pct99Pattern: """Pattern struct for repeated tree structure.""" @@ -2489,7 +2489,7 @@ class Pct1Pct2Pct5Pct95Pct98Pct99Pattern: self.pct98: BpsPriceRatioPattern = BpsPriceRatioPattern(client, acc, 'pct98') self.pct99: BpsPriceRatioPattern = BpsPriceRatioPattern(client, acc, 'pct99') -class _1m1w1y24hBasePattern: +class _1m1w1y24hBlockPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -2498,7 +2498,7 @@ class _1m1w1y24hBasePattern: self._1w: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'average_1w')) self._1y: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'average_1y')) self._24h: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'average_24h')) - self.base: SeriesPattern18[StoredU32] = SeriesPattern18(client, acc) + self.block: SeriesPattern18[StoredU32] = SeriesPattern18(client, acc) class ActivityOutputsRealizedSupplyUnrealizedPattern: """Pattern struct for repeated tree structure.""" @@ -2533,7 +2533,7 @@ class ActivityOutputsRealizedSupplyUnrealizedPattern2: self.supply: DeltaHalfTotalPattern = DeltaHalfTotalPattern(client, _m(acc, 'supply')) self.unrealized: NuplPattern = NuplPattern(client, _m(acc, 'nupl')) -class BaseCumulativeNegativeSumToPattern: +class BlockCumulativeNegativeSumToPattern: """Pattern struct for repeated tree structure.""" pass @@ -2587,10 +2587,10 @@ class CapLossMvrvPriceProfitPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.cap: CentsDeltaUsdPattern = CentsDeltaUsdPattern(client, _m(acc, 'realized_cap')) - self.loss: BaseCumulativeSumPattern = BaseCumulativeSumPattern(client, _m(acc, 'realized_loss')) + self.loss: BlockCumulativeSumPattern = BlockCumulativeSumPattern(client, _m(acc, 'realized_loss')) self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'mvrv')) self.price: BpsCentsRatioSatsUsdPattern = BpsCentsRatioSatsUsdPattern(client, _m(acc, 'realized_price')) - self.profit: BaseCumulativeSumPattern = BaseCumulativeSumPattern(client, _m(acc, 'realized_profit')) + self.profit: BlockCumulativeSumPattern = BlockCumulativeSumPattern(client, _m(acc, 'realized_profit')) class CentsToUsdPattern4: """Pattern struct for repeated tree structure.""" @@ -2609,10 +2609,10 @@ class DeltaHalfInTotalPattern2: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.delta: AbsoluteRatePattern = AbsoluteRatePattern(client, _m(acc, 'delta')) - self.half: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, 'half')) - self.in_loss: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, 'in_loss')) - self.in_profit: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, 'in_profit')) - self.total: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, acc) + self.half: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, 'half')) + self.in_loss: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, 'in_loss')) + self.in_profit: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, 'in_profit')) + self.total: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, acc) class EmaHistogramLineSignalPattern: """Pattern struct for repeated tree structure.""" @@ -2664,10 +2664,10 @@ class _1m1w1y24hPattern4: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self._1m: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '1m')) - self._1w: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '1w')) - self._1y: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '1y')) - self._24h: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, '24h')) + self._1m: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '1m')) + self._1w: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '1w')) + self._1y: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '1y')) + self._24h: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, '24h')) class _1m1w1y2wPattern: """Pattern struct for repeated tree structure.""" @@ -2694,76 +2694,76 @@ class _1m1w1y24hPattern6: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self._1m: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, '1m')) - self._1w: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, '1w')) - self._1y: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, '1y')) - self._24h: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, '24h')) + self._1m: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, '1m')) + self._1w: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, '1w')) + self._1y: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, '1y')) + self._24h: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, '24h')) class _1y2y4yAllPattern: """Pattern struct for repeated tree structure.""" pass -class AverageBaseCumulativeSumPattern2: +class AverageBlockCumulativeSumPattern2: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.average: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, _m(acc, 'average')) - self.base: SeriesPattern1[StoredU32] = SeriesPattern1(client, acc) + self.block: SeriesPattern18[StoredU32] = SeriesPattern18(client, acc) self.cumulative: SeriesPattern1[StoredU64] = SeriesPattern1(client, _m(acc, 'cumulative')) self.sum: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, _m(acc, 'sum')) -class AverageBaseCumulativeSumPattern3: +class AverageBlockCumulativeSumPattern3: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.average: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, _m(acc, 'average')) - self.base: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, acc) - self.cumulative: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, 'cumulative')) + self.block: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, acc) + self.cumulative: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, 'cumulative')) self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, _m(acc, 'sum')) -class BaseCumulativeDeltaSumPattern: +class BlockCumulativeNegativeSumPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.base: CentsUsdPattern = CentsUsdPattern(client, acc) - self.cumulative: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'cumulative')) - self.delta: AbsoluteRatePattern2 = AbsoluteRatePattern2(client, _m(acc, 'delta')) - self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, _m(acc, 'sum')) - -class BaseCumulativeNegativeSumPattern: - """Pattern struct for repeated tree structure.""" - - def __init__(self, client: BrkClientBase, acc: str): - """Create pattern node with accumulated series name.""" - self.base: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'realized_loss')) - self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'realized_loss_cumulative')) + self.block: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'realized_loss')) + self.cumulative: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, 'realized_loss_cumulative')) self.negative: BaseSumPattern = BaseSumPattern(client, _m(acc, 'neg_realized_loss')) self.sum: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, _m(acc, 'realized_loss_sum')) -class BaseCumulativeSumToPattern: +class BlockCumulativeSumToPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.base: CentsUsdPattern2 = CentsUsdPattern2(client, acc) - self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'cumulative')) + self.block: CentsUsdPattern2 = CentsUsdPattern2(client, acc) + self.cumulative: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, 'cumulative')) self.sum: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, _m(acc, 'sum')) self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, _m(acc, 'to_rcap')) +class BlockCumulativeDeltaSumPattern: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated series name.""" + self.block: CentsUsdPattern4 = CentsUsdPattern4(client, acc) + self.cumulative: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'cumulative')) + self.delta: AbsoluteRatePattern2 = AbsoluteRatePattern2(client, _m(acc, 'delta')) + self.sum: _1m1w1y24hPattern5 = _1m1w1y24hPattern5(client, _m(acc, 'sum')) + class BothReactivatedReceivingSendingPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.both: _1m1w1y24hBasePattern = _1m1w1y24hBasePattern(client, _m(acc, 'both')) - self.reactivated: _1m1w1y24hBasePattern = _1m1w1y24hBasePattern(client, _m(acc, 'reactivated')) - self.receiving: _1m1w1y24hBasePattern = _1m1w1y24hBasePattern(client, _m(acc, 'receiving')) - self.sending: _1m1w1y24hBasePattern = _1m1w1y24hBasePattern(client, _m(acc, 'sending')) + self.both: _1m1w1y24hBlockPattern = _1m1w1y24hBlockPattern(client, _m(acc, 'both')) + self.reactivated: _1m1w1y24hBlockPattern = _1m1w1y24hBlockPattern(client, _m(acc, 'reactivated')) + self.receiving: _1m1w1y24hBlockPattern = _1m1w1y24hBlockPattern(client, _m(acc, 'receiving')) + self.sending: _1m1w1y24hBlockPattern = _1m1w1y24hBlockPattern(client, _m(acc, 'sending')) -class BtcCentsSatsUsdPattern2: +class BtcCentsSatsUsdPattern3: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -2783,6 +2783,16 @@ class BtcCentsSatsUsdPattern: self.sats: SeriesPattern1[StoredF32] = SeriesPattern1(client, _m(acc, 'sats')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, _m(acc, 'usd')) +class BtcCentsSatsUsdPattern2: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated series name.""" + self.btc: SeriesPattern18[Bitcoin] = SeriesPattern18(client, acc) + self.cents: SeriesPattern18[Cents] = SeriesPattern18(client, _m(acc, 'cents')) + self.sats: SeriesPattern18[Sats] = SeriesPattern18(client, _m(acc, 'sats')) + self.usd: SeriesPattern18[Dollars] = SeriesPattern18(client, _m(acc, 'usd')) + class CentsDeltaToUsdPattern: """Pattern struct for repeated tree structure.""" @@ -2815,7 +2825,7 @@ class LossNetNuplProfitPattern: self.loss: CentsNegativeUsdPattern = CentsNegativeUsdPattern(client, acc) self.net_pnl: CentsUsdPattern = CentsUsdPattern(client, _m(acc, 'net_unrealized_pnl')) self.nupl: BpsRatioPattern = BpsRatioPattern(client, _m(acc, 'nupl')) - self.profit: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'unrealized_profit')) + self.profit: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, 'unrealized_profit')) class _1m1w1y24hPattern(Generic[T]): """Pattern struct for repeated tree structure.""" @@ -2827,13 +2837,13 @@ class _1m1w1y24hPattern(Generic[T]): self._1y: SeriesPattern1[T] = SeriesPattern1(client, _m(acc, '1y')) self._24h: SeriesPattern1[T] = SeriesPattern1(client, _m(acc, '24h')) -class AverageBaseCumulativeSumPattern(Generic[T]): +class AverageBlockCumulativeSumPattern(Generic[T]): """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.average: _1m1w1y24hPattern[T] = _1m1w1y24hPattern(client, _m(acc, 'average')) - self.base: SeriesPattern1[T] = SeriesPattern1(client, acc) + self.block: SeriesPattern18[T] = SeriesPattern18(client, acc) self.cumulative: SeriesPattern1[T] = SeriesPattern1(client, _m(acc, 'cumulative')) self.sum: _1m1w1y24hPattern[T] = _1m1w1y24hPattern(client, _m(acc, 'sum')) @@ -2841,13 +2851,13 @@ class AdjustedRatioValuePattern: """Pattern struct for repeated tree structure.""" pass -class BaseCumulativeSumPattern: +class BlockCumulativeSumPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.base: CentsUsdPattern2 = CentsUsdPattern2(client, acc) - self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'cumulative')) + self.block: CentsUsdPattern2 = CentsUsdPattern2(client, acc) + self.cumulative: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, 'cumulative')) self.sum: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, _m(acc, 'sum')) class BlocksDominanceRewardsPattern: @@ -2855,9 +2865,9 @@ class BlocksDominanceRewardsPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.blocks_mined: AverageBaseCumulativeSumPattern2 = AverageBaseCumulativeSumPattern2(client, _m(acc, 'blocks_mined')) + self.blocks_mined: AverageBlockCumulativeSumPattern2 = AverageBlockCumulativeSumPattern2(client, _m(acc, 'blocks_mined')) self.dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, _m(acc, 'dominance')) - self.rewards: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, _m(acc, 'rewards')) + self.rewards: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, _m(acc, 'rewards')) class BpsPercentRatioPattern3: """Pattern struct for repeated tree structure.""" @@ -2955,8 +2965,8 @@ class DeltaHalfTotalPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.delta: AbsoluteRatePattern = AbsoluteRatePattern(client, _m(acc, 'delta')) - self.half: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, 'half')) - self.total: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, acc) + self.half: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, 'half')) + self.total: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, acc) class GreedNetPainPattern: """Pattern struct for repeated tree structure.""" @@ -2969,7 +2979,7 @@ class LossNuplProfitPattern: """Create pattern node with accumulated series name.""" self.loss: CentsNegativeUsdPattern = CentsNegativeUsdPattern(client, acc) self.nupl: BpsRatioPattern = BpsRatioPattern(client, _m(acc, 'nupl')) - self.profit: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'unrealized_profit')) + self.profit: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, 'unrealized_profit')) class NuplRealizedSupplyPattern: """Pattern struct for repeated tree structure.""" @@ -3015,7 +3025,7 @@ class AllSthPattern2: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.all: BtcCentsDeltaSatsUsdPattern = BtcCentsDeltaSatsUsdPattern(client, _m(acc, 'supply')) - self.sth: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, _m(acc, 'sth_supply')) + self.sth: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, _m(acc, 'sth_supply')) class AllSthPattern: """Pattern struct for repeated tree structure.""" @@ -3046,7 +3056,7 @@ class BlocksDominancePattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.blocks_mined: AverageBaseCumulativeSumPattern2 = AverageBaseCumulativeSumPattern2(client, _m(acc, 'blocks_mined')) + self.blocks_mined: AverageBlockCumulativeSumPattern2 = AverageBlockCumulativeSumPattern2(client, _m(acc, 'blocks_mined')) self.dominance: BpsPercentRatioPattern3 = BpsPercentRatioPattern3(client, _m(acc, 'dominance')) class BpsRatioPattern2: @@ -3065,7 +3075,7 @@ class BpsRatioPattern: self.bps: SeriesPattern1[BasisPointsSigned32] = SeriesPattern1(client, _m(acc, 'bps')) self.ratio: SeriesPattern1[StoredF32] = SeriesPattern1(client, acc) -class CentsUsdPattern2: +class CentsUsdPattern3: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): @@ -3073,6 +3083,14 @@ class CentsUsdPattern2: self.cents: SeriesPattern1[Cents] = SeriesPattern1(client, _m(acc, 'cents')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, acc) +class CentsUsdPattern2: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated series name.""" + self.cents: SeriesPattern18[Cents] = SeriesPattern18(client, _m(acc, 'cents')) + self.usd: SeriesPattern18[Dollars] = SeriesPattern18(client, acc) + class CentsUsdPattern: """Pattern struct for repeated tree structure.""" @@ -3081,21 +3099,29 @@ class CentsUsdPattern: self.cents: SeriesPattern1[CentsSigned] = SeriesPattern1(client, _m(acc, 'cents')) self.usd: SeriesPattern1[Dollars] = SeriesPattern1(client, acc) +class CentsUsdPattern4: + """Pattern struct for repeated tree structure.""" + + def __init__(self, client: BrkClientBase, acc: str): + """Create pattern node with accumulated series name.""" + self.cents: SeriesPattern18[CentsSigned] = SeriesPattern18(client, _m(acc, 'cents')) + self.usd: SeriesPattern18[Dollars] = SeriesPattern18(client, acc) + class CoindaysTransferPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.coindays_destroyed: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, _m(acc, 'coindays_destroyed')) - self.transfer_volume: AverageBaseCumulativeInSumPattern = AverageBaseCumulativeInSumPattern(client, _m(acc, 'transfer_volume')) + self.coindays_destroyed: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, _m(acc, 'coindays_destroyed')) + self.transfer_volume: AverageBlockCumulativeInSumPattern = AverageBlockCumulativeInSumPattern(client, _m(acc, 'transfer_volume')) class InPattern: """Pattern struct for repeated tree structure.""" def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.in_loss: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'loss')) - self.in_profit: CentsUsdPattern2 = CentsUsdPattern2(client, _m(acc, 'profit')) + self.in_loss: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, 'loss')) + self.in_profit: CentsUsdPattern3 = CentsUsdPattern3(client, _m(acc, 'profit')) class PerPattern: """Pattern struct for repeated tree structure.""" @@ -3119,7 +3145,7 @@ class RatioValuePattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" self.ratio: _24hPattern = _24hPattern(client, _m(acc, 'sopr_24h')) - self.value_destroyed: AverageBaseCumulativeSumPattern[Cents] = AverageBaseCumulativeSumPattern(client, _m(acc, 'value_destroyed')) + self.value_destroyed: AverageBlockCumulativeSumPattern[Cents] = AverageBlockCumulativeSumPattern(client, _m(acc, 'value_destroyed')) class SdSmaPattern: """Pattern struct for repeated tree structure.""" @@ -3159,7 +3185,7 @@ class TransferPattern: def __init__(self, client: BrkClientBase, acc: str): """Create pattern node with accumulated series name.""" - self.transfer_volume: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, acc) + self.transfer_volume: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, acc) class UnspentPattern: """Pattern struct for repeated tree structure.""" @@ -3226,7 +3252,7 @@ class SeriesTree_Blocks_Count: def __init__(self, client: BrkClientBase, base_path: str = ''): self.target: _1m1w1y24hPattern[StoredU64] = _1m1w1y24hPattern(client, 'block_count_target') - self.total: AverageBaseCumulativeSumPattern2 = AverageBaseCumulativeSumPattern2(client, 'block_count') + self.total: AverageBlockCumulativeSumPattern2 = AverageBlockCumulativeSumPattern2(client, 'block_count') class SeriesTree_Blocks_Lookback: """Series tree node.""" @@ -3280,7 +3306,7 @@ class SeriesTree_Blocks_Interval: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.base: SeriesPattern18[Timestamp] = SeriesPattern18(client, 'block_interval') + self.block: SeriesPattern18[Timestamp] = SeriesPattern18(client, 'block_interval') self._24h: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'block_interval_average_24h') self._1w: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'block_interval_average_1w') self._1m: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'block_interval_average_1m') @@ -3314,7 +3340,7 @@ class SeriesTree_Blocks: self.count: SeriesTree_Blocks_Count = SeriesTree_Blocks_Count(client) self.lookback: SeriesTree_Blocks_Lookback = SeriesTree_Blocks_Lookback(client) self.interval: SeriesTree_Blocks_Interval = SeriesTree_Blocks_Interval(client) - self.vbytes: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 = AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(client, 'block_vbytes') + self.vbytes: AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern = AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, 'block_vbytes') self.fullness: SeriesTree_Blocks_Fullness = SeriesTree_Blocks_Fullness(client) self.halving: SeriesTree_Blocks_Halving = SeriesTree_Blocks_Halving(client) @@ -3337,7 +3363,7 @@ class SeriesTree_Transactions_Count: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.total: AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2 = AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern2(client, 'tx_count') + self.total: AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern = AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, 'tx_count') self.is_coinbase: SeriesPattern19[StoredBool] = SeriesPattern19(client, 'is_coinbase') class SeriesTree_Transactions_Size_Weight: @@ -3368,15 +3394,15 @@ class SeriesTree_Transactions_Versions: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.v1: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'tx_v1') - self.v2: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'tx_v2') - self.v3: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'tx_v3') + self.v1: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'tx_v1') + self.v2: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'tx_v2') + self.v3: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'tx_v3') class SeriesTree_Transactions_Volume: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.transfer_volume: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'transfer_volume_bis') + self.transfer_volume: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'transfer_volume_bis') self.tx_per_sec: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'tx_per_sec') self.outputs_per_sec: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'outputs_per_sec') self.inputs_per_sec: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'inputs_per_sec') @@ -3557,15 +3583,15 @@ class SeriesTree_Addrs_New: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.all: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'new_addr_count') - self.p2pk65: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2pk65_new_addr_count') - self.p2pk33: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2pk33_new_addr_count') - self.p2pkh: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2pkh_new_addr_count') - self.p2sh: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2sh_new_addr_count') - self.p2wpkh: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2wpkh_new_addr_count') - self.p2wsh: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2wsh_new_addr_count') - self.p2tr: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2tr_new_addr_count') - self.p2a: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2a_new_addr_count') + self.all: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'new_addr_count') + self.p2pk65: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2pk65_new_addr_count') + self.p2pk33: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2pk33_new_addr_count') + self.p2pkh: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2pkh_new_addr_count') + self.p2sh: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2sh_new_addr_count') + self.p2wpkh: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2wpkh_new_addr_count') + self.p2wsh: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2wsh_new_addr_count') + self.p2tr: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2tr_new_addr_count') + self.p2a: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2a_new_addr_count') class SeriesTree_Addrs_Delta: """Series tree node.""" @@ -3636,24 +3662,24 @@ class SeriesTree_Scripts_Count: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.p2a: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2a_count') - self.p2ms: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2ms_count') - self.p2pk33: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2pk33_count') - self.p2pk65: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2pk65_count') - self.p2pkh: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2pkh_count') - self.p2sh: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2sh_count') - self.p2tr: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2tr_count') - self.p2wpkh: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2wpkh_count') - self.p2wsh: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'p2wsh_count') - self.op_return: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'op_return_count') - self.empty_output: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'empty_output_count') - self.unknown_output: AverageBaseCumulativeSumPattern[StoredU64] = AverageBaseCumulativeSumPattern(client, 'unknown_output_count') + self.p2a: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2a_count') + self.p2ms: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2ms_count') + self.p2pk33: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2pk33_count') + self.p2pk65: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2pk65_count') + self.p2pkh: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2pkh_count') + self.p2sh: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2sh_count') + self.p2tr: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2tr_count') + self.p2wpkh: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2wpkh_count') + self.p2wsh: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'p2wsh_count') + self.op_return: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'op_return_count') + self.empty_output: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'empty_output_count') + self.unknown_output: AverageBlockCumulativeSumPattern[StoredU64] = AverageBlockCumulativeSumPattern(client, 'unknown_output_count') class SeriesTree_Scripts_Value: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.op_return: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'op_return_value') + self.op_return: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'op_return_value') class SeriesTree_Scripts: """Series tree node.""" @@ -3667,12 +3693,12 @@ class SeriesTree_Mining_Rewards_Subsidy: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.base: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'subsidy') - self.cumulative: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'subsidy_cumulative') + self.block: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'subsidy') + self.cumulative: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'subsidy_cumulative') self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'subsidy_sum') self.average: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'subsidy_average') self.dominance: _1m1w1y24hBpsPercentRatioPattern = _1m1w1y24hBpsPercentRatioPattern(client, 'subsidy_dominance') - self.sma_1y: CentsUsdPattern2 = CentsUsdPattern2(client, 'subsidy_sma_1y') + self.sma_1y: CentsUsdPattern3 = CentsUsdPattern3(client, 'subsidy_sma_1y') class SeriesTree_Mining_Rewards_Fees_ToSubsidyRatio: """Series tree node.""" @@ -3687,8 +3713,8 @@ class SeriesTree_Mining_Rewards_Fees: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.base: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'fees') - self.cumulative: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'fees_cumulative') + self.block: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'fees') + self.cumulative: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'fees_cumulative') self.sum: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'fees_sum') self.average: _1m1w1y24hPattern3 = _1m1w1y24hPattern3(client, 'fees_average') self.min: _1m1w1y24hPattern4 = _1m1w1y24hPattern4(client, 'fees_min') @@ -3705,14 +3731,14 @@ class SeriesTree_Mining_Rewards_Unclaimed: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.base: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'unclaimed_rewards') - self.cumulative: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'unclaimed_rewards_cumulative') + self.block: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'unclaimed_rewards') + self.cumulative: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'unclaimed_rewards_cumulative') class SeriesTree_Mining_Rewards: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.coinbase: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'coinbase') + self.coinbase: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'coinbase') self.subsidy: SeriesTree_Mining_Rewards_Subsidy = SeriesTree_Mining_Rewards_Subsidy(client) self.fees: SeriesTree_Mining_Rewards_Fees = SeriesTree_Mining_Rewards_Fees(client) self.unclaimed: SeriesTree_Mining_Rewards_Unclaimed = SeriesTree_Mining_Rewards_Unclaimed(client) @@ -3761,38 +3787,38 @@ class SeriesTree_Cointime_Activity: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.coinblocks_created: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, 'coinblocks_created') - self.coinblocks_stored: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, 'coinblocks_stored') + self.coinblocks_created: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, 'coinblocks_created') + self.coinblocks_stored: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, 'coinblocks_stored') self.liveliness: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'liveliness') self.vaultedness: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'vaultedness') self.ratio: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'activity_to_vaultedness') - self.coinblocks_destroyed: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, 'coinblocks_destroyed') + self.coinblocks_destroyed: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, 'coinblocks_destroyed') class SeriesTree_Cointime_Supply: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.vaulted: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'vaulted_supply') - self.active: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'active_supply') + self.vaulted: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'vaulted_supply') + self.active: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'active_supply') class SeriesTree_Cointime_Value: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.destroyed: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, 'cointime_value_destroyed') - self.created: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, 'cointime_value_created') - self.stored: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, 'cointime_value_stored') - self.vocdd: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, 'vocdd') + self.destroyed: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, 'cointime_value_destroyed') + self.created: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, 'cointime_value_created') + self.stored: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, 'cointime_value_stored') + self.vocdd: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, 'vocdd') class SeriesTree_Cointime_Cap: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.thermo: CentsUsdPattern2 = CentsUsdPattern2(client, 'thermo_cap') - self.investor: CentsUsdPattern2 = CentsUsdPattern2(client, 'investor_cap') - self.vaulted: CentsUsdPattern2 = CentsUsdPattern2(client, 'vaulted_cap') - self.active: CentsUsdPattern2 = CentsUsdPattern2(client, 'active_cap') - self.cointime: CentsUsdPattern2 = CentsUsdPattern2(client, 'cointime_cap') + self.thermo: CentsUsdPattern3 = CentsUsdPattern3(client, 'thermo_cap') + self.investor: CentsUsdPattern3 = CentsUsdPattern3(client, 'investor_cap') + self.vaulted: CentsUsdPattern3 = CentsUsdPattern3(client, 'vaulted_cap') + self.active: CentsUsdPattern3 = CentsUsdPattern3(client, 'active_cap') + self.cointime: CentsUsdPattern3 = CentsUsdPattern3(client, 'cointime_cap') self.aviv: BpsRatioPattern2 = BpsRatioPattern2(client, 'aviv_ratio') class SeriesTree_Cointime_Prices: @@ -4361,18 +4387,18 @@ class SeriesTree_Market_Dca_Class_Stack: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.from_2015: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2015') - self.from_2016: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2016') - self.from_2017: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2017') - self.from_2018: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2018') - self.from_2019: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2019') - self.from_2020: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2020') - self.from_2021: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2021') - self.from_2022: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2022') - self.from_2023: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2023') - self.from_2024: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2024') - self.from_2025: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2025') - self.from_2026: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'dca_stack_from_2026') + self.from_2015: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2015') + self.from_2016: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2016') + self.from_2017: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2017') + self.from_2018: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2018') + self.from_2019: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2019') + self.from_2020: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2020') + self.from_2021: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2021') + self.from_2022: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2022') + self.from_2023: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2023') + self.from_2024: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2024') + self.from_2025: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2025') + self.from_2026: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'dca_stack_from_2026') class SeriesTree_Market_Dca_Class_CostBasis: """Series tree node.""" @@ -4718,20 +4744,20 @@ class SeriesTree_Supply: def __init__(self, client: BrkClientBase, base_path: str = ''): self.state: SeriesPattern18[SupplyState] = SeriesPattern18(client, 'supply_state') - self.circulating: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'circulating_supply') - self.burned: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'unspendable_supply') + self.circulating: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'circulating_supply') + self.burned: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'unspendable_supply') self.inflation_rate: BpsPercentRatioPattern = BpsPercentRatioPattern(client, 'inflation_rate') self.velocity: SeriesTree_Supply_Velocity = SeriesTree_Supply_Velocity(client) self.market_cap: CentsDeltaUsdPattern = CentsDeltaUsdPattern(client, 'market_cap') self.market_minus_realized_cap_growth_rate: _1m1w1y24hPattern[BasisPointsSigned32] = _1m1w1y24hPattern(client, 'market_minus_realized_cap_growth_rate') - self.hodled_or_lost: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'hodled_or_lost_supply') + self.hodled_or_lost: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'hodled_or_lost_supply') class SeriesTree_Cohorts_Utxo_All_Supply: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.total: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'supply') - self.half: BtcCentsSatsUsdPattern2 = BtcCentsSatsUsdPattern2(client, 'supply_half') + self.total: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'supply') + self.half: BtcCentsSatsUsdPattern3 = BtcCentsSatsUsdPattern3(client, 'supply_half') self.delta: AbsoluteRatePattern = AbsoluteRatePattern(client, 'supply_delta') self.in_profit: BtcCentsSatsToUsdPattern2 = BtcCentsSatsToUsdPattern2(client, 'supply_in_profit') self.in_loss: BtcCentsSatsToUsdPattern2 = BtcCentsSatsToUsdPattern2(client, 'supply_in_loss') @@ -4740,8 +4766,8 @@ class SeriesTree_Cohorts_Utxo_All_Activity: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.transfer_volume: AverageBaseCumulativeInSumPattern = AverageBaseCumulativeInSumPattern(client, 'transfer_volume') - self.coindays_destroyed: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, 'coindays_destroyed') + self.transfer_volume: AverageBlockCumulativeInSumPattern = AverageBlockCumulativeInSumPattern(client, 'transfer_volume') + self.coindays_destroyed: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, 'coindays_destroyed') self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'coinyears_destroyed') self.dormancy: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'dormancy') @@ -4749,8 +4775,8 @@ class SeriesTree_Cohorts_Utxo_All_Realized_Loss: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'realized_loss') - self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'realized_loss_cumulative') + self.block: CentsUsdPattern2 = CentsUsdPattern2(client, 'realized_loss') + self.cumulative: CentsUsdPattern3 = CentsUsdPattern3(client, 'realized_loss_cumulative') self.sum: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'realized_loss_sum') self.negative: BaseSumPattern = BaseSumPattern(client, 'neg_realized_loss') self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'realized_loss_to_rcap') @@ -4862,14 +4888,14 @@ class SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted: def __init__(self, client: BrkClientBase, base_path: str = ''): self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'asopr') - self.transfer_volume: AverageBaseCumulativeSumPattern[Cents] = AverageBaseCumulativeSumPattern(client, 'adj_value_created') - self.value_destroyed: AverageBaseCumulativeSumPattern[Cents] = AverageBaseCumulativeSumPattern(client, 'adj_value_destroyed') + self.transfer_volume: AverageBlockCumulativeSumPattern[Cents] = AverageBlockCumulativeSumPattern(client, 'adj_value_created') + self.value_destroyed: AverageBlockCumulativeSumPattern[Cents] = AverageBlockCumulativeSumPattern(client, 'adj_value_destroyed') class SeriesTree_Cohorts_Utxo_All_Realized_Sopr: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.value_destroyed: AverageBaseCumulativeSumPattern[Cents] = AverageBaseCumulativeSumPattern(client, 'value_destroyed') + self.value_destroyed: AverageBlockCumulativeSumPattern[Cents] = AverageBlockCumulativeSumPattern(client, 'value_destroyed') self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'sopr') self.adjusted: SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted = SeriesTree_Cohorts_Utxo_All_Realized_Sopr_Adjusted(client) @@ -4878,15 +4904,15 @@ class SeriesTree_Cohorts_Utxo_All_Realized: def __init__(self, client: BrkClientBase, base_path: str = ''): self.cap: CentsDeltaToUsdPattern = CentsDeltaToUsdPattern(client, 'realized_cap') - self.profit: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'realized_profit') + self.profit: BlockCumulativeSumToPattern = BlockCumulativeSumToPattern(client, 'realized_profit') self.loss: SeriesTree_Cohorts_Utxo_All_Realized_Loss = SeriesTree_Cohorts_Utxo_All_Realized_Loss(client) self.price: SeriesTree_Cohorts_Utxo_All_Realized_Price = SeriesTree_Cohorts_Utxo_All_Realized_Price(client) self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'mvrv') - self.net_pnl: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'net') + self.net_pnl: BlockChangeCumulativeDeltaSumToPattern = BlockChangeCumulativeDeltaSumToPattern(client, 'net') self.sopr: SeriesTree_Cohorts_Utxo_All_Realized_Sopr = SeriesTree_Cohorts_Utxo_All_Realized_Sopr(client) - self.gross_pnl: BaseCumulativeSumPattern = BaseCumulativeSumPattern(client, 'realized_gross_pnl') + self.gross_pnl: BlockCumulativeSumPattern = BlockCumulativeSumPattern(client, 'realized_gross_pnl') self.sell_side_risk_ratio: _1m1w1y24hPattern7 = _1m1w1y24hPattern7(client, 'sell_side_risk_ratio') - self.peak_regret: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'realized_peak_regret') + self.peak_regret: BlockCumulativeSumToPattern = BlockCumulativeSumToPattern(client, 'realized_peak_regret') self.investor: PricePattern = PricePattern(client, 'investor_price') self.profit_to_loss_ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'realized_profit_to_loss_ratio') @@ -4933,8 +4959,8 @@ class SeriesTree_Cohorts_Utxo_All_Unrealized_Sentiment: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.pain_index: CentsUsdPattern2 = CentsUsdPattern2(client, 'pain_index') - self.greed_index: CentsUsdPattern2 = CentsUsdPattern2(client, 'greed_index') + self.pain_index: CentsUsdPattern3 = CentsUsdPattern3(client, 'pain_index') + self.greed_index: CentsUsdPattern3 = CentsUsdPattern3(client, 'greed_index') self.net: CentsUsdPattern = CentsUsdPattern(client, 'net_sentiment') class SeriesTree_Cohorts_Utxo_All_Unrealized: @@ -4945,7 +4971,7 @@ class SeriesTree_Cohorts_Utxo_All_Unrealized: self.profit: SeriesTree_Cohorts_Utxo_All_Unrealized_Profit = SeriesTree_Cohorts_Utxo_All_Unrealized_Profit(client) self.loss: SeriesTree_Cohorts_Utxo_All_Unrealized_Loss = SeriesTree_Cohorts_Utxo_All_Unrealized_Loss(client) self.net_pnl: SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl = SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl(client) - self.gross_pnl: CentsUsdPattern2 = CentsUsdPattern2(client, 'unrealized_gross_pnl') + self.gross_pnl: CentsUsdPattern3 = CentsUsdPattern3(client, 'unrealized_gross_pnl') self.invested_capital: InPattern = InPattern(client, 'invested_capital_in') self.investor_cap_in_profit_raw: SeriesPattern18[CentsSquaredSats] = SeriesPattern18(client, 'investor_cap_in_profit_raw') self.investor_cap_in_loss_raw: SeriesPattern18[CentsSquaredSats] = SeriesPattern18(client, 'investor_cap_in_loss_raw') @@ -4966,8 +4992,8 @@ class SeriesTree_Cohorts_Utxo_Sth_Activity: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.transfer_volume: AverageBaseCumulativeInSumPattern = AverageBaseCumulativeInSumPattern(client, 'sth_transfer_volume') - self.coindays_destroyed: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, 'sth_coindays_destroyed') + self.transfer_volume: AverageBlockCumulativeInSumPattern = AverageBlockCumulativeInSumPattern(client, 'sth_transfer_volume') + self.coindays_destroyed: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, 'sth_coindays_destroyed') self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'sth_coinyears_destroyed') self.dormancy: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'sth_dormancy') @@ -4975,8 +5001,8 @@ class SeriesTree_Cohorts_Utxo_Sth_Realized_Loss: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_realized_loss') - self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_realized_loss_cumulative') + self.block: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_realized_loss') + self.cumulative: CentsUsdPattern3 = CentsUsdPattern3(client, 'sth_realized_loss_cumulative') self.sum: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'sth_realized_loss_sum') self.negative: BaseSumPattern = BaseSumPattern(client, 'sth_neg_realized_loss') self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'sth_realized_loss_to_rcap') @@ -5088,14 +5114,14 @@ class SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted: def __init__(self, client: BrkClientBase, base_path: str = ''): self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'sth_asopr') - self.transfer_volume: AverageBaseCumulativeSumPattern[Cents] = AverageBaseCumulativeSumPattern(client, 'sth_adj_value_created') - self.value_destroyed: AverageBaseCumulativeSumPattern[Cents] = AverageBaseCumulativeSumPattern(client, 'sth_adj_value_destroyed') + self.transfer_volume: AverageBlockCumulativeSumPattern[Cents] = AverageBlockCumulativeSumPattern(client, 'sth_adj_value_created') + self.value_destroyed: AverageBlockCumulativeSumPattern[Cents] = AverageBlockCumulativeSumPattern(client, 'sth_adj_value_destroyed') class SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.value_destroyed: AverageBaseCumulativeSumPattern[Cents] = AverageBaseCumulativeSumPattern(client, 'sth_value_destroyed') + self.value_destroyed: AverageBlockCumulativeSumPattern[Cents] = AverageBlockCumulativeSumPattern(client, 'sth_value_destroyed') self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'sth_sopr') self.adjusted: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted = SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr_Adjusted(client) @@ -5104,15 +5130,15 @@ class SeriesTree_Cohorts_Utxo_Sth_Realized: def __init__(self, client: BrkClientBase, base_path: str = ''): self.cap: CentsDeltaToUsdPattern = CentsDeltaToUsdPattern(client, 'sth_realized_cap') - self.profit: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'sth_realized_profit') + self.profit: BlockCumulativeSumToPattern = BlockCumulativeSumToPattern(client, 'sth_realized_profit') self.loss: SeriesTree_Cohorts_Utxo_Sth_Realized_Loss = SeriesTree_Cohorts_Utxo_Sth_Realized_Loss(client) self.price: SeriesTree_Cohorts_Utxo_Sth_Realized_Price = SeriesTree_Cohorts_Utxo_Sth_Realized_Price(client) self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'sth_mvrv') - self.net_pnl: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'sth_net') + self.net_pnl: BlockChangeCumulativeDeltaSumToPattern = BlockChangeCumulativeDeltaSumToPattern(client, 'sth_net') self.sopr: SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr = SeriesTree_Cohorts_Utxo_Sth_Realized_Sopr(client) - self.gross_pnl: BaseCumulativeSumPattern = BaseCumulativeSumPattern(client, 'sth_realized_gross_pnl') + self.gross_pnl: BlockCumulativeSumPattern = BlockCumulativeSumPattern(client, 'sth_realized_gross_pnl') self.sell_side_risk_ratio: _1m1w1y24hPattern7 = _1m1w1y24hPattern7(client, 'sth_sell_side_risk_ratio') - self.peak_regret: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'sth_realized_peak_regret') + self.peak_regret: BlockCumulativeSumToPattern = BlockCumulativeSumToPattern(client, 'sth_realized_peak_regret') self.investor: PricePattern = PricePattern(client, 'sth_investor_price') self.profit_to_loss_ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'sth_realized_profit_to_loss_ratio') @@ -5132,8 +5158,8 @@ class SeriesTree_Cohorts_Utxo_Sth_Unrealized_Sentiment: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.pain_index: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_pain_index') - self.greed_index: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_greed_index') + self.pain_index: CentsUsdPattern3 = CentsUsdPattern3(client, 'sth_pain_index') + self.greed_index: CentsUsdPattern3 = CentsUsdPattern3(client, 'sth_greed_index') self.net: CentsUsdPattern = CentsUsdPattern(client, 'sth_net_sentiment') class SeriesTree_Cohorts_Utxo_Sth_Unrealized: @@ -5144,7 +5170,7 @@ class SeriesTree_Cohorts_Utxo_Sth_Unrealized: self.profit: CentsToUsdPattern4 = CentsToUsdPattern4(client, 'sth_unrealized_profit') self.loss: CentsNegativeToUsdPattern2 = CentsNegativeToUsdPattern2(client, 'sth') self.net_pnl: CentsToUsdPattern3 = CentsToUsdPattern3(client, 'sth_net_unrealized_pnl') - self.gross_pnl: CentsUsdPattern2 = CentsUsdPattern2(client, 'sth_unrealized_gross_pnl') + self.gross_pnl: CentsUsdPattern3 = CentsUsdPattern3(client, 'sth_unrealized_gross_pnl') self.invested_capital: InPattern = InPattern(client, 'sth_invested_capital_in') self.investor_cap_in_profit_raw: SeriesPattern18[CentsSquaredSats] = SeriesPattern18(client, 'sth_investor_cap_in_profit_raw') self.investor_cap_in_loss_raw: SeriesPattern18[CentsSquaredSats] = SeriesPattern18(client, 'sth_investor_cap_in_loss_raw') @@ -5165,8 +5191,8 @@ class SeriesTree_Cohorts_Utxo_Lth_Activity: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.transfer_volume: AverageBaseCumulativeInSumPattern = AverageBaseCumulativeInSumPattern(client, 'lth_transfer_volume') - self.coindays_destroyed: AverageBaseCumulativeSumPattern[StoredF64] = AverageBaseCumulativeSumPattern(client, 'lth_coindays_destroyed') + self.transfer_volume: AverageBlockCumulativeInSumPattern = AverageBlockCumulativeInSumPattern(client, 'lth_transfer_volume') + self.coindays_destroyed: AverageBlockCumulativeSumPattern[StoredF64] = AverageBlockCumulativeSumPattern(client, 'lth_coindays_destroyed') self.coinyears_destroyed: SeriesPattern1[StoredF64] = SeriesPattern1(client, 'lth_coinyears_destroyed') self.dormancy: _1m1w1y24hPattern[StoredF32] = _1m1w1y24hPattern(client, 'lth_dormancy') @@ -5174,8 +5200,8 @@ class SeriesTree_Cohorts_Utxo_Lth_Realized_Loss: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.base: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_realized_loss') - self.cumulative: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_realized_loss_cumulative') + self.block: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_realized_loss') + self.cumulative: CentsUsdPattern3 = CentsUsdPattern3(client, 'lth_realized_loss_cumulative') self.sum: _1m1w1y24hPattern6 = _1m1w1y24hPattern6(client, 'lth_realized_loss_sum') self.negative: BaseSumPattern = BaseSumPattern(client, 'lth_neg_realized_loss') self.to_rcap: BpsPercentRatioPattern4 = BpsPercentRatioPattern4(client, 'lth_realized_loss_to_rcap') @@ -5286,7 +5312,7 @@ class SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.value_destroyed: AverageBaseCumulativeSumPattern[Cents] = AverageBaseCumulativeSumPattern(client, 'lth_value_destroyed') + self.value_destroyed: AverageBlockCumulativeSumPattern[Cents] = AverageBlockCumulativeSumPattern(client, 'lth_value_destroyed') self.ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'lth_sopr') class SeriesTree_Cohorts_Utxo_Lth_Realized: @@ -5294,15 +5320,15 @@ class SeriesTree_Cohorts_Utxo_Lth_Realized: def __init__(self, client: BrkClientBase, base_path: str = ''): self.cap: CentsDeltaToUsdPattern = CentsDeltaToUsdPattern(client, 'lth_realized_cap') - self.profit: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'lth_realized_profit') + self.profit: BlockCumulativeSumToPattern = BlockCumulativeSumToPattern(client, 'lth_realized_profit') self.loss: SeriesTree_Cohorts_Utxo_Lth_Realized_Loss = SeriesTree_Cohorts_Utxo_Lth_Realized_Loss(client) self.price: SeriesTree_Cohorts_Utxo_Lth_Realized_Price = SeriesTree_Cohorts_Utxo_Lth_Realized_Price(client) self.mvrv: SeriesPattern1[StoredF32] = SeriesPattern1(client, 'lth_mvrv') - self.net_pnl: BaseChangeCumulativeDeltaSumToPattern = BaseChangeCumulativeDeltaSumToPattern(client, 'lth_net') + self.net_pnl: BlockChangeCumulativeDeltaSumToPattern = BlockChangeCumulativeDeltaSumToPattern(client, 'lth_net') self.sopr: SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr = SeriesTree_Cohorts_Utxo_Lth_Realized_Sopr(client) - self.gross_pnl: BaseCumulativeSumPattern = BaseCumulativeSumPattern(client, 'lth_realized_gross_pnl') + self.gross_pnl: BlockCumulativeSumPattern = BlockCumulativeSumPattern(client, 'lth_realized_gross_pnl') self.sell_side_risk_ratio: _1m1w1y24hPattern7 = _1m1w1y24hPattern7(client, 'lth_sell_side_risk_ratio') - self.peak_regret: BaseCumulativeSumToPattern = BaseCumulativeSumToPattern(client, 'lth_realized_peak_regret') + self.peak_regret: BlockCumulativeSumToPattern = BlockCumulativeSumToPattern(client, 'lth_realized_peak_regret') self.investor: PricePattern = PricePattern(client, 'lth_investor_price') self.profit_to_loss_ratio: _1m1w1y24hPattern[StoredF64] = _1m1w1y24hPattern(client, 'lth_realized_profit_to_loss_ratio') @@ -5322,8 +5348,8 @@ class SeriesTree_Cohorts_Utxo_Lth_Unrealized_Sentiment: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.pain_index: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_pain_index') - self.greed_index: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_greed_index') + self.pain_index: CentsUsdPattern3 = CentsUsdPattern3(client, 'lth_pain_index') + self.greed_index: CentsUsdPattern3 = CentsUsdPattern3(client, 'lth_greed_index') self.net: CentsUsdPattern = CentsUsdPattern(client, 'lth_net_sentiment') class SeriesTree_Cohorts_Utxo_Lth_Unrealized: @@ -5334,7 +5360,7 @@ class SeriesTree_Cohorts_Utxo_Lth_Unrealized: self.profit: CentsToUsdPattern4 = CentsToUsdPattern4(client, 'lth_unrealized_profit') self.loss: CentsNegativeToUsdPattern2 = CentsNegativeToUsdPattern2(client, 'lth') self.net_pnl: CentsToUsdPattern3 = CentsToUsdPattern3(client, 'lth_net_unrealized_pnl') - self.gross_pnl: CentsUsdPattern2 = CentsUsdPattern2(client, 'lth_unrealized_gross_pnl') + self.gross_pnl: CentsUsdPattern3 = CentsUsdPattern3(client, 'lth_unrealized_gross_pnl') self.invested_capital: InPattern = InPattern(client, 'lth_invested_capital_in') self.investor_cap_in_profit_raw: SeriesPattern18[CentsSquaredSats] = SeriesPattern18(client, 'lth_investor_cap_in_profit_raw') self.investor_cap_in_loss_raw: SeriesPattern18[CentsSquaredSats] = SeriesPattern18(client, 'lth_investor_cap_in_loss_raw') @@ -5603,27 +5629,27 @@ class SeriesTree_Cohorts_Utxo_Matured: """Series tree node.""" def __init__(self, client: BrkClientBase, base_path: str = ''): - self.under_1h: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_under_1h_old_matured_supply') - self._1h_to_1d: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_1h_to_1d_old_matured_supply') - self._1d_to_1w: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_1d_to_1w_old_matured_supply') - self._1w_to_1m: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_1w_to_1m_old_matured_supply') - self._1m_to_2m: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_1m_to_2m_old_matured_supply') - self._2m_to_3m: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_2m_to_3m_old_matured_supply') - self._3m_to_4m: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_3m_to_4m_old_matured_supply') - self._4m_to_5m: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_4m_to_5m_old_matured_supply') - self._5m_to_6m: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_5m_to_6m_old_matured_supply') - self._6m_to_1y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_6m_to_1y_old_matured_supply') - self._1y_to_2y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_1y_to_2y_old_matured_supply') - self._2y_to_3y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_2y_to_3y_old_matured_supply') - self._3y_to_4y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_3y_to_4y_old_matured_supply') - self._4y_to_5y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_4y_to_5y_old_matured_supply') - self._5y_to_6y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_5y_to_6y_old_matured_supply') - self._6y_to_7y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_6y_to_7y_old_matured_supply') - self._7y_to_8y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_7y_to_8y_old_matured_supply') - self._8y_to_10y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_8y_to_10y_old_matured_supply') - self._10y_to_12y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_10y_to_12y_old_matured_supply') - self._12y_to_15y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_12y_to_15y_old_matured_supply') - self.over_15y: AverageBaseCumulativeSumPattern3 = AverageBaseCumulativeSumPattern3(client, 'utxos_over_15y_old_matured_supply') + self.under_1h: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_under_1h_old_matured_supply') + self._1h_to_1d: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_1h_to_1d_old_matured_supply') + self._1d_to_1w: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_1d_to_1w_old_matured_supply') + self._1w_to_1m: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_1w_to_1m_old_matured_supply') + self._1m_to_2m: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_1m_to_2m_old_matured_supply') + self._2m_to_3m: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_2m_to_3m_old_matured_supply') + self._3m_to_4m: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_3m_to_4m_old_matured_supply') + self._4m_to_5m: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_4m_to_5m_old_matured_supply') + self._5m_to_6m: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_5m_to_6m_old_matured_supply') + self._6m_to_1y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_6m_to_1y_old_matured_supply') + self._1y_to_2y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_1y_to_2y_old_matured_supply') + self._2y_to_3y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_2y_to_3y_old_matured_supply') + self._3y_to_4y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_3y_to_4y_old_matured_supply') + self._4y_to_5y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_4y_to_5y_old_matured_supply') + self._5y_to_6y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_5y_to_6y_old_matured_supply') + self._6y_to_7y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_6y_to_7y_old_matured_supply') + self._7y_to_8y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_7y_to_8y_old_matured_supply') + self._8y_to_10y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_8y_to_10y_old_matured_supply') + self._10y_to_12y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_10y_to_12y_old_matured_supply') + self._12y_to_15y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_12y_to_15y_old_matured_supply') + self.over_15y: AverageBlockCumulativeSumPattern3 = AverageBlockCumulativeSumPattern3(client, 'utxos_over_15y_old_matured_supply') class SeriesTree_Cohorts_Utxo: """Series tree node.""" diff --git a/website/scripts/options/distribution/cost-basis.js b/website/scripts/options/distribution/cost-basis.js index b88152598..5327f396e 100644 --- a/website/scripts/options/distribution/cost-basis.js +++ b/website/scripts/options/distribution/cost-basis.js @@ -57,8 +57,8 @@ function percentileSeries(p, n = (x) => x) { function singleWeightFolder({ avgPrice, avgName, inProfit, inLoss, percentiles, color, weightLabel, title, min, max }) { return [ { - name: "Profitability", - title: title(`Cost Basis Profitability (${weightLabel})`), + name: "Average", + title: title(`Cost Basis Average (${weightLabel})`), top: [ price({ series: inProfit, name: "In Profit", color: colors.profit }), price({ series: avgPrice, name: avgName, color }), @@ -91,7 +91,7 @@ export function createCostBasisSectionWithPercentiles({ cohort, title }) { { name: "Per Coin", tree: singleWeightFolder({ - avgPrice: tree.realized.price, avgName: "Average", + avgPrice: tree.realized.price, avgName: "All", inProfit: cb.inProfit.perCoin, inLoss: cb.inLoss.perCoin, percentiles: cb.perCoin, color, weightLabel: "BTC-weighted", title, min: cb.min, max: cb.max, @@ -100,32 +100,11 @@ export function createCostBasisSectionWithPercentiles({ cohort, title }) { { name: "Per Dollar", tree: singleWeightFolder({ - avgPrice: tree.realized.investor.price, avgName: "Average", + avgPrice: tree.realized.investor.price, avgName: "All", inProfit: cb.inProfit.perDollar, inLoss: cb.inLoss.perDollar, percentiles: cb.perDollar, color, weightLabel: "USD-weighted", title, }), }, - { - name: "Profitability", - tree: [ - { - name: "In Profit", - title: title("Cost Basis In Profit"), - top: [ - price({ series: cb.inProfit.perCoin, name: "Per Coin", color: colors.realized }), - price({ series: cb.inProfit.perDollar, name: "Per Dollar", color: colors.investor }), - ], - }, - { - name: "In Loss", - title: title("Cost Basis In Loss"), - top: [ - price({ series: cb.inLoss.perCoin, name: "Per Coin", color: colors.realized }), - price({ series: cb.inLoss.perDollar, name: "Per Dollar", color: colors.investor }), - ], - }, - ], - }, { name: "Supply Density", title: title("Cost Basis Supply Density"), @@ -156,7 +135,7 @@ export function createCostBasisSectionWithPercentiles({ cohort, title }) { function groupedWeightFolder({ list, all, getAvgPrice, getInProfit, getInLoss, getPercentiles, avgTitle, weightLabel, title }) { return [ { - name: "Profitability", + name: "Average", tree: [ { name: "In Profit", @@ -230,27 +209,6 @@ export function createGroupedCostBasisSectionWithPercentiles({ list, all, title avgTitle: "Average", weightLabel: "USD-weighted", }), }, - { - name: "Profitability", - tree: [ - { - name: "In Profit", - title: title("Cost Basis In Profit"), - top: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => [ - price({ series: tree.costBasis.inProfit.perCoin, name: `${name} (coin)`, color }), - price({ series: tree.costBasis.inProfit.perDollar, name: `${name} (dollar)`, color }), - ]), - }, - { - name: "In Loss", - title: title("Cost Basis In Loss"), - top: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => [ - price({ series: tree.costBasis.inLoss.perCoin, name: `${name} (coin)`, color }), - price({ series: tree.costBasis.inLoss.perDollar, name: `${name} (dollar)`, color }), - ]), - }, - ], - }, { name: "Supply Density", title: title("Cost Basis Supply Density"), diff --git a/website/scripts/options/distribution/holdings.js b/website/scripts/options/distribution/holdings.js index 51b3f75b1..e77db2dff 100644 --- a/website/scripts/options/distribution/holdings.js +++ b/website/scripts/options/distribution/holdings.js @@ -10,7 +10,14 @@ */ import { Unit } from "../../utils/units.js"; -import { ROLLING_WINDOWS, line, baseline, sumsTree, rollingPercentRatioTree, percentRatio } from "../series.js"; +import { + ROLLING_WINDOWS, + line, + baseline, + sumsTreeBaseline, + rollingPercentRatioTree, + percentRatioBaseline, +} from "../series.js"; import { satsBtcUsd, mapCohorts, @@ -26,50 +33,10 @@ import { priceLines } from "../constants.js"; * @returns {AnyFetchedSeriesBlueprint[]} */ function simpleSupplySeries(supply) { - return [ - ...satsBtcUsd({ - pattern: supply.total, - name: "Total", - color: colors.default, - }), - ...satsBtcUsd({ - pattern: supply.half, - name: "Halved", - color: colors.gray, - style: 4, - }), - ]; -} - -/** - * Full supply series (total, profit, loss, halved) - * @param {{ total: AnyValuePattern, half: AnyValuePattern, inProfit: AnyValuePattern, inLoss: AnyValuePattern }} supply - * @returns {AnyFetchedSeriesBlueprint[]} - */ -function fullSupplySeries(supply) { - return [ - ...satsBtcUsd({ - pattern: supply.total, - name: "Total", - color: colors.default, - }), - ...satsBtcUsd({ - pattern: supply.inProfit, - name: "In Profit", - color: colors.profit, - }), - ...satsBtcUsd({ - pattern: supply.inLoss, - name: "In Loss", - color: colors.loss, - }), - ...satsBtcUsd({ - pattern: supply.half, - name: "Halved", - color: colors.gray, - style: 4, - }), - ]; + return satsBtcUsd({ + pattern: supply.total, + name: "Total", + }); } /** @@ -79,11 +46,31 @@ function fullSupplySeries(supply) { */ function ownSupplyPctSeries(supply) { return [ - line({ series: supply.inProfit.toOwn.percent, name: "In Profit", color: colors.profit, unit: Unit.pctOwn }), - line({ series: supply.inLoss.toOwn.percent, name: "In Loss", color: colors.loss, unit: Unit.pctOwn }), - line({ series: supply.inProfit.toOwn.ratio, name: "In Profit", color: colors.profit, unit: Unit.ratio }), - line({ series: supply.inLoss.toOwn.ratio, name: "In Loss", color: colors.loss, unit: Unit.ratio }), - ...priceLines({ numbers: [100, 50, 0], unit: Unit.pctOwn }), + line({ + series: supply.inProfit.toOwn.percent, + name: "In Profit", + color: colors.profit, + unit: Unit.percentage, + }), + line({ + series: supply.inLoss.toOwn.percent, + name: "In Loss", + color: colors.loss, + unit: Unit.percentage, + }), + line({ + series: supply.inProfit.toOwn.ratio, + name: "In Profit", + color: colors.profit, + unit: Unit.ratio, + }), + line({ + series: supply.inLoss.toOwn.ratio, + name: "In Loss", + color: colors.loss, + unit: Unit.ratio, + }), + ...priceLines({ numbers: [100, 50, 0], unit: Unit.percentage }), ]; } @@ -98,47 +85,19 @@ function circulatingSupplyPctSeries(supply) { series: supply.toCirculating.percent, name: "Total", color: colors.default, - unit: Unit.pctSupply, + unit: Unit.percentage, }), line({ series: supply.inProfit.toCirculating.percent, name: "In Profit", color: colors.profit, - unit: Unit.pctSupply, + unit: Unit.percentage, }), line({ series: supply.inLoss.toCirculating.percent, name: "In Loss", color: colors.loss, - unit: Unit.pctSupply, - }), - ]; -} - -/** - * Ratio of Circulating Supply series (total, profit, loss) - * @param {{ toCirculating: { ratio: AnySeriesPattern }, inProfit: { toCirculating: { ratio: AnySeriesPattern } }, inLoss: { toCirculating: { ratio: AnySeriesPattern } } }} supply - * @returns {AnyFetchedSeriesBlueprint[]} - */ -function circulatingSupplyRatioSeries(supply) { - return [ - line({ - series: supply.toCirculating.ratio, - name: "Total", - color: colors.default, - unit: Unit.ratio, - }), - line({ - series: supply.inProfit.toCirculating.ratio, - name: "In Profit", - color: colors.profit, - unit: Unit.ratio, - }), - line({ - series: supply.inLoss.toCirculating.ratio, - name: "In Loss", - color: colors.loss, - unit: Unit.ratio, + unit: Unit.percentage, }), ]; } @@ -148,18 +107,19 @@ function circulatingSupplyRatioSeries(supply) { * @param {CohortAll} all * @param {(name: string) => string} title */ -function groupedUtxoCountChart(list, all, title) { +function groupedUtxoCountFolder(list, all, title) { return { - name: "UTXO Count", - title: title("UTXO Count"), - bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => - line({ - series: tree.outputs.unspentCount.base, - name, - color, - unit: Unit.count, - }), - ), + name: "UTXOs", + tree: [ + { + name: "Count", + title: title("UTXOs"), + bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => + line({ series: tree.outputs.unspentCount.base, name, color, unit: Unit.count }), + ), + }, + ...groupedDeltaItems(list, all, (c) => c.tree.outputs.unspentCount.delta, Unit.count, title, "UTXOs"), + ], }; } @@ -168,16 +128,26 @@ function groupedUtxoCountChart(list, all, title) { * @param {Unit} unit * @param {(name: string) => string} title * @param {string} name - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ -function singleDeltaTree(delta, unit, title, name) { - return { - name, - tree: [ - { ...sumsTree({ windows: delta.absolute, title: title(`${name} Change`), unit, series: baseline }), name: "Absolute" }, - { ...rollingPercentRatioTree({ windows: delta.rate, title: title(`${name} Rate`) }), name: "Rate" }, - ], - }; +function singleDeltaItems(delta, unit, title, name) { + return [ + { + ...sumsTreeBaseline({ + windows: delta.absolute, + title: title(`${name} Change`), + unit, + }), + name: "Change", + }, + { + ...rollingPercentRatioTree({ + windows: delta.rate, + title: title(`${name} Rate`), + }), + name: "Growth Rate", + }, + ]; } /** @@ -189,305 +159,305 @@ function singleDeltaTree(delta, unit, title, name) { * @param {Unit} unit * @param {(name: string) => string} title * @param {string} name - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ -function groupedDeltaTree(list, all, getDelta, unit, title, name) { - return { - name, - tree: [ +function groupedDeltaItems(list, all, getDelta, unit, title, name) { + return [ { - name: "Absolute", + name: "Change", tree: ROLLING_WINDOWS.map((w) => ({ name: w.name, title: title(`${name} Change (${w.title})`), bottom: mapCohortsWithAll(list, all, (c) => - baseline({ series: getDelta(c).absolute[w.key], name: c.name, color: c.color, unit }), + baseline({ + series: getDelta(c).absolute[w.key], + name: c.name, + color: c.color, + unit, + }), ), })), }, { - name: "Rate", + name: "Growth Rate", tree: ROLLING_WINDOWS.map((w) => ({ name: w.name, title: title(`${name} Rate (${w.title})`), bottom: flatMapCohortsWithAll(list, all, (c) => - percentRatio({ pattern: getDelta(c).rate[w.key], name: c.name, color: c.color }), + percentRatioBaseline({ + pattern: getDelta(c).rate[w.key], + name: c.name, + color: c.color, + }), ), })), }, - ], - }; + ]; } +// ============================================================================ +// Single Cohort Composable Builders +// ============================================================================ + /** - * @param {UtxoCohortObject | CohortWithoutRelative} cohort + * Profitability chart (in profit + in loss supply) + * @param {{ total: AnyValuePattern, half: AnyValuePattern, inProfit: AnyValuePattern, inLoss: AnyValuePattern }} supply * @param {(name: string) => string} title * @returns {PartialChartOption} */ -function singleUtxoCountChart(cohort, title) { +function profitabilityChart(supply, title) { return { - name: "UTXO Count", - title: title("UTXO Count"), + name: "Profitability", + title: title("Supply Profitability"), bottom: [ - line({ - series: cohort.tree.outputs.unspentCount.base, - name: "UTXO Count", - color: cohort.color, - unit: Unit.count, + ...satsBtcUsd({ + pattern: supply.total, + name: "Total", + color: colors.default, + }), + ...satsBtcUsd({ + pattern: supply.inProfit, + name: "In Profit", + color: colors.profit, + }), + ...satsBtcUsd({ + pattern: supply.inLoss, + name: "In Loss", + color: colors.loss, + }), + ...satsBtcUsd({ + pattern: supply.half, + name: "Halved", + color: colors.gray, + style: 4, }), ], }; } - /** - * @param {CohortAll | CohortAddr | AddrCohortObject} cohort + * @param {{ toCirculating: { percent: AnySeriesPattern }, inProfit: { toCirculating: { percent: AnySeriesPattern } }, inLoss: { toCirculating: { percent: AnySeriesPattern } } }} supply * @param {(name: string) => string} title * @returns {PartialChartOption} */ -function singleAddressCountChart(cohort, title) { +function circulatingChart(supply, title) { return { - name: "Address Count", - title: title("Address Count"), - bottom: [ - line({ - series: cohort.addressCount.base, - name: "Address Count", - color: cohort.color, - unit: Unit.count, - }), - ], + name: "% of Circulating", + title: title("Supply (% of Circulating)"), + bottom: circulatingSupplyPctSeries(supply), }; } +/** + * @param {{ inProfit: { toOwn: { percent: AnySeriesPattern, ratio: AnySeriesPattern } }, inLoss: { toOwn: { percent: AnySeriesPattern, ratio: AnySeriesPattern } } }} supply + * @param {(name: string) => string} title + * @returns {PartialChartOption} + */ +function ownSupplyChart(supply, title) { + return { + name: "% of Own Supply", + title: title("Supply (% of Own)"), + bottom: ownSupplyPctSeries(supply), + }; +} + +/** + * Count folder (UTXO or Address) with value + change + * @param {{ base: AnySeriesPattern, delta: DeltaPattern }} pattern + * @param {string} name + * @param {Color} color + * @param {(name: string) => string} title + * @returns {PartialOptionsGroup} + */ +function countFolder(pattern, name, color, title) { + return { + name, + tree: [ + { + name: "Count", + title: title(name), + bottom: [ + line({ + series: pattern.base, + name: "Count", + color, + unit: Unit.count, + }), + ], + }, + ...singleDeltaItems(pattern.delta, Unit.count, title, "Change"), + ], + }; +} // ============================================================================ // Single Cohort Holdings Sections // ============================================================================ /** - * Basic holdings (total + half only, no supply breakdown) - * For: CohortWithoutRelative, CohortBasicWithMarketCap, CohortBasicWithoutMarketCap * @param {{ cohort: UtxoCohortObject | CohortWithoutRelative, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ export function createHoldingsSection({ cohort, title }) { - return { - name: "Holdings", - tree: [ - { - name: "Supply", - title: title("Supply"), - bottom: simpleSupplySeries(cohort.tree.supply), - }, - singleUtxoCountChart(cohort, title), - { - name: "Change", - tree: [ - singleDeltaTree(cohort.tree.supply.delta, Unit.sats, title, "Supply"), - singleDeltaTree(cohort.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - ], - }, - ], - }; + const { supply } = cohort.tree; + return [ + { + name: "Supply", + tree: [ + { + name: "Total", + title: title("Supply"), + bottom: simpleSupplySeries(supply), + }, + ...singleDeltaItems(supply.delta, Unit.sats, title, "Change"), + ], + }, + countFolder(cohort.tree.outputs.unspentCount, "UTXOs", cohort.color, title), + ]; } /** - * Holdings for CohortAll (has inProfit/inLoss with toOwn but no toCirculating) * @param {{ cohort: CohortAll, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ export function createHoldingsSectionAll({ cohort, title }) { const { supply } = cohort.tree; - return { - name: "Holdings", - tree: [ - { - name: "Supply", - title: title("Supply"), - bottom: [ - ...fullSupplySeries(supply), - ...ownSupplyPctSeries(supply), - ], - }, - singleUtxoCountChart(cohort, title), - singleAddressCountChart(cohort, title), - { - name: "Change", - tree: [ - singleDeltaTree(cohort.tree.supply.delta, Unit.sats, title, "Supply"), - singleDeltaTree(cohort.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - singleDeltaTree(cohort.addressCount.delta, Unit.count, title, "Address Count"), - ], - }, - ], - }; + return [ + { + name: "Supply", + tree: [ + { + name: "Total", + title: title("Supply"), + bottom: simpleSupplySeries(supply), + }, + profitabilityChart(supply, title), + ownSupplyChart(supply, title), + ...singleDeltaItems(supply.delta, Unit.sats, title, "Change"), + ], + }, + countFolder(cohort.tree.outputs.unspentCount, "UTXOs", cohort.color, title), + countFolder(cohort.addressCount, "Addresses", cohort.color, title), + ]; } /** - * Holdings with full relative series (toCirculating + toOwn) - * For: CohortFull, CohortLongTerm (have DeltaHalfInRelTotalPattern2) * @param {{ cohort: CohortFull | CohortLongTerm, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ export function createHoldingsSectionWithRelative({ cohort, title }) { const { supply } = cohort.tree; - return { - name: "Holdings", - tree: [ - { - name: "Supply", - tree: [ - { - name: "Overview", - title: title("Supply"), - bottom: [ - ...fullSupplySeries(supply), - ...circulatingSupplyPctSeries(supply), - ...ownSupplyPctSeries(supply), - ], - }, - { - name: "Ratio", - title: title("Supply (% of Circulating)"), - bottom: circulatingSupplyRatioSeries(supply), - }, - ], - }, - singleUtxoCountChart(cohort, title), - { - name: "Change", - tree: [ - singleDeltaTree(cohort.tree.supply.delta, Unit.sats, title, "Supply"), - singleDeltaTree(cohort.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - ], - }, - ], - }; + return [ + { + name: "Supply", + tree: [ + { + name: "Total", + title: title("Supply"), + bottom: simpleSupplySeries(supply), + }, + profitabilityChart(supply, title), + circulatingChart(supply, title), + ownSupplyChart(supply, title), + ...singleDeltaItems(supply.delta, Unit.sats, title, "Change"), + ], + }, + countFolder(cohort.tree.outputs.unspentCount, "UTXOs", cohort.color, title), + ]; } /** - * Holdings with inProfit/inLoss + toCirculating (no toOwn) - * For: CohortWithAdjusted, CohortAgeRange (have DeltaHalfInRelTotalPattern) * @param {{ cohort: CohortWithAdjusted | CohortAgeRange, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ export function createHoldingsSectionWithOwnSupply({ cohort, title }) { const { supply } = cohort.tree; - return { - name: "Holdings", - tree: [ - { - name: "Supply", - tree: [ - { - name: "Overview", - title: title("Supply"), - bottom: [ - ...fullSupplySeries(supply), - ...circulatingSupplyPctSeries(supply), - ], - }, - { - name: "Ratio", - title: title("Supply (% of Circulating)"), - bottom: circulatingSupplyRatioSeries(supply), - }, - ], - }, - singleUtxoCountChart(cohort, title), - { - name: "Change", - tree: [ - singleDeltaTree(cohort.tree.supply.delta, Unit.sats, title, "Supply"), - singleDeltaTree(cohort.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - ], - }, - ], - }; + return [ + { + name: "Supply", + tree: [ + { + name: "Total", + title: title("Supply"), + bottom: simpleSupplySeries(supply), + }, + profitabilityChart(supply, title), + circulatingChart(supply, title), + ...singleDeltaItems(supply.delta, Unit.sats, title, "Change"), + ], + }, + countFolder(cohort.tree.outputs.unspentCount, "UTXOs", cohort.color, title), + ]; } /** - * Holdings with inProfit/inLoss (no rel, no address count) - * For: CohortWithoutRelative (p2ms, unknown, empty) * @param {{ cohort: CohortWithoutRelative, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ export function createHoldingsSectionWithProfitLoss({ cohort, title }) { - return { - name: "Holdings", - tree: [ - { - name: "Supply", - title: title("Supply"), - bottom: fullSupplySeries(cohort.tree.supply), - }, - singleUtxoCountChart(cohort, title), - { - name: "Change", - tree: [ - singleDeltaTree(cohort.tree.supply.delta, Unit.sats, title, "Supply"), - singleDeltaTree(cohort.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - ], - }, - ], - }; + const { supply } = cohort.tree; + return [ + { + name: "Supply", + tree: [ + { + name: "Total", + title: title("Supply"), + bottom: simpleSupplySeries(supply), + }, + profitabilityChart(supply, title), + ...singleDeltaItems(supply.delta, Unit.sats, title, "Change"), + ], + }, + countFolder(cohort.tree.outputs.unspentCount, "UTXOs", cohort.color, title), + ]; } /** - * Holdings for CohortAddr (has inProfit/inLoss but no rel, plus address count) * @param {{ cohort: CohortAddr, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ export function createHoldingsSectionAddress({ cohort, title }) { - return { - name: "Holdings", - tree: [ - { - name: "Supply", - title: title("Supply"), - bottom: fullSupplySeries(cohort.tree.supply), - }, - singleUtxoCountChart(cohort, title), - singleAddressCountChart(cohort, title), - { - name: "Change", - tree: [ - singleDeltaTree(cohort.tree.supply.delta, Unit.sats, title, "Supply"), - singleDeltaTree(cohort.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - singleDeltaTree(cohort.addressCount.delta, Unit.count, title, "Address Count"), - ], - }, - ], - }; + const { supply } = cohort.tree; + return [ + { + name: "Supply", + tree: [ + { + name: "Total", + title: title("Supply"), + bottom: simpleSupplySeries(supply), + }, + profitabilityChart(supply, title), + ...singleDeltaItems(supply.delta, Unit.sats, title, "Change"), + ], + }, + countFolder(cohort.tree.outputs.unspentCount, "UTXOs", cohort.color, title), + countFolder(cohort.addressCount, "Addresses", cohort.color, title), + ]; } /** - * Holdings for address amount cohorts (no inProfit/inLoss, has address count) * @param {{ cohort: AddrCohortObject, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ export function createHoldingsSectionAddressAmount({ cohort, title }) { - return { - name: "Holdings", - tree: [ - { - name: "Supply", - title: title("Supply"), - bottom: simpleSupplySeries(cohort.tree.supply), - }, - singleUtxoCountChart(cohort, title), - singleAddressCountChart(cohort, title), - { - name: "Change", - tree: [ - singleDeltaTree(cohort.tree.supply.delta, Unit.sats, title, "Supply"), - singleDeltaTree(cohort.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - singleDeltaTree(cohort.addressCount.delta, Unit.count, title, "Address Count"), - ], - }, - ], - }; + const { supply } = cohort.tree; + return [ + { + name: "Supply", + tree: [ + { + name: "Total", + title: title("Supply"), + bottom: simpleSupplySeries(supply), + }, + ...singleDeltaItems(supply.delta, Unit.sats, title, "Change"), + ], + }, + countFolder(cohort.tree.outputs.unspentCount, "UTXOs", cohort.color, title), + countFolder(cohort.addressCount, "Addresses", cohort.color, title), + ]; } // ============================================================================ @@ -496,394 +466,151 @@ export function createHoldingsSectionAddressAmount({ cohort, title }) { /** * @param {{ list: readonly CohortAddr[], all: CohortAll, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ export function createGroupedHoldingsSectionAddress({ list, all, title }) { - return { - name: "Holdings", - tree: [ - { - name: "Supply", - tree: [ - { - name: "Total", - title: title("Supply"), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ pattern: tree.supply.total, name, color }), - ), - }, - { - name: "In Profit", - title: title("Supply In Profit"), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ - pattern: tree.supply.inProfit, - name, - color, - }), - ), - }, - { - name: "In Loss", - title: title("Supply In Loss"), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ - pattern: tree.supply.inLoss, - name, - color, - }), - ), - }, - ], - }, - groupedUtxoCountChart(list, all, title), - { - name: "Address Count", - title: title("Address Count"), - bottom: mapCohortsWithAll(list, all, ({ name, color, addressCount }) => - line({ series: addressCount.base, name, color, unit: Unit.count }), - ), - }, - { - name: "Change", - tree: [ - groupedDeltaTree(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), - groupedDeltaTree(list, all, (c) => c.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - groupedDeltaTree(list, all, (c) => c.addressCount.delta, Unit.count, title, "Address Count"), - ], - }, - ], - }; + return [ + { + name: "Supply", + tree: [ + { + name: "Total", + title: title("Supply"), + bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => + satsBtcUsd({ pattern: tree.supply.total, name, color }), + ), + }, + { + name: "In Profit", + title: title("Supply In Profit"), + bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => + satsBtcUsd({ pattern: tree.supply.inProfit, name, color }), + ), + }, + { + name: "In Loss", + title: title("Supply In Loss"), + bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => + satsBtcUsd({ pattern: tree.supply.inLoss, name, color }), + ), + }, + ...groupedDeltaItems(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), + ], + }, + groupedUtxoCountFolder(list, all, title), + { + name: "Addresses", + tree: [ + { + name: "Count", + title: title("Addresses"), + bottom: mapCohortsWithAll(list, all, ({ name, color, addressCount }) => + line({ series: addressCount.base, name, color, unit: Unit.count }), + ), + }, + ...groupedDeltaItems(list, all, (c) => c.addressCount.delta, Unit.count, title, "Addresses"), + ], + }, + ]; } /** * Grouped holdings for address amount cohorts (no inProfit/inLoss, has address count) * @param {{ list: readonly AddrCohortObject[], all: CohortAll, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ -export function createGroupedHoldingsSectionAddressAmount({ - list, - all, - title, -}) { - return { - name: "Holdings", - tree: [ - { - name: "Supply", - tree: [ - { - name: "Total", - title: title("Supply"), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ pattern: tree.supply.total, name, color }), - ), - }, - ], - }, - groupedUtxoCountChart(list, all, title), - { - name: "Address Count", - title: title("Address Count"), - bottom: mapCohortsWithAll(list, all, ({ name, color, addressCount }) => - line({ series: addressCount.base, name, color, unit: Unit.count }), - ), - }, - { - name: "Change", - tree: [ - groupedDeltaTree(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), - groupedDeltaTree(list, all, (c) => c.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - groupedDeltaTree(list, all, (c) => c.addressCount.delta, Unit.count, title, "Address Count"), - ], - }, - ], - }; +export function createGroupedHoldingsSectionAddressAmount({ list, all, title }) { + return [ + { + name: "Supply", + tree: [ + { name: "Total", title: title("Supply"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.total, name, color })) }, + ...groupedDeltaItems(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), + ], + }, + groupedUtxoCountFolder(list, all, title), + { + name: "Addresses", + tree: [ + { + name: "Count", + title: title("Addresses"), + bottom: mapCohortsWithAll(list, all, ({ name, color, addressCount }) => + line({ series: addressCount.base, name, color, unit: Unit.count }), + ), + }, + ...groupedDeltaItems(list, all, (c) => c.addressCount.delta, Unit.count, title, "Addresses"), + ], + }, + ]; } -/** - * Basic grouped holdings (total + half only) - * @param {{ list: readonly (UtxoCohortObject | CohortWithoutRelative)[], all: CohortAll, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} - */ +/** @param {{ list: readonly (UtxoCohortObject | CohortWithoutRelative)[], all: CohortAll, title: (name: string) => string }} args */ export function createGroupedHoldingsSection({ list, all, title }) { - return { - name: "Holdings", - tree: [ - { - name: "Supply", - tree: [ - { - name: "Total", - title: title("Supply"), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ pattern: tree.supply.total, name, color }), - ), - }, - ], - }, - groupedUtxoCountChart(list, all, title), - { - name: "Change", - tree: [ - groupedDeltaTree(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), - groupedDeltaTree(list, all, (c) => c.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - ], - }, - ], - }; + return [ + { + name: "Supply", + tree: [ + { name: "Total", title: title("Supply"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.total, name, color })) }, + ...groupedDeltaItems(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), + ], + }, + groupedUtxoCountFolder(list, all, title), + ]; } -/** - * Grouped holdings with inProfit/inLoss (no rel, no address count) - * For: CohortWithoutRelative (p2ms, unknown, empty) - * @param {{ list: readonly CohortWithoutRelative[], all: CohortAll, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} - */ -export function createGroupedHoldingsSectionWithProfitLoss({ - list, - all, - title, -}) { - return { - name: "Holdings", - tree: [ - { - name: "Supply", - tree: [ - { - name: "Total", - title: title("Supply"), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ pattern: tree.supply.total, name, color }), - ), - }, - { - name: "In Profit", - title: title("Supply In Profit"), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ - pattern: tree.supply.inProfit, - name, - color, - }), - ), - }, - { - name: "In Loss", - title: title("Supply In Loss"), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ - pattern: tree.supply.inLoss, - name, - color, - }), - ), - }, - ], - }, - groupedUtxoCountChart(list, all, title), - { - name: "Change", - tree: [ - groupedDeltaTree(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), - groupedDeltaTree(list, all, (c) => c.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - ], - }, - ], - }; +/** @param {{ list: readonly CohortWithoutRelative[], all: CohortAll, title: (name: string) => string }} args */ +export function createGroupedHoldingsSectionWithProfitLoss({ list, all, title }) { + return [ + { + name: "Supply", + tree: [ + { name: "Total", title: title("Supply"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.total, name, color })) }, + { name: "In Profit", title: title("Supply In Profit"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.inProfit, name, color })) }, + { name: "In Loss", title: title("Supply In Loss"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.inLoss, name, color })) }, + ...groupedDeltaItems(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), + ], + }, + groupedUtxoCountFolder(list, all, title), + ]; } -/** - * Grouped holdings with inProfit/inLoss + toCirculating (no toOwn) - * For: CohortWithAdjusted, CohortAgeRange - * @param {{ list: readonly (CohortWithAdjusted | CohortAgeRange)[], all: CohortAll, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} - */ -export function createGroupedHoldingsSectionWithOwnSupply({ - list, - all, - title, -}) { - return { - name: "Holdings", - tree: [ - { - name: "Supply", - tree: [ - { - name: "Total", - title: title("Supply"), - bottom: [ - ...flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ pattern: tree.supply.total, name, color }), - ), - ...mapCohorts(list, ({ name, color, tree }) => - line({ - series: tree.supply.toCirculating.percent, - name, - color, - unit: Unit.pctSupply, - }), - ), - ], - }, - { - name: "In Profit", - title: title("Supply In Profit"), - bottom: [ - ...flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ - pattern: tree.supply.inProfit, - name, - color, - }), - ), - ...mapCohorts(list, ({ name, color, tree }) => - line({ - series: tree.supply.inProfit.toCirculating.percent, - name, - color, - unit: Unit.pctSupply, - }), - ), - ], - }, - { - name: "In Loss", - title: title("Supply In Loss"), - bottom: [ - ...flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ - pattern: tree.supply.inLoss, - name, - color, - }), - ), - ...mapCohorts(list, ({ name, color, tree }) => - line({ - series: tree.supply.inLoss.toCirculating.percent, - name, - color, - unit: Unit.pctSupply, - }), - ), - ], - }, - ], - }, - groupedUtxoCountChart(list, all, title), - { - name: "Change", - tree: [ - groupedDeltaTree(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), - groupedDeltaTree(list, all, (c) => c.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - ], - }, - ], - }; +/** @param {{ list: readonly (CohortWithAdjusted | CohortAgeRange)[], all: CohortAll, title: (name: string) => string }} args */ +export function createGroupedHoldingsSectionWithOwnSupply({ list, all, title }) { + return [ + { + name: "Supply", + tree: [ + { name: "Total", title: title("Supply"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.total, name, color })) }, + { name: "In Profit", title: title("Supply In Profit"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.inProfit, name, color })) }, + { name: "In Loss", title: title("Supply In Loss"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.inLoss, name, color })) }, + { name: "% of Circulating", title: title("Supply (% of Circulating)"), bottom: mapCohorts(list, ({ name, color, tree }) => line({ series: tree.supply.toCirculating.percent, name, color, unit: Unit.percentage })) }, + ...groupedDeltaItems(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), + ], + }, + groupedUtxoCountFolder(list, all, title), + ]; } /** * Grouped holdings with full relative series (toCirculating + toOwn) * For: CohortFull, CohortLongTerm * @param {{ list: readonly (CohortFull | CohortLongTerm)[], all: CohortAll, title: (name: string) => string }} args - * @returns {PartialOptionsGroup} + * @returns {PartialOptionsTree} */ export function createGroupedHoldingsSectionWithRelative({ list, all, title }) { - return { - name: "Holdings", - tree: [ - { - name: "Supply", - tree: [ - { - name: "Total", - title: title("Supply"), - bottom: [ - ...flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ pattern: tree.supply.total, name, color }), - ), - ...mapCohorts(list, ({ name, color, tree }) => - line({ - series: tree.supply.toCirculating.percent, - name, - color, - unit: Unit.pctSupply, - }), - ), - ], - }, - { - name: "In Profit", - title: title("Supply In Profit"), - bottom: [ - ...flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ - pattern: tree.supply.inProfit, - name, - color, - }), - ), - ...mapCohorts(list, ({ name, color, tree }) => - line({ - series: tree.supply.inProfit.toCirculating.percent, - name, - color, - unit: Unit.pctSupply, - }), - ), - ...mapCohortsWithAll(list, all, ({ name, color, tree }) => - line({ - series: tree.supply.inProfit.toOwn.percent, - name, - color, - unit: Unit.pctOwn, - }), - ), - ...priceLines({ numbers: [100, 50, 0], unit: Unit.pctOwn }), - ], - }, - { - name: "In Loss", - title: title("Supply In Loss"), - bottom: [ - ...flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - satsBtcUsd({ - pattern: tree.supply.inLoss, - name, - color, - }), - ), - ...mapCohorts(list, ({ name, color, tree }) => - line({ - series: tree.supply.inLoss.toCirculating.percent, - name, - color, - unit: Unit.pctSupply, - }), - ), - ...mapCohortsWithAll(list, all, ({ name, color, tree }) => - line({ - series: tree.supply.inLoss.toOwn.percent, - name, - color, - unit: Unit.pctOwn, - }), - ), - ...priceLines({ numbers: [100, 50, 0], unit: Unit.pctOwn }), - ], - }, - ], - }, - groupedUtxoCountChart(list, all, title), - { - name: "Change", - tree: [ - groupedDeltaTree(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), - groupedDeltaTree(list, all, (c) => c.tree.outputs.unspentCount.delta, Unit.count, title, "UTXO Count"), - ], - }, - ], - }; + return [ + { + name: "Supply", + tree: [ + { name: "Total", title: title("Supply"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.total, name, color })) }, + { name: "In Profit", title: title("Supply In Profit"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.inProfit, name, color })) }, + { name: "In Loss", title: title("Supply In Loss"), bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => satsBtcUsd({ pattern: tree.supply.inLoss, name, color })) }, + { name: "% of Circulating", title: title("Supply (% of Circulating)"), bottom: mapCohorts(list, ({ name, color, tree }) => line({ series: tree.supply.toCirculating.percent, name, color, unit: Unit.percentage })) }, + { name: "% of Own Supply", title: title("Supply (% of Own)"), bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => line({ series: tree.supply.inProfit.toOwn.percent, name, color, unit: Unit.percentage })) }, + ...groupedDeltaItems(list, all, (c) => c.tree.supply.delta, Unit.sats, title, "Supply"), + ], + }, + groupedUtxoCountFolder(list, all, title), + ]; } diff --git a/website/scripts/options/distribution/index.js b/website/scripts/options/distribution/index.js index 3d41384f6..840979cc3 100644 --- a/website/scripts/options/distribution/index.js +++ b/website/scripts/options/distribution/index.js @@ -20,7 +20,7 @@ import { line, baseline, percentRatio, - sumsTree, + sumsTreeBaseline, rollingPercentRatioTree, } from "../series.js"; import { Unit } from "../../utils/units.js"; @@ -101,7 +101,7 @@ export function createCohortFolderAll(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSectionAll({ cohort, title }), + ...createHoldingsSectionAll({ cohort, title }), createValuationSectionFull({ cohort, title }), createPricesSectionFull({ cohort, title }), createCostBasisSectionWithPercentiles({ cohort, title }), @@ -121,7 +121,7 @@ export function createCohortFolderFull(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSectionWithRelative({ cohort, title }), + ...createHoldingsSectionWithRelative({ cohort, title }), createValuationSectionFull({ cohort, title }), createPricesSectionFull({ cohort, title }), createCostBasisSectionWithPercentiles({ cohort, title }), @@ -141,7 +141,7 @@ export function createCohortFolderWithAdjusted(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSectionWithOwnSupply({ cohort, title }), + ...createHoldingsSectionWithOwnSupply({ cohort, title }), createValuationSection({ cohort, title }), createPricesSectionBasic({ cohort, title }), createProfitabilitySectionWithInvestedCapitalPct({ cohort, title }), @@ -160,7 +160,7 @@ export function createCohortFolderWithNupl(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSectionWithRelative({ cohort, title }), + ...createHoldingsSectionWithRelative({ cohort, title }), createValuationSectionFull({ cohort, title }), createPricesSectionFull({ cohort, title }), createCostBasisSectionWithPercentiles({ cohort, title }), @@ -180,7 +180,7 @@ export function createCohortFolderLongTerm(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSectionWithRelative({ cohort, title }), + ...createHoldingsSectionWithRelative({ cohort, title }), createValuationSectionFull({ cohort, title }), createPricesSectionFull({ cohort, title }), createCostBasisSectionWithPercentiles({ cohort, title }), @@ -200,7 +200,7 @@ export function createCohortFolderAgeRange(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSectionWithOwnSupply({ cohort, title }), + ...createHoldingsSectionWithOwnSupply({ cohort, title }), createValuationSection({ cohort, title }), createPricesSectionBasic({ cohort, title }), createProfitabilitySectionWithInvestedCapitalPct({ cohort, title }), @@ -237,7 +237,7 @@ export function createCohortFolderBasicWithMarketCap(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSection({ cohort, title }), + ...createHoldingsSection({ cohort, title }), createValuationSection({ cohort, title }), createPricesSectionBasic({ cohort, title }), createProfitabilitySectionWithNupl({ cohort, title }), @@ -256,7 +256,7 @@ export function createCohortFolderBasicWithoutMarketCap(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSection({ cohort, title }), + ...createHoldingsSection({ cohort, title }), createValuationSection({ cohort, title }), createPricesSectionBasic({ cohort, title }), createProfitabilitySectionBasicWithInvestedCapitalPct({ cohort, title }), @@ -275,7 +275,7 @@ export function createCohortFolderAddress(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSectionAddress({ cohort, title }), + ...createHoldingsSectionAddress({ cohort, title }), createValuationSection({ cohort, title }), createPricesSectionBasic({ cohort, title }), createProfitabilitySectionAddress({ cohort, title }), @@ -294,7 +294,7 @@ export function createCohortFolderWithoutRelative(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSectionWithProfitLoss({ cohort, title }), + ...createHoldingsSectionWithProfitLoss({ cohort, title }), createValuationSection({ cohort, title }), createPricesSectionBasic({ cohort, title }), createProfitabilitySectionWithProfitLoss({ cohort, title }), @@ -313,7 +313,7 @@ export function createAddressCohortFolder(cohort) { return { name: cohort.name || "all", tree: [ - createHoldingsSectionAddressAmount({ cohort, title }), + ...createHoldingsSectionAddressAmount({ cohort, title }), createValuationSection({ cohort, title }), createPricesSectionBasic({ cohort, title }), createProfitabilitySectionWithNupl({ cohort, title }), @@ -340,7 +340,7 @@ export function createGroupedCohortFolderFull({ return { name: name || "all", tree: [ - createGroupedHoldingsSectionWithRelative({ list, all, title }), + ...createGroupedHoldingsSectionWithRelative({ list, all, title }), createGroupedValuationSectionWithOwnMarketCap({ list, all, title }), createGroupedPricesSection({ list, all, title }), createGroupedCostBasisSectionWithPercentiles({ list, all, title }), @@ -364,7 +364,7 @@ export function createGroupedCohortFolderWithAdjusted({ return { name: name || "all", tree: [ - createGroupedHoldingsSectionWithOwnSupply({ list, all, title }), + ...createGroupedHoldingsSectionWithOwnSupply({ list, all, title }), createGroupedValuationSection({ list, all, title }), createGroupedPricesSection({ list, all, title }), createGroupedProfitabilitySectionWithInvestedCapitalPct({ @@ -391,7 +391,7 @@ export function createGroupedCohortFolderWithNupl({ return { name: name || "all", tree: [ - createGroupedHoldingsSectionWithRelative({ list, all, title }), + ...createGroupedHoldingsSectionWithRelative({ list, all, title }), createGroupedValuationSection({ list, all, title }), createGroupedPricesSection({ list, all, title }), createGroupedCostBasisSectionWithPercentiles({ list, all, title }), @@ -415,7 +415,7 @@ export function createGroupedCohortFolderLongTerm({ return { name: name || "all", tree: [ - createGroupedHoldingsSectionWithRelative({ list, all, title }), + ...createGroupedHoldingsSectionWithRelative({ list, all, title }), createGroupedValuationSectionWithOwnMarketCap({ list, all, title }), createGroupedPricesSection({ list, all, title }), createGroupedCostBasisSectionWithPercentiles({ list, all, title }), @@ -439,7 +439,7 @@ export function createGroupedCohortFolderAgeRange({ return { name: name || "all", tree: [ - createGroupedHoldingsSectionWithOwnSupply({ list, all, title }), + ...createGroupedHoldingsSectionWithOwnSupply({ list, all, title }), createGroupedValuationSection({ list, all, title }), createGroupedPricesSection({ list, all, title }), createGroupedProfitabilitySectionWithInvestedCapitalPct({ @@ -471,14 +471,17 @@ export function createGroupedCohortFolderAgeRangeWithMatured({ const title = formatCohortTitle(groupTitle); folder.tree.push({ name: "Matured", - title: title("Matured Supply"), - bottom: list.flatMap((cohort) => - satsBtcUsd({ - pattern: cohort.matured.base, - name: cohort.name, - color: cohort.color, - }), - ), + tree: ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: title(`Matured Supply (${w.title})`), + bottom: list.flatMap((cohort) => + satsBtcUsd({ + pattern: cohort.matured.sum[w.key], + name: cohort.name, + color: cohort.color, + }), + ), + })), }); return folder; } @@ -497,7 +500,7 @@ export function createGroupedCohortFolderBasicWithMarketCap({ return { name: name || "all", tree: [ - createGroupedHoldingsSection({ list, all, title }), + ...createGroupedHoldingsSection({ list, all, title }), createGroupedValuationSection({ list, all, title }), createGroupedPricesSection({ list, all, title }), createGroupedProfitabilitySection({ list, all, title }), @@ -520,7 +523,7 @@ export function createGroupedCohortFolderBasicWithoutMarketCap({ return { name: name || "all", tree: [ - createGroupedHoldingsSection({ list, all, title }), + ...createGroupedHoldingsSection({ list, all, title }), createGroupedValuationSection({ list, all, title }), createGroupedPricesSection({ list, all, title }), createGroupedProfitabilitySectionBasicWithInvestedCapitalPct({ @@ -547,7 +550,7 @@ export function createGroupedCohortFolderAddress({ return { name: name || "all", tree: [ - createGroupedHoldingsSectionAddress({ list, all, title }), + ...createGroupedHoldingsSectionAddress({ list, all, title }), createGroupedValuationSection({ list, all, title }), createGroupedPricesSection({ list, all, title }), createGroupedProfitabilitySectionBasicWithInvestedCapitalPct({ @@ -574,7 +577,7 @@ export function createGroupedCohortFolderWithoutRelative({ return { name: name || "all", tree: [ - createGroupedHoldingsSectionWithProfitLoss({ list, all, title }), + ...createGroupedHoldingsSectionWithProfitLoss({ list, all, title }), createGroupedValuationSection({ list, all, title }), createGroupedPricesSection({ list, all, title }), createGroupedProfitabilitySectionWithProfitLoss({ list, all, title }), @@ -597,7 +600,7 @@ export function createGroupedAddressCohortFolder({ return { name: name || "all", tree: [ - createGroupedHoldingsSectionAddressAmount({ list, all, title }), + ...createGroupedHoldingsSectionAddressAmount({ list, all, title }), createGroupedValuationSection({ list, all, title }), createGroupedPricesSection({ list, all, title }), createGroupedProfitabilitySection({ list, all, title }), @@ -637,11 +640,10 @@ function singleBucketFolder({ name, color, pattern }) { name: "Change", tree: [ { - ...sumsTree({ + ...sumsTreeBaseline({ windows: pattern.supply.all.delta.absolute, title: `${name}: Supply Change`, unit: Unit.sats, - series: baseline, }), name: "Absolute", }, @@ -650,7 +652,7 @@ function singleBucketFolder({ name, color, pattern }) { windows: pattern.supply.all.delta.rate, title: `${name}: Supply Rate`, }), - name: "Rate", + name: "Growth Rate", }, ], }, @@ -743,7 +745,7 @@ function groupedBucketCharts(list, titlePrefix) { ], }, { - name: "Rate", + name: "Growth Rate", tree: [ { name: "Compare", diff --git a/website/scripts/options/distribution/profitability.js b/website/scripts/options/distribution/profitability.js index e67a721cd..e53b2588f 100644 --- a/website/scripts/options/distribution/profitability.js +++ b/website/scripts/options/distribution/profitability.js @@ -197,17 +197,6 @@ function unrealizedTreeMid(u, title) { // Invested Capital, Sentiment, NUPL // ============================================================================ -/** - * Invested capital (Full unrealized only) - * @param {FullRelativePattern | AllRelativePattern} u - * @returns {AnyFetchedSeriesBlueprint[]} - */ -function investedCapitalSeries(u) { - return [ - line({ series: u.investedCapital.inProfit.usd, name: "In Profit", color: colors.profit, unit: Unit.usd }), - line({ series: u.investedCapital.inLoss.usd, name: "In Loss", color: colors.loss, unit: Unit.usd }), - ]; -} /** * Sentiment (Full unrealized only) @@ -238,7 +227,7 @@ function nuplSeries(nupl) { /** * Flat metric folder: Compare + windows + Cumulative + optional % of Realized Cap * @param {Object} args - * @param {{ sum: Record, cumulative: { usd: AnySeriesPattern }, base: { usd: AnySeriesPattern } }} args.pattern + * @param {{ sum: Record, cumulative: { usd: AnySeriesPattern } }} args.pattern * @param {string} args.metricTitle * @param {Color} args.color * @param {(name: string) => string} args.title @@ -328,7 +317,7 @@ function realizedNetFolder({ netPnl, title, toRcap, extraChange = [] }) { ], }, { - name: "Rate", + name: "Growth Rate", tree: [ { name: "Compare", @@ -340,7 +329,7 @@ function realizedNetFolder({ netPnl, title, toRcap, extraChange = [] }) { ...ROLLING_WINDOWS.map((w) => ({ name: w.name, title: title(`Net Realized P&L Rate (${w.title})`), - bottom: percentRatioBaseline({ pattern: netPnl.delta.rate[w.key], name: "Rate" }), + bottom: percentRatioBaseline({ pattern: netPnl.delta.rate[w.key], name: "Growth Rate" }), })), ], }, @@ -561,11 +550,6 @@ export function createProfitabilitySectionAll({ cohort, title }) { tree: [ { name: "Unrealized", tree: unrealizedTreeAll(u, title) }, realizedSubfolderFull(r, title), - { - name: "Invested Capital", - title: title("Invested Capital In Profit & Loss"), - bottom: investedCapitalSeries(u), - }, { name: "Sentiment", title: title("Market Sentiment"), bottom: sentimentSeries(u) }, ], }; @@ -584,11 +568,6 @@ export function createProfitabilitySectionFull({ cohort, title }) { tree: [ { name: "Unrealized", tree: unrealizedTreeFull(u, title) }, realizedSubfolderFull(r, title), - { - name: "Invested Capital", - title: title("Invested Capital In Profit & Loss"), - bottom: investedCapitalSeries(u), - }, { name: "Sentiment", title: title("Market Sentiment"), bottom: sentimentSeries(u) }, ], }; @@ -628,11 +607,6 @@ export function createProfitabilitySectionLongTerm({ cohort, title }) { tree: [ { name: "Unrealized", tree: unrealizedTreeLongTerm(u, title) }, realizedSubfolderFull(r, title), - { - name: "Invested Capital", - title: title("Invested Capital In Profit & Loss"), - bottom: investedCapitalSeries(u), - }, { name: "Sentiment", title: title("Market Sentiment"), bottom: sentimentSeries(u) }, ], }; @@ -716,17 +690,23 @@ function groupedRealizedPnlSum(list, all, title) { return [ { name: "Profit", - title: title("Realized Profit"), - bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => - line({ series: tree.realized.profit.base.usd, name, color, unit: Unit.usd }), - ), + tree: ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: title(`Realized Profit (${w.title})`), + bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => + line({ series: tree.realized.profit.sum[w.key].usd, name, color, unit: Unit.usd }), + ), + })), }, { name: "Loss", - title: title("Realized Loss"), - bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => - line({ series: tree.realized.loss.base.usd, name, color, unit: Unit.usd }), - ), + tree: ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: title(`Realized Loss (${w.title})`), + bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => + line({ series: tree.realized.loss.sum[w.key].usd, name, color, unit: Unit.usd }), + ), + })), }, ]; } @@ -882,7 +862,7 @@ function groupedRealizedNetPnlDeltaTree(list, all, title) { ], }, { - name: "Rate", + name: "Growth Rate", tree: [ { name: "Compare", @@ -920,10 +900,13 @@ function groupedRealizedSubfolderFull(list, all, title) { { name: "P&L", tree: groupedRealizedPnlSumFull(list, all, title) }, { name: "Net", - title: title("Net Realized P&L"), - bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => - baseline({ series: tree.realized.netPnl.base.usd, name, color, unit: Unit.usd }), - ), + tree: ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: title(`Net Realized P&L (${w.title})`), + bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => + baseline({ series: tree.realized.netPnl.sum[w.key].usd, name, color, unit: Unit.usd }), + ), + })), }, groupedRealizedNetPnlDeltaTree(list, all, title), { name: "Rolling", tree: groupedRollingRealizedChartsFull(list, all, title) }, diff --git a/website/scripts/options/distribution/valuation.js b/website/scripts/options/distribution/valuation.js index 328ea6dab..f79ec50e5 100644 --- a/website/scripts/options/distribution/valuation.js +++ b/website/scripts/options/distribution/valuation.js @@ -1,176 +1,144 @@ /** - * Valuation section builders + * Capitalization section builders * * Structure: - * - Realized Cap: Total value at cost basis (USD) - * - 30d Change: Recent realized cap changes + * - Total: Realized Cap (USD) + * - Profitability: Invested Capital (Total + In Profit + In Loss) [full only] * - MVRV: Market Value to Realized Value ratio - * - * For cohorts WITH full ratio patterns: MVRV uses createRatioChart (price + percentiles) - * For cohorts WITHOUT full ratio patterns: MVRV is simple baseline + * - % of Own Market Cap [full only] + * - Change: Rolling window absolute changes + * - Growth Rate: Rolling window rate of change */ import { Unit } from "../../utils/units.js"; -import { ROLLING_WINDOWS, line, baseline, mapWindows, sumsTree, rollingPercentRatioTree, percentRatio, percentRatioBaseline } from "../series.js"; +import { colors } from "../../utils/colors.js"; +import { ROLLING_WINDOWS, line, baseline, mapWindows, sumsTreeBaseline, rollingPercentRatioTree, percentRatio, percentRatioBaseline } from "../series.js"; import { createRatioChart, mapCohortsWithAll, flatMapCohortsWithAll } from "../shared.js"; +// ============================================================================ +// Shared building blocks +// ============================================================================ + /** - * @param {UtxoCohortObject | CohortWithoutRelative} cohort - * @returns {AnyFetchedSeriesBlueprint[]} + * Single cohort: Change + Growth Rate items (flat) + * @param {UtxoCohortObject["tree"]} tree + * @param {(name: string) => string} title + * @returns {PartialOptionsTree} */ -function createSingleRealizedCapSeries(cohort) { - const { color, tree } = cohort; +function singleDeltaItems(tree, title) { return [ - line({ - series: tree.realized.cap.usd, - name: "Realized Cap", - color, - unit: Unit.usd, - }), + { ...sumsTreeBaseline({ windows: mapWindows(tree.realized.cap.delta.absolute, (c) => c.usd), title: title("Realized Cap Change"), unit: Unit.usd }), name: "Change" }, + { ...rollingPercentRatioTree({ windows: tree.realized.cap.delta.rate, title: title("Realized Cap Rate") }), name: "Growth Rate" }, ]; } /** - * Create valuation section for cohorts with full ratio patterns - * (CohortAll, CohortFull, CohortWithPercentiles) + * Grouped: Change + Growth Rate + MVRV items (flat) + * @param {readonly (UtxoCohortObject | CohortWithoutRelative)[]} list + * @param {CohortAll} all + * @param {(name: string) => string} title + * @returns {PartialOptionsTree} + */ +function groupedDeltaAndMvrv(list, all, title) { + return [ + { + name: "Change", + tree: ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: title(`Realized Cap Change (${w.title})`), + bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => + baseline({ series: tree.realized.cap.delta.absolute[w.key].usd, name, color, unit: Unit.usd }), + ), + })), + }, + { + name: "Growth Rate", + tree: ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: title(`Realized Cap Rate (${w.title})`), + bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => + percentRatioBaseline({ pattern: tree.realized.cap.delta.rate[w.key], name, color }), + ), + })), + }, + { + name: "MVRV", + title: title("MVRV"), + bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => + baseline({ series: tree.realized.mvrv, name, color, unit: Unit.ratio, base: 1 }), + ), + }, + ]; +} + +// ============================================================================ +// Single Cohort Sections +// ============================================================================ + +/** + * Full capitalization (has invested capital, own market cap ratio, full MVRV) * @param {{ cohort: CohortAll | CohortFull | CohortLongTerm, title: (name: string) => string }} args * @returns {PartialOptionsGroup} */ export function createValuationSectionFull({ cohort, title }) { const { tree, color } = cohort; return { - name: "Valuation", + name: "Capitalization", tree: [ + { name: "Total", title: title("Realized Cap"), bottom: [line({ series: tree.realized.cap.usd, name: "Realized Cap", color, unit: Unit.usd })] }, { - name: "Realized Cap", - tree: [ - { - name: "USD", - title: title("Realized Cap"), - bottom: createSingleRealizedCapSeries(cohort), - }, - { - name: "% of Own Market Cap", - title: title("Realized Cap (% of Own Market Cap)"), - bottom: percentRatioBaseline({ pattern: tree.realized.cap.toOwnMcap, name: "Rel. to Own Market Cap", color }), - }, + name: "Profitability", + title: title("Invested Capital"), + bottom: [ + line({ series: tree.realized.cap.usd, name: "Total", color: colors.default, unit: Unit.usd }), + line({ series: tree.unrealized.investedCapital.inProfit.usd, name: "In Profit", color: colors.profit, unit: Unit.usd }), + line({ series: tree.unrealized.investedCapital.inLoss.usd, name: "In Loss", color: colors.loss, unit: Unit.usd }), ], }, - { - name: "Change", - tree: [ - { ...sumsTree({ windows: mapWindows(tree.realized.cap.delta.absolute, (c) => c.usd), title: title("Realized Cap Change"), unit: Unit.usd, series: baseline }), name: "Absolute" }, - { ...rollingPercentRatioTree({ windows: tree.realized.cap.delta.rate, title: title("Realized Cap Rate") }), name: "Rate" }, - ], - }, - createRatioChart({ - title, - pricePattern: tree.realized.price, - ratio: tree.realized.price, - color, - name: "MVRV", - }), + createRatioChart({ title, pricePattern: tree.realized.price, ratio: tree.realized.price, color, name: "MVRV" }), + { name: "% of Own Market Cap", title: title("Realized Cap (% of Own Market Cap)"), bottom: percentRatioBaseline({ pattern: tree.realized.cap.toOwnMcap, name: "Rel. to Own Market Cap", color }) }, + ...singleDeltaItems(tree, title), ], }; } /** - * Create valuation section for cohorts with basic ratio patterns - * (CohortWithAdjusted, CohortBasic, CohortAddr, CohortWithoutRelative) + * Basic capitalization (no invested capital, simple MVRV) * @param {{ cohort: CohortWithAdjusted | CohortBasic | CohortAddr | CohortWithoutRelative, title: (name: string) => string }} args * @returns {PartialOptionsGroup} */ export function createValuationSection({ cohort, title }) { const { tree } = cohort; return { - name: "Valuation", + name: "Capitalization", tree: [ - { - name: "Realized Cap", - title: title("Realized Cap"), - bottom: createSingleRealizedCapSeries(cohort), - }, - { - name: "Change", - tree: [ - { ...sumsTree({ windows: mapWindows(tree.realized.cap.delta.absolute, (c) => c.usd), title: title("Realized Cap Change"), unit: Unit.usd, series: baseline }), name: "Absolute" }, - { ...rollingPercentRatioTree({ windows: tree.realized.cap.delta.rate, title: title("Realized Cap Rate") }), name: "Rate" }, - ], - }, - { - name: "MVRV", - title: title("MVRV"), - bottom: [ - baseline({ - series: tree.realized.mvrv, - name: "MVRV", - unit: Unit.ratio, - base: 1, - }), - ], - }, + { name: "Total", title: title("Realized Cap"), bottom: [line({ series: tree.realized.cap.usd, name: "Realized Cap", color: cohort.color, unit: Unit.usd })] }, + ...singleDeltaItems(tree, title), + { name: "MVRV", title: title("MVRV"), bottom: [baseline({ series: tree.realized.mvrv, name: "MVRV", unit: Unit.ratio, base: 1 })] }, ], }; } +// ============================================================================ +// Grouped Cohort Sections +// ============================================================================ + /** * @param {{ list: readonly (UtxoCohortObject | CohortWithoutRelative)[], all: CohortAll, title: (name: string) => string }} args * @returns {PartialOptionsGroup} */ export function createGroupedValuationSection({ list, all, title }) { return { - name: "Valuation", + name: "Capitalization", tree: [ { - name: "Realized Cap", + name: "Total", title: title("Realized Cap"), bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => - line({ - series: tree.realized.cap.usd, - name, - color, - unit: Unit.usd, - }), - ), - }, - { - name: "Change", - tree: [ - { - name: "Absolute", - tree: ROLLING_WINDOWS.map((w) => ({ - name: w.name, - title: title(`Realized Cap Change (${w.title})`), - bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => - baseline({ series: tree.realized.cap.delta.absolute[w.key].usd, name, color, unit: Unit.usd }), - ), - })), - }, - { - name: "Rate", - tree: ROLLING_WINDOWS.map((w) => ({ - name: w.name, - title: title(`Realized Cap Rate (${w.title})`), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - percentRatio({ pattern: tree.realized.cap.delta.rate[w.key], name, color }), - ), - })), - }, - ], - }, - { - name: "MVRV", - title: title("MVRV"), - bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => - baseline({ - series: tree.realized.mvrv, - name, - color, - unit: Unit.ratio, - base: 1, - }), + line({ series: tree.realized.cap.usd, name, color, unit: Unit.usd }), ), }, + ...groupedDeltaAndMvrv(list, all, title), ], }; } @@ -179,71 +147,25 @@ export function createGroupedValuationSection({ list, all, title }) { * @param {{ list: readonly (CohortAll | CohortFull | CohortLongTerm)[], all: CohortAll, title: (name: string) => string }} args * @returns {PartialOptionsGroup} */ -export function createGroupedValuationSectionWithOwnMarketCap({ - list, - all, - title, -}) { +export function createGroupedValuationSectionWithOwnMarketCap({ list, all, title }) { return { - name: "Valuation", + name: "Capitalization", tree: [ { - name: "Realized Cap", - tree: [ - { - name: "USD", - title: title("Realized Cap"), - bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => - line({ series: tree.realized.cap.usd, name, color, unit: Unit.usd }), - ), - }, - { - name: "% of Own Market Cap", - title: title("Realized Cap (% of Own Market Cap)"), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - percentRatio({ pattern: tree.realized.cap.toOwnMcap, name, color }), - ), - }, - ], - }, - { - name: "Change", - tree: [ - { - name: "Absolute", - tree: ROLLING_WINDOWS.map((w) => ({ - name: w.name, - title: title(`Realized Cap Change (${w.title})`), - bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => - baseline({ series: tree.realized.cap.delta.absolute[w.key].usd, name, color, unit: Unit.usd }), - ), - })), - }, - { - name: "Rate", - tree: ROLLING_WINDOWS.map((w) => ({ - name: w.name, - title: title(`Realized Cap Rate (${w.title})`), - bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => - percentRatio({ pattern: tree.realized.cap.delta.rate[w.key], name, color }), - ), - })), - }, - ], - }, - { - name: "MVRV", - title: title("MVRV"), + name: "Total", + title: title("Realized Cap"), bottom: mapCohortsWithAll(list, all, ({ name, color, tree }) => - baseline({ - series: tree.realized.mvrv, - name, - color, - unit: Unit.ratio, - base: 1, - }), + line({ series: tree.realized.cap.usd, name, color, unit: Unit.usd }), ), }, + { + name: "% of Own Market Cap", + title: title("Realized Cap (% of Own Market Cap)"), + bottom: flatMapCohortsWithAll(list, all, ({ name, color, tree }) => + percentRatio({ pattern: tree.realized.cap.toOwnMcap, name, color }), + ), + }, + ...groupedDeltaAndMvrv(list, all, title), ], }; } diff --git a/website/scripts/options/series.js b/website/scripts/options/series.js index 9a8faf3cc..0b175ff26 100644 --- a/website/scripts/options/series.js +++ b/website/scripts/options/series.js @@ -408,24 +408,16 @@ export function statsAtWindow(pattern, window) { } /** - * Create a Rolling folder tree from a _1m1w1y24hPattern (4 rolling windows) + * Rolling folder tree with line series * @param {Object} args * @param {{ _24h: AnySeriesPattern, _1w: AnySeriesPattern, _1m: AnySeriesPattern, _1y: AnySeriesPattern }} args.windows - * @param {string} args.title - Compare chart title - * @param {(w: typeof ROLLING_WINDOWS[number]) => string} args.windowTitle - Individual window chart title + * @param {string} args.title + * @param {(w: typeof ROLLING_WINDOWS[number]) => string} args.windowTitle * @param {Unit} args.unit * @param {string} args.name - * @param {(args: {series: AnySeriesPattern, name: string, color: Color, unit: Unit}) => AnyFetchedSeriesBlueprint} [args.series] * @returns {PartialOptionsGroup} */ -function rollingWindowsTree({ - windows, - title, - windowTitle, - unit, - name, - series = line, -}) { +function rollingWindowsTreeLine({ windows, title, windowTitle, unit, name }) { return { name, tree: [ @@ -433,25 +425,43 @@ function rollingWindowsTree({ name: "Compare", title, bottom: ROLLING_WINDOWS.map((w) => - series({ - series: windows[w.key], - name: w.name, - color: w.color, - unit, - }), + line({ series: windows[w.key], name: w.name, color: w.color, unit }), ), }, ...ROLLING_WINDOWS.map((w) => ({ name: w.name, title: windowTitle(w), - bottom: [ - series({ - series: windows[w.key], - name: w.name, - color: w.color, - unit, - }), - ], + bottom: [line({ series: windows[w.key], name: w.name, unit })], + })), + ], + }; +} + +/** + * Rolling folder tree with baseline series + * @param {Object} args + * @param {{ _24h: AnySeriesPattern, _1w: AnySeriesPattern, _1m: AnySeriesPattern, _1y: AnySeriesPattern }} args.windows + * @param {string} args.title + * @param {(w: typeof ROLLING_WINDOWS[number]) => string} args.windowTitle + * @param {Unit} args.unit + * @param {string} args.name + * @returns {PartialOptionsGroup} + */ +function rollingWindowsTreeBaseline({ windows, title, windowTitle, unit, name }) { + return { + name, + tree: [ + { + name: "Compare", + title, + bottom: ROLLING_WINDOWS.map((w) => + baseline({ series: windows[w.key], name: w.name, color: w.color, unit }), + ), + }, + ...ROLLING_WINDOWS.map((w) => ({ + name: w.name, + title: windowTitle(w), + bottom: [baseline({ series: windows[w.key], name: w.name, unit })], })), ], }; @@ -584,17 +594,32 @@ export function sumsAndAveragesCumulative({ sum, average, cumulative, title, uni * @param {{ _24h: AnySeriesPattern, _1w: AnySeriesPattern, _1m: AnySeriesPattern, _1y: AnySeriesPattern }} args.windows * @param {string} args.title * @param {Unit} args.unit - * @param {(args: {series: AnySeriesPattern, name: string, color: Color, unit: Unit}) => AnyFetchedSeriesBlueprint} [args.series] * @returns {PartialOptionsGroup} */ -export function sumsTree({ windows, title, unit, series }) { - return rollingWindowsTree({ +export function sumsTree({ windows, title, unit }) { + return rollingWindowsTreeLine({ + windows, + title, + windowTitle: (w) => `${title} ${w.title} Sum`, + unit, + name: "Sums", + }); +} + +/** + * @param {Object} args + * @param {{ _24h: AnySeriesPattern, _1w: AnySeriesPattern, _1m: AnySeriesPattern, _1y: AnySeriesPattern }} args.windows + * @param {string} args.title + * @param {Unit} args.unit + * @returns {PartialOptionsGroup} + */ +export function sumsTreeBaseline({ windows, title, unit }) { + return rollingWindowsTreeBaseline({ windows, title, windowTitle: (w) => `${title} ${w.title} Sum`, unit, name: "Sums", - ...(series ? { series } : {}), }); } @@ -819,20 +844,14 @@ export function percentRatioBaseline({ pattern, name, color, defaultActive }) { } /** - * Create a Rolling folder tree where each window is a BpsPercentRatioPattern (percent + ratio) + * Rolling folder tree with percentRatio series (colored in compare, plain in individual) * @param {Object} args * @param {{ _24h: { percent: AnySeriesPattern, ratio: AnySeriesPattern }, _1w: { percent: AnySeriesPattern, ratio: AnySeriesPattern }, _1m: { percent: AnySeriesPattern, ratio: AnySeriesPattern }, _1y: { percent: AnySeriesPattern, ratio: AnySeriesPattern } }} args.windows * @param {string} args.title * @param {string} [args.name] - * @param {(args: {pattern: { percent: AnySeriesPattern, ratio: AnySeriesPattern }, name: string, color?: Color}) => AnyFetchedSeriesBlueprint[]} [args.series] * @returns {PartialOptionsGroup} */ -export function rollingPercentRatioTree({ - windows, - title, - name = "Sums", - series = percentRatio, -}) { +export function rollingPercentRatioTree({ windows, title, name = "Sums" }) { return { name, tree: [ @@ -840,17 +859,13 @@ export function rollingPercentRatioTree({ name: "Compare", title: `${title} Rolling`, bottom: ROLLING_WINDOWS.flatMap((w) => - percentRatio({ - pattern: windows[w.key], - name: w.name, - color: w.color, - }), + percentRatio({ pattern: windows[w.key], name: w.name, color: w.color }), ), }, ...ROLLING_WINDOWS.map((w) => ({ name: w.name, title: `${title} (${w.title})`, - bottom: series({ pattern: windows[w.key], name: w.name }), + bottom: percentRatioBaseline({ pattern: windows[w.key], name: w.name }), })), ], }; @@ -900,7 +915,6 @@ export function deltaTree({ delta, title, unit, extract }) { windows: delta.rate, title: `${title} Growth Rate`, name: "Growth Rate", - series: percentRatioBaseline, }), ]; } diff --git a/website/scripts/options/shared.js b/website/scripts/options/shared.js index 69a466b76..208ce9948 100644 --- a/website/scripts/options/shared.js +++ b/website/scripts/options/shared.js @@ -152,10 +152,10 @@ export function satsBtcUsdBaseline({ pattern, name, color, defaultActive }) { } /** - * Create sats/btc/usd series from any value pattern using base or cumulative key + * Create sats/btc/usd series from a value pattern's cumulative * @param {Object} args - * @param {{ base: AnyValuePattern, cumulative: AnyValuePattern }} args.source - * @param {'base' | 'cumulative'} args.key + * @param {{ cumulative: AnyValuePattern }} args.source + * @param {'cumulative'} args.key * @param {string} args.name * @param {Color} [args.color] * @param {boolean} [args.defaultActive] @@ -173,10 +173,10 @@ export function satsBtcUsdFrom({ source, key, name, color, defaultActive }) { /** * Create coinbase/subsidy/fee series from separate sources * @param {Object} args - * @param {{ base: AnyValuePattern, cumulative: AnyValuePattern }} args.coinbase - * @param {{ base: AnyValuePattern, cumulative: AnyValuePattern }} args.subsidy - * @param {{ base: AnyValuePattern, cumulative: AnyValuePattern }} args.fee - * @param {'base' | 'cumulative'} args.key + * @param {{ cumulative: AnyValuePattern }} args.coinbase + * @param {{ cumulative: AnyValuePattern }} args.subsidy + * @param {{ cumulative: AnyValuePattern }} args.fee + * @param {'cumulative'} args.key * @returns {FetchedLineSeriesBlueprint[]} */ export function revenueBtcSatsUsd({ coinbase, subsidy, fee, key }) { diff --git a/website/scripts/options/unused.js b/website/scripts/options/unused.js index 3242db71b..7d429005a 100644 --- a/website/scripts/options/unused.js +++ b/website/scripts/options/unused.js @@ -1,15 +1,4 @@ import { localhost } from "../utils/env.js"; -import { INDEX_LABEL } from "../utils/serde.js"; - -/** - * Check if a series pattern has at least one chartable index - * @param {AnySeriesPattern} node - * @returns {boolean} - */ -function hasChartableIndex(node) { - const indexes = node.indexes(); - return indexes.some((idx) => idx in INDEX_LABEL); -} /** * Walk a series tree and collect all chartable series patterns @@ -20,7 +9,7 @@ function hasChartableIndex(node) { function walkSeries(node, map, path) { if (node && "by" in node) { const seriesNode = /** @type {AnySeriesPattern} */ (node); - if (!hasChartableIndex(seriesNode)) return; + if (!seriesNode.by.day1) return; map.set(seriesNode, path); } else if (node && typeof node === "object") { for (const [key, value] of Object.entries(node)) { diff --git a/website/scripts/types.js b/website/scripts/types.js index 95edcbeb2..135916685 100644 --- a/website/scripts/types.js +++ b/website/scripts/types.js @@ -38,7 +38,7 @@ * @typedef {Brk.SeriesTree_Cohorts_Utxo_All_Unrealized} AllRelativePattern * @typedef {keyof Brk.BtcCentsSatsUsdPattern} BtcSatsUsdKey * @typedef {Brk.BtcCentsSatsUsdPattern} SupplyPattern - * @typedef {Brk.AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} BlockSizePattern + * @typedef {Brk.AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} BlockSizePattern * @typedef {keyof Brk.SeriesTree_Cohorts_Utxo_Type} SpendableType * @typedef {keyof Brk.SeriesTree_Addrs_Raw} AddressableType * @@ -58,8 +58,8 @@ * @typedef {Brk.BpsCentsPercentilesRatioSatsUsdPattern} PriceRatioPercentilesPattern * AnyRatioPattern: full ratio pattern with percentiles, SMAs, and std dev bands * @typedef {Brk.BpsCentsPercentilesRatioSatsSmaStdUsdPattern} AnyRatioPattern - * FullValuePattern: base + cumulative + sum + average rolling windows (sats/btc/cents/usd) - * @typedef {Brk.AverageBaseCumulativeSumPattern3} FullValuePattern + * FullValuePattern: block + cumulative + sum + average rolling windows (sats/btc/cents/usd) + * @typedef {Brk.AverageBlockCumulativeSumPattern3} FullValuePattern * RollingWindowSlot: a single rolling window with stats (pct10, pct25, median, pct75, pct90, max, min) per unit * @typedef {Brk.MaxMedianMinPct10Pct25Pct75Pct90Pattern} RollingWindowSlot * @typedef {Brk.AnySeriesPattern} AnySeriesPattern @@ -86,11 +86,11 @@ * @typedef {Brk.CapGrossInvestorLossMvrvNetPeakPriceProfitSellSoprPattern} RealizedPattern3 * @typedef {Brk.CapGrossInvestorLossMvrvNetPeakPriceProfitSellSoprPattern} RealizedPattern4 * - * Transfer volume pattern (base + cumulative + inProfit/inLoss + sum windows) - * @typedef {Brk.AverageBaseCumulativeInSumPattern} TransferVolumePattern + * Transfer volume pattern (block + cumulative + inProfit/inLoss + sum windows) + * @typedef {Brk.AverageBlockCumulativeInSumPattern} TransferVolumePattern * - * Realized profit/loss pattern (base + cumulative + sum windows, cents/usd) - * @typedef {Brk.BaseCumulativeSumPattern} RealizedProfitLossPattern + * Realized profit/loss pattern (block + cumulative + sum windows, cents/usd) + * @typedef {Brk.BlockCumulativeSumPattern} RealizedProfitLossPattern * * Full activity pattern (coindays, coinyears, dormancy, transfer volume) * @typedef {Brk.CoindaysCoinyearsDormancyTransferPattern} FullActivityPattern @@ -103,10 +103,10 @@ * @typedef {Brk.SeriesTree_Cohorts_Utxo_Lth_Realized} LthRealizedPattern * * Net PnL pattern with change (base + change + cumulative + delta + rel + sum) - * @typedef {Brk.BaseChangeCumulativeDeltaSumToPattern} NetPnlFullPattern + * @typedef {Brk.BlockChangeCumulativeDeltaSumToPattern} NetPnlFullPattern * * Net PnL basic pattern (base + cumulative + delta + sum) - * @typedef {Brk.BaseCumulativeDeltaSumPattern} NetPnlBasicPattern + * @typedef {Brk.BlockCumulativeDeltaSumPattern} NetPnlBasicPattern * * Mid realized pattern (cap + loss + MVRV + net + price + profit + SOPR) * @typedef {Brk.CapLossMvrvNetPriceProfitSoprPattern} MidRealizedPattern @@ -144,7 +144,7 @@ */ /** * Full stats pattern: cumulative, sum, average, min, max, percentiles + rolling - * @typedef {Brk.AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} FullStatsPattern + * @typedef {Brk.AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} FullStatsPattern */ /** * Aggregated pattern: cumulative + rolling (with distribution stats) + sum (no base) @@ -152,20 +152,22 @@ */ /** * Sum stats pattern: cumulative, sum, average, min, max, percentiles + rolling (same as FullStatsPattern) - * @typedef {Brk.AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} SumStatsPattern + * @typedef {Brk.AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} SumStatsPattern */ /** * Full stats pattern for Bitcoin (non-generic variant) - same as FullStatsPattern - * @typedef {Brk.AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} BtcFullStatsPattern + * @typedef {Brk.AverageBlockCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} BtcFullStatsPattern */ /** * Count pattern: height, cumulative, and rolling sum windows * @template T - * @typedef {Brk.AverageBaseCumulativeSumPattern} CountPattern + * @typedef {Brk.AverageBlockCumulativeSumPattern} CountPattern */ /** * Full per-block pattern: height, cumulative, sum, and distribution stats (all flat) - * @typedef {Brk.AverageBaseCumulativeMaxMedianMinPct10Pct25Pct75Pct90SumPattern} FullPerBlockPattern + * FullPerBlockPattern: cumulative + sum + average + distribution stats (used by chartsFromFull) + * Note: some callers also have .block but the function doesn't use it + * @typedef {Omit} FullPerBlockPattern */ /** * Any stats pattern union - patterns with sum/cumulative + percentiles