brk-client 0.1.0-beta.1 → 0.1.1

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 +651 -594
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -455,8 +455,6 @@
455
455
  *
456
456
  * @typedef {Cents} Open
457
457
  */
458
- /** @typedef {number[]} OracleBins */
459
- /** @typedef {number[]} OracleBinsV2 */
460
458
  /** @typedef {number} OutPoint */
461
459
  /**
462
460
  * Type (P2PKH, P2WPKH, P2SH, P2TR, etc.)
@@ -494,14 +492,6 @@
494
492
  * @typedef {Object} Pagination
495
493
  * @property {?number=} page - Pagination index
496
494
  */
497
- /**
498
- * Index for 2-output transactions (oracle pair candidates)
499
- *
500
- * This indexes all transactions with exactly 2 outputs, which are
501
- * candidates for the UTXOracle algorithm (payment + change pattern).
502
- *
503
- * @typedef {number} PairOutputIndex
504
- */
505
495
  /**
506
496
  * Block counts for different time periods
507
497
  *
@@ -604,6 +594,18 @@
604
594
  *
605
595
  * @typedef {number} Sats
606
596
  */
597
+ /**
598
+ * Fractional satoshis (f64) - for representing USD prices in sats
599
+ *
600
+ * Formula: `sats_fract = usd_value * 100_000_000 / btc_price`
601
+ *
602
+ * When BTC is $100,000:
603
+ * - $1 = 1,000 sats
604
+ * - $0.001 = 1 sat
605
+ * - $0.0001 = 0.1 sats (fractional)
606
+ *
607
+ * @typedef {number} SatsFract
608
+ */
607
609
  /** @typedef {number} SemesterIndex */
608
610
  /**
609
611
  * Fixed-size boolean value optimized for on-disk storage (stored as u8)
@@ -1104,7 +1106,6 @@ const _i29 = /** @type {const} */ (["weekindex"]);
1104
1106
  const _i30 = /** @type {const} */ (["yearindex"]);
1105
1107
  const _i31 = /** @type {const} */ (["loadedaddressindex"]);
1106
1108
  const _i32 = /** @type {const} */ (["emptyaddressindex"]);
1107
- const _i33 = /** @type {const} */ (["pairoutputindex"]);
1108
1109
 
1109
1110
  /**
1110
1111
  * Generic metric pattern factory.
@@ -1227,9 +1228,6 @@ function createMetricPattern31(client, name) { return _mp(client, name, _i31); }
1227
1228
  /** @template T @typedef {{ name: string, by: { readonly emptyaddressindex: MetricEndpointBuilder<T> }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder<T>|undefined }} MetricPattern32 */
1228
1229
  /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern32<T>} */
1229
1230
  function createMetricPattern32(client, name) { return _mp(client, name, _i32); }
1230
- /** @template T @typedef {{ name: string, by: { readonly pairoutputindex: MetricEndpointBuilder<T> }, indexes: () => readonly Index[], get: (index: Index) => MetricEndpointBuilder<T>|undefined }} MetricPattern33 */
1231
- /** @template T @param {BrkClientBase} client @param {string} name @returns {MetricPattern33<T>} */
1232
- function createMetricPattern33(client, name) { return _mp(client, name, _i33); }
1233
1231
 
1234
1232
  // Reusable structural pattern factories
1235
1233
 
@@ -1252,7 +1250,7 @@ function createMetricPattern33(client, name) { return _mp(client, name, _i33); }
1252
1250
  * @property {MetricPattern1<StoredF32>} realizedCapRelToOwnMarketCap
1253
1251
  * @property {BlockCountPattern<Dollars>} realizedLoss
1254
1252
  * @property {BlockCountPattern<StoredF32>} realizedLossRelToRealizedCap
1255
- * @property {MetricPattern1<Dollars>} realizedPrice
1253
+ * @property {ActivePricePattern} realizedPrice
1256
1254
  * @property {ActivePriceRatioPattern} realizedPriceExtra
1257
1255
  * @property {BlockCountPattern<Dollars>} realizedProfit
1258
1256
  * @property {BlockCountPattern<StoredF32>} realizedProfitRelToRealizedCap
