brk-client 0.3.0-beta.2 → 0.3.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +246 -226
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -314,8 +314,8 @@ Matches mempool.space/bitcoin-cli behavior.
314
314
  */
315
315
  /**
316
316
  * Raw cents squared (u128) - stores cents² × sats without division.
317
- * Used for precise accumulation of investor cap values: Σ(price² × sats).
318
- * investor_price = investor_cap_raw / realized_cap_raw
317
+ * Used for precise accumulation of capitalized cap values: Σ(price² × sats).
318
+ * capitalized_price = capitalized_cap_raw / realized_cap_raw
319
319
  *
320
320
  * @typedef {number} CentsSquaredSats
321
321
  */
@@ -327,7 +327,7 @@ Matches mempool.space/bitcoin-cli behavior.
327
327
  /**
328
328
  * Cohort identifier for cost basis distribution.
329
329
  *
330
- * @typedef {string} Cohort
330
+ * @typedef {("all"|"sth"|"lth"|"under_1h_old"|"1h_to_1d_old"|"1d_to_1w_old"|"1w_to_1m_old"|"1m_to_2m_old"|"2m_to_3m_old"|"3m_to_4m_old"|"4m_to_5m_old"|"5m_to_6m_old"|"6m_to_1y_old"|"1y_to_2y_old"|"2y_to_3y_old"|"3y_to_4y_old"|"4y_to_5y_old"|"5y_to_6y_old"|"6y_to_7y_old"|"7y_to_8y_old"|"8y_to_10y_old"|"10y_to_12y_old"|"12y_to_15y_old"|"over_15y_old")} Cohort
331
331
  */
332
332
  /**
333
333
  * Coinbase scriptSig tag for pool identification.
@@ -516,7 +516,7 @@ Matches mempool.space/bitcoin-cli behavior.
516
516
  * @property {Sats} received - Satoshis received by this address
517
517
  * @property {Sats} sent - Satoshis sent by this address
518
518
  * @property {CentsSats} realizedCapRaw - The realized capitalization: Σ(price × sats)
519
- * @property {CentsSquaredSats} investorCapRaw - The investor capitalization: Σ(price² × sats)
519
+ * @property {CentsSquaredSats} capitalizedCapRaw - The capitalized cap: Σ(price² × sats)
520
520
  */
521
521
  /** @typedef {TypeIndex} FundedAddrIndex */
522
522
  /** @typedef {number} Halving */
@@ -626,7 +626,7 @@ Matches mempool.space/bitcoin-cli behavior.
626
626
  * Block info in a mempool.space like format for fee estimation.
627
627
  *
628
628
  * @typedef {Object} MempoolBlock
629
- * @property {number} blockSize - Total block size in weight units
629
+ * @property {number} blockSize - Total serialized block size in bytes (witness + non-witness).
630
630
  * @property {number} blockVSize - Total block virtual size in vbytes
631
631
  * @property {number} nTx - Number of transactions in the projected block
632
632
  * @property {Sats} totalFees - Total fees in satoshis