@@ -1294,7 +1292,7 @@ function createRealizedPattern3(client, acc) {
1294
1292
  realizedCapRelToOwnMarketCap: createMetricPattern1(client, _m(acc, 'realized_cap_rel_to_own_market_cap')),
1295
1293
  realizedLoss: createBlockCountPattern(client, _m(acc, 'realized_loss')),
1296
1294
  realizedLossRelToRealizedCap: createBlockCountPattern(client, _m(acc, 'realized_loss_rel_to_realized_cap')),
1297
- realizedPrice: createMetricPattern1(client, _m(acc, 'realized_price')),
1295
+ realizedPrice: createActivePricePattern(client, _m(acc, 'realized_price')),
1298
1296
  realizedPriceExtra: createActivePriceRatioPattern(client, _m(acc, 'realized_price_ratio')),
1299
1297
  realizedProfit: createBlockCountPattern(client, _m(acc, 'realized_profit')),
1300
1298
  realizedProfitRelToRealizedCap: createBlockCountPattern(client, _m(acc, 'realized_profit_rel_to_realized_cap')),
@@ -1330,7 +1328,7 @@ function createRealizedPattern3(client, acc) {
1330
1328
  * @property {MetricPattern4<Dollars>} realizedCap30dDelta
1331
1329
  * @property {BlockCountPattern<Dollars>} realizedLoss
1332
1330
  * @property {BlockCountPattern<StoredF32>} realizedLossRelToRealizedCap
1333
- * @property {MetricPattern1<Dollars>} realizedPrice
1331
+ * @property {ActivePricePattern} realizedPrice
1334
1332
  * @property {RealizedPriceExtraPattern} realizedPriceExtra
1335
1333
  * @property {BlockCountPattern<Dollars>} realizedProfit
1336
1334
  * @property {BlockCountPattern<StoredF32>} realizedProfitRelToRealizedCap
@@ -1370,7 +1368,7 @@ function createRealizedPattern4(client, acc) {
1370
1368
  realizedCap30dDelta: createMetricPattern4(client, _m(acc, 'realized_cap_30d_delta')),
1371
1369
  realizedLoss: createBlockCountPattern(client, _m(acc, 'realized_loss')),
1372
1370
  realizedLossRelToRealizedCap: createBlockCountPattern(client, _m(acc, 'realized_loss_rel_to_realized_cap')),
1373
- realizedPrice: createMetricPattern1(client, _m(acc, 'realized_price')),
1371
+ realizedPrice: createActivePricePattern(client, _m(acc, 'realized_price')),
1374
1372
  realizedPriceExtra: createRealizedPriceExtraPattern(client, _m(acc, 'realized_price_ratio')),
1375
1373
  realizedProfit: createBlockCountPattern(client, _m(acc, 'realized_profit')),
1376
1374
  realizedProfitRelToRealizedCap: createBlockCountPattern(client, _m(acc, 'realized_profit_rel_to_realized_cap')),
@@ -1389,31 +1387,31 @@ function createRealizedPattern4(client, acc) {
1389
1387
 
1390
1388
  /**
1391
1389
  * @typedef {Object} Ratio1ySdPattern
1392
- * @property {MetricPattern4<Dollars>} _0sdUsd
1390
+ * @property {_0sdUsdPattern} _0sdUsd
1393
1391
  * @property {MetricPattern4<StoredF32>} m05sd
1394
- * @property {MetricPattern4<Dollars>} m05sdUsd
1392
+ * @property {_0sdUsdPattern} m05sdUsd
1395
1393
  * @property {MetricPattern4<StoredF32>} m15sd
1396
- * @property {MetricPattern4<Dollars>} m15sdUsd
1394
+ * @property {_0sdUsdPattern} m15sdUsd
1397
1395
  * @property {MetricPattern4<StoredF32>} m1sd
1398
- * @property {MetricPattern4<Dollars>} m1sdUsd
1396
+ * @property {_0sdUsdPattern} m1sdUsd
1399
1397
  * @property {MetricPattern4<StoredF32>} m25sd
1400
- * @property {MetricPattern4<Dollars>} m25sdUsd
1398
+ * @property {_0sdUsdPattern} m25sdUsd
1401
1399
  * @property {MetricPattern4<StoredF32>} m2sd
1402
- * @property {MetricPattern4<Dollars>} m2sdUsd
1400
+ * @property {_0sdUsdPattern} m2sdUsd
1403
1401
  * @property {MetricPattern4<StoredF32>} m3sd
1404
- * @property {MetricPattern4<Dollars>} m3sdUsd
1402
+ * @property {_0sdUsdPattern} m3sdUsd
1405
1403
  * @property {MetricPattern4<StoredF32>} p05sd
1406
- * @property {MetricPattern4<Dollars>} p05sdUsd
1404
+ * @property {_0sdUsdPattern} p05sdUsd
1407
1405
  * @property {MetricPattern4<StoredF32>} p15sd
1408
- * @property {MetricPattern4<Dollars>} p15sdUsd
1406
+ * @property {_0sdUsdPattern} p15sdUsd
1409
1407
  * @property {MetricPattern4<StoredF32>} p1sd
1410
- * @property {MetricPattern4<Dollars>} p1sdUsd
1408
+ * @property {_0sdUsdPattern} p1sdUsd
1411
1409
  * @property {MetricPattern4<StoredF32>} p25sd
1412
- * @property {MetricPattern4<Dollars>} p25sdUsd
1410
+ * @property {_0sdUsdPattern} p25sdUsd
1413
1411
  * @property {MetricPattern4<StoredF32>} p2sd
1414
- * @property {MetricPattern4<Dollars>} p2sdUsd
1412
+ * @property {_0sdUsdPattern} p2sdUsd
1415
1413
  * @property {MetricPattern4<StoredF32>} p3sd
1416
- * @property {MetricPattern4<Dollars>} p3sdUsd
1414
+ * @property {_0sdUsdPattern} p3sdUsd
1417
1415
  * @property {MetricPattern4<StoredF32>} sd
1418
1416
  * @property {MetricPattern4<StoredF32>} sma
1419
1417
  * @property {MetricPattern4<StoredF32>} zscore
@@ -1427,31 +1425,31 @@ function createRealizedPattern4(client, acc) {
1427
1425
  */
1428
1426
  function createRatio1ySdPattern(client, acc) {
1429
1427
  return {
1430
- _0sdUsd: createMetricPattern4(client, _m(acc, '0sd_usd')),
1428
+ _0sdUsd: create_0sdUsdPattern(client, _m(acc, '0sd_usd')),
1431
1429
  m05sd: createMetricPattern4(client, _m(acc, 'm0_5sd')),
1432
- m05sdUsd: createMetricPattern4(client, _m(acc, 'm0_5sd_usd')),
1430
+ m05sdUsd: create_0sdUsdPattern(client, _m(acc, 'm0_5sd_usd')),
1433
1431
  m15sd: createMetricPattern4(client, _m(acc, 'm1_5sd')),
1434
- m15sdUsd: createMetricPattern4(client, _m(acc, 'm1_5sd_usd')),
1432
+ m15sdUsd: create_0sdUsdPattern(client, _m(acc, 'm1_5sd_usd')),
1435
1433
  m1sd: createMetricPattern4(client, _m(acc, 'm1sd')),
1436
- m1sdUsd: createMetricPattern4(client, _m(acc, 'm1sd_usd')),
1434
+ m1sdUsd: create_0sdUsdPattern(client, _m(acc, 'm1sd_usd')),
1437
1435
  m25sd: createMetricPattern4(client, _m(acc, 'm2_5sd')),
1438
- m25sdUsd: createMetricPattern4(client, _m(acc, 'm2_5sd_usd')),
1436
+ m25sdUsd: create_0sdUsdPattern(client, _m(acc, 'm2_5sd_usd')),
1439
1437
  m2sd: createMetricPattern4(client, _m(acc, 'm2sd')),
1440
- m2sdUsd: createMetricPattern4(client, _m(acc, 'm2sd_usd')),
1438
+ m2sdUsd: create_0sdUsdPattern(client, _m(acc, 'm2sd_usd')),
1441
1439
  m3sd: createMetricPattern4(client, _m(acc, 'm3sd')),
1442
- m3sdUsd: createMetricPattern4(client, _m(acc, 'm3sd_usd')),
1440
+ m3sdUsd: create_0sdUsdPattern(client, _m(acc, 'm3sd_usd')),
1443
1441
  p05sd: createMetricPattern4(client, _m(acc, 'p0_5sd')),
1444
- p05sdUsd: createMetricPattern4(client, _m(acc, 'p0_5sd_usd')),
1442
+ p05sdUsd: create_0sdUsdPattern(client, _m(acc, 'p0_5sd_usd')),
1445
1443
  p15sd: createMetricPattern4(client, _m(acc, 'p1_5sd')),
1446
- p15sdUsd: createMetricPattern4(client, _m(acc, 'p1_5sd_usd')),
1444
+ p15sdUsd: create_0sdUsdPattern(client, _m(acc, 'p1_5sd_usd')),
1447
1445
  p1sd: createMetricPattern4(client, _m(acc, 'p1sd')),
1448
- p1sdUsd: createMetricPattern4(client, _m(acc, 'p1sd_usd')),
1446
+ p1sdUsd: create_0sdUsdPattern(client, _m(acc, 'p1sd_usd')),
1449
1447
  p25sd: createMetricPattern4(client, _m(acc, 'p2_5sd')),
1450
- p25sdUsd: createMetricPattern4(client, _m(acc, 'p2_5sd_usd')),
1448
+ p25sdUsd: create_0sdUsdPattern(client, _m(acc, 'p2_5sd_usd')),
1451
1449
  p2sd: createMetricPattern4(client, _m(acc, 'p2sd')),
1452
- p2sdUsd: createMetricPattern4(client, _m(acc, 'p2sd_usd')),
1450
+ p2sdUsd: create_0sdUsdPattern(client, _m(acc, 'p2sd_usd')),
1453
1451
  p3sd: createMetricPattern4(client, _m(acc, 'p3sd')),
1454
- p3sdUsd: createMetricPattern4(client, _m(acc, 'p3sd_usd')),
1452
+ p3sdUsd: create_0sdUsdPattern(client, _m(acc, 'p3sd_usd')),
1455
1453
  sd: createMetricPattern4(client, _m(acc, 'sd')),
1456
1454
  sma: createMetricPattern4(client, _m(acc, 'sma')),
1457
1455
  zscore: createMetricPattern4(client, _m(acc, 'zscore')),
@@ -1472,7 +1470,7 @@ function createRatio1ySdPattern(client, acc) {
1472
1470
  * @property {MetricPattern1<StoredF32>} realizedCapRelToOwnMarketCap
1473
1471
  * @property {BlockCountPattern<Dollars>} realizedLoss
1474
1472
  * @property {BlockCountPattern<StoredF32>} realizedLossRelToRealizedCap
1475
- * @property {MetricPattern1<Dollars>} realizedPrice
1473
+ * @property {ActivePricePattern} realizedPrice
1476
1474
  * @property {ActivePriceRatioPattern} realizedPriceExtra
1477
1475
  * @property {BlockCountPattern<Dollars>} realizedProfit
1478
1476
  * @property {BlockCountPattern<StoredF32>} realizedProfitRelToRealizedCap
@@ -1509,7 +1507,7 @@ function createRealizedPattern2(client, acc) {
1509
1507
  realizedCapRelToOwnMarketCap: createMetricPattern1(client, _m(acc, 'realized_cap_rel_to_own_market_cap')),
1510
1508
  realizedLoss: createBlockCountPattern(client, _m(acc, 'realized_loss')),
1511
1509
  realizedLossRelToRealizedCap: createBlockCountPattern(client, _m(acc, 'realized_loss_rel_to_realized_cap')),
1512
- realizedPrice: createMetricPattern1(client, _m(acc, 'realized_price')),
1510
+ realizedPrice: createActivePricePattern(client, _m(acc, 'realized_price')),
1513
1511
  realizedPriceExtra: createActivePriceRatioPattern(client, _m(acc, 'realized_price_ratio')),
1514
1512
  realizedProfit: createBlockCountPattern(client, _m(acc, 'realized_profit')),
1515
1513
  realizedProfitRelToRealizedCap: createBlockCountPattern(client, _m(acc, 'realized_profit_rel_to_realized_cap')),
@@ -1540,7 +1538,7 @@ function createRealizedPattern2(client, acc) {
1540
1538
  * @property {MetricPattern4<Dollars>} realizedCap30dDelta
1541
1539
  * @property {BlockCountPattern<Dollars>} realizedLoss
1542
1540
  * @property {BlockCountPattern<StoredF32>} realizedLossRelToRealizedCap
1543
- * @property {MetricPattern1<Dollars>} realizedPrice
1541
+ * @property {ActivePricePattern} realizedPrice
1544
1542
  * @property {RealizedPriceExtraPattern} realizedPriceExtra
1545
1543
  * @property {BlockCountPattern<Dollars>} realizedProfit
1546
1544
  * @property {BlockCountPattern<StoredF32>} realizedProfitRelToRealizedCap
@@ -1575,7 +1573,7 @@ function createRealizedPattern(client, acc) {
1575
1573
  realizedCap30dDelta: createMetricPattern4(client, _m(acc, 'realized_cap_30d_delta')),
1576
1574
  realizedLoss: createBlockCountPattern(client, _m(acc, 'realized_loss')),
1577
1575
  realizedLossRelToRealizedCap: createBlockCountPattern(client, _m(acc, 'realized_loss_rel_to_realized_cap')),
1578
- realizedPrice: createMetricPattern1(client, _m(acc, 'realized_price')),
1576
+ realizedPrice: createActivePricePattern(client, _m(acc, 'realized_price')),
1579
1577
  realizedPriceExtra: createRealizedPriceExtraPattern(client, _m(acc, 'realized_price_ratio')),
1580
1578
  realizedProfit: createBlockCountPattern(client, _m(acc, 'realized_profit')),
1581
1579
  realizedProfitRelToRealizedCap: createBlockCountPattern(client, _m(acc, 'realized_profit_rel_to_realized_cap')),
@@ -1594,7 +1592,7 @@ function createRealizedPattern(client, acc) {
1594
1592
 
1595
1593
  /**
1596
1594
  * @typedef {Object} Price111dSmaPattern
1597
- * @property {MetricPattern4<Dollars>} price
1595
+ * @property {_0sdUsdPattern} price
1598
1596
  * @property {MetricPattern4<StoredF32>} ratio
1599
1597
  * @property {MetricPattern4<StoredF32>} ratio1mSma
1600
1598
  * @property {MetricPattern4<StoredF32>} ratio1wSma
@@ -1602,17 +1600,17 @@ function createRealizedPattern(client, acc) {
1602
1600
  * @property {Ratio1ySdPattern} ratio2ySd
1603
1601
  * @property {Ratio1ySdPattern} ratio4ySd
1604
1602
  * @property {MetricPattern4<StoredF32>} ratioPct1
1605
- * @property {MetricPattern4<Dollars>} ratioPct1Usd
1603
+ * @property {_0sdUsdPattern} ratioPct1Usd
1606
1604
  * @property {MetricPattern4<StoredF32>} ratioPct2
1607
- * @property {MetricPattern4<Dollars>} ratioPct2Usd
1605
+ * @property {_0sdUsdPattern} ratioPct2Usd
1608
1606
  * @property {MetricPattern4<StoredF32>} ratioPct5
1609
- * @property {MetricPattern4<Dollars>} ratioPct5Usd
1607
+ * @property {_0sdUsdPattern} ratioPct5Usd
1610
1608
  * @property {MetricPattern4<StoredF32>} ratioPct95
1611
- * @property {MetricPattern4<Dollars>} ratioPct95Usd
1609
+ * @property {_0sdUsdPattern} ratioPct95Usd
1612
1610
  * @property {MetricPattern4<StoredF32>} ratioPct98
1613
- * @property {MetricPattern4<Dollars>} ratioPct98Usd
1611
+ * @property {_0sdUsdPattern} ratioPct98Usd
1614
1612
  * @property {MetricPattern4<StoredF32>} ratioPct99
1615
- * @property {MetricPattern4<Dollars>} ratioPct99Usd
1613
+ * @property {_0sdUsdPattern} ratioPct99Usd
1616
1614
  * @property {Ratio1ySdPattern} ratioSd
1617
1615
  */
1618
1616
 
@@ -1624,7 +1622,7 @@ function createRealizedPattern(client, acc) {
1624
1622
  */
1625
1623
  function createPrice111dSmaPattern(client, acc) {
1626
1624
  return {
1627
- price: createMetricPattern4(client, acc),
1625
+ price: create_0sdUsdPattern(client, acc),
1628
1626
  ratio: createMetricPattern4(client, _m(acc, 'ratio')),
1629
1627
  ratio1mSma: createMetricPattern4(client, _m(acc, 'ratio_1m_sma')),
1630
1628
  ratio1wSma: createMetricPattern4(client, _m(acc, 'ratio_1w_sma')),
@@ -1632,21 +1630,74 @@ function createPrice111dSmaPattern(client, acc) {
1632
1630
  ratio2ySd: createRatio1ySdPattern(client, _m(acc, 'ratio_2y')),
1633
1631
  ratio4ySd: createRatio1ySdPattern(client, _m(acc, 'ratio_4y')),
1634
1632
  ratioPct1: createMetricPattern4(client, _m(acc, 'ratio_pct1')),
1635
- ratioPct1Usd: createMetricPattern4(client, _m(acc, 'ratio_pct1_usd')),
1633
+ ratioPct1Usd: create_0sdUsdPattern(client, _m(acc, 'ratio_pct1_usd')),
1636
1634
  ratioPct2: createMetricPattern4(client, _m(acc, 'ratio_pct2')),
1637
- ratioPct2Usd: createMetricPattern4(client, _m(acc, 'ratio_pct2_usd')),
1635
+ ratioPct2Usd: create_0sdUsdPattern(client, _m(acc, 'ratio_pct2_usd')),
1638
1636
  ratioPct5: createMetricPattern4(client, _m(acc, 'ratio_pct5')),
1639
- ratioPct5Usd: createMetricPattern4(client, _m(acc, 'ratio_pct5_usd')),
1637
+ ratioPct5Usd: create_0sdUsdPattern(client, _m(acc, 'ratio_pct5_usd')),
1640
1638
  ratioPct95: createMetricPattern4(client, _m(acc, 'ratio_pct95')),
1641
- ratioPct95Usd: createMetricPattern4(client, _m(acc, 'ratio_pct95_usd')),
1639
+ ratioPct95Usd: create_0sdUsdPattern(client, _m(acc, 'ratio_pct95_usd')),
1642
1640
  ratioPct98: createMetricPattern4(client, _m(acc, 'ratio_pct98')),
1643
- ratioPct98Usd: createMetricPattern4(client, _m(acc, 'ratio_pct98_usd')),
1641
+ ratioPct98Usd: create_0sdUsdPattern(client, _m(acc, 'ratio_pct98_usd')),
1644
1642
  ratioPct99: createMetricPattern4(client, _m(acc, 'ratio_pct99')),
1645
- ratioPct99Usd: createMetricPattern4(client, _m(acc, 'ratio_pct99_usd')),
1643
+ ratioPct99Usd: create_0sdUsdPattern(client, _m(acc, 'ratio_pct99_usd')),
1646
1644
  ratioSd: createRatio1ySdPattern(client, _m(acc, 'ratio')),
1647
1645
  };
1648
1646
  }
1649
1647
 
1648
+ /**
1649
+ * @typedef {Object} PercentilesPattern
1650
+ * @property {_0sdUsdPattern} pct05
1651
+ * @property {_0sdUsdPattern} pct10
1652
+ * @property {_0sdUsdPattern} pct15
1653
+ * @property {_0sdUsdPattern} pct20
1654
+ * @property {_0sdUsdPattern} pct25
1655
+ * @property {_0sdUsdPattern} pct30
1656
+ * @property {_0sdUsdPattern} pct35
1657
+ * @property {_0sdUsdPattern} pct40
1658
+ * @property {_0sdUsdPattern} pct45
1659
+ * @property {_0sdUsdPattern} pct50
1660
+ * @property {_0sdUsdPattern} pct55
1661
+ * @property {_0sdUsdPattern} pct60
1662
+ * @property {_0sdUsdPattern} pct65
1663
+ * @property {_0sdUsdPattern} pct70
1664
+ * @property {_0sdUsdPattern} pct75
1665
+ * @property {_0sdUsdPattern} pct80
1666
+ * @property {_0sdUsdPattern} pct85
1667
+ * @property {_0sdUsdPattern} pct90
1668
+ * @property {_0sdUsdPattern} pct95
1669
+ */
1670
+
1671
+ /**
1672
+ * Create a PercentilesPattern pattern node
1673
+ * @param {BrkClientBase} client
1674
+ * @param {string} acc - Accumulated metric name
1675
+ * @returns {PercentilesPattern}
1676
+ */
1677
+ function createPercentilesPattern(client, acc) {
1678
+ return {
1679
+ pct05: create_0sdUsdPattern(client, _m(acc, 'pct05')),
1680
+ pct10: create_0sdUsdPattern(client, _m(acc, 'pct10')),
1681
+ pct15: create_0sdUsdPattern(client, _m(acc, 'pct15')),
1682
+ pct20: create_0sdUsdPattern(client, _m(acc, 'pct20')),
1683
+ pct25: create_0sdUsdPattern(client, _m(acc, 'pct25')),
1684
+ pct30: create_0sdUsdPattern(client, _m(acc, 'pct30')),
1685
+ pct35: create_0sdUsdPattern(client, _m(acc, 'pct35')),
1686
+ pct40: create_0sdUsdPattern(client, _m(acc, 'pct40')),
1687
+ pct45: create_0sdUsdPattern(client, _m(acc, 'pct45')),
1688
+ pct50: create_0sdUsdPattern(client, _m(acc, 'pct50')),
1689
+ pct55: create_0sdUsdPattern(client, _m(acc, 'pct55')),
1690
+ pct60: create_0sdUsdPattern(client, _m(acc, 'pct60')),
1691
+ pct65: create_0sdUsdPattern(client, _m(acc, 'pct65')),
1692
+ pct70: create_0sdUsdPattern(client, _m(acc, 'pct70')),
1693
+ pct75: create_0sdUsdPattern(client, _m(acc, 'pct75')),
1694
+ pct80: create_0sdUsdPattern(client, _m(acc, 'pct80')),
1695
+ pct85: create_0sdUsdPattern(client, _m(acc, 'pct85')),
1696
+ pct90: create_0sdUsdPattern(client, _m(acc, 'pct90')),
1697
+ pct95: create_0sdUsdPattern(client, _m(acc, 'pct95')),
1698
+ };
1699
+ }
1700
+
1650
1701
  /**
1651
1702
  * @typedef {Object} ActivePriceRatioPattern
1652
1703
  * @property {MetricPattern4<StoredF32>} ratio
@@ -1656,17 +1707,17 @@ function createPrice111dSmaPattern(client, acc) {
1656
1707
  * @property {Ratio1ySdPattern} ratio2ySd
1657
1708
  * @property {Ratio1ySdPattern} ratio4ySd
1658
1709
  * @property {MetricPattern4<StoredF32>} ratioPct1
1659
- * @property {MetricPattern4<Dollars>} ratioPct1Usd
1710
+ * @property {_0sdUsdPattern} ratioPct1Usd
1660
1711
  * @property {MetricPattern4<StoredF32>} ratioPct2
1661
- * @property {MetricPattern4<Dollars>} ratioPct2Usd
1712
+ * @property {_0sdUsdPattern} ratioPct2Usd
1662
1713
  * @property {MetricPattern4<StoredF32>} ratioPct5
1663
- * @property {MetricPattern4<Dollars>} ratioPct5Usd
1714
+ * @property {_0sdUsdPattern} ratioPct5Usd
1664
1715
  * @property {MetricPattern4<StoredF32>} ratioPct95
1665
- * @property {MetricPattern4<Dollars>} ratioPct95Usd
1716
+ * @property {_0sdUsdPattern} ratioPct95Usd
1666
1717
  * @property {MetricPattern4<StoredF32>} ratioPct98
1667
- * @property {MetricPattern4<Dollars>} ratioPct98Usd
1718
+ * @property {_0sdUsdPattern} ratioPct98Usd
1668
1719
  * @property {MetricPattern4<StoredF32>} ratioPct99
1669
- * @property {MetricPattern4<Dollars>} ratioPct99Usd
1720
+ * @property {_0sdUsdPattern} ratioPct99Usd
1670
1721
  * @property {Ratio1ySdPattern} ratioSd
1671
1722
  */
1672
1723
 
@@ -1685,74 +1736,21 @@ function createActivePriceRatioPattern(client, acc) {
1685
1736
  ratio2ySd: createRatio1ySdPattern(client, _m(acc, '2y')),
1686
1737
  ratio4ySd: createRatio1ySdPattern(client, _m(acc, '4y')),
1687
1738
  ratioPct1: createMetricPattern4(client, _m(acc, 'pct1')),
1688
- ratioPct1Usd: createMetricPattern4(client, _m(acc, 'pct1_usd')),
1739
+ ratioPct1Usd: create_0sdUsdPattern(client, _m(acc, 'pct1_usd')),
1689
1740
  ratioPct2: createMetricPattern4(client, _m(acc, 'pct2')),
1690
- ratioPct2Usd: createMetricPattern4(client, _m(acc, 'pct2_usd')),
1741
+ ratioPct2Usd: create_0sdUsdPattern(client, _m(acc, 'pct2_usd')),
1691
1742
  ratioPct5: createMetricPattern4(client, _m(acc, 'pct5')),
1692
- ratioPct5Usd: createMetricPattern4(client, _m(acc, 'pct5_usd')),
1743
+ ratioPct5Usd: create_0sdUsdPattern(client, _m(acc, 'pct5_usd')),
1693
1744
  ratioPct95: createMetricPattern4(client, _m(acc, 'pct95')),
1694
- ratioPct95Usd: createMetricPattern4(client, _m(acc, 'pct95_usd')),
1745
+ ratioPct95Usd: create_0sdUsdPattern(client, _m(acc, 'pct95_usd')),
1695
1746
  ratioPct98: createMetricPattern4(client, _m(acc, 'pct98')),
1696
- ratioPct98Usd: createMetricPattern4(client, _m(acc, 'pct98_usd')),
1747
+ ratioPct98Usd: create_0sdUsdPattern(client, _m(acc, 'pct98_usd')),
1697
1748
  ratioPct99: createMetricPattern4(client, _m(acc, 'pct99')),
1698
- ratioPct99Usd: createMetricPattern4(client, _m(acc, 'pct99_usd')),
1749
+ ratioPct99Usd: create_0sdUsdPattern(client, _m(acc, 'pct99_usd')),
1699
1750
  ratioSd: createRatio1ySdPattern(client, acc),
1700
1751
  };
1701
1752
  }
1702
1753
 
1703
- /**
1704
- * @typedef {Object} PercentilesPattern
1705
- * @property {MetricPattern4<Dollars>} pct05
1706
- * @property {MetricPattern4<Dollars>} pct10
1707
- * @property {MetricPattern4<Dollars>} pct15
1708
- * @property {MetricPattern4<Dollars>} pct20
1709
- * @property {MetricPattern4<Dollars>} pct25
1710
- * @property {MetricPattern4<Dollars>} pct30
1711
- * @property {MetricPattern4<Dollars>} pct35
1712
- * @property {MetricPattern4<Dollars>} pct40
1713
- * @property {MetricPattern4<Dollars>} pct45
1714
- * @property {MetricPattern4<Dollars>} pct50
1715
- * @property {MetricPattern4<Dollars>} pct55
1716
- * @property {MetricPattern4<Dollars>} pct60
1717
- * @property {MetricPattern4<Dollars>} pct65
1718
- * @property {MetricPattern4<Dollars>} pct70
1719
- * @property {MetricPattern4<Dollars>} pct75
1720
- * @property {MetricPattern4<Dollars>} pct80
1721
- * @property {MetricPattern4<Dollars>} pct85
1722
- * @property {MetricPattern4<Dollars>} pct90
1723
- * @property {MetricPattern4<Dollars>} pct95
1724
- */
1725
-
1726
- /**
1727
- * Create a PercentilesPattern pattern node
1728
- * @param {BrkClientBase} client
1729
- * @param {string} acc - Accumulated metric name
1730
- * @returns {PercentilesPattern}
1731
- */
1732
- function createPercentilesPattern(client, acc) {
1733
- return {
1734
- pct05: createMetricPattern4(client, _m(acc, 'pct05')),
1735
- pct10: createMetricPattern4(client, _m(acc, 'pct10')),
1736
- pct15: createMetricPattern4(client, _m(acc, 'pct15')),
1737
- pct20: createMetricPattern4(client, _m(acc, 'pct20')),
1738
- pct25: createMetricPattern4(client, _m(acc, 'pct25')),
1739
- pct30: createMetricPattern4(client, _m(acc, 'pct30')),
1740
- pct35: createMetricPattern4(client, _m(acc, 'pct35')),
1741
- pct40: createMetricPattern4(client, _m(acc, 'pct40')),
1742
- pct45: createMetricPattern4(client, _m(acc, 'pct45')),
1743
- pct50: createMetricPattern4(client, _m(acc, 'pct50')),
1744
- pct55: createMetricPattern4(client, _m(acc, 'pct55')),
1745
- pct60: createMetricPattern4(client, _m(acc, 'pct60')),
1746
- pct65: createMetricPattern4(client, _m(acc, 'pct65')),
1747
- pct70: createMetricPattern4(client, _m(acc, 'pct70')),
1748
- pct75: createMetricPattern4(client, _m(acc, 'pct75')),
1749
- pct80: createMetricPattern4(client, _m(acc, 'pct80')),
1750
- pct85: createMetricPattern4(client, _m(acc, 'pct85')),
1751
- pct90: createMetricPattern4(client, _m(acc, 'pct90')),
1752
- pct95: createMetricPattern4(client, _m(acc, 'pct95')),
1753
- };
1754
- }
1755
-
1756
1754
  /**
1757
1755
  * @typedef {Object} RelativePattern5
1758
1756
  * @property {MetricPattern1<StoredF32>} negUnrealizedLossRelToMarketCap
@@ -1849,49 +1847,6 @@ function createAaopoolPattern(client, acc) {
1849
1847
  };
1850
1848
  }
1851
1849
 
1852
- /**
1853
- * @template T
1854
- * @typedef {Object} LookbackPattern
1855
- * @property {MetricPattern4<T>} _10y
1856
- * @property {MetricPattern4<T>} _1d
1857
- * @property {MetricPattern4<T>} _1m
1858
- * @property {MetricPattern4<T>} _1w
1859
- * @property {MetricPattern4<T>} _1y
1860
- * @property {MetricPattern4<T>} _2y
1861
- * @property {MetricPattern4<T>} _3m
1862
- * @property {MetricPattern4<T>} _3y
1863
- * @property {MetricPattern4<T>} _4y
1864
- * @property {MetricPattern4<T>} _5y
1865
- * @property {MetricPattern4<T>} _6m
1866
- * @property {MetricPattern4<T>} _6y
1867
- * @property {MetricPattern4<T>} _8y
1868
- */
1869
-
1870
- /**
1871
- * Create a LookbackPattern pattern node
1872
- * @template T
1873
- * @param {BrkClientBase} client
1874
- * @param {string} acc - Accumulated metric name
1875
- * @returns {LookbackPattern<T>}
1876
- */
1877
- function createLookbackPattern(client, acc) {
1878
- return {
1879
- _10y: createMetricPattern4(client, _m(acc, '10y_ago')),
1880
- _1d: createMetricPattern4(client, _m(acc, '1d_ago')),
1881
- _1m: createMetricPattern4(client, _m(acc, '1m_ago')),
1882
- _1w: createMetricPattern4(client, _m(acc, '1w_ago')),
1883
- _1y: createMetricPattern4(client, _m(acc, '1y_ago')),
1884
- _2y: createMetricPattern4(client, _m(acc, '2y_ago')),
1885
- _3m: createMetricPattern4(client, _m(acc, '3m_ago')),
1886
- _3y: createMetricPattern4(client, _m(acc, '3y_ago')),
1887
- _4y: createMetricPattern4(client, _m(acc, '4y_ago')),
1888
- _5y: createMetricPattern4(client, _m(acc, '5y_ago')),
1889
- _6m: createMetricPattern4(client, _m(acc, '6m_ago')),
1890
- _6y: createMetricPattern4(client, _m(acc, '6y_ago')),
1891
- _8y: createMetricPattern4(client, _m(acc, '8y_ago')),
1892
- };
1893
- }
1894
-
1895
1850
  /**
1896
1851
  * @typedef {Object} PeriodLumpSumStackPattern
1897
1852
  * @property {_2015Pattern} _10y
@@ -1933,48 +1888,7 @@ function createPeriodLumpSumStackPattern(client, acc) {
1933
1888
 
1934
1889
  /**
1935
1890
  * @template T
1936
- * @typedef {Object} ClassAveragePricePattern
1937
- * @property {MetricPattern4<T>} _2015
1938
- * @property {MetricPattern4<T>} _2016
1939
- * @property {MetricPattern4<T>} _2017
1940
- * @property {MetricPattern4<T>} _2018
1941
- * @property {MetricPattern4<T>} _2019
1942
- * @property {MetricPattern4<T>} _2020
1943
- * @property {MetricPattern4<T>} _2021
1944
- * @property {MetricPattern4<T>} _2022
1945
- * @property {MetricPattern4<T>} _2023
1946
- * @property {MetricPattern4<T>} _2024
1947
- * @property {MetricPattern4<T>} _2025
1948
- * @property {MetricPattern4<T>} _2026
1949
- */
1950
-
1951
- /**
1952
- * Create a ClassAveragePricePattern pattern node
1953
- * @template T
1954
- * @param {BrkClientBase} client
1955
- * @param {string} acc - Accumulated metric name
1956
- * @returns {ClassAveragePricePattern<T>}
1957
- */
1958
- function createClassAveragePricePattern(client, acc) {
1959
- return {
1960
- _2015: createMetricPattern4(client, _m(acc, '2015_average_price')),
1961
- _2016: createMetricPattern4(client, _m(acc, '2016_average_price')),
1962
- _2017: createMetricPattern4(client, _m(acc, '2017_average_price')),
1963
- _2018: createMetricPattern4(client, _m(acc, '2018_average_price')),
1964
- _2019: createMetricPattern4(client, _m(acc, '2019_average_price')),
1965
- _2020: createMetricPattern4(client, _m(acc, '2020_average_price')),
1966
- _2021: createMetricPattern4(client, _m(acc, '2021_average_price')),
1967
- _2022: createMetricPattern4(client, _m(acc, '2022_average_price')),
1968
- _2023: createMetricPattern4(client, _m(acc, '2023_average_price')),
1969
- _2024: createMetricPattern4(client, _m(acc, '2024_average_price')),
1970
- _2025: createMetricPattern4(client, _m(acc, '2025_average_price')),
1971
- _2026: createMetricPattern4(client, _m(acc, '2026_average_price')),
1972
- };
1973
- }
1974
-
1975
- /**
1976
- * @template T
1977
- * @typedef {Object} PeriodAveragePricePattern
1891
+ * @typedef {Object} PeriodDaysInLossPattern
1978
1892
  * @property {MetricPattern4<T>} _10y
1979
1893
  * @property {MetricPattern4<T>} _1m
1980
1894
  * @property {MetricPattern4<T>} _1w
@@ -1990,13 +1904,13 @@ function createClassAveragePricePattern(client, acc) {
1990
1904
  */
1991
1905
 
1992
1906
  /**
1993
- * Create a PeriodAveragePricePattern pattern node
1907
+ * Create a PeriodDaysInLossPattern pattern node
1994
1908
  * @template T
1995
1909
  * @param {BrkClientBase} client
1996
1910
  * @param {string} acc - Accumulated metric name
1997
- * @returns {PeriodAveragePricePattern<T>}
1911
+ * @returns {PeriodDaysInLossPattern<T>}
1998
1912
  */
1999
- function createPeriodAveragePricePattern(client, acc) {
1913
+ function createPeriodDaysInLossPattern(client, acc) {
2000
1914
  return {
2001
1915
  _10y: createMetricPattern4(client, _p('10y', acc)),
2002
1916
  _1m: createMetricPattern4(client, _p('1m', acc)),
@@ -2013,6 +1927,47 @@ function createPeriodAveragePricePattern(client, acc) {
2013
1927
  };
2014
1928
  }
2015
1929
 
1930
+ /**
1931
+ * @template T
1932
+ * @typedef {Object} ClassDaysInLossPattern
1933
+ * @property {MetricPattern4<T>} _2015
1934
+ * @property {MetricPattern4<T>} _2016
1935
+ * @property {MetricPattern4<T>} _2017
1936
+ * @property {MetricPattern4<T>} _2018
1937
+ * @property {MetricPattern4<T>} _2019
1938
+ * @property {MetricPattern4<T>} _2020
1939
+ * @property {MetricPattern4<T>} _2021
1940
+ * @property {MetricPattern4<T>} _2022
1941
+ * @property {MetricPattern4<T>} _2023
1942
+ * @property {MetricPattern4<T>} _2024
1943
+ * @property {MetricPattern4<T>} _2025
1944
+ * @property {MetricPattern4<T>} _2026
1945
+ */
1946
+
1947
+ /**
1948
+ * Create a ClassDaysInLossPattern pattern node
1949
+ * @template T
1950
+ * @param {BrkClientBase} client
1951
+ * @param {string} acc - Accumulated metric name
1952
+ * @returns {ClassDaysInLossPattern<T>}
1953
+ */
1954
+ function createClassDaysInLossPattern(client, acc) {
1955
+ return {
1956
+ _2015: createMetricPattern4(client, _m(acc, '2015_days_in_profit')),
1957
+ _2016: createMetricPattern4(client, _m(acc, '2016_days_in_profit')),
1958
+ _2017: createMetricPattern4(client, _m(acc, '2017_days_in_profit')),
1959
+ _2018: createMetricPattern4(client, _m(acc, '2018_days_in_profit')),
1960
+ _2019: createMetricPattern4(client, _m(acc, '2019_days_in_profit')),
1961
+ _2020: createMetricPattern4(client, _m(acc, '2020_days_in_profit')),
1962
+ _2021: createMetricPattern4(client, _m(acc, '2021_days_in_profit')),
1963
+ _2022: createMetricPattern4(client, _m(acc, '2022_days_in_profit')),
1964
+ _2023: createMetricPattern4(client, _m(acc, '2023_days_in_profit')),
1965
+ _2024: createMetricPattern4(client, _m(acc, '2024_days_in_profit')),
1966
+ _2025: createMetricPattern4(client, _m(acc, '2025_days_in_profit')),
1967
+ _2026: createMetricPattern4(client, _m(acc, '2026_days_in_profit')),
1968
+ };
1969
+ }
1970
+
2016
1971
  /**
2017
1972
  * @typedef {Object} BitcoinPattern
2018
1973
  * @property {MetricPattern2<Bitcoin>} average
@@ -2089,41 +2044,6 @@ function createDollarsPattern(client, acc) {
2089
2044
  };
2090
2045
  }
2091
2046
 
2092
- /**
2093
- * @typedef {Object} RelativePattern
2094
- * @property {MetricPattern1<StoredF32>} negUnrealizedLossRelToMarketCap
2095
- * @property {MetricPattern1<StoredF32>} netUnrealizedPnlRelToMarketCap
2096
- * @property {MetricPattern1<StoredF32>} nupl
2097
- * @property {MetricPattern1<StoredF64>} supplyInLossRelToCirculatingSupply
2098
- * @property {MetricPattern1<StoredF64>} supplyInLossRelToOwnSupply
2099
- * @property {MetricPattern1<StoredF64>} supplyInProfitRelToCirculatingSupply
2100
- * @property {MetricPattern1<StoredF64>} supplyInProfitRelToOwnSupply
2101
- * @property {MetricPattern4<StoredF64>} supplyRelToCirculatingSupply
2102
- * @property {MetricPattern1<StoredF32>} unrealizedLossRelToMarketCap
2103
- * @property {MetricPattern1<StoredF32>} unrealizedProfitRelToMarketCap
2104
- */
2105
-
2106
- /**
2107
- * Create a RelativePattern pattern node
2108
- * @param {BrkClientBase} client
2109
- * @param {string} acc - Accumulated metric name
2110
- * @returns {RelativePattern}
2111
- */
2112
- function createRelativePattern(client, acc) {
2113
- return {
2114
- negUnrealizedLossRelToMarketCap: createMetricPattern1(client, _m(acc, 'neg_unrealized_loss_rel_to_market_cap')),
2115
- netUnrealizedPnlRelToMarketCap: createMetricPattern1(client, _m(acc, 'net_unrealized_pnl_rel_to_market_cap')),
2116
- nupl: createMetricPattern1(client, _m(acc, 'nupl')),
2117
- supplyInLossRelToCirculatingSupply: createMetricPattern1(client, _m(acc, 'supply_in_loss_rel_to_circulating_supply')),
2118
- supplyInLossRelToOwnSupply: createMetricPattern1(client, _m(acc, 'supply_in_loss_rel_to_own_supply')),
2119
- supplyInProfitRelToCirculatingSupply: createMetricPattern1(client, _m(acc, 'supply_in_profit_rel_to_circulating_supply')),
2120
- supplyInProfitRelToOwnSupply: createMetricPattern1(client, _m(acc, 'supply_in_profit_rel_to_own_supply')),
2121
- supplyRelToCirculatingSupply: createMetricPattern4(client, _m(acc, 'supply_rel_to_circulating_supply')),
2122
- unrealizedLossRelToMarketCap: createMetricPattern1(client, _m(acc, 'unrealized_loss_rel_to_market_cap')),
2123
- unrealizedProfitRelToMarketCap: createMetricPattern1(client, _m(acc, 'unrealized_profit_rel_to_market_cap')),
2124
- };
2125
- }
2126
-
2127
2047
  /**
2128
2048
  * @typedef {Object} RelativePattern2
2129
2049
  * @property {MetricPattern1<StoredF32>} negUnrealizedLossRelToOwnMarketCap
@@ -2159,6 +2079,41 @@ function createRelativePattern2(client, acc) {
2159
2079
  };
2160
2080
  }
2161
2081
 
2082
+ /**
2083
+ * @typedef {Object} RelativePattern
2084
+ * @property {MetricPattern1<StoredF32>} negUnrealizedLossRelToMarketCap
2085
+ * @property {MetricPattern1<StoredF32>} netUnrealizedPnlRelToMarketCap
2086
+ * @property {MetricPattern1<StoredF32>} nupl
2087
+ * @property {MetricPattern1<StoredF64>} supplyInLossRelToCirculatingSupply
2088
+ * @property {MetricPattern1<StoredF64>} supplyInLossRelToOwnSupply
2089
+ * @property {MetricPattern1<StoredF64>} supplyInProfitRelToCirculatingSupply
2090
+ * @property {MetricPattern1<StoredF64>} supplyInProfitRelToOwnSupply
2091
+ * @property {MetricPattern4<StoredF64>} supplyRelToCirculatingSupply
2092
+ * @property {MetricPattern1<StoredF32>} unrealizedLossRelToMarketCap
2093
+ * @property {MetricPattern1<StoredF32>} unrealizedProfitRelToMarketCap
2094
+ */
2095
+
2096
+ /**
2097
+ * Create a RelativePattern pattern node
2098
+ * @param {BrkClientBase} client
2099
+ * @param {string} acc - Accumulated metric name
2100
+ * @returns {RelativePattern}
2101
+ */
2102
+ function createRelativePattern(client, acc) {
2103
+ return {
2104
+ negUnrealizedLossRelToMarketCap: createMetricPattern1(client, _m(acc, 'neg_unrealized_loss_rel_to_market_cap')),
2105
+ netUnrealizedPnlRelToMarketCap: createMetricPattern1(client, _m(acc, 'net_unrealized_pnl_rel_to_market_cap')),
2106
+ nupl: createMetricPattern1(client, _m(acc, 'nupl')),
2107
+ supplyInLossRelToCirculatingSupply: createMetricPattern1(client, _m(acc, 'supply_in_loss_rel_to_circulating_supply')),
2108
+ supplyInLossRelToOwnSupply: createMetricPattern1(client, _m(acc, 'supply_in_loss_rel_to_own_supply')),
2109
+ supplyInProfitRelToCirculatingSupply: createMetricPattern1(client, _m(acc, 'supply_in_profit_rel_to_circulating_supply')),
2110
+ supplyInProfitRelToOwnSupply: createMetricPattern1(client, _m(acc, 'supply_in_profit_rel_to_own_supply')),
2111
+ supplyRelToCirculatingSupply: createMetricPattern4(client, _m(acc, 'supply_rel_to_circulating_supply')),
2112
+ unrealizedLossRelToMarketCap: createMetricPattern1(client, _m(acc, 'unrealized_loss_rel_to_market_cap')),
2113
+ unrealizedProfitRelToMarketCap: createMetricPattern1(client, _m(acc, 'unrealized_profit_rel_to_market_cap')),
2114
+ };
2115
+ }
2116
+
2162
2117
  /**
2163
2118
  * @template T
2164
2119
  * @typedef {Object} CountPattern2
@@ -2331,35 +2286,31 @@ function create_0satsPattern(client, acc) {
2331
2286
  }
2332
2287
 
2333
2288
  /**
2334
- * @template T
2335
- * @typedef {Object} PhaseDailyCentsPattern
2336
- * @property {MetricPattern6<T>} average
2337
- * @property {MetricPattern6<T>} max
2338
- * @property {MetricPattern6<T>} median
2339
- * @property {MetricPattern6<T>} min
2340
- * @property {MetricPattern6<T>} pct10
2341
- * @property {MetricPattern6<T>} pct25
2342
- * @property {MetricPattern6<T>} pct75
2343
- * @property {MetricPattern6<T>} pct90
2289
+ * @typedef {Object} _100btcPattern
2290
+ * @property {ActivityPattern2} activity
2291
+ * @property {CostBasisPattern} costBasis
2292
+ * @property {OutputsPattern} outputs
2293
+ * @property {RealizedPattern} realized
2294
+ * @property {RelativePattern} relative
2295
+ * @property {SupplyPattern2} supply
2296
+ * @property {UnrealizedPattern} unrealized
2344
2297
  */
2345
2298
 
2346
2299
  /**
2347
- * Create a PhaseDailyCentsPattern pattern node
2348
- * @template T
2300
+ * Create a _100btcPattern pattern node
2349
2301
  * @param {BrkClientBase} client
2350
2302
  * @param {string} acc - Accumulated metric name
2351
- * @returns {PhaseDailyCentsPattern<T>}
2303
+ * @returns {_100btcPattern}
2352
2304
  */
2353
- function createPhaseDailyCentsPattern(client, acc) {
2305
+ function create_100btcPattern(client, acc) {
2354
2306
  return {
2355
- average: createMetricPattern6(client, _m(acc, 'average')),
2356
- max: createMetricPattern6(client, _m(acc, 'max')),
2357
- median: createMetricPattern6(client, _m(acc, 'median')),
2358
- min: createMetricPattern6(client, _m(acc, 'min')),
2359
- pct10: createMetricPattern6(client, _m(acc, 'pct10')),
2360
- pct25: createMetricPattern6(client, _m(acc, 'pct25')),
2361
- pct75: createMetricPattern6(client, _m(acc, 'pct75')),
2362
- pct90: createMetricPattern6(client, _m(acc, 'pct90')),
2307
+ activity: createActivityPattern2(client, acc),
2308
+ costBasis: createCostBasisPattern(client, acc),
2309
+ outputs: createOutputsPattern(client, _m(acc, 'utxo_count')),
2310
+ realized: createRealizedPattern(client, acc),
2311
+ relative: createRelativePattern(client, acc),
2312
+ supply: createSupplyPattern2(client, _m(acc, 'supply')),
2313
+ unrealized: createUnrealizedPattern(client, acc),
2363
2314
  };
2364
2315
  }
2365
2316
 
@@ -2393,34 +2344,63 @@ function create_0satsPattern2(client, acc) {
2393
2344
  }
2394
2345
 
2395
2346
  /**
2396
- * @typedef {Object} _100btcPattern
2347
+ * @typedef {Object} _10yPattern
2397
2348
  * @property {ActivityPattern2} activity
2398
2349
  * @property {CostBasisPattern} costBasis
2399
2350
  * @property {OutputsPattern} outputs
2400
- * @property {RealizedPattern} realized
2351
+ * @property {RealizedPattern4} realized
2401
2352
  * @property {RelativePattern} relative
2402
2353
  * @property {SupplyPattern2} supply
2403
2354
  * @property {UnrealizedPattern} unrealized
2404
2355
  */
2405
2356
 
2406
2357
  /**
2407
- * Create a _100btcPattern pattern node
2358
+ * Create a _10yPattern pattern node
2408
2359
  * @param {BrkClientBase} client
2409
2360
  * @param {string} acc - Accumulated metric name
2410
- * @returns {_100btcPattern}
2361
+ * @returns {_10yPattern}
2411
2362
  */
2412
- function create_100btcPattern(client, acc) {
2363
+ function create_10yPattern(client, acc) {
2413
2364
  return {
2414
2365
  activity: createActivityPattern2(client, acc),
2415
2366
  costBasis: createCostBasisPattern(client, acc),
2416
2367
  outputs: createOutputsPattern(client, _m(acc, 'utxo_count')),
2417
- realized: createRealizedPattern(client, acc),
2368
+ realized: createRealizedPattern4(client, acc),
2418
2369
  relative: createRelativePattern(client, acc),
2419
2370
  supply: createSupplyPattern2(client, _m(acc, 'supply')),
2420
2371
  unrealized: createUnrealizedPattern(client, acc),
2421
2372
  };
2422
2373
  }
2423
2374
 
2375
+ /**
2376
+ * @typedef {Object} UnrealizedPattern
2377
+ * @property {MetricPattern1<Dollars>} negUnrealizedLoss
2378
+ * @property {MetricPattern1<Dollars>} netUnrealizedPnl
2379
+ * @property {ActiveSupplyPattern} supplyInLoss
2380
+ * @property {ActiveSupplyPattern} supplyInProfit
2381
+ * @property {MetricPattern1<Dollars>} totalUnrealizedPnl
2382
+ * @property {MetricPattern1<Dollars>} unrealizedLoss
2383
+ * @property {MetricPattern1<Dollars>} unrealizedProfit
2384
+ */
2385
+
2386
+ /**
2387
+ * Create a UnrealizedPattern pattern node
2388
+ * @param {BrkClientBase} client
2389
+ * @param {string} acc - Accumulated metric name
2390
+ * @returns {UnrealizedPattern}
2391
+ */
2392
+ function createUnrealizedPattern(client, acc) {
2393
+ return {
2394
+ negUnrealizedLoss: createMetricPattern1(client, _m(acc, 'neg_unrealized_loss')),
2395
+ netUnrealizedPnl: createMetricPattern1(client, _m(acc, 'net_unrealized_pnl')),
2396
+ supplyInLoss: createActiveSupplyPattern(client, _m(acc, 'supply_in_loss')),
2397
+ supplyInProfit: createActiveSupplyPattern(client, _m(acc, 'supply_in_profit')),
2398
+ totalUnrealizedPnl: createMetricPattern1(client, _m(acc, 'total_unrealized_pnl')),
2399
+ unrealizedLoss: createMetricPattern1(client, _m(acc, 'unrealized_loss')),
2400
+ unrealizedProfit: createMetricPattern1(client, _m(acc, 'unrealized_profit')),
2401
+ };
2402
+ }
2403
+
2424
2404
  /**
2425
2405
  * @typedef {Object} PeriodCagrPattern
2426
2406
  * @property {MetricPattern4<StoredF32>} _10y
@@ -2475,65 +2455,34 @@ function create_10yTo12yPattern(client, acc) {
2475
2455
  realized: createRealizedPattern2(client, acc),
2476
2456
  relative: createRelativePattern2(client, acc),
2477
2457
  supply: createSupplyPattern2(client, _m(acc, 'supply')),
2478
- unrealized: createUnrealizedPattern(client, acc),
2479
- };
2480
- }
2481
-
2482
- /**
2483
- * @typedef {Object} _10yPattern
2484
- * @property {ActivityPattern2} activity
2485
- * @property {CostBasisPattern} costBasis
2486
- * @property {OutputsPattern} outputs
2487
- * @property {RealizedPattern4} realized
2488
- * @property {RelativePattern} relative
2489
- * @property {SupplyPattern2} supply
2490
- * @property {UnrealizedPattern} unrealized
2491
- */
2492
-
2493
- /**
2494
- * Create a _10yPattern pattern node
2495
- * @param {BrkClientBase} client
2496
- * @param {string} acc - Accumulated metric name
2497
- * @returns {_10yPattern}
2498
- */
2499
- function create_10yPattern(client, acc) {
2500
- return {
2501
- activity: createActivityPattern2(client, acc),
2502
- costBasis: createCostBasisPattern(client, acc),
2503
- outputs: createOutputsPattern(client, _m(acc, 'utxo_count')),
2504
- realized: createRealizedPattern4(client, acc),
2505
- relative: createRelativePattern(client, acc),
2506
- supply: createSupplyPattern2(client, _m(acc, 'supply')),
2507
- unrealized: createUnrealizedPattern(client, acc),
2508
- };
2509
- }
2510
-
2511
- /**
2512
- * @typedef {Object} UnrealizedPattern
2513
- * @property {MetricPattern1<Dollars>} negUnrealizedLoss
2514
- * @property {MetricPattern1<Dollars>} netUnrealizedPnl
2515
- * @property {ActiveSupplyPattern} supplyInLoss
2516
- * @property {ActiveSupplyPattern} supplyInProfit
2517
- * @property {MetricPattern1<Dollars>} totalUnrealizedPnl
2518
- * @property {MetricPattern1<Dollars>} unrealizedLoss
2519
- * @property {MetricPattern1<Dollars>} unrealizedProfit
2458
+ unrealized: createUnrealizedPattern(client, acc),
2459
+ };
2460
+ }
2461
+
2462
+ /**
2463
+ * @typedef {Object} AllPattern
2464
+ * @property {FullnessPattern<StoredU32>} balanceDecreased
2465
+ * @property {FullnessPattern<StoredU32>} balanceIncreased
2466
+ * @property {FullnessPattern<StoredU32>} both
2467
+ * @property {FullnessPattern<StoredU32>} reactivated
2468
+ * @property {FullnessPattern<StoredU32>} receiving
2469
+ * @property {FullnessPattern<StoredU32>} sending
2520
2470
  */
2521
2471
 
2522
2472
  /**
2523
- * Create a UnrealizedPattern pattern node
2473
+ * Create a AllPattern pattern node
2524
2474
  * @param {BrkClientBase} client
2525
2475
  * @param {string} acc - Accumulated metric name
2526
- * @returns {UnrealizedPattern}
2476
+ * @returns {AllPattern}
2527
2477
  */
2528
- function createUnrealizedPattern(client, acc) {
2478
+ function createAllPattern(client, acc) {
2529
2479
  return {
2530
- negUnrealizedLoss: createMetricPattern1(client, _m(acc, 'neg_unrealized_loss')),
2531
- netUnrealizedPnl: createMetricPattern1(client, _m(acc, 'net_unrealized_pnl')),
2532
- supplyInLoss: createActiveSupplyPattern(client, _m(acc, 'supply_in_loss')),
2533
- supplyInProfit: createActiveSupplyPattern(client, _m(acc, 'supply_in_profit')),
2534
- totalUnrealizedPnl: createMetricPattern1(client, _m(acc, 'total_unrealized_pnl')),
2535
- unrealizedLoss: createMetricPattern1(client, _m(acc, 'unrealized_loss')),
2536
- unrealizedProfit: createMetricPattern1(client, _m(acc, 'unrealized_profit')),
2480
+ balanceDecreased: createFullnessPattern(client, _m(acc, 'balance_decreased')),
2481
+ balanceIncreased: createFullnessPattern(client, _m(acc, 'balance_increased')),
2482
+ both: createFullnessPattern(client, _m(acc, 'both')),
2483
+ reactivated: createFullnessPattern(client, _m(acc, 'reactivated')),
2484
+ receiving: createFullnessPattern(client, _m(acc, 'receiving')),
2485
+ sending: createFullnessPattern(client, _m(acc, 'sending')),
2537
2486
  };
2538
2487
  }
2539
2488
 
@@ -2588,23 +2537,44 @@ function createSplitPattern2(client, acc) {
2588
2537
  }
2589
2538
 
2590
2539
  /**
2591
- * @typedef {Object} CostBasisPattern2
2592
- * @property {MetricPattern1<Dollars>} max
2593
- * @property {MetricPattern1<Dollars>} min
2594
- * @property {PercentilesPattern} percentiles
2540
+ * @typedef {Object} UnclaimedRewardsPattern
2541
+ * @property {BitcoinPattern2<Bitcoin>} bitcoin
2542
+ * @property {BlockCountPattern<Dollars>} dollars
2543
+ * @property {BlockCountPattern<Sats>} sats
2595
2544
  */
2596
2545
 
2597
2546
  /**
2598
- * Create a CostBasisPattern2 pattern node
2547
+ * Create a UnclaimedRewardsPattern pattern node
2599
2548
  * @param {BrkClientBase} client
2600
2549
  * @param {string} acc - Accumulated metric name
2601
- * @returns {CostBasisPattern2}
2550
+ * @returns {UnclaimedRewardsPattern}
2602
2551
  */
2603
- function createCostBasisPattern2(client, acc) {
2552
+ function createUnclaimedRewardsPattern(client, acc) {
2604
2553
  return {
2605
- max: createMetricPattern1(client, _m(acc, 'max_cost_basis')),
2606
- min: createMetricPattern1(client, _m(acc, 'min_cost_basis')),
2607
- percentiles: createPercentilesPattern(client, _m(acc, 'cost_basis')),
2554
+ bitcoin: createBitcoinPattern2(client, _m(acc, 'btc')),
2555
+ dollars: createBlockCountPattern(client, _m(acc, 'usd')),
2556
+ sats: createBlockCountPattern(client, acc),
2557
+ };
2558
+ }
2559
+
2560
+ /**
2561
+ * @typedef {Object} _2015Pattern
2562
+ * @property {MetricPattern4<Bitcoin>} bitcoin
2563
+ * @property {MetricPattern4<Dollars>} dollars
2564
+ * @property {MetricPattern4<Sats>} sats
2565
+ */
2566
+
2567
+ /**
2568
+ * Create a _2015Pattern pattern node
2569
+ * @param {BrkClientBase} client
2570
+ * @param {string} acc - Accumulated metric name
2571
+ * @returns {_2015Pattern}
2572
+ */
2573
+ function create_2015Pattern(client, acc) {
2574
+ return {
2575
+ bitcoin: createMetricPattern4(client, _m(acc, 'btc')),
2576
+ dollars: createMetricPattern4(client, _m(acc, 'usd')),
2577
+ sats: createMetricPattern4(client, acc),
2608
2578
  };
2609
2579
  }
2610
2580
 
@@ -2629,6 +2599,27 @@ function createActiveSupplyPattern(client, acc) {
2629
2599
  };
2630
2600
  }
2631
2601
 
2602
+ /**
2603
+ * @typedef {Object} CoinbasePattern
2604
+ * @property {BitcoinPattern} bitcoin
2605
+ * @property {DollarsPattern<Dollars>} dollars
2606
+ * @property {DollarsPattern<Sats>} sats
2607
+ */
2608
+
2609
+ /**
2610
+ * Create a CoinbasePattern pattern node
2611
+ * @param {BrkClientBase} client
2612
+ * @param {string} acc - Accumulated metric name
2613
+ * @returns {CoinbasePattern}
2614
+ */
2615
+ function createCoinbasePattern(client, acc) {
2616
+ return {
2617
+ bitcoin: createBitcoinPattern(client, _m(acc, 'btc')),
2618
+ dollars: createDollarsPattern(client, _m(acc, 'usd')),
2619
+ sats: createDollarsPattern(client, acc),
2620
+ };
2621
+ }
2622
+
2632
2623
  /**
2633
2624
  * @typedef {Object} SegwitAdoptionPattern
2634
2625
  * @property {MetricPattern11<StoredF32>} base
@@ -2651,105 +2642,101 @@ function createSegwitAdoptionPattern(client, acc) {
2651
2642
  }
2652
2643
 
2653
2644
  /**
2654
- * @typedef {Object} CoinbasePattern2
2655
- * @property {BlockCountPattern<Bitcoin>} bitcoin
2656
- * @property {BlockCountPattern<Dollars>} dollars
2657
- * @property {BlockCountPattern<Sats>} sats
2645
+ * @typedef {Object} CostBasisPattern2
2646
+ * @property {ActivePricePattern} max
2647
+ * @property {ActivePricePattern} min
2648
+ * @property {PercentilesPattern} percentiles
2658
2649
  */
2659
2650
 
2660
2651
  /**
2661
- * Create a CoinbasePattern2 pattern node
2652
+ * Create a CostBasisPattern2 pattern node
2662
2653
  * @param {BrkClientBase} client
2663
2654
  * @param {string} acc - Accumulated metric name
2664
- * @returns {CoinbasePattern2}
2655
+ * @returns {CostBasisPattern2}
2665
2656
  */
2666
- function createCoinbasePattern2(client, acc) {
2657
+ function createCostBasisPattern2(client, acc) {
2667
2658
  return {
2668
- bitcoin: createBlockCountPattern(client, _m(acc, 'btc')),
2669
- dollars: createBlockCountPattern(client, _m(acc, 'usd')),
2670
- sats: createBlockCountPattern(client, acc),
2659
+ max: createActivePricePattern(client, _m(acc, 'max_cost_basis')),
2660
+ min: createActivePricePattern(client, _m(acc, 'min_cost_basis')),
2661
+ percentiles: createPercentilesPattern(client, _m(acc, 'cost_basis')),
2671
2662
  };
2672
2663
  }
2673
2664
 
2674
2665
  /**
2675
- * @typedef {Object} UnclaimedRewardsPattern
2676
- * @property {BitcoinPattern2<Bitcoin>} bitcoin
2666
+ * @typedef {Object} CoinbasePattern2
2667
+ * @property {BlockCountPattern<Bitcoin>} bitcoin
2677
2668
  * @property {BlockCountPattern<Dollars>} dollars
2678
2669
  * @property {BlockCountPattern<Sats>} sats
2679
2670
  */
2680
2671
 
2681
2672
  /**
2682
- * Create a UnclaimedRewardsPattern pattern node
2673
+ * Create a CoinbasePattern2 pattern node
2683
2674
  * @param {BrkClientBase} client
2684
2675
  * @param {string} acc - Accumulated metric name
2685
- * @returns {UnclaimedRewardsPattern}
2676
+ * @returns {CoinbasePattern2}
2686
2677
  */
2687
- function createUnclaimedRewardsPattern(client, acc) {
2678
+ function createCoinbasePattern2(client, acc) {
2688
2679
  return {
2689
- bitcoin: createBitcoinPattern2(client, _m(acc, 'btc')),
2680
+ bitcoin: createBlockCountPattern(client, _m(acc, 'btc')),
2690
2681
  dollars: createBlockCountPattern(client, _m(acc, 'usd')),
2691
2682
  sats: createBlockCountPattern(client, acc),
2692
2683
  };
2693
2684
  }
2694
2685
 
2695
2686
  /**
2696
- * @typedef {Object} CoinbasePattern
2697
- * @property {BitcoinPattern} bitcoin
2698
- * @property {DollarsPattern<Dollars>} dollars
2699
- * @property {DollarsPattern<Sats>} sats
2687
+ * @typedef {Object} RelativePattern4
2688
+ * @property {MetricPattern1<StoredF64>} supplyInLossRelToOwnSupply
2689
+ * @property {MetricPattern1<StoredF64>} supplyInProfitRelToOwnSupply
2700
2690
  */
2701
2691
 
2702
2692
  /**
2703
- * Create a CoinbasePattern pattern node
2693
+ * Create a RelativePattern4 pattern node
2704
2694
  * @param {BrkClientBase} client
2705
2695
  * @param {string} acc - Accumulated metric name
2706
- * @returns {CoinbasePattern}
2696
+ * @returns {RelativePattern4}
2707
2697
  */
2708
- function createCoinbasePattern(client, acc) {
2698
+ function createRelativePattern4(client, acc) {
2709
2699
  return {
2710
- bitcoin: createBitcoinPattern(client, _m(acc, 'btc')),
2711
- dollars: createDollarsPattern(client, _m(acc, 'usd')),
2712
- sats: createDollarsPattern(client, acc),
2700
+ supplyInLossRelToOwnSupply: createMetricPattern1(client, _m(acc, 'loss_rel_to_own_supply')),
2701
+ supplyInProfitRelToOwnSupply: createMetricPattern1(client, _m(acc, 'profit_rel_to_own_supply')),
2713
2702
  };
2714
2703
  }
2715
2704
 
2716
2705
  /**
2717
- * @typedef {Object} _2015Pattern
2718
- * @property {MetricPattern4<Bitcoin>} bitcoin
2719
- * @property {MetricPattern4<Dollars>} dollars
2720
- * @property {MetricPattern4<Sats>} sats
2706
+ * @typedef {Object} ActivePricePattern
2707
+ * @property {MetricPattern1<Dollars>} dollars
2708
+ * @property {MetricPattern1<SatsFract>} sats
2721
2709
  */
2722
2710
 
2723
2711
  /**
2724
- * Create a _2015Pattern pattern node
2712
+ * Create a ActivePricePattern pattern node
2725
2713
  * @param {BrkClientBase} client
2726
2714
  * @param {string} acc - Accumulated metric name
2727
- * @returns {_2015Pattern}
2715
+ * @returns {ActivePricePattern}
2728
2716
  */
2729
- function create_2015Pattern(client, acc) {
2717
+ function createActivePricePattern(client, acc) {
2730
2718
  return {
2731
- bitcoin: createMetricPattern4(client, _m(acc, 'btc')),
2732
- dollars: createMetricPattern4(client, _m(acc, 'usd')),
2733
- sats: createMetricPattern4(client, acc),
2719
+ dollars: createMetricPattern1(client, acc),
2720
+ sats: createMetricPattern1(client, _m(acc, 'sats')),
2734
2721
  };
2735
2722
  }
2736
2723
 
2737
2724
  /**
2738
- * @typedef {Object} RelativePattern4
2739
- * @property {MetricPattern1<StoredF64>} supplyInLossRelToOwnSupply
2740
- * @property {MetricPattern1<StoredF64>} supplyInProfitRelToOwnSupply
2725
+ * @typedef {Object} _1dReturns1mSdPattern
2726
+ * @property {MetricPattern4<StoredF32>} sd
2727
+ * @property {MetricPattern4<StoredF32>} sma
2741
2728
  */
2742
2729
 
2743
2730
  /**
2744
- * Create a RelativePattern4 pattern node
2731
+ * Create a _1dReturns1mSdPattern pattern node
2745
2732
  * @param {BrkClientBase} client
2746
2733
  * @param {string} acc - Accumulated metric name
2747
- * @returns {RelativePattern4}
2734
+ * @returns {_1dReturns1mSdPattern}
2748
2735
  */
2749
- function createRelativePattern4(client, acc) {
2736
+ function create_1dReturns1mSdPattern(client, acc) {
2750
2737
  return {
2751
- supplyInLossRelToOwnSupply: createMetricPattern1(client, _m(acc, 'loss_rel_to_own_supply')),
2752
- supplyInProfitRelToOwnSupply: createMetricPattern1(client, _m(acc, 'profit_rel_to_own_supply')),
2738
+ sd: createMetricPattern4(client, _m(acc, 'sd')),
2739
+ sma: createMetricPattern4(client, _m(acc, 'sma')),
2753
2740
  };
2754
2741
  }
2755
2742
 
@@ -2773,81 +2760,81 @@ function createSupplyPattern2(client, acc) {
2773
2760
  }
2774
2761
 
2775
2762
  /**
2776
- * @typedef {Object} CostBasisPattern
2777
- * @property {MetricPattern1<Dollars>} max
2778
- * @property {MetricPattern1<Dollars>} min
2763
+ * @typedef {Object} _0sdUsdPattern
2764
+ * @property {MetricPattern4<Dollars>} dollars
2765
+ * @property {MetricPattern4<SatsFract>} sats
2779
2766
  */
2780
2767
 
2781
2768
  /**
2782
- * Create a CostBasisPattern pattern node
2769
+ * Create a _0sdUsdPattern pattern node
2783
2770
  * @param {BrkClientBase} client
2784
2771
  * @param {string} acc - Accumulated metric name
2785
- * @returns {CostBasisPattern}
2772
+ * @returns {_0sdUsdPattern}
2786
2773
  */
2787
- function createCostBasisPattern(client, acc) {
2774
+ function create_0sdUsdPattern(client, acc) {
2788
2775
  return {
2789
- max: createMetricPattern1(client, _m(acc, 'max_cost_basis')),
2790
- min: createMetricPattern1(client, _m(acc, 'min_cost_basis')),
2776
+ dollars: createMetricPattern4(client, acc),
2777
+ sats: createMetricPattern4(client, _m(acc, 'sats')),
2791
2778
  };
2792
2779
  }
2793
2780
 
2794
2781
  /**
2795
- * @typedef {Object} _1dReturns1mSdPattern
2796
- * @property {MetricPattern4<StoredF32>} sd
2797
- * @property {MetricPattern4<StoredF32>} sma
2782
+ * @typedef {Object} CostBasisPattern
2783
+ * @property {ActivePricePattern} max
2784
+ * @property {ActivePricePattern} min
2798
2785
  */
2799
2786
 
2800
2787
  /**
2801
- * Create a _1dReturns1mSdPattern pattern node
2788
+ * Create a CostBasisPattern pattern node
2802
2789
  * @param {BrkClientBase} client
2803
2790
  * @param {string} acc - Accumulated metric name
2804
- * @returns {_1dReturns1mSdPattern}
2791
+ * @returns {CostBasisPattern}
2805
2792
  */
2806
- function create_1dReturns1mSdPattern(client, acc) {
2793
+ function createCostBasisPattern(client, acc) {
2807
2794
  return {
2808
- sd: createMetricPattern4(client, _m(acc, 'sd')),
2809
- sma: createMetricPattern4(client, _m(acc, 'sma')),
2795
+ max: createActivePricePattern(client, _m(acc, 'max_cost_basis')),
2796
+ min: createActivePricePattern(client, _m(acc, 'min_cost_basis')),
2810
2797
  };
2811
2798
  }
2812
2799
 
2813
2800
  /**
2814
2801
  * @template T
2815
- * @typedef {Object} BitcoinPattern2
2816
- * @property {MetricPattern2<T>} cumulative
2802
+ * @typedef {Object} BlockCountPattern
2803
+ * @property {MetricPattern1<T>} cumulative
2817
2804
  * @property {MetricPattern1<T>} sum
2818
2805
  */
2819
2806
 
2820
2807
  /**
2821
- * Create a BitcoinPattern2 pattern node
2808
+ * Create a BlockCountPattern pattern node
2822
2809
  * @template T
2823
2810
  * @param {BrkClientBase} client
2824
2811
  * @param {string} acc - Accumulated metric name
2825
- * @returns {BitcoinPattern2<T>}
2812
+ * @returns {BlockCountPattern<T>}
2826
2813
  */
2827
- function createBitcoinPattern2(client, acc) {
2814
+ function createBlockCountPattern(client, acc) {
2828
2815
  return {
2829
- cumulative: createMetricPattern2(client, _m(acc, 'cumulative')),
2816
+ cumulative: createMetricPattern1(client, _m(acc, 'cumulative')),
2830
2817
  sum: createMetricPattern1(client, acc),
2831
2818
  };
2832
2819
  }
2833
2820
 
2834
2821
  /**
2835
2822
  * @template T
2836
- * @typedef {Object} BlockCountPattern
2837
- * @property {MetricPattern1<T>} cumulative
2823
+ * @typedef {Object} BitcoinPattern2
2824
+ * @property {MetricPattern2<T>} cumulative
2838
2825
  * @property {MetricPattern1<T>} sum
2839
2826
  */
2840
2827
 
2841
2828
  /**
2842
- * Create a BlockCountPattern pattern node
2829
+ * Create a BitcoinPattern2 pattern node
2843
2830
  * @template T
2844
2831
  * @param {BrkClientBase} client
2845
2832
  * @param {string} acc - Accumulated metric name
2846
- * @returns {BlockCountPattern<T>}
2833
+ * @returns {BitcoinPattern2<T>}
2847
2834
  */
2848
- function createBlockCountPattern(client, acc) {
2835
+ function createBitcoinPattern2(client, acc) {
2849
2836
  return {
2850
- cumulative: createMetricPattern1(client, _m(acc, 'cumulative')),
2837
+ cumulative: createMetricPattern2(client, _m(acc, 'cumulative')),
2851
2838
  sum: createMetricPattern1(client, acc),
2852
2839
  };
2853
2840
  }
@@ -2868,42 +2855,42 @@ function createBlockCountPattern(client, acc) {
2868
2855
  */
2869
2856
  function createSatsPattern(client, acc) {
2870
2857
  return {
2871
- ohlc: createMetricPattern1(client, _m(acc, 'ohlc')),
2872
- split: createSplitPattern2(client, acc),
2858
+ ohlc: createMetricPattern1(client, _m(acc, 'ohlc_sats')),
2859
+ split: createSplitPattern2(client, _m(acc, 'sats')),
2873
2860
  };
2874
2861
  }
2875
2862
 
2876
2863
  /**
2877
- * @typedef {Object} RealizedPriceExtraPattern
2878
- * @property {MetricPattern4<StoredF32>} ratio
2864
+ * @typedef {Object} OutputsPattern
2865
+ * @property {MetricPattern1<StoredU64>} utxoCount
2879
2866
  */
2880
2867
 
2881
2868
  /**
2882
- * Create a RealizedPriceExtraPattern pattern node
2869
+ * Create a OutputsPattern pattern node
2883
2870
  * @param {BrkClientBase} client
2884
2871
  * @param {string} acc - Accumulated metric name
2885
- * @returns {RealizedPriceExtraPattern}
2872
+ * @returns {OutputsPattern}
2886
2873
  */
2887
- function createRealizedPriceExtraPattern(client, acc) {
2874
+ function createOutputsPattern(client, acc) {
2888
2875
  return {
2889
- ratio: createMetricPattern4(client, acc),
2876
+ utxoCount: createMetricPattern1(client, acc),
2890
2877
  };
2891
2878
  }
2892
2879
 
2893
2880
  /**
2894
- * @typedef {Object} OutputsPattern
2895
- * @property {MetricPattern1<StoredU64>} utxoCount
2881
+ * @typedef {Object} RealizedPriceExtraPattern
2882
+ * @property {MetricPattern4<StoredF32>} ratio
2896
2883
  */
2897
2884
 
2898
2885
  /**
2899
- * Create a OutputsPattern pattern node
2886
+ * Create a RealizedPriceExtraPattern pattern node
2900
2887
  * @param {BrkClientBase} client
2901
2888
  * @param {string} acc - Accumulated metric name
2902
- * @returns {OutputsPattern}
2889
+ * @returns {RealizedPriceExtraPattern}
2903
2890
  */
2904
- function createOutputsPattern(client, acc) {
2891
+ function createRealizedPriceExtraPattern(client, acc) {
2905
2892
  return {
2906
- utxoCount: createMetricPattern1(client, acc),
2893
+ ratio: createMetricPattern4(client, acc),
2907
2894
  };
2908
2895
  }
2909
2896
 
@@ -3092,13 +3079,13 @@ function createOutputsPattern(client, acc) {
3092
3079
 
3093
3080
  /**
3094
3081
  * @typedef {Object} MetricsTree_Cointime_Pricing
3095
- * @property {MetricPattern1<Dollars>} activePrice
3082
+ * @property {ActivePricePattern} activePrice
3096
3083
  * @property {ActivePriceRatioPattern} activePriceRatio
3097
- * @property {MetricPattern1<Dollars>} cointimePrice
3084
+ * @property {ActivePricePattern} cointimePrice
3098
3085
  * @property {ActivePriceRatioPattern} cointimePriceRatio
3099
- * @property {MetricPattern1<Dollars>} trueMarketMean
3086
+ * @property {ActivePricePattern} trueMarketMean
3100
3087
  * @property {ActivePriceRatioPattern} trueMarketMeanRatio
3101
- * @property {MetricPattern1<Dollars>} vaultedPrice
3088
+ * @property {ActivePricePattern} vaultedPrice
3102
3089
  * @property {ActivePriceRatioPattern} vaultedPriceRatio
3103
3090
  */
3104
3091
 
@@ -3148,16 +3135,33 @@ function createOutputsPattern(client, acc) {
3148
3135
  /**
3149
3136
  * @typedef {Object} MetricsTree_Distribution
3150
3137
  * @property {AddrCountPattern} addrCount
3138
+ * @property {MetricsTree_Distribution_AddressActivity} addressActivity
3151
3139
  * @property {MetricsTree_Distribution_AddressCohorts} addressCohorts
3152
3140
  * @property {MetricsTree_Distribution_AddressesData} addressesData
3153
3141
  * @property {MetricsTree_Distribution_AnyAddressIndexes} anyAddressIndexes
3154
3142
  * @property {MetricPattern11<SupplyState>} chainState
3155
3143
  * @property {AddrCountPattern} emptyAddrCount
3156
3144
  * @property {MetricPattern32<EmptyAddressIndex>} emptyaddressindex
3145
+ * @property {MetricsTree_Distribution_GrowthRate} growthRate
3157
3146
  * @property {MetricPattern31<LoadedAddressIndex>} loadedaddressindex
3147
+ * @property {MetricsTree_Distribution_NewAddrCount} newAddrCount
3148
+ * @property {AddrCountPattern} totalAddrCount
3158
3149
  * @property {MetricsTree_Distribution_UtxoCohorts} utxoCohorts
3159
3150
  */
3160
3151
 
3152
+ /**
3153
+ * @typedef {Object} MetricsTree_Distribution_AddressActivity
3154
+ * @property {AllPattern} all
3155
+ * @property {AllPattern} p2a
3156
+ * @property {AllPattern} p2pk33
3157
+ * @property {AllPattern} p2pk65
3158
+ * @property {AllPattern} p2pkh
3159
+ * @property {AllPattern} p2sh
3160
+ * @property {AllPattern} p2tr
3161
+ * @property {AllPattern} p2wpkh
3162
+ * @property {AllPattern} p2wsh
3163
+ */
3164
+
3161
3165
  /**
3162
3166
  * @typedef {Object} MetricsTree_Distribution_AddressCohorts
3163
3167
  * @property {MetricsTree_Distribution_AddressCohorts_AmountRange} amountRange
@@ -3236,6 +3240,32 @@ function createOutputsPattern(client, acc) {
3236
3240
  * @property {MetricPattern24<AnyAddressIndex>} p2wsh
3237
3241
  */
3238
3242
 
3243
+ /**
3244
+ * @typedef {Object} MetricsTree_Distribution_GrowthRate
3245
+ * @property {FullnessPattern<StoredF32>} all
3246
+ * @property {FullnessPattern<StoredF32>} p2a
3247
+ * @property {FullnessPattern<StoredF32>} p2pk33
3248
+ * @property {FullnessPattern<StoredF32>} p2pk65
3249
+ * @property {FullnessPattern<StoredF32>} p2pkh
3250
+ * @property {FullnessPattern<StoredF32>} p2sh
3251
+ * @property {FullnessPattern<StoredF32>} p2tr
3252
+ * @property {FullnessPattern<StoredF32>} p2wpkh
3253
+ * @property {FullnessPattern<StoredF32>} p2wsh
3254
+ */
3255
+
3256
+ /**
3257
+ * @typedef {Object} MetricsTree_Distribution_NewAddrCount
3258
+ * @property {DollarsPattern<StoredU64>} all
3259
+ * @property {DollarsPattern<StoredU64>} p2a
3260
+ * @property {DollarsPattern<StoredU64>} p2pk33
3261
+ * @property {DollarsPattern<StoredU64>} p2pk65
3262
+ * @property {DollarsPattern<StoredU64>} p2pkh
3263
+ * @property {DollarsPattern<StoredU64>} p2sh
3264
+ * @property {DollarsPattern<StoredU64>} p2tr
3265
+ * @property {DollarsPattern<StoredU64>} p2wpkh
3266
+ * @property {DollarsPattern<StoredU64>} p2wsh
3267
+ */
3268
+
3239
3269
  /**
3240
3270
  * @typedef {Object} MetricsTree_Distribution_UtxoCohorts
3241
3271
  * @property {MetricsTree_Distribution_UtxoCohorts_AgeRange} ageRange
@@ -3289,8 +3319,8 @@ function createOutputsPattern(client, acc) {
3289
3319
 
3290
3320
  /**
3291
3321
  * @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_CostBasis
3292
- * @property {MetricPattern1<Dollars>} max
3293
- * @property {MetricPattern1<Dollars>} min
3322
+ * @property {ActivePricePattern} max
3323
+ * @property {ActivePricePattern} min
3294
3324
  * @property {PercentilesPattern} percentiles
3295
3325
  */
3296
3326
 
@@ -3692,7 +3722,7 @@ function createOutputsPattern(client, acc) {
3692
3722
  * @property {MetricsTree_Market_Ath} ath
3693
3723
  * @property {MetricsTree_Market_Dca} dca
3694
3724
  * @property {MetricsTree_Market_Indicators} indicators
3695
- * @property {LookbackPattern<Dollars>} lookback
3725
+ * @property {MetricsTree_Market_Lookback} lookback
3696
3726
  * @property {MetricsTree_Market_MovingAverage} movingAverage
3697
3727
  * @property {MetricsTree_Market_Range} range
3698
3728
  * @property {MetricsTree_Market_Returns} returns
@@ -3704,54 +3734,54 @@ function createOutputsPattern(client, acc) {
3704
3734
  * @property {MetricPattern4<StoredU16>} daysSincePriceAth
3705
3735
  * @property {MetricPattern4<StoredU16>} maxDaysBetweenPriceAths
3706
3736
  * @property {MetricPattern4<StoredF32>} maxYearsBetweenPriceAths
3707
- * @property {MetricPattern1<Dollars>} priceAth
3737
+ * @property {ActivePricePattern} priceAth
3708
3738
  * @property {MetricPattern3<StoredF32>} priceDrawdown
3709
3739
  * @property {MetricPattern4<StoredF32>} yearsSincePriceAth
3710
3740
  */
3711
3741
 
3712
3742
  /**
3713
3743
  * @typedef {Object} MetricsTree_Market_Dca
3714
- * @property {ClassAveragePricePattern<Dollars>} classAveragePrice
3744
+ * @property {MetricsTree_Market_Dca_ClassAveragePrice} classAveragePrice
3715
3745
  * @property {MetricsTree_Market_Dca_ClassDaysInLoss} classDaysInLoss
3716
- * @property {MetricsTree_Market_Dca_ClassDaysInProfit} classDaysInProfit
3746
+ * @property {ClassDaysInLossPattern<StoredU32>} classDaysInProfit
3717
3747
  * @property {MetricsTree_Market_Dca_ClassMaxDrawdown} classMaxDrawdown
3718
3748
  * @property {MetricsTree_Market_Dca_ClassMaxReturn} classMaxReturn
3719
3749
  * @property {MetricsTree_Market_Dca_ClassReturns} classReturns
3720
3750
  * @property {MetricsTree_Market_Dca_ClassStack} classStack
3721
- * @property {PeriodAveragePricePattern<Dollars>} periodAveragePrice
3751
+ * @property {MetricsTree_Market_Dca_PeriodAveragePrice} periodAveragePrice
3722
3752
  * @property {PeriodCagrPattern} periodCagr
3723
- * @property {PeriodAveragePricePattern<StoredU32>} periodDaysInLoss
3724
- * @property {PeriodAveragePricePattern<StoredU32>} periodDaysInProfit
3725
- * @property {PeriodAveragePricePattern<StoredU32>} periodLumpSumDaysInLoss
3726
- * @property {PeriodAveragePricePattern<StoredU32>} periodLumpSumDaysInProfit
3727
- * @property {PeriodAveragePricePattern<StoredF32>} periodLumpSumMaxDrawdown
3728
- * @property {PeriodAveragePricePattern<StoredF32>} periodLumpSumMaxReturn
3729
- * @property {PeriodAveragePricePattern<StoredF32>} periodLumpSumReturns
3753
+ * @property {PeriodDaysInLossPattern<StoredU32>} periodDaysInLoss
3754
+ * @property {PeriodDaysInLossPattern<StoredU32>} periodDaysInProfit
3755
+ * @property {PeriodDaysInLossPattern<StoredU32>} periodLumpSumDaysInLoss
3756
+ * @property {PeriodDaysInLossPattern<StoredU32>} periodLumpSumDaysInProfit
3757
+ * @property {PeriodDaysInLossPattern<StoredF32>} periodLumpSumMaxDrawdown
3758
+ * @property {PeriodDaysInLossPattern<StoredF32>} periodLumpSumMaxReturn
3759
+ * @property {PeriodDaysInLossPattern<StoredF32>} periodLumpSumReturns
3730
3760
  * @property {PeriodLumpSumStackPattern} periodLumpSumStack
3731
- * @property {PeriodAveragePricePattern<StoredF32>} periodMaxDrawdown
3732
- * @property {PeriodAveragePricePattern<StoredF32>} periodMaxReturn
3733
- * @property {PeriodAveragePricePattern<StoredF32>} periodReturns
3761
+ * @property {PeriodDaysInLossPattern<StoredF32>} periodMaxDrawdown
3762
+ * @property {PeriodDaysInLossPattern<StoredF32>} periodMaxReturn
3763
+ * @property {PeriodDaysInLossPattern<StoredF32>} periodReturns
3734
3764
  * @property {PeriodLumpSumStackPattern} periodStack
3735
3765
  */
3736
3766
 
3737
3767
  /**
3738
- * @typedef {Object} MetricsTree_Market_Dca_ClassDaysInLoss
3739
- * @property {MetricPattern4<StoredU32>} _2015
3740
- * @property {MetricPattern4<StoredU32>} _2016
3741
- * @property {MetricPattern4<StoredU32>} _2017
3742
- * @property {MetricPattern4<StoredU32>} _2018
3743
- * @property {MetricPattern4<StoredU32>} _2019
3744
- * @property {MetricPattern4<StoredU32>} _2020
3745
- * @property {MetricPattern4<StoredU32>} _2021
3746
- * @property {MetricPattern4<StoredU32>} _2022
3747
- * @property {MetricPattern4<StoredU32>} _2023
3748
- * @property {MetricPattern4<StoredU32>} _2024
3749
- * @property {MetricPattern4<StoredU32>} _2025
3750
- * @property {MetricPattern4<StoredU32>} _2026
3768
+ * @typedef {Object} MetricsTree_Market_Dca_ClassAveragePrice
3769
+ * @property {_0sdUsdPattern} _2015
3770
+ * @property {_0sdUsdPattern} _2016
3771
+ * @property {_0sdUsdPattern} _2017
3772
+ * @property {_0sdUsdPattern} _2018
3773
+ * @property {_0sdUsdPattern} _2019
3774
+ * @property {_0sdUsdPattern} _2020
3775
+ * @property {_0sdUsdPattern} _2021
3776
+ * @property {_0sdUsdPattern} _2022
3777
+ * @property {_0sdUsdPattern} _2023
3778
+ * @property {_0sdUsdPattern} _2024
3779
+ * @property {_0sdUsdPattern} _2025
3780
+ * @property {_0sdUsdPattern} _2026
3751
3781
  */
3752
3782
 
3753
3783
  /**
3754
- * @typedef {Object} MetricsTree_Market_Dca_ClassDaysInProfit
3784
+ * @typedef {Object} MetricsTree_Market_Dca_ClassDaysInLoss
3755
3785
  * @property {MetricPattern4<StoredU32>} _2015
3756
3786
  * @property {MetricPattern4<StoredU32>} _2016
3757
3787
  * @property {MetricPattern4<StoredU32>} _2017
@@ -3830,6 +3860,22 @@ function createOutputsPattern(client, acc) {
3830
3860
  * @property {_2015Pattern} _2026
3831
3861
  */
3832
3862
 
3863
+ /**
3864
+ * @typedef {Object} MetricsTree_Market_Dca_PeriodAveragePrice
3865
+ * @property {_0sdUsdPattern} _10y
3866
+ * @property {_0sdUsdPattern} _1m
3867
+ * @property {_0sdUsdPattern} _1w
3868
+ * @property {_0sdUsdPattern} _1y
3869
+ * @property {_0sdUsdPattern} _2y
3870
+ * @property {_0sdUsdPattern} _3m
3871
+ * @property {_0sdUsdPattern} _3y
3872
+ * @property {_0sdUsdPattern} _4y
3873
+ * @property {_0sdUsdPattern} _5y
3874
+ * @property {_0sdUsdPattern} _6m
3875
+ * @property {_0sdUsdPattern} _6y
3876
+ * @property {_0sdUsdPattern} _8y
3877
+ */
3878
+
3833
3879
  /**
3834
3880
  * @typedef {Object} MetricsTree_Market_Indicators
3835
3881
  * @property {MetricPattern6<StoredF32>} gini
@@ -3853,6 +3899,23 @@ function createOutputsPattern(client, acc) {
3853
3899
  * @property {MetricPattern6<StoredF32>} stochRsiK
3854
3900
  */
3855
3901
 
3902
+ /**
3903
+ * @typedef {Object} MetricsTree_Market_Lookback
3904
+ * @property {_0sdUsdPattern} _10y
3905
+ * @property {_0sdUsdPattern} _1d
3906
+ * @property {_0sdUsdPattern} _1m
3907
+ * @property {_0sdUsdPattern} _1w
3908
+ * @property {_0sdUsdPattern} _1y
3909
+ * @property {_0sdUsdPattern} _2y
3910
+ * @property {_0sdUsdPattern} _3m
3911
+ * @property {_0sdUsdPattern} _3y
3912
+ * @property {_0sdUsdPattern} _4y
3913
+ * @property {_0sdUsdPattern} _5y
3914
+ * @property {_0sdUsdPattern} _6m
3915
+ * @property {_0sdUsdPattern} _6y
3916
+ * @property {_0sdUsdPattern} _8y
3917
+ */
3918
+
3856
3919
  /**
3857
3920
  * @typedef {Object} MetricsTree_Market_MovingAverage
3858
3921
  * @property {Price111dSmaPattern} price111dSma
@@ -3869,8 +3932,8 @@ function createOutputsPattern(client, acc) {
3869
3932
  * @property {Price111dSmaPattern} price1ySma
3870
3933
  * @property {Price111dSmaPattern} price200dEma
3871
3934
  * @property {Price111dSmaPattern} price200dSma
3872
- * @property {MetricPattern4<Dollars>} price200dSmaX08
3873
- * @property {MetricPattern4<Dollars>} price200dSmaX24
3935
+ * @property {_0sdUsdPattern} price200dSmaX08
3936
+ * @property {_0sdUsdPattern} price200dSmaX24
3874
3937
  * @property {Price111dSmaPattern} price200wEma
3875
3938
  * @property {Price111dSmaPattern} price200wSma
3876
3939
  * @property {Price111dSmaPattern} price21dEma
@@ -3881,7 +3944,7 @@ function createOutputsPattern(client, acc) {
3881
3944
  * @property {Price111dSmaPattern} price34dEma
3882
3945
  * @property {Price111dSmaPattern} price34dSma
3883
3946
  * @property {Price111dSmaPattern} price350dSma
3884
- * @property {MetricPattern4<Dollars>} price350dSmaX2
3947
+ * @property {_0sdUsdPattern} price350dSmaX2
3885
3948
  * @property {Price111dSmaPattern} price4yEma
3886
3949
  * @property {Price111dSmaPattern} price4ySma
3887
3950
  * @property {Price111dSmaPattern} price55dEma
@@ -3894,15 +3957,15 @@ function createOutputsPattern(client, acc) {
3894
3957
 
3895
3958
  /**
3896
3959
  * @typedef {Object} MetricsTree_Market_Range
3897
- * @property {MetricPattern4<Dollars>} price1mMax
3898
- * @property {MetricPattern4<Dollars>} price1mMin
3899
- * @property {MetricPattern4<Dollars>} price1wMax
3900
- * @property {MetricPattern4<Dollars>} price1wMin
3901
- * @property {MetricPattern4<Dollars>} price1yMax
3902
- * @property {MetricPattern4<Dollars>} price1yMin
3960
+ * @property {_0sdUsdPattern} price1mMax
3961
+ * @property {_0sdUsdPattern} price1mMin
3962
+ * @property {_0sdUsdPattern} price1wMax
3963
+ * @property {_0sdUsdPattern} price1wMin
3964
+ * @property {_0sdUsdPattern} price1yMax
3965
+ * @property {_0sdUsdPattern} price1yMin
3903
3966
  * @property {MetricPattern4<StoredF32>} price2wChoppinessIndex
3904
- * @property {MetricPattern4<Dollars>} price2wMax
3905
- * @property {MetricPattern4<Dollars>} price2wMin
3967
+ * @property {_0sdUsdPattern} price2wMax
3968
+ * @property {_0sdUsdPattern} price2wMin
3906
3969
  * @property {MetricPattern6<StoredF32>} priceTrueRange
3907
3970
  * @property {MetricPattern6<StoredF32>} priceTrueRange2wSum
3908
3971
  */
@@ -4149,9 +4212,8 @@ function createOutputsPattern(client, acc) {
4149
4212
  /**
4150
4213
  * @typedef {Object} MetricsTree_Price
4151
4214
  * @property {MetricsTree_Price_Cents} cents
4152
- * @property {MetricsTree_Price_Oracle} oracle
4153
- * @property {MetricsTree_Price_Sats} sats
4154
- * @property {SatsPattern<OHLCDollars>} usd
4215
+ * @property {SatsPattern<OHLCSats>} sats
4216
+ * @property {MetricsTree_Price_Usd} usd
4155
4217
  */
4156
4218
 
4157
4219
  /**
@@ -4169,43 +4231,9 @@ function createOutputsPattern(client, acc) {
4169
4231
  */
4170
4232
 
4171
4233
  /**
4172
- * @typedef {Object} MetricsTree_Price_Oracle
4173
- * @property {MetricPattern6<OHLCCents>} closeOhlcCents
4174
- * @property {MetricPattern6<OHLCDollars>} closeOhlcDollars
4175
- * @property {MetricPattern11<PairOutputIndex>} heightToFirstPairoutputindex
4176
- * @property {MetricPattern6<OHLCCents>} midOhlcCents
4177
- * @property {MetricPattern6<OHLCDollars>} midOhlcDollars
4178
- * @property {MetricPattern6<OHLCCents>} ohlcCents
4179
- * @property {MetricPattern6<OHLCDollars>} ohlcDollars
4180
- * @property {MetricPattern33<Sats>} output0Value
4181
- * @property {MetricPattern33<Sats>} output1Value
4182
- * @property {MetricPattern33<TxIndex>} pairoutputindexToTxindex
4183
- * @property {PhaseDailyCentsPattern<Cents>} phaseDailyCents
4184
- * @property {PhaseDailyCentsPattern<Dollars>} phaseDailyDollars
4185
- * @property {MetricPattern11<OracleBins>} phaseHistogram
4186
- * @property {MetricPattern11<Cents>} phasePriceCents
4187
- * @property {PhaseDailyCentsPattern<Cents>} phaseV2DailyCents
4188
- * @property {PhaseDailyCentsPattern<Dollars>} phaseV2DailyDollars
4189
- * @property {MetricPattern11<OracleBinsV2>} phaseV2Histogram
4190
- * @property {PhaseDailyCentsPattern<Cents>} phaseV2PeakDailyCents
4191
- * @property {PhaseDailyCentsPattern<Dollars>} phaseV2PeakDailyDollars
4192
- * @property {MetricPattern11<Cents>} phaseV2PeakPriceCents
4193
- * @property {MetricPattern11<Cents>} phaseV2PriceCents
4194
- * @property {PhaseDailyCentsPattern<Cents>} phaseV3DailyCents
4195
- * @property {PhaseDailyCentsPattern<Dollars>} phaseV3DailyDollars
4196
- * @property {MetricPattern11<OracleBinsV2>} phaseV3Histogram
4197
- * @property {PhaseDailyCentsPattern<Cents>} phaseV3PeakDailyCents
4198
- * @property {PhaseDailyCentsPattern<Dollars>} phaseV3PeakDailyDollars
4199
- * @property {MetricPattern11<Cents>} phaseV3PeakPriceCents
4200
- * @property {MetricPattern11<Cents>} phaseV3PriceCents
4201
- * @property {MetricPattern11<Cents>} priceCents
4202
- * @property {MetricPattern6<StoredU32>} txCount
4203
- */
4204
-
4205
- /**
4206
- * @typedef {Object} MetricsTree_Price_Sats
4207
- * @property {MetricPattern1<OHLCSats>} ohlc
4208
- * @property {SplitPattern2<Sats>} split
4234
+ * @typedef {Object} MetricsTree_Price_Usd
4235
+ * @property {MetricPattern1<OHLCDollars>} ohlc
4236
+ * @property {SplitPattern2<Dollars>} split
4209
4237
  */
4210
4238
 
4211
4239
  /**
@@ -4343,7 +4371,7 @@ function createOutputsPattern(client, acc) {
4343
4371
  * @extends BrkClientBase
4344
4372
  */
4345
4373
  class BrkClient extends BrkClientBase {
4346
- VERSION = "v0.1.0-beta.0";
4374
+ VERSION = "v0.1.0";
4347
4375
 
4348
4376
  INDEXES = /** @type {const} */ ([
4349
4377
  "dateindex",
@@ -5372,13 +5400,13 @@ class BrkClient extends BrkClientBase {
5372
5400
  vaultedCap: createMetricPattern1(this, 'vaulted_cap'),
5373
5401
  },
5374
5402
  pricing: {
5375
- activePrice: createMetricPattern1(this, 'active_price'),
5403
+ activePrice: createActivePricePattern(this, 'active_price'),
5376
5404
  activePriceRatio: createActivePriceRatioPattern(this, 'active_price_ratio'),
5377
- cointimePrice: createMetricPattern1(this, 'cointime_price'),
5405
+ cointimePrice: createActivePricePattern(this, 'cointime_price'),
5378
5406
  cointimePriceRatio: createActivePriceRatioPattern(this, 'cointime_price_ratio'),
5379
- trueMarketMean: createMetricPattern1(this, 'true_market_mean'),
5407
+ trueMarketMean: createActivePricePattern(this, 'true_market_mean'),
5380
5408
  trueMarketMeanRatio: createActivePriceRatioPattern(this, 'true_market_mean_ratio'),
5381
- vaultedPrice: createMetricPattern1(this, 'vaulted_price'),
5409
+ vaultedPrice: createActivePricePattern(this, 'vaulted_price'),
5382
5410
  vaultedPriceRatio: createActivePriceRatioPattern(this, 'vaulted_price_ratio'),
5383
5411
  },
5384
5412
  reserveRisk: {
@@ -5419,6 +5447,17 @@ class BrkClient extends BrkClientBase {
5419
5447
  },
5420
5448
  distribution: {
5421
5449
  addrCount: createAddrCountPattern(this, 'addr_count'),
5450
+ addressActivity: {
5451
+ all: createAllPattern(this, 'address_activity'),
5452
+ p2a: createAllPattern(this, 'p2a_address_activity'),
5453
+ p2pk33: createAllPattern(this, 'p2pk33_address_activity'),
5454
+ p2pk65: createAllPattern(this, 'p2pk65_address_activity'),
5455
+ p2pkh: createAllPattern(this, 'p2pkh_address_activity'),
5456
+ p2sh: createAllPattern(this, 'p2sh_address_activity'),
5457
+ p2tr: createAllPattern(this, 'p2tr_address_activity'),
5458
+ p2wpkh: createAllPattern(this, 'p2wpkh_address_activity'),
5459
+ p2wsh: createAllPattern(this, 'p2wsh_address_activity'),
5460
+ },
5422
5461
  addressCohorts: {
5423
5462
  amountRange: {
5424
5463
  _0sats: create_0satsPattern(this, 'addrs_with_0sats'),
@@ -5485,7 +5524,30 @@ class BrkClient extends BrkClientBase {
5485
5524
  chainState: createMetricPattern11(this, 'chain'),
5486
5525
  emptyAddrCount: createAddrCountPattern(this, 'empty_addr_count'),
5487
5526
  emptyaddressindex: createMetricPattern32(this, 'emptyaddressindex'),
5527
+ growthRate: {
5528
+ all: createFullnessPattern(this, 'growth_rate'),
5529
+ p2a: createFullnessPattern(this, 'p2a_growth_rate'),
5530
+ p2pk33: createFullnessPattern(this, 'p2pk33_growth_rate'),
5531
+ p2pk65: createFullnessPattern(this, 'p2pk65_growth_rate'),
5532
+ p2pkh: createFullnessPattern(this, 'p2pkh_growth_rate'),
5533
+ p2sh: createFullnessPattern(this, 'p2sh_growth_rate'),
5534
+ p2tr: createFullnessPattern(this, 'p2tr_growth_rate'),
5535
+ p2wpkh: createFullnessPattern(this, 'p2wpkh_growth_rate'),
5536
+ p2wsh: createFullnessPattern(this, 'p2wsh_growth_rate'),
5537
+ },
5488
5538
  loadedaddressindex: createMetricPattern31(this, 'loadedaddressindex'),
5539
+ newAddrCount: {
5540
+ all: createDollarsPattern(this, 'new_addr_count'),
5541
+ p2a: createDollarsPattern(this, 'p2a_new_addr_count'),
5542
+ p2pk33: createDollarsPattern(this, 'p2pk33_new_addr_count'),
5543
+ p2pk65: createDollarsPattern(this, 'p2pk65_new_addr_count'),
5544
+ p2pkh: createDollarsPattern(this, 'p2pkh_new_addr_count'),
5545
+ p2sh: createDollarsPattern(this, 'p2sh_new_addr_count'),
5546
+ p2tr: createDollarsPattern(this, 'p2tr_new_addr_count'),
5547
+ p2wpkh: createDollarsPattern(this, 'p2wpkh_new_addr_count'),
5548
+ p2wsh: createDollarsPattern(this, 'p2wsh_new_addr_count'),
5549
+ },
5550
+ totalAddrCount: createAddrCountPattern(this, 'total_addr_count'),
5489
5551
  utxoCohorts: {
5490
5552
  ageRange: {
5491
5553
  _10yTo12y: create_10yTo12yPattern(this, 'utxos_10y_to_12y_old'),
@@ -5513,8 +5575,8 @@ class BrkClient extends BrkClientBase {
5513
5575
  all: {
5514
5576
  activity: createActivityPattern2(this, ''),
5515
5577
  costBasis: {
5516
- max: createMetricPattern1(this, 'max_cost_basis'),
5517
- min: createMetricPattern1(this, 'min_cost_basis'),
5578
+ max: createActivePricePattern(this, 'max_cost_basis'),
5579
+ min: createActivePricePattern(this, 'min_cost_basis'),
5518
5580
  percentiles: createPercentilesPattern(this, 'cost_basis'),
5519
5581
  },
5520
5582
  outputs: createOutputsPattern(this, 'utxo_count'),
@@ -5811,12 +5873,25 @@ class BrkClient extends BrkClientBase {
5811
5873
  daysSincePriceAth: createMetricPattern4(this, 'days_since_price_ath'),
5812
5874
  maxDaysBetweenPriceAths: createMetricPattern4(this, 'max_days_between_price_aths'),
5813
5875
  maxYearsBetweenPriceAths: createMetricPattern4(this, 'max_years_between_price_aths'),
5814
- priceAth: createMetricPattern1(this, 'price_ath'),
5876
+ priceAth: createActivePricePattern(this, 'price_ath'),
5815
5877
  priceDrawdown: createMetricPattern3(this, 'price_drawdown'),
5816
5878
  yearsSincePriceAth: createMetricPattern4(this, 'years_since_price_ath'),
5817
5879
  },
5818
5880
  dca: {
5819
- classAveragePrice: createClassAveragePricePattern(this, 'dca_class'),
5881
+ classAveragePrice: {
5882
+ _2015: create_0sdUsdPattern(this, 'dca_class_2015_average_price'),
5883
+ _2016: create_0sdUsdPattern(this, 'dca_class_2016_average_price'),
5884
+ _2017: create_0sdUsdPattern(this, 'dca_class_2017_average_price'),
5885
+ _2018: create_0sdUsdPattern(this, 'dca_class_2018_average_price'),
5886
+ _2019: create_0sdUsdPattern(this, 'dca_class_2019_average_price'),
5887
+ _2020: create_0sdUsdPattern(this, 'dca_class_2020_average_price'),
5888
+ _2021: create_0sdUsdPattern(this, 'dca_class_2021_average_price'),
5889
+ _2022: create_0sdUsdPattern(this, 'dca_class_2022_average_price'),
5890
+ _2023: create_0sdUsdPattern(this, 'dca_class_2023_average_price'),
5891
+ _2024: create_0sdUsdPattern(this, 'dca_class_2024_average_price'),
5892
+ _2025: create_0sdUsdPattern(this, 'dca_class_2025_average_price'),
5893
+ _2026: create_0sdUsdPattern(this, 'dca_class_2026_average_price'),
5894
+ },
5820
5895
  classDaysInLoss: {
5821
5896
  _2015: createMetricPattern4(this, 'dca_class_2015_days_in_loss'),
5822
5897
  _2016: createMetricPattern4(this, 'dca_class_2016_days_in_loss'),
@@ -5831,20 +5906,7 @@ class BrkClient extends BrkClientBase {
5831
5906
  _2025: createMetricPattern4(this, 'dca_class_2025_days_in_loss'),
5832
5907
  _2026: createMetricPattern4(this, 'dca_class_2026_days_in_loss'),
5833
5908
  },
5834
- classDaysInProfit: {
5835
- _2015: createMetricPattern4(this, 'dca_class_2015_days_in_profit'),
5836
- _2016: createMetricPattern4(this, 'dca_class_2016_days_in_profit'),
5837
- _2017: createMetricPattern4(this, 'dca_class_2017_days_in_profit'),
5838
- _2018: createMetricPattern4(this, 'dca_class_2018_days_in_profit'),
5839
- _2019: createMetricPattern4(this, 'dca_class_2019_days_in_profit'),
5840
- _2020: createMetricPattern4(this, 'dca_class_2020_days_in_profit'),
5841
- _2021: createMetricPattern4(this, 'dca_class_2021_days_in_profit'),
5842
- _2022: createMetricPattern4(this, 'dca_class_2022_days_in_profit'),
5843
- _2023: createMetricPattern4(this, 'dca_class_2023_days_in_profit'),
5844
- _2024: createMetricPattern4(this, 'dca_class_2024_days_in_profit'),
5845
- _2025: createMetricPattern4(this, 'dca_class_2025_days_in_profit'),
5846
- _2026: createMetricPattern4(this, 'dca_class_2026_days_in_profit'),
5847
- },
5909
+ classDaysInProfit: createClassDaysInLossPattern(this, 'dca_class'),
5848
5910
  classMaxDrawdown: {
5849
5911
  _2015: createMetricPattern4(this, 'dca_class_2015_max_drawdown'),
5850
5912
  _2016: createMetricPattern4(this, 'dca_class_2016_max_drawdown'),
@@ -5901,19 +5963,32 @@ class BrkClient extends BrkClientBase {
5901
5963
  _2025: create_2015Pattern(this, 'dca_class_2025_stack'),
5902
5964
  _2026: create_2015Pattern(this, 'dca_class_2026_stack'),
5903
5965
  },
5904
- periodAveragePrice: createPeriodAveragePricePattern(this, 'dca_average_price'),
5966
+ periodAveragePrice: {
5967
+ _10y: create_0sdUsdPattern(this, '10y_dca_average_price'),
5968
+ _1m: create_0sdUsdPattern(this, '1m_dca_average_price'),
5969
+ _1w: create_0sdUsdPattern(this, '1w_dca_average_price'),
5970
+ _1y: create_0sdUsdPattern(this, '1y_dca_average_price'),
5971
+ _2y: create_0sdUsdPattern(this, '2y_dca_average_price'),
5972
+ _3m: create_0sdUsdPattern(this, '3m_dca_average_price'),
5973
+ _3y: create_0sdUsdPattern(this, '3y_dca_average_price'),
5974
+ _4y: create_0sdUsdPattern(this, '4y_dca_average_price'),
5975
+ _5y: create_0sdUsdPattern(this, '5y_dca_average_price'),
5976
+ _6m: create_0sdUsdPattern(this, '6m_dca_average_price'),
5977
+ _6y: create_0sdUsdPattern(this, '6y_dca_average_price'),
5978
+ _8y: create_0sdUsdPattern(this, '8y_dca_average_price'),
5979
+ },
5905
5980
  periodCagr: createPeriodCagrPattern(this, 'dca_cagr'),
5906
- periodDaysInLoss: createPeriodAveragePricePattern(this, 'dca_days_in_loss'),
5907
- periodDaysInProfit: createPeriodAveragePricePattern(this, 'dca_days_in_profit'),
5908
- periodLumpSumDaysInLoss: createPeriodAveragePricePattern(this, 'lump_sum_days_in_loss'),
5909
- periodLumpSumDaysInProfit: createPeriodAveragePricePattern(this, 'lump_sum_days_in_profit'),
5910
- periodLumpSumMaxDrawdown: createPeriodAveragePricePattern(this, 'lump_sum_max_drawdown'),
5911
- periodLumpSumMaxReturn: createPeriodAveragePricePattern(this, 'lump_sum_max_return'),
5912
- periodLumpSumReturns: createPeriodAveragePricePattern(this, 'lump_sum_returns'),
5981
+ periodDaysInLoss: createPeriodDaysInLossPattern(this, 'dca_days_in_loss'),
5982
+ periodDaysInProfit: createPeriodDaysInLossPattern(this, 'dca_days_in_profit'),
5983
+ periodLumpSumDaysInLoss: createPeriodDaysInLossPattern(this, 'lump_sum_days_in_loss'),
5984
+ periodLumpSumDaysInProfit: createPeriodDaysInLossPattern(this, 'lump_sum_days_in_profit'),
5985
+ periodLumpSumMaxDrawdown: createPeriodDaysInLossPattern(this, 'lump_sum_max_drawdown'),
5986
+ periodLumpSumMaxReturn: createPeriodDaysInLossPattern(this, 'lump_sum_max_return'),
5987
+ periodLumpSumReturns: createPeriodDaysInLossPattern(this, 'lump_sum_returns'),
5913
5988
  periodLumpSumStack: createPeriodLumpSumStackPattern(this, 'lump_sum_stack'),
5914
- periodMaxDrawdown: createPeriodAveragePricePattern(this, 'dca_max_drawdown'),
5915
- periodMaxReturn: createPeriodAveragePricePattern(this, 'dca_max_return'),
5916
- periodReturns: createPeriodAveragePricePattern(this, 'dca_returns'),
5989
+ periodMaxDrawdown: createPeriodDaysInLossPattern(this, 'dca_max_drawdown'),
5990
+ periodMaxReturn: createPeriodDaysInLossPattern(this, 'dca_max_return'),
5991
+ periodReturns: createPeriodDaysInLossPattern(this, 'dca_returns'),
5917
5992
  periodStack: createPeriodLumpSumStackPattern(this, 'dca_stack'),
5918
5993
  },
5919
5994
  indicators: {
@@ -5937,7 +6012,21 @@ class BrkClient extends BrkClientBase {
5937
6012
  stochRsiD: createMetricPattern6(this, 'stoch_rsi_d'),
5938
6013
  stochRsiK: createMetricPattern6(this, 'stoch_rsi_k'),
5939
6014
  },
5940
- lookback: createLookbackPattern(this, 'price'),
6015
+ lookback: {
6016
+ _10y: create_0sdUsdPattern(this, 'price_10y_ago'),
6017
+ _1d: create_0sdUsdPattern(this, 'price_1d_ago'),
6018
+ _1m: create_0sdUsdPattern(this, 'price_1m_ago'),
6019
+ _1w: create_0sdUsdPattern(this, 'price_1w_ago'),
6020
+ _1y: create_0sdUsdPattern(this, 'price_1y_ago'),
6021
+ _2y: create_0sdUsdPattern(this, 'price_2y_ago'),
6022
+ _3m: create_0sdUsdPattern(this, 'price_3m_ago'),
6023
+ _3y: create_0sdUsdPattern(this, 'price_3y_ago'),
6024
+ _4y: create_0sdUsdPattern(this, 'price_4y_ago'),
6025
+ _5y: create_0sdUsdPattern(this, 'price_5y_ago'),
6026
+ _6m: create_0sdUsdPattern(this, 'price_6m_ago'),
6027
+ _6y: create_0sdUsdPattern(this, 'price_6y_ago'),
6028
+ _8y: create_0sdUsdPattern(this, 'price_8y_ago'),
6029
+ },
5941
6030
  movingAverage: {
5942
6031
  price111dSma: createPrice111dSmaPattern(this, 'price_111d_sma'),
5943
6032
  price12dEma: createPrice111dSmaPattern(this, 'price_12d_ema'),
@@ -5953,8 +6042,8 @@ class BrkClient extends BrkClientBase {
5953
6042
  price1ySma: createPrice111dSmaPattern(this, 'price_1y_sma'),
5954
6043
  price200dEma: createPrice111dSmaPattern(this, 'price_200d_ema'),
5955
6044
  price200dSma: createPrice111dSmaPattern(this, 'price_200d_sma'),
5956
- price200dSmaX08: createMetricPattern4(this, 'price_200d_sma_x0_8'),
5957
- price200dSmaX24: createMetricPattern4(this, 'price_200d_sma_x2_4'),
6045
+ price200dSmaX08: create_0sdUsdPattern(this, 'price_200d_sma_x0_8'),
6046
+ price200dSmaX24: create_0sdUsdPattern(this, 'price_200d_sma_x2_4'),
5958
6047
  price200wEma: createPrice111dSmaPattern(this, 'price_200w_ema'),
5959
6048
  price200wSma: createPrice111dSmaPattern(this, 'price_200w_sma'),
5960
6049
  price21dEma: createPrice111dSmaPattern(this, 'price_21d_ema'),
@@ -5965,7 +6054,7 @@ class BrkClient extends BrkClientBase {
5965
6054
  price34dEma: createPrice111dSmaPattern(this, 'price_34d_ema'),
5966
6055
  price34dSma: createPrice111dSmaPattern(this, 'price_34d_sma'),
5967
6056
  price350dSma: createPrice111dSmaPattern(this, 'price_350d_sma'),
5968
- price350dSmaX2: createMetricPattern4(this, 'price_350d_sma_x2'),
6057
+ price350dSmaX2: create_0sdUsdPattern(this, 'price_350d_sma_x2'),
5969
6058
  price4yEma: createPrice111dSmaPattern(this, 'price_4y_ema'),
5970
6059
  price4ySma: createPrice111dSmaPattern(this, 'price_4y_sma'),
5971
6060
  price55dEma: createPrice111dSmaPattern(this, 'price_55d_ema'),
@@ -5976,15 +6065,15 @@ class BrkClient extends BrkClientBase {
5976
6065
  price8dSma: createPrice111dSmaPattern(this, 'price_8d_sma'),
5977
6066
  },
5978
6067
  range: {
5979
- price1mMax: createMetricPattern4(this, 'price_1m_max'),
5980
- price1mMin: createMetricPattern4(this, 'price_1m_min'),
5981
- price1wMax: createMetricPattern4(this, 'price_1w_max'),
5982
- price1wMin: createMetricPattern4(this, 'price_1w_min'),
5983
- price1yMax: createMetricPattern4(this, 'price_1y_max'),
5984
- price1yMin: createMetricPattern4(this, 'price_1y_min'),
6068
+ price1mMax: create_0sdUsdPattern(this, 'price_1m_max'),
6069
+ price1mMin: create_0sdUsdPattern(this, 'price_1m_min'),
6070
+ price1wMax: create_0sdUsdPattern(this, 'price_1w_max'),
6071
+ price1wMin: create_0sdUsdPattern(this, 'price_1w_min'),
6072
+ price1yMax: create_0sdUsdPattern(this, 'price_1y_max'),
6073
+ price1yMin: create_0sdUsdPattern(this, 'price_1y_min'),
5985
6074
  price2wChoppinessIndex: createMetricPattern4(this, 'price_2w_choppiness_index'),
5986
- price2wMax: createMetricPattern4(this, 'price_2w_max'),
5987
- price2wMin: createMetricPattern4(this, 'price_2w_min'),
6075
+ price2wMax: create_0sdUsdPattern(this, 'price_2w_max'),
6076
+ price2wMin: create_0sdUsdPattern(this, 'price_2w_min'),
5988
6077
  priceTrueRange: createMetricPattern6(this, 'price_true_range'),
5989
6078
  priceTrueRange2wSum: createMetricPattern6(this, 'price_true_range_2w_sum'),
5990
6079
  },
@@ -6216,43 +6305,11 @@ class BrkClient extends BrkClientBase {
6216
6305
  open: createMetricPattern5(this, 'price_open_cents'),
6217
6306
  },
6218
6307
  },
6219
- oracle: {
6220
- closeOhlcCents: createMetricPattern6(this, 'close_ohlc_cents'),
6221
- closeOhlcDollars: createMetricPattern6(this, 'close_ohlc_dollars'),
6222
- heightToFirstPairoutputindex: createMetricPattern11(this, 'height_to_first_pairoutputindex'),
6223
- midOhlcCents: createMetricPattern6(this, 'mid_ohlc_cents'),
6224
- midOhlcDollars: createMetricPattern6(this, 'mid_ohlc_dollars'),
6225
- ohlcCents: createMetricPattern6(this, 'oracle_ohlc_cents'),
6226
- ohlcDollars: createMetricPattern6(this, 'oracle_ohlc'),
6227
- output0Value: createMetricPattern33(this, 'pair_output0_value'),
6228
- output1Value: createMetricPattern33(this, 'pair_output1_value'),
6229
- pairoutputindexToTxindex: createMetricPattern33(this, 'pairoutputindex_to_txindex'),
6230
- phaseDailyCents: createPhaseDailyCentsPattern(this, 'phase_daily'),
6231
- phaseDailyDollars: createPhaseDailyCentsPattern(this, 'phase_daily_dollars'),
6232
- phaseHistogram: createMetricPattern11(this, 'phase_histogram'),
6233
- phasePriceCents: createMetricPattern11(this, 'phase_price_cents'),
6234
- phaseV2DailyCents: createPhaseDailyCentsPattern(this, 'phase_v2_daily'),
6235
- phaseV2DailyDollars: createPhaseDailyCentsPattern(this, 'phase_v2_daily_dollars'),
6236
- phaseV2Histogram: createMetricPattern11(this, 'phase_v2_histogram'),
6237
- phaseV2PeakDailyCents: createPhaseDailyCentsPattern(this, 'phase_v2_peak_daily'),
6238
- phaseV2PeakDailyDollars: createPhaseDailyCentsPattern(this, 'phase_v2_peak_daily_dollars'),
6239
- phaseV2PeakPriceCents: createMetricPattern11(this, 'phase_v2_peak_price_cents'),
6240
- phaseV2PriceCents: createMetricPattern11(this, 'phase_v2_price_cents'),
6241
- phaseV3DailyCents: createPhaseDailyCentsPattern(this, 'phase_v3_daily'),
6242
- phaseV3DailyDollars: createPhaseDailyCentsPattern(this, 'phase_v3_daily_dollars'),
6243
- phaseV3Histogram: createMetricPattern11(this, 'phase_v3_histogram'),
6244
- phaseV3PeakDailyCents: createPhaseDailyCentsPattern(this, 'phase_v3_peak_daily'),
6245
- phaseV3PeakDailyDollars: createPhaseDailyCentsPattern(this, 'phase_v3_peak_daily_dollars'),
6246
- phaseV3PeakPriceCents: createMetricPattern11(this, 'phase_v3_peak_price_cents'),
6247
- phaseV3PriceCents: createMetricPattern11(this, 'phase_v3_price_cents'),
6248
- priceCents: createMetricPattern11(this, 'oracle_price_cents'),
6249
- txCount: createMetricPattern6(this, 'oracle_tx_count'),
6250
- },
6251
- sats: {
6252
- ohlc: createMetricPattern1(this, 'price_ohlc_sats'),
6253
- split: createSplitPattern2(this, 'price_sats'),
6308
+ sats: createSatsPattern(this, 'price'),
6309
+ usd: {
6310
+ ohlc: createMetricPattern1(this, 'price_ohlc'),
6311
+ split: createSplitPattern2(this, 'price'),
6254
6312
  },
6255
- usd: createSatsPattern(this, 'price'),
6256
6313
  },
6257
6314
  scripts: {
6258
6315
  count: {