@@ -2098,10 +2098,10 @@ function create_10y1m1w1y2y3m3y4y5y6m6y8yPattern3(client, acc) {
2098
2098
  */
2099
2099
 
2100
2100
  /**
2101
- * @typedef {Object} CapGrossInvestorLossMvrvNetPeakPriceProfitSellSoprPattern
2101
+ * @typedef {Object} CapCapitalizedGrossLossMvrvNetPeakPriceProfitSellSoprPattern
2102
2102
  * @property {CentsDeltaToUsdPattern} cap
2103
+ * @property {PricePattern} capitalized
2103
2104
  * @property {BlockCumulativeSumPattern} grossPnl
2104
- * @property {PricePattern} investor
2105
2105
  * @property {BlockCumulativeNegativeSumPattern} loss
2106
2106
  * @property {SeriesPattern1<StoredF32>} mvrv
2107
2107
  * @property {BlockChangeCumulativeDeltaSumPattern} netPnl
@@ -2301,7 +2301,7 @@ function createIndexPct0Pct1Pct2Pct5Pct95Pct98Pct99ScorePattern(client, acc) {
2301
2301
  }
2302
2302
 
2303
2303
  /**
2304
- * @typedef {Object} AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5
2304
+ * @typedef {Object} AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6
2305
2305
  * @property {AverageBlockCumulativeSumPattern<StoredU64>} all
2306
2306
  * @property {AverageBlockCumulativeSumPattern<StoredU64>} p2a
2307
2307
  * @property {AverageBlockCumulativeSumPattern<StoredU64>} p2pk33
@@ -2314,12 +2314,12 @@ function createIndexPct0Pct1Pct2Pct5Pct95Pct98Pct99ScorePattern(client, acc) {
2314
2314
  */
2315
2315
 
2316
2316
  /**
2317
- * Create a AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5 pattern node
2317
+ * Create a AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6 pattern node
2318
2318
  * @param {BrkClientBase} client
2319
2319
  * @param {string} acc - Accumulated series name
2320
- * @returns {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5}
2320
+ * @returns {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6}
2321
2321
  */
2322
- function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5(client, acc) {
2322
+ function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(client, acc) {
2323
2323
  return {
2324
2324
  all: createAverageBlockCumulativeSumPattern(client, acc),
2325
2325
  p2a: createAverageBlockCumulativeSumPattern(client, _p('p2a', acc)),
@@ -2334,7 +2334,7 @@ function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5(client, acc) {
2334
2334
  }
2335
2335
 
2336
2336
  /**
2337
- * @typedef {Object} AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3
2337
+ * @typedef {Object} AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4
2338
2338
  * @property {SeriesPattern1<StoredU64>} all
2339
2339
  * @property {SeriesPattern1<StoredU64>} p2a
2340
2340
  * @property {SeriesPattern1<StoredU64>} p2pk33
@@ -2347,12 +2347,12 @@ function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5(client, acc) {
2347
2347
  */
2348
2348
 
2349
2349
  /**
2350
- * Create a AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3 pattern node
2350
+ * Create a AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4 pattern node
2351
2351
  * @param {BrkClientBase} client
2352
2352
  * @param {string} acc - Accumulated series name
2353
- * @returns {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3}
2353
+ * @returns {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4}
2354
2354
  */
2355
- function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3(client, acc) {
2355
+ function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4(client, acc) {
2356
2356
  return {
2357
2357
  all: createSeriesPattern1(client, acc),
2358
2358
  p2a: createSeriesPattern1(client, _p('p2a', acc)),
@@ -2367,7 +2367,7 @@ function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3(client, acc) {
2367
2367
  }
2368
2368
 
2369
2369
  /**
2370
- * @typedef {Object} AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6
2370
+ * @typedef {Object} AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7
2371
2371
  * @property {_1m1w1y24hBpsPercentRatioPattern} all
2372
2372
  * @property {_1m1w1y24hBpsPercentRatioPattern} p2a
2373
2373
  * @property {_1m1w1y24hBpsPercentRatioPattern} p2pk33
@@ -2380,12 +2380,12 @@ function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3(client, acc) {
2380
2380
  */
2381
2381
 
2382
2382
  /**
2383
- * Create a AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6 pattern node
2383
+ * Create a AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7 pattern node
2384
2384
  * @param {BrkClientBase} client
2385
2385
  * @param {string} acc - Accumulated series name
2386
- * @returns {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6}
2386
+ * @returns {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7}
2387
2387
  */
2388
- function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(client, acc) {
2388
+ function createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7(client, acc) {
2389
2389
  return {
2390
2390
  all: create_1m1w1y24hBpsPercentRatioPattern(client, acc),
2391
2391
  p2a: create_1m1w1y24hBpsPercentRatioPattern(client, _p('p2a', acc)),
@@ -2433,11 +2433,11 @@ function createAverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) {
2433
2433
  }
2434
2434
 
2435
2435
  /**
2436
- * @typedef {Object} GrossInvestedInvestorLossNetNuplProfitSentimentPattern2
2436
+ * @typedef {Object} CapitalizedGrossInvestedLossNetNuplProfitSentimentPattern2
2437
+ * @property {SeriesPattern18<CentsSquaredSats>} capitalizedCapInLossRaw
2438
+ * @property {SeriesPattern18<CentsSquaredSats>} capitalizedCapInProfitRaw
2437
2439
  * @property {CentsUsdPattern3} grossPnl
2438
- * @property {InPattern} investedCapital
2439
- * @property {SeriesPattern18<CentsSquaredSats>} investorCapInLossRaw
2440
- * @property {SeriesPattern18<CentsSquaredSats>} investorCapInProfitRaw
2440
+ * @property {InPattern2} investedCapital
2441
2441
  * @property {CentsNegativeToUsdPattern2} loss
2442
2442
  * @property {CentsToUsdPattern3} netPnl
2443
2443
  * @property {BpsRatioPattern} nupl
@@ -2446,17 +2446,17 @@ function createAverageMaxMedianMinPct10Pct25Pct75Pct90SumPattern(client, acc) {
2446
2446
  */
2447
2447
 
2448
2448
  /**
2449
- * Create a GrossInvestedInvestorLossNetNuplProfitSentimentPattern2 pattern node
2449
+ * Create a CapitalizedGrossInvestedLossNetNuplProfitSentimentPattern2 pattern node
2450
2450
  * @param {BrkClientBase} client
2451
2451
  * @param {string} acc - Accumulated series name
2452
- * @returns {GrossInvestedInvestorLossNetNuplProfitSentimentPattern2}
2452
+ * @returns {CapitalizedGrossInvestedLossNetNuplProfitSentimentPattern2}
2453
2453
  */
2454
- function createGrossInvestedInvestorLossNetNuplProfitSentimentPattern2(client, acc) {
2454
+ function createCapitalizedGrossInvestedLossNetNuplProfitSentimentPattern2(client, acc) {
2455
2455
  return {
2456
+ capitalizedCapInLossRaw: createSeriesPattern18(client, _m(acc, 'capitalized_cap_in_loss_raw')),
2457
+ capitalizedCapInProfitRaw: createSeriesPattern18(client, _m(acc, 'capitalized_cap_in_profit_raw')),
2456
2458
  grossPnl: createCentsUsdPattern3(client, _m(acc, 'unrealized_gross_pnl')),
2457
- investedCapital: createInPattern(client, _m(acc, 'invested_capital_in')),
2458
- investorCapInLossRaw: createSeriesPattern18(client, _m(acc, 'investor_cap_in_loss_raw')),
2459
- investorCapInProfitRaw: createSeriesPattern18(client, _m(acc, 'investor_cap_in_profit_raw')),
2459
+ investedCapital: createInPattern2(client, _m(acc, 'invested_capital_in')),
2460
2460
  loss: createCentsNegativeToUsdPattern2(client, _m(acc, 'unrealized_loss')),
2461
2461
  netPnl: createCentsToUsdPattern3(client, _m(acc, 'net_unrealized_pnl')),
2462
2462
  nupl: createBpsRatioPattern(client, _m(acc, 'nupl')),
@@ -2717,7 +2717,7 @@ function create_1m1w1y2y4yAllPattern(client, acc) {
2717
2717
  * @property {BaseDeltaPattern} addrCount
2718
2718
  * @property {SpendingSpentUnspentPattern} outputs
2719
2719
  * @property {CapLossMvrvPriceProfitPattern} realized
2720
- * @property {DeltaTotalPattern} supply
2720
+ * @property {DeltaDominanceTotalPattern} supply
2721
2721
  * @property {NuplPattern} unrealized
2722
2722
  */
2723
2723
 
@@ -2733,7 +2733,7 @@ function createActivityAddrOutputsRealizedSupplyUnrealizedPattern(client, acc) {
2733
2733
  addrCount: createBaseDeltaPattern(client, _m(acc, 'addr_count')),
2734
2734
  outputs: createSpendingSpentUnspentPattern(client, acc),
2735
2735
  realized: createCapLossMvrvPriceProfitPattern(client, acc),
2736
- supply: createDeltaTotalPattern(client, _m(acc, 'supply')),
2736
+ supply: createDeltaDominanceTotalPattern(client, _m(acc, 'supply')),
2737
2737
  unrealized: createNuplPattern(client, _m(acc, 'nupl')),
2738
2738
  };
2739
2739
  }
@@ -2792,33 +2792,6 @@ function createBpsCentsPercentilesRatioSatsUsdPattern(client, acc) {
2792
2792
  };
2793
2793
  }
2794
2794
 
2795
- /**
2796
- * @typedef {Object} BtcCentsSatsToUsdPattern3
2797
- * @property {SeriesPattern1<Bitcoin>} btc
2798
- * @property {SeriesPattern1<Cents>} cents
2799
- * @property {SeriesPattern1<Sats>} sats
2800
- * @property {BpsPercentRatioPattern2} toCirculating
2801
- * @property {BpsPercentRatioPattern2} toOwn
2802
- * @property {SeriesPattern1<Dollars>} usd
2803
- */
2804
-
2805
- /**
2806
- * Create a BtcCentsSatsToUsdPattern3 pattern node
2807
- * @param {BrkClientBase} client
2808
- * @param {string} acc - Accumulated series name
2809
- * @returns {BtcCentsSatsToUsdPattern3}
2810
- */
2811
- function createBtcCentsSatsToUsdPattern3(client, acc) {
2812
- return {
2813
- btc: createSeriesPattern1(client, acc),
2814
- cents: createSeriesPattern1(client, _m(acc, 'cents')),
2815
- sats: createSeriesPattern1(client, _m(acc, 'sats')),
2816
- toCirculating: createBpsPercentRatioPattern2(client, _m(acc, 'to_circulating')),
2817
- toOwn: createBpsPercentRatioPattern2(client, _m(acc, 'to_own')),
2818
- usd: createSeriesPattern1(client, _m(acc, 'usd')),
2819
- };
2820
- }
2821
-
2822
2795
  /**
2823
2796
  * @typedef {Object} CentsNegativeToUsdPattern2
2824
2797
  * @property {SeriesPattern1<Cents>} cents
@@ -2847,55 +2820,55 @@ function createCentsNegativeToUsdPattern2(client, acc) {
2847
2820
  }
2848
2821
 
2849
2822
  /**
2850
- * @typedef {Object} DeltaHalfInToTotalPattern
2823
+ * @typedef {Object} DeltaDominanceHalfInTotalPattern2
2851
2824
  * @property {AbsoluteRatePattern} delta
2825
+ * @property {BpsPercentRatioPattern2} dominance
2852
2826
  * @property {BtcCentsSatsUsdPattern} half
2853
- * @property {BtcCentsSatsToUsdPattern} inLoss
2854
- * @property {BtcCentsSatsToUsdPattern} inProfit
2855
- * @property {BpsPercentRatioPattern2} toCirculating
2827
+ * @property {BtcCentsSatsShareUsdPattern} inLoss
2828
+ * @property {BtcCentsSatsShareUsdPattern} inProfit
2856
2829
  * @property {BtcCentsSatsUsdPattern} total
2857
2830
  */
2858
2831
 
2859
2832
  /**
2860
- * Create a DeltaHalfInToTotalPattern pattern node
2833
+ * Create a DeltaDominanceHalfInTotalPattern2 pattern node
2861
2834
  * @param {BrkClientBase} client
2862
2835
  * @param {string} acc - Accumulated series name
2863
- * @returns {DeltaHalfInToTotalPattern}
2836
+ * @returns {DeltaDominanceHalfInTotalPattern2}
2864
2837
  */
2865
- function createDeltaHalfInToTotalPattern(client, acc) {
2838
+ function createDeltaDominanceHalfInTotalPattern2(client, acc) {
2866
2839
  return {
2867
2840
  delta: createAbsoluteRatePattern(client, _m(acc, 'delta')),
2841
+ dominance: createBpsPercentRatioPattern2(client, _m(acc, 'dominance')),
2868
2842
  half: createBtcCentsSatsUsdPattern(client, _m(acc, 'half')),
2869
- inLoss: createBtcCentsSatsToUsdPattern(client, _m(acc, 'in_loss')),
2870
- inProfit: createBtcCentsSatsToUsdPattern(client, _m(acc, 'in_profit')),
2871
- toCirculating: createBpsPercentRatioPattern2(client, _m(acc, 'to_circulating')),
2843
+ inLoss: createBtcCentsSatsShareUsdPattern(client, _m(acc, 'in_loss')),
2844
+ inProfit: createBtcCentsSatsShareUsdPattern(client, _m(acc, 'in_profit')),
2872
2845
  total: createBtcCentsSatsUsdPattern(client, acc),
2873
2846
  };
2874
2847
  }
2875
2848
 
2876
2849
  /**
2877
- * @typedef {Object} DeltaHalfInToTotalPattern2
2850
+ * @typedef {Object} DeltaDominanceHalfInTotalPattern
2878
2851
  * @property {AbsoluteRatePattern} delta
2852
+ * @property {BpsPercentRatioPattern2} dominance
2879
2853
  * @property {BtcCentsSatsUsdPattern} half
2880
- * @property {BtcCentsSatsToUsdPattern3} inLoss
2881
- * @property {BtcCentsSatsToUsdPattern3} inProfit
2882
- * @property {BpsPercentRatioPattern2} toCirculating
2854
+ * @property {BtcCentsSatsUsdPattern} inLoss
2855
+ * @property {BtcCentsSatsUsdPattern} inProfit
2883
2856
  * @property {BtcCentsSatsUsdPattern} total
2884
2857
  */
2885
2858
 
2886
2859
  /**
2887
- * Create a DeltaHalfInToTotalPattern2 pattern node
2860
+ * Create a DeltaDominanceHalfInTotalPattern pattern node
2888
2861
  * @param {BrkClientBase} client
2889
2862
  * @param {string} acc - Accumulated series name
2890
- * @returns {DeltaHalfInToTotalPattern2}
2863
+ * @returns {DeltaDominanceHalfInTotalPattern}
2891
2864
  */
2892
- function createDeltaHalfInToTotalPattern2(client, acc) {
2865
+ function createDeltaDominanceHalfInTotalPattern(client, acc) {
2893
2866
  return {
2894
2867
  delta: createAbsoluteRatePattern(client, _m(acc, 'delta')),
2868
+ dominance: createBpsPercentRatioPattern2(client, _m(acc, 'dominance')),
2895
2869
  half: createBtcCentsSatsUsdPattern(client, _m(acc, 'half')),
2896
- inLoss: createBtcCentsSatsToUsdPattern3(client, _m(acc, 'in_loss')),
2897
- inProfit: createBtcCentsSatsToUsdPattern3(client, _m(acc, 'in_profit')),
2898
- toCirculating: createBpsPercentRatioPattern2(client, _m(acc, 'to_circulating')),
2870
+ inLoss: createBtcCentsSatsUsdPattern(client, _m(acc, 'in_loss')),
2871
+ inProfit: createBtcCentsSatsUsdPattern(client, _m(acc, 'in_profit')),
2899
2872
  total: createBtcCentsSatsUsdPattern(client, acc),
2900
2873
  };
2901
2874
  }
@@ -2955,7 +2928,7 @@ function createActiveBidirectionalReactivatedReceivingSendingPattern(client, acc
2955
2928
  * @property {CoindaysTransferPattern} activity
2956
2929
  * @property {SpendingSpentUnspentPattern} outputs
2957
2930
  * @property {CapLossMvrvNetPriceProfitSoprPattern} realized
2958
- * @property {DeltaHalfInToTotalPattern} supply
2931
+ * @property {DeltaDominanceHalfInTotalPattern} supply
2959
2932
  * @property {LossNetNuplProfitPattern} unrealized
2960
2933
  */
2961
2934
 
@@ -2970,7 +2943,7 @@ function createActivityOutputsRealizedSupplyUnrealizedPattern(client, acc) {
2970
2943
  activity: createCoindaysTransferPattern(client, acc),
2971
2944
  outputs: createSpendingSpentUnspentPattern(client, acc),
2972
2945
  realized: createCapLossMvrvNetPriceProfitSoprPattern(client, acc),
2973
- supply: createDeltaHalfInToTotalPattern(client, _m(acc, 'supply')),
2946
+ supply: createDeltaDominanceHalfInTotalPattern(client, _m(acc, 'supply')),
2974
2947
  unrealized: createLossNetNuplProfitPattern(client, acc),
2975
2948
  };
2976
2949
  }
@@ -2980,7 +2953,7 @@ function createActivityOutputsRealizedSupplyUnrealizedPattern(client, acc) {
2980
2953
  * @property {TransferPattern} activity
2981
2954
  * @property {SpendingSpentUnspentPattern} outputs
2982
2955
  * @property {CapLossMvrvPriceProfitPattern} realized
2983
- * @property {DeltaHalfInTotalPattern2} supply
2956
+ * @property {DeltaDominanceHalfInTotalPattern} supply
2984
2957
  * @property {LossNuplProfitPattern} unrealized
2985
2958
  */
2986
2959
 
@@ -2995,7 +2968,7 @@ function createActivityOutputsRealizedSupplyUnrealizedPattern3(client, acc) {
2995
2968
  activity: createTransferPattern(client, _m(acc, 'transfer_volume')),
2996
2969
  outputs: createSpendingSpentUnspentPattern(client, acc),
2997
2970
  realized: createCapLossMvrvPriceProfitPattern(client, acc),
2998
- supply: createDeltaHalfInTotalPattern2(client, _m(acc, 'supply')),
2971
+ supply: createDeltaDominanceHalfInTotalPattern(client, _m(acc, 'supply')),
2999
2972
  unrealized: createLossNuplProfitPattern(client, acc),
3000
2973
  };
3001
2974
  }
@@ -3005,7 +2978,7 @@ function createActivityOutputsRealizedSupplyUnrealizedPattern3(client, acc) {
3005
2978
  * @property {TransferPattern} activity
3006
2979
  * @property {SpendingSpentUnspentPattern} outputs
3007
2980
  * @property {CapLossMvrvPriceProfitPattern} realized
3008
- * @property {DeltaTotalPattern} supply
2981
+ * @property {DeltaDominanceTotalPattern} supply
3009
2982
  * @property {NuplPattern} unrealized
3010
2983
  */
3011
2984
 
@@ -3020,7 +2993,7 @@ function createActivityOutputsRealizedSupplyUnrealizedPattern2(client, acc) {
3020
2993
  activity: createTransferPattern(client, _m(acc, 'transfer_volume')),
3021
2994
  outputs: createSpendingSpentUnspentPattern(client, acc),
3022
2995
  realized: createCapLossMvrvPriceProfitPattern(client, acc),
3023
- supply: createDeltaTotalPattern(client, _m(acc, 'supply')),
2996
+ supply: createDeltaDominanceTotalPattern(client, _m(acc, 'supply')),
3024
2997
  unrealized: createNuplPattern(client, _m(acc, 'nupl')),
3025
2998
  };
3026
2999
  }
@@ -3101,51 +3074,26 @@ function createBtcCentsDeltaSatsUsdPattern(client, acc) {
3101
3074
  }
3102
3075
 
3103
3076
  /**
3104
- * @typedef {Object} BtcCentsSatsToUsdPattern
3077
+ * @typedef {Object} BtcCentsSatsShareUsdPattern
3105
3078
  * @property {SeriesPattern1<Bitcoin>} btc
3106
3079
  * @property {SeriesPattern1<Cents>} cents
3107
3080
  * @property {SeriesPattern1<Sats>} sats
3108
- * @property {BpsPercentRatioPattern2} toCirculating
3081
+ * @property {BpsPercentRatioPattern2} share
3109
3082
  * @property {SeriesPattern1<Dollars>} usd
3110
3083
  */
3111
3084
 
3112
3085
  /**
3113
- * Create a BtcCentsSatsToUsdPattern pattern node
3086
+ * Create a BtcCentsSatsShareUsdPattern pattern node
3114
3087
  * @param {BrkClientBase} client
3115
3088
  * @param {string} acc - Accumulated series name
3116
- * @returns {BtcCentsSatsToUsdPattern}
3089
+ * @returns {BtcCentsSatsShareUsdPattern}
3117
3090
  */
3118
- function createBtcCentsSatsToUsdPattern(client, acc) {
3091
+ function createBtcCentsSatsShareUsdPattern(client, acc) {
3119
3092
  return {
3120
3093
  btc: createSeriesPattern1(client, acc),
3121
3094
  cents: createSeriesPattern1(client, _m(acc, 'cents')),
3122
3095
  sats: createSeriesPattern1(client, _m(acc, 'sats')),
3123
- toCirculating: createBpsPercentRatioPattern2(client, _m(acc, 'to_circulating')),
3124
- usd: createSeriesPattern1(client, _m(acc, 'usd')),
3125
- };
3126
- }
3127
-
3128
- /**
3129
- * @typedef {Object} BtcCentsSatsToUsdPattern2
3130
- * @property {SeriesPattern1<Bitcoin>} btc
3131
- * @property {SeriesPattern1<Cents>} cents
3132
- * @property {SeriesPattern1<Sats>} sats
3133
- * @property {BpsPercentRatioPattern2} toOwn
3134
- * @property {SeriesPattern1<Dollars>} usd
3135
- */
3136
-
3137
- /**
3138
- * Create a BtcCentsSatsToUsdPattern2 pattern node
3139
- * @param {BrkClientBase} client
3140
- * @param {string} acc - Accumulated series name
3141
- * @returns {BtcCentsSatsToUsdPattern2}
3142
- */
3143
- function createBtcCentsSatsToUsdPattern2(client, acc) {
3144
- return {
3145
- btc: createSeriesPattern1(client, acc),
3146
- cents: createSeriesPattern1(client, _m(acc, 'cents')),
3147
- sats: createSeriesPattern1(client, _m(acc, 'sats')),
3148
- toOwn: createBpsPercentRatioPattern2(client, _m(acc, 'to_own')),
3096
+ share: createBpsPercentRatioPattern2(client, _m(acc, 'share')),
3149
3097
  usd: createSeriesPattern1(client, _m(acc, 'usd')),
3150
3098
  };
3151
3099
  }
@@ -3200,31 +3148,6 @@ function createCentsToUsdPattern4(client, acc) {
3200
3148
  };
3201
3149
  }
3202
3150
 
3203
- /**
3204
- * @typedef {Object} DeltaHalfInTotalPattern2
3205
- * @property {AbsoluteRatePattern} delta
3206
- * @property {BtcCentsSatsUsdPattern} half
3207
- * @property {BtcCentsSatsUsdPattern} inLoss
3208
- * @property {BtcCentsSatsUsdPattern} inProfit
3209
- * @property {BtcCentsSatsUsdPattern} total
3210
- */
3211
-
3212
- /**
3213
- * Create a DeltaHalfInTotalPattern2 pattern node
3214
- * @param {BrkClientBase} client
3215
- * @param {string} acc - Accumulated series name
3216
- * @returns {DeltaHalfInTotalPattern2}
3217
- */
3218
- function createDeltaHalfInTotalPattern2(client, acc) {
3219
- return {
3220
- delta: createAbsoluteRatePattern(client, _m(acc, 'delta')),
3221
- half: createBtcCentsSatsUsdPattern(client, _m(acc, 'half')),
3222
- inLoss: createBtcCentsSatsUsdPattern(client, _m(acc, 'in_loss')),
3223
- inProfit: createBtcCentsSatsUsdPattern(client, _m(acc, 'in_profit')),
3224
- total: createBtcCentsSatsUsdPattern(client, acc),
3225
- };
3226
- }
3227
-
3228
3151
  /**
3229
3152
  * @typedef {Object} EmaHistogramLineSignalPattern
3230
3153
  * @property {SeriesPattern1<StoredF32>} emaFast
@@ -4028,6 +3951,27 @@ function createCumulativeRollingSumPattern(client, acc) {
4028
3951
  };
4029
3952
  }
4030
3953
 
3954
+ /**
3955
+ * @typedef {Object} DeltaDominanceTotalPattern
3956
+ * @property {AbsoluteRatePattern} delta
3957
+ * @property {BpsPercentRatioPattern2} dominance
3958
+ * @property {BtcCentsSatsUsdPattern} total
3959
+ */
3960
+
3961
+ /**
3962
+ * Create a DeltaDominanceTotalPattern pattern node
3963
+ * @param {BrkClientBase} client
3964
+ * @param {string} acc - Accumulated series name
3965
+ * @returns {DeltaDominanceTotalPattern}
3966
+ */
3967
+ function createDeltaDominanceTotalPattern(client, acc) {
3968
+ return {
3969
+ delta: createAbsoluteRatePattern(client, _m(acc, 'delta')),
3970
+ dominance: createBpsPercentRatioPattern2(client, _m(acc, 'dominance')),
3971
+ total: createBtcCentsSatsUsdPattern(client, acc),
3972
+ };
3973
+ }
3974
+
4031
3975
  /**
4032
3976
  * @typedef {Object} GreedNetPainPattern
4033
3977
  * @property {CentsUsdPattern3} greedIndex
@@ -4195,6 +4139,25 @@ function createAbsoluteRatePattern2(client, acc) {
4195
4139
  };
4196
4140
  }
4197
4141
 
4142
+ /**
4143
+ * @typedef {Object} AddrUtxoPattern
4144
+ * @property {BtcCentsSatsUsdPattern} addr
4145
+ * @property {BtcCentsSatsUsdPattern} utxo
4146
+ */
4147
+
4148
+ /**
4149
+ * Create a AddrUtxoPattern pattern node
4150
+ * @param {BrkClientBase} client
4151
+ * @param {string} acc - Accumulated series name
4152
+ * @returns {AddrUtxoPattern}
4153
+ */
4154
+ function createAddrUtxoPattern(client, acc) {
4155
+ return {
4156
+ addr: createBtcCentsSatsUsdPattern(client, _m(acc, 'addr_amount')),
4157
+ utxo: createBtcCentsSatsUsdPattern(client, _m(acc, 'utxo_amount')),
4158
+ };
4159
+ }
4160
+
4198
4161
  /**
4199
4162
  * @typedef {Object} AllSthPattern2
4200
4163
  * @property {BtcCentsDeltaSatsUsdPattern} all
@@ -4444,47 +4407,47 @@ function createCoindaysTransferPattern(client, acc) {
4444
4407
  }
4445
4408
 
4446
4409
  /**
4447
- * @typedef {Object} DeltaTotalPattern
4448
- * @property {AbsoluteRatePattern} delta
4449
- * @property {BtcCentsSatsUsdPattern} total
4410
+ * @typedef {Object} FundedTotalPattern
4411
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4} funded
4412
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4} total
4450
4413
  */
4451
4414
 
4452
4415
  /**
4453
- * Create a DeltaTotalPattern pattern node
4416
+ * Create a FundedTotalPattern pattern node
4454
4417
  * @param {BrkClientBase} client
4455
4418
  * @param {string} acc - Accumulated series name
4456
- * @returns {DeltaTotalPattern}
4419
+ * @returns {FundedTotalPattern}
4457
4420
  */
4458
- function createDeltaTotalPattern(client, acc) {
4421
+ function createFundedTotalPattern(client, acc) {
4459
4422
  return {
4460
- delta: createAbsoluteRatePattern(client, _m(acc, 'delta')),
4461
- total: createBtcCentsSatsUsdPattern(client, acc),
4423
+ funded: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4(client, acc),
4424
+ total: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4(client, _p('total', acc)),
4462
4425
  };
4463
4426
  }
4464
4427
 
4465
4428
  /**
4466
- * @typedef {Object} FundedTotalPattern
4467
- * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3} funded
4468
- * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3} total
4429
+ * @typedef {Object} InPattern2
4430
+ * @property {CentsUsdPattern3} inLoss
4431
+ * @property {CentsUsdPattern3} inProfit
4469
4432
  */
4470
4433
 
4471
4434
  /**
4472
- * Create a FundedTotalPattern pattern node
4435
+ * Create a InPattern2 pattern node
4473
4436
  * @param {BrkClientBase} client
4474
4437
  * @param {string} acc - Accumulated series name
4475
- * @returns {FundedTotalPattern}
4438
+ * @returns {InPattern2}
4476
4439
  */
4477
- function createFundedTotalPattern(client, acc) {
4440
+ function createInPattern2(client, acc) {
4478
4441
  return {
4479
- funded: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3(client, acc),
4480
- total: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3(client, _p('total', acc)),
4442
+ inLoss: createCentsUsdPattern3(client, _m(acc, 'loss')),
4443
+ inProfit: createCentsUsdPattern3(client, _m(acc, 'profit')),
4481
4444
  };
4482
4445
  }
4483
4446
 
4484
4447
  /**
4485
4448
  * @typedef {Object} InPattern
4486
- * @property {CentsUsdPattern3} inLoss
4487
- * @property {CentsUsdPattern3} inProfit
4449
+ * @property {SharePattern} inLoss
4450
+ * @property {SharePattern} inProfit
4488
4451
  */
4489
4452
 
4490
4453
  /**
@@ -4495,8 +4458,8 @@ function createFundedTotalPattern(client, acc) {
4495
4458
  */
4496
4459
  function createInPattern(client, acc) {
4497
4460
  return {
4498
- inLoss: createCentsUsdPattern3(client, _m(acc, 'loss')),
4499
- inProfit: createCentsUsdPattern3(client, _m(acc, 'profit')),
4461
+ inLoss: createSharePattern(client, _m(acc, 'loss_share')),
4462
+ inProfit: createSharePattern(client, _m(acc, 'profit_share')),
4500
4463
  };
4501
4464
  }
4502
4465
 
@@ -4634,6 +4597,23 @@ function createPricePattern(client, acc) {
4634
4597
  };
4635
4598
  }
4636
4599
 
4600
+ /**
4601
+ * @typedef {Object} SharePattern
4602
+ * @property {BpsPercentRatioPattern2} share
4603
+ */
4604
+
4605
+ /**
4606
+ * Create a SharePattern pattern node
4607
+ * @param {BrkClientBase} client
4608
+ * @param {string} acc - Accumulated series name
4609
+ * @returns {SharePattern}
4610
+ */
4611
+ function createSharePattern(client, acc) {
4612
+ return {
4613
+ share: createBpsPercentRatioPattern2(client, acc),
4614
+ };
4615
+ }
4616
+
4637
4617
  /**
4638
4618
  * @typedef {Object} TransferPattern
4639
4619
  * @property {AverageBlockCumulativeSumPattern3} transferVolume
@@ -5028,14 +5008,15 @@ function createTransferPattern(client, acc) {
5028
5008
  * @property {SeriesTree_Addrs_Raw} raw
5029
5009
  * @property {SeriesTree_Addrs_Indexes} indexes
5030
5010
  * @property {SeriesTree_Addrs_Data} data
5031
- * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3} funded
5032
- * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3} empty
5011
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4} funded
5012
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4} empty
5033
5013
  * @property {SeriesTree_Addrs_Activity} activity
5034
- * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3} total
5035
- * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5} new
5014
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4} total
5015
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} new
5036
5016
  * @property {SeriesTree_Addrs_Reused} reused
5037
5017
  * @property {SeriesTree_Addrs_Exposed} exposed
5038
5018
  * @property {SeriesTree_Addrs_Delta} delta
5019
+ * @property {SeriesTree_Addrs_AvgAmount} avgAmount
5039
5020
  */
5040
5021
 
5041
5022
  /**
@@ -5148,11 +5129,11 @@ function createTransferPattern(client, acc) {
5148
5129
 
5149
5130
  /**
5150
5131
  * @typedef {Object} SeriesTree_Addrs_Reused_Events
5151
- * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5} outputToReusedAddrCount
5152
- * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} outputToReusedAddrShare
5132
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} outputToReusedAddrCount
5133
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7} outputToReusedAddrShare
5153
5134
  * @property {_1m1w1y24hBpsPercentRatioPattern} spendableOutputToReusedAddrShare
5154
- * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5} inputFromReusedAddrCount
5155
- * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} inputFromReusedAddrShare
5135
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6} inputFromReusedAddrCount
5136
+ * @property {AllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7} inputFromReusedAddrShare
5156
5137
  * @property {_1m1w1y24hBlockPattern} activeReusedAddrCount
5157
5138
  * @property {SeriesTree_Addrs_Reused_Events_ActiveReusedAddrShare} activeReusedAddrShare
5158
5139
  */
@@ -5183,6 +5164,20 @@ function createTransferPattern(client, acc) {
5183
5164
  * @property {BtcCentsSatsUsdPattern} p2wsh
5184
5165
  * @property {BtcCentsSatsUsdPattern} p2tr
5185
5166
  * @property {BtcCentsSatsUsdPattern} p2a
5167
+ * @property {SeriesTree_Addrs_Exposed_Supply_Share} share
5168
+ */
5169
+
5170
+ /**
5171
+ * @typedef {Object} SeriesTree_Addrs_Exposed_Supply_Share
5172
+ * @property {BpsPercentRatioPattern2} all
5173
+ * @property {BpsPercentRatioPattern2} p2pk65
5174
+ * @property {BpsPercentRatioPattern2} p2pk33
5175
+ * @property {BpsPercentRatioPattern2} p2pkh
5176
+ * @property {BpsPercentRatioPattern2} p2sh
5177
+ * @property {BpsPercentRatioPattern2} p2wpkh
5178
+ * @property {BpsPercentRatioPattern2} p2wsh
5179
+ * @property {BpsPercentRatioPattern2} p2tr
5180
+ * @property {BpsPercentRatioPattern2} p2a
5186
5181
  */
5187
5182
 
5188
5183
  /**
@@ -5198,6 +5193,19 @@ function createTransferPattern(client, acc) {
5198
5193
  * @property {AbsoluteRatePattern} p2a
5199
5194
  */
5200
5195
 
5196
+ /**
5197
+ * @typedef {Object} SeriesTree_Addrs_AvgAmount
5198
+ * @property {AddrUtxoPattern} all
5199
+ * @property {AddrUtxoPattern} p2pk65
5200
+ * @property {AddrUtxoPattern} p2pk33
5201
+ * @property {AddrUtxoPattern} p2pkh
5202
+ * @property {AddrUtxoPattern} p2sh
5203
+ * @property {AddrUtxoPattern} p2wpkh
5204
+ * @property {AddrUtxoPattern} p2wsh
5205
+ * @property {AddrUtxoPattern} p2tr
5206
+ * @property {AddrUtxoPattern} p2a
5207
+ */
5208
+
5201
5209
  /**
5202
5210
  * @typedef {Object} SeriesTree_Scripts
5203
5211
  * @property {SeriesTree_Scripts_Raw} raw
@@ -6217,21 +6225,13 @@ function createTransferPattern(client, acc) {
6217
6225
 
6218
6226
  /**
6219
6227
  * @typedef {Object} SeriesTree_Cohorts_Utxo_All
6220
- * @property {SeriesTree_Cohorts_Utxo_All_Supply} supply
6228
+ * @property {DeltaDominanceHalfInTotalPattern2} supply
6221
6229
  * @property {SeriesTree_Cohorts_Utxo_All_Outputs} outputs
6222
6230
  * @property {SeriesTree_Cohorts_Utxo_All_Activity} activity
6223
6231
  * @property {SeriesTree_Cohorts_Utxo_All_Realized} realized
6224
6232
  * @property {SeriesTree_Cohorts_Utxo_All_CostBasis} costBasis
6225
6233
  * @property {SeriesTree_Cohorts_Utxo_All_Unrealized} unrealized
6226
- */
6227
-
6228
- /**
6229
- * @typedef {Object} SeriesTree_Cohorts_Utxo_All_Supply
6230
- * @property {BtcCentsSatsUsdPattern} total
6231
- * @property {AbsoluteRatePattern} delta
6232
- * @property {BtcCentsSatsUsdPattern} half
6233
- * @property {BtcCentsSatsToUsdPattern2} inProfit
6234
- * @property {BtcCentsSatsToUsdPattern2} inLoss
6234
+ * @property {InPattern} investedCapital
6235
6235
  */
6236
6236
 
6237
6237
  /**
@@ -6261,7 +6261,7 @@ function createTransferPattern(client, acc) {
6261
6261
  * @property {BlockCumulativeSumPattern} grossPnl
6262
6262
  * @property {_1m1w1y24hPattern7} sellSideRiskRatio
6263
6263
  * @property {BlockCumulativeSumPattern} peakRegret
6264
- * @property {PricePattern} investor
6264
+ * @property {PricePattern} capitalized
6265
6265
  * @property {_1m1w1y24hPattern<StoredF64>} profitToLossRatio
6266
6266
  */
6267
6267
 
@@ -6393,9 +6393,9 @@ function createTransferPattern(client, acc) {
6393
6393
  * @property {SeriesTree_Cohorts_Utxo_All_Unrealized_Loss} loss
6394
6394
  * @property {SeriesTree_Cohorts_Utxo_All_Unrealized_NetPnl} netPnl
6395
6395
  * @property {CentsUsdPattern3} grossPnl
6396
- * @property {InPattern} investedCapital
6397
- * @property {SeriesPattern18<CentsSquaredSats>} investorCapInProfitRaw
6398
- * @property {SeriesPattern18<CentsSquaredSats>} investorCapInLossRaw
6396
+ * @property {InPattern2} investedCapital
6397
+ * @property {SeriesPattern18<CentsSquaredSats>} capitalizedCapInProfitRaw
6398
+ * @property {SeriesPattern18<CentsSquaredSats>} capitalizedCapInLossRaw
6399
6399
  * @property {SeriesTree_Cohorts_Utxo_All_Unrealized_Sentiment} sentiment
6400
6400
  */
6401
6401
 
@@ -6432,12 +6432,13 @@ function createTransferPattern(client, acc) {
6432
6432
 
6433
6433
  /**
6434
6434
  * @typedef {Object} SeriesTree_Cohorts_Utxo_Sth
6435
- * @property {DeltaHalfInToTotalPattern2} supply
6435
+ * @property {DeltaDominanceHalfInTotalPattern2} supply
6436
6436
  * @property {SpendingSpentUnspentPattern} outputs
6437
6437
  * @property {CoindaysCoinyearsDormancyTransferPattern} activity
6438
6438
  * @property {SeriesTree_Cohorts_Utxo_Sth_Realized} realized
6439
6439
  * @property {InMaxMinPerSupplyPattern} costBasis
6440
- * @property {GrossInvestedInvestorLossNetNuplProfitSentimentPattern2} unrealized
6440
+ * @property {CapitalizedGrossInvestedLossNetNuplProfitSentimentPattern2} unrealized
6441
+ * @property {InPattern} investedCapital
6441
6442
  */
6442
6443
 
6443
6444
  /**
@@ -6452,7 +6453,7 @@ function createTransferPattern(client, acc) {
6452
6453
  * @property {BlockCumulativeSumPattern} grossPnl
6453
6454
  * @property {_1m1w1y24hPattern7} sellSideRiskRatio
6454
6455
  * @property {BlockCumulativeSumPattern} peakRegret
6455
- * @property {PricePattern} investor
6456
+ * @property {PricePattern} capitalized
6456
6457
  * @property {_1m1w1y24hPattern<StoredF64>} profitToLossRatio
6457
6458
  */
6458
6459
 
@@ -6554,12 +6555,13 @@ function createTransferPattern(client, acc) {
6554
6555
 
6555
6556
  /**
6556
6557
  * @typedef {Object} SeriesTree_Cohorts_Utxo_Lth
6557
- * @property {DeltaHalfInToTotalPattern2} supply
6558
+ * @property {DeltaDominanceHalfInTotalPattern2} supply
6558
6559
  * @property {SpendingSpentUnspentPattern} outputs
6559
6560
  * @property {CoindaysCoinyearsDormancyTransferPattern} activity
6560
6561
  * @property {SeriesTree_Cohorts_Utxo_Lth_Realized} realized
6561
6562
  * @property {InMaxMinPerSupplyPattern} costBasis
6562
- * @property {GrossInvestedInvestorLossNetNuplProfitSentimentPattern2} unrealized
6563
+ * @property {CapitalizedGrossInvestedLossNetNuplProfitSentimentPattern2} unrealized
6564
+ * @property {InPattern} investedCapital
6563
6565
  */
6564
6566
 
6565
6567
  /**
@@ -6574,7 +6576,7 @@ function createTransferPattern(client, acc) {
6574
6576
  * @property {BlockCumulativeSumPattern} grossPnl
6575
6577
  * @property {_1m1w1y24hPattern7} sellSideRiskRatio
6576
6578
  * @property {BlockCumulativeSumPattern} peakRegret
6577
- * @property {PricePattern} investor
6579
+ * @property {PricePattern} capitalized
6578
6580
  * @property {_1m1w1y24hPattern<StoredF64>} profitToLossRatio
6579
6581
  */
6580
6582
 
@@ -7005,7 +7007,7 @@ function createTransferPattern(client, acc) {
7005
7007
  * @extends BrkClientBase
7006
7008
  */
7007
7009
  class BrkClient extends BrkClientBase {
7008
- VERSION = "v0.3.0-beta.2";
7010
+ VERSION = "v0.3.0-beta.3";
7009
7011
 
7010
7012
  INDEXES = /** @type {const} */ ([
7011
7013
  "minute10",
@@ -8186,15 +8188,14 @@ class BrkClient extends BrkClientBase {
8186
8188
  constructor(options) {
8187
8189
  super(options);
8188
8190
  /** @type {SeriesTree} */
8189
- this.series = this._buildTree('');
8191
+ this.series = this._buildTree();
8190
8192
  }
8191
8193
 
8192
8194
  /**
8193
8195
  * @private
8194
- * @param {string} basePath
8195
8196
  * @returns {SeriesTree}
8196
8197
  */
8197
- _buildTree(basePath) {
8198
+ _buildTree() {
8198
8199
  return {
8199
8200
  blocks: {
8200
8201
  blockhash: createSeriesPattern18(this, 'blockhash'),
@@ -8501,8 +8502,8 @@ class BrkClient extends BrkClientBase {
8501
8502
  funded: createSeriesPattern34(this, 'funded_addr_data'),
8502
8503
  empty: createSeriesPattern35(this, 'empty_addr_data'),
8503
8504
  },
8504
- funded: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3(this, 'addr_count'),
8505
- empty: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3(this, 'empty_addr_count'),
8505
+ funded: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4(this, 'addr_count'),
8506
+ empty: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4(this, 'empty_addr_count'),
8506
8507
  activity: {
8507
8508
  all: {
8508
8509
  reactivated: create_1m1w1y24hBlockPattern(this, 'reactivated_addrs'),
@@ -8520,16 +8521,16 @@ class BrkClient extends BrkClientBase {
8520
8521
  p2tr: createActiveBidirectionalReactivatedReceivingSendingPattern(this, 'p2tr'),
8521
8522
  p2a: createActiveBidirectionalReactivatedReceivingSendingPattern(this, 'p2a'),
8522
8523
  },
8523
- total: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern3(this, 'total_addr_count'),
8524
- new: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5(this, 'new_addr_count'),
8524
+ total: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern4(this, 'total_addr_count'),
8525
+ new: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(this, 'new_addr_count'),
8525
8526
  reused: {
8526
8527
  count: createFundedTotalPattern(this, 'reused_addr_count'),
8527
8528
  events: {
8528
- outputToReusedAddrCount: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5(this, 'output_to_reused_addr_count'),
8529
- outputToReusedAddrShare: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(this, 'output_to_reused_addr_share'),
8529
+ outputToReusedAddrCount: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(this, 'output_to_reused_addr_count'),
8530
+ outputToReusedAddrShare: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7(this, 'output_to_reused_addr_share'),
8530
8531
  spendableOutputToReusedAddrShare: create_1m1w1y24hBpsPercentRatioPattern(this, 'spendable_output_to_reused_addr_share'),
8531
- inputFromReusedAddrCount: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern5(this, 'input_from_reused_addr_count'),
8532
- inputFromReusedAddrShare: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(this, 'input_from_reused_addr_share'),
8532
+ inputFromReusedAddrCount: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern6(this, 'input_from_reused_addr_count'),
8533
+ inputFromReusedAddrShare: createAllP2aP2pk33P2pk65P2pkhP2shP2trP2wpkhP2wshPattern7(this, 'input_from_reused_addr_share'),
8533
8534
  activeReusedAddrCount: create_1m1w1y24hBlockPattern(this, 'active_reused_addr_count'),
8534
8535
  activeReusedAddrShare: {
8535
8536
  block: createSeriesPattern18(this, 'active_reused_addr_share'),
@@ -8543,15 +8544,26 @@ class BrkClient extends BrkClientBase {
8543
8544
  exposed: {
8544
8545
  count: createFundedTotalPattern(this, 'exposed_addr_count'),
8545
8546
  supply: {
8546
- all: createBtcCentsSatsUsdPattern(this, 'exposed_addr_supply'),
8547
- p2pk65: createBtcCentsSatsUsdPattern(this, 'p2pk65_exposed_addr_supply'),
8548
- p2pk33: createBtcCentsSatsUsdPattern(this, 'p2pk33_exposed_addr_supply'),
8549
- p2pkh: createBtcCentsSatsUsdPattern(this, 'p2pkh_exposed_addr_supply'),
8550
- p2sh: createBtcCentsSatsUsdPattern(this, 'p2sh_exposed_addr_supply'),
8551
- p2wpkh: createBtcCentsSatsUsdPattern(this, 'p2wpkh_exposed_addr_supply'),
8552
- p2wsh: createBtcCentsSatsUsdPattern(this, 'p2wsh_exposed_addr_supply'),
8553
- p2tr: createBtcCentsSatsUsdPattern(this, 'p2tr_exposed_addr_supply'),
8554
- p2a: createBtcCentsSatsUsdPattern(this, 'p2a_exposed_addr_supply'),
8547
+ all: createBtcCentsSatsUsdPattern(this, 'exposed_supply'),
8548
+ p2pk65: createBtcCentsSatsUsdPattern(this, 'p2pk65_exposed_supply'),
8549
+ p2pk33: createBtcCentsSatsUsdPattern(this, 'p2pk33_exposed_supply'),
8550
+ p2pkh: createBtcCentsSatsUsdPattern(this, 'p2pkh_exposed_supply'),
8551
+ p2sh: createBtcCentsSatsUsdPattern(this, 'p2sh_exposed_supply'),
8552
+ p2wpkh: createBtcCentsSatsUsdPattern(this, 'p2wpkh_exposed_supply'),
8553
+ p2wsh: createBtcCentsSatsUsdPattern(this, 'p2wsh_exposed_supply'),
8554
+ p2tr: createBtcCentsSatsUsdPattern(this, 'p2tr_exposed_supply'),
8555
+ p2a: createBtcCentsSatsUsdPattern(this, 'p2a_exposed_supply'),
8556
+ share: {
8557
+ all: createBpsPercentRatioPattern2(this, 'exposed_supply_share'),
8558
+ p2pk65: createBpsPercentRatioPattern2(this, 'p2pk65_exposed_supply_share'),
8559
+ p2pk33: createBpsPercentRatioPattern2(this, 'p2pk33_exposed_supply_share'),
8560
+ p2pkh: createBpsPercentRatioPattern2(this, 'p2pkh_exposed_supply_share'),
8561
+ p2sh: createBpsPercentRatioPattern2(this, 'p2sh_exposed_supply_share'),
8562
+ p2wpkh: createBpsPercentRatioPattern2(this, 'p2wpkh_exposed_supply_share'),
8563
+ p2wsh: createBpsPercentRatioPattern2(this, 'p2wsh_exposed_supply_share'),
8564
+ p2tr: createBpsPercentRatioPattern2(this, 'p2tr_exposed_supply_share'),
8565
+ p2a: createBpsPercentRatioPattern2(this, 'p2a_exposed_supply_share'),
8566
+ },
8555
8567
  },
8556
8568
  },
8557
8569
  delta: {
@@ -8565,6 +8577,17 @@ class BrkClient extends BrkClientBase {
8565
8577
  p2tr: createAbsoluteRatePattern(this, 'p2tr_addr_count'),
8566
8578
  p2a: createAbsoluteRatePattern(this, 'p2a_addr_count'),
8567
8579
  },
8580
+ avgAmount: {
8581
+ all: createAddrUtxoPattern(this, 'avg'),
8582
+ p2pk65: createAddrUtxoPattern(this, 'p2pk65_avg'),
8583
+ p2pk33: createAddrUtxoPattern(this, 'p2pk33_avg'),
8584
+ p2pkh: createAddrUtxoPattern(this, 'p2pkh_avg'),
8585
+ p2sh: createAddrUtxoPattern(this, 'p2sh_avg'),
8586
+ p2wpkh: createAddrUtxoPattern(this, 'p2wpkh_avg'),
8587
+ p2wsh: createAddrUtxoPattern(this, 'p2wsh_avg'),
8588
+ p2tr: createAddrUtxoPattern(this, 'p2tr_avg'),
8589
+ p2a: createAddrUtxoPattern(this, 'p2a_avg'),
8590
+ },
8568
8591
  },
8569
8592
  scripts: {
8570
8593
  raw: {
@@ -9279,13 +9302,7 @@ class BrkClient extends BrkClientBase {
9279
9302
  cohorts: {
9280
9303
  utxo: {
9281
9304
  all: {
9282
- supply: {
9283
- total: createBtcCentsSatsUsdPattern(this, 'supply'),
9284
- delta: createAbsoluteRatePattern(this, 'supply_delta'),
9285
- half: createBtcCentsSatsUsdPattern(this, 'supply_half'),
9286
- inProfit: createBtcCentsSatsToUsdPattern2(this, 'supply_in_profit'),
9287
- inLoss: createBtcCentsSatsToUsdPattern2(this, 'supply_in_loss'),
9288
- },
9305
+ supply: createDeltaDominanceHalfInTotalPattern2(this, 'supply'),
9289
9306
  outputs: {
9290
9307
  unspentCount: createBaseDeltaPattern(this, 'utxo_count'),
9291
9308
  spentCount: createAverageBlockCumulativeSumPattern2(this, 'spent_utxo_count'),
@@ -9394,7 +9411,7 @@ class BrkClient extends BrkClientBase {
9394
9411
  grossPnl: createBlockCumulativeSumPattern(this, 'realized_gross_pnl'),
9395
9412
  sellSideRiskRatio: create_1m1w1y24hPattern7(this, 'sell_side_risk_ratio'),
9396
9413
  peakRegret: createBlockCumulativeSumPattern(this, 'realized_peak_regret'),
9397
- investor: createPricePattern(this, 'investor_price'),
9414
+ capitalized: createPricePattern(this, 'capitalized_price'),
9398
9415
  profitToLossRatio: create_1m1w1y24hPattern(this, 'realized_profit_to_loss_ratio'),
9399
9416
  },
9400
9417
  costBasis: {
@@ -9427,18 +9444,19 @@ class BrkClient extends BrkClientBase {
9427
9444
  toOwnGrossPnl: createBpsPercentRatioPattern(this, 'net_unrealized_pnl_to_own_gross_pnl'),
9428
9445
  },
9429
9446
  grossPnl: createCentsUsdPattern3(this, 'unrealized_gross_pnl'),
9430
- investedCapital: createInPattern(this, 'invested_capital_in'),
9431
- investorCapInProfitRaw: createSeriesPattern18(this, 'investor_cap_in_profit_raw'),
9432
- investorCapInLossRaw: createSeriesPattern18(this, 'investor_cap_in_loss_raw'),
9447
+ investedCapital: createInPattern2(this, 'invested_capital_in'),
9448
+ capitalizedCapInProfitRaw: createSeriesPattern18(this, 'capitalized_cap_in_profit_raw'),
9449
+ capitalizedCapInLossRaw: createSeriesPattern18(this, 'capitalized_cap_in_loss_raw'),
9433
9450
  sentiment: {
9434
9451
  painIndex: createCentsUsdPattern3(this, 'pain_index'),
9435
9452
  greedIndex: createCentsUsdPattern3(this, 'greed_index'),
9436
9453
  net: createCentsUsdPattern(this, 'net_sentiment'),
9437
9454
  },
9438
9455
  },
9456
+ investedCapital: createInPattern(this, 'invested_capital_in'),
9439
9457
  },
9440
9458
  sth: {
9441
- supply: createDeltaHalfInToTotalPattern2(this, 'sth_supply'),
9459
+ supply: createDeltaDominanceHalfInTotalPattern2(this, 'sth_supply'),
9442
9460
  outputs: createSpendingSpentUnspentPattern(this, 'sth'),
9443
9461
  activity: createCoindaysCoinyearsDormancyTransferPattern(this, 'sth'),
9444
9462
  realized: {
@@ -9530,14 +9548,15 @@ class BrkClient extends BrkClientBase {
9530
9548
  grossPnl: createBlockCumulativeSumPattern(this, 'sth_realized_gross_pnl'),
9531
9549
  sellSideRiskRatio: create_1m1w1y24hPattern7(this, 'sth_sell_side_risk_ratio'),
9532
9550
  peakRegret: createBlockCumulativeSumPattern(this, 'sth_realized_peak_regret'),
9533
- investor: createPricePattern(this, 'sth_investor_price'),
9551
+ capitalized: createPricePattern(this, 'sth_capitalized_price'),
9534
9552
  profitToLossRatio: create_1m1w1y24hPattern(this, 'sth_realized_profit_to_loss_ratio'),
9535
9553
  },
9536
9554
  costBasis: createInMaxMinPerSupplyPattern(this, 'sth'),
9537
- unrealized: createGrossInvestedInvestorLossNetNuplProfitSentimentPattern2(this, 'sth'),
9555
+ unrealized: createCapitalizedGrossInvestedLossNetNuplProfitSentimentPattern2(this, 'sth'),
9556
+ investedCapital: createInPattern(this, 'sth_invested_capital_in'),
9538
9557
  },
9539
9558
  lth: {
9540
- supply: createDeltaHalfInToTotalPattern2(this, 'lth_supply'),
9559
+ supply: createDeltaDominanceHalfInTotalPattern2(this, 'lth_supply'),
9541
9560
  outputs: createSpendingSpentUnspentPattern(this, 'lth'),
9542
9561
  activity: createCoindaysCoinyearsDormancyTransferPattern(this, 'lth'),
9543
9562
  realized: {
@@ -9632,11 +9651,12 @@ class BrkClient extends BrkClientBase {
9632
9651
  grossPnl: createBlockCumulativeSumPattern(this, 'lth_realized_gross_pnl'),
9633
9652
  sellSideRiskRatio: create_1m1w1y24hPattern7(this, 'lth_sell_side_risk_ratio'),
9634
9653
  peakRegret: createBlockCumulativeSumPattern(this, 'lth_realized_peak_regret'),
9635
- investor: createPricePattern(this, 'lth_investor_price'),
9654
+ capitalized: createPricePattern(this, 'lth_capitalized_price'),
9636
9655
  profitToLossRatio: create_1m1w1y24hPattern(this, 'lth_realized_profit_to_loss_ratio'),
9637
9656
  },
9638
9657
  costBasis: createInMaxMinPerSupplyPattern(this, 'lth'),
9639
- unrealized: createGrossInvestedInvestorLossNetNuplProfitSentimentPattern2(this, 'lth'),
9658
+ unrealized: createCapitalizedGrossInvestedLossNetNuplProfitSentimentPattern2(this, 'lth'),
9659
+ investedCapital: createInPattern(this, 'lth_invested_capital_in'),
9640
9660
  },
9641
9661
  ageRange: {
9642
9662
  under1h: createActivityOutputsRealizedSupplyUnrealizedPattern(this, 'utxos_under_1h_old'),
package/package.json CHANGED
@@ -40,5 +40,5 @@
40
40
  "url": "git+https://github.com/bitcoinresearchkit/brk.git"
41
41
  },
42
42
  "type": "module",
43
- "version": "0.3.0-beta.2"
43
+ "version": "0.3.0-beta.3"
44
44
  }