global: snapshot

This commit is contained in:
nym21
2026-03-07 20:23:11 +01:00
parent efefd39439
commit 2df549f1f8
15 changed files with 202 additions and 344 deletions
+54 -73
View File
@@ -2745,6 +2745,31 @@ function createBaseBtcCentsSatsUsdPattern(client, acc) {
};
}
/**
* @typedef {Object} CoinblocksCoindaysSentPattern
* @property {CumulativeHeightPattern<StoredF64>} coinblocksDestroyed
* @property {CumulativeHeightSumPattern<StoredF64>} coindaysDestroyed
* @property {MetricPattern1<Sats>} sent
* @property {_24hPattern<Sats>} sentSum
* @property {_1m1w1yPattern<Sats>} sentSumExtended
*/
/**
* Create a CoinblocksCoindaysSentPattern pattern node
* @param {BrkClientBase} client
* @param {string} acc - Accumulated metric name
* @returns {CoinblocksCoindaysSentPattern}
*/
function createCoinblocksCoindaysSentPattern(client, acc) {
return {
coinblocksDestroyed: createCumulativeHeightPattern(client, _m(acc, 'coinblocks_destroyed')),
coindaysDestroyed: createCumulativeHeightSumPattern(client, _m(acc, 'coindays_destroyed')),
sent: createMetricPattern1(client, _m(acc, 'sent')),
sentSum: create_24hPattern(client, _m(acc, 'sent_24h')),
sentSumExtended: create_1m1w1yPattern(client, _m(acc, 'sent')),
};
}
/**
* @typedef {Object} EmaHistogramLineSignalPattern
* @property {MetricPattern1<StoredF32>} emaFast
@@ -2770,31 +2795,6 @@ function createEmaHistogramLineSignalPattern(client, acc) {
};
}
/**
* @typedef {Object} SupplyPattern2
* @property {BpsPercentRatioPattern} supplyInLossRelToCirculatingSupply
* @property {BpsPercentRatioPattern} supplyInLossRelToOwnSupply
* @property {BpsPercentRatioPattern} supplyInProfitRelToCirculatingSupply
* @property {BpsPercentRatioPattern} supplyInProfitRelToOwnSupply
* @property {BpsPercentRatioPattern} supplyRelToCirculatingSupply
*/
/**
* Create a SupplyPattern2 pattern node
* @param {BrkClientBase} client
* @param {string} acc - Accumulated metric name
* @returns {SupplyPattern2}
*/
function createSupplyPattern2(client, acc) {
return {
supplyInLossRelToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'in_loss_rel_to_circulating_supply')),
supplyInLossRelToOwnSupply: createBpsPercentRatioPattern(client, _m(acc, 'in_loss_rel_to_own_supply')),
supplyInProfitRelToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'in_profit_rel_to_circulating_supply')),
supplyInProfitRelToOwnSupply: createBpsPercentRatioPattern(client, _m(acc, 'in_profit_rel_to_own_supply')),
supplyRelToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')),
};
}
/**
* @template T
* @typedef {Object} _1m1w1y24hHeightPattern
@@ -2937,29 +2937,6 @@ function createBtcCentsSatsUsdPattern(client, acc) {
};
}
/**
* @typedef {Object} CoinblocksCoindaysSentPattern
* @property {CumulativeHeightPattern<StoredF64>} coinblocksDestroyed
* @property {CumulativeHeightSumPattern<StoredF64>} coindaysDestroyed
* @property {BaseCumulativePattern} sent
* @property {_2wPattern} sentEma
*/
/**
* Create a CoinblocksCoindaysSentPattern pattern node
* @param {BrkClientBase} client
* @param {string} acc - Accumulated metric name
* @returns {CoinblocksCoindaysSentPattern}
*/
function createCoinblocksCoindaysSentPattern(client, acc) {
return {
coinblocksDestroyed: createCumulativeHeightPattern(client, _m(acc, 'coinblocks_destroyed')),
coindaysDestroyed: createCumulativeHeightSumPattern(client, _m(acc, 'coindays_destroyed')),
sent: createBaseCumulativePattern(client, _m(acc, 'sent')),
sentEma: create_2wPattern(client, _m(acc, 'sent_ema_2w')),
};
}
/**
* @typedef {Object} InvestedMaxMinPercentilesPattern
* @property {Pct05Pct10Pct15Pct20Pct25Pct30Pct35Pct40Pct45Pct50Pct55Pct60Pct65Pct70Pct75Pct80Pct85Pct90Pct95Pattern} investedCapital
@@ -3157,6 +3134,27 @@ function createChangeHalvedTotalPattern(client, acc) {
};
}
/**
* @typedef {Object} SupplyPattern2
* @property {BpsPercentRatioPattern} supplyInLossRelToCirculatingSupply
* @property {BpsPercentRatioPattern} supplyInProfitRelToCirculatingSupply
* @property {BpsPercentRatioPattern} supplyRelToCirculatingSupply
*/
/**
* Create a SupplyPattern2 pattern node
* @param {BrkClientBase} client
* @param {string} acc - Accumulated metric name
* @returns {SupplyPattern2}
*/
function createSupplyPattern2(client, acc) {
return {
supplyInLossRelToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'in_loss_rel_to_circulating_supply')),
supplyInProfitRelToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'in_profit_rel_to_circulating_supply')),
supplyRelToCirculatingSupply: createBpsPercentRatioPattern(client, _m(acc, 'rel_to_circulating_supply')),
};
}
/**
* @template T
* @typedef {Object} _1m1w1yPattern
@@ -3399,8 +3397,8 @@ function createSdSmaPattern(client, acc) {
/**
* @typedef {Object} SentPattern
* @property {BaseCumulativePattern} sent
* @property {_2wPattern} sentEma
* @property {MetricPattern1<Sats>} sent
* @property {_24hPattern<Sats>} sentSum
*/
/**
@@ -3411,8 +3409,8 @@ function createSdSmaPattern(client, acc) {
*/
function createSentPattern(client, acc) {
return {
sent: createBaseCumulativePattern(client, acc),
sentEma: create_2wPattern(client, _m(acc, 'ema_2w')),
sent: createMetricPattern1(client, acc),
sentSum: create_24hPattern(client, _m(acc, '24h')),
};
}
@@ -3475,23 +3473,6 @@ function createCumulativeHeightPattern(client, acc) {
};
}
/**
* @typedef {Object} _2wPattern
* @property {BtcCentsSatsUsdPattern} _2w
*/
/**
* Create a _2wPattern pattern node
* @param {BrkClientBase} client
* @param {string} acc - Accumulated metric name
* @returns {_2wPattern}
*/
function create_2wPattern(client, acc) {
return {
_2w: createBtcCentsSatsUsdPattern(client, acc),
};
}
/**
* @template T
* @typedef {Object} _24hPattern
@@ -4803,12 +4784,12 @@ function create_24hPattern(client, acc) {
/**
* @typedef {Object} MetricsTree_Distribution_UtxoCohorts_All_Relative
* @property {BpsPercentRatioPattern} supplyInProfitRelToOwnSupply
* @property {BpsPercentRatioPattern} supplyInLossRelToOwnSupply
* @property {BpsPercentRatioPattern} unrealizedProfitRelToMarketCap
* @property {BpsPercentRatioPattern} unrealizedLossRelToMarketCap
* @property {BpsPercentRatioPattern} netUnrealizedPnlRelToMarketCap
* @property {MetricPattern1<StoredF32>} nupl
* @property {BpsPercentRatioPattern} supplyInProfitRelToOwnSupply
* @property {BpsPercentRatioPattern} supplyInLossRelToOwnSupply
* @property {BpsPercentRatioPattern} unrealizedProfitRelToOwnGrossPnl
* @property {BpsPercentRatioPattern} unrealizedLossRelToOwnGrossPnl
* @property {BpsPercentRatioPattern} netUnrealizedPnlRelToOwnGrossPnl
@@ -7014,12 +6995,12 @@ class BrkClient extends BrkClientBase {
adjustedSoprEma: create_1m1wPattern(this, 'adjusted_sopr_24h_ema'),
},
relative: {
supplyInProfitRelToOwnSupply: createBpsPercentRatioPattern(this, 'supply_in_profit_rel_to_own_supply'),
supplyInLossRelToOwnSupply: createBpsPercentRatioPattern(this, 'supply_in_loss_rel_to_own_supply'),
unrealizedProfitRelToMarketCap: createBpsPercentRatioPattern(this, 'unrealized_profit_rel_to_market_cap'),
unrealizedLossRelToMarketCap: createBpsPercentRatioPattern(this, 'unrealized_loss_rel_to_market_cap'),
netUnrealizedPnlRelToMarketCap: createBpsPercentRatioPattern(this, 'net_unrealized_pnl_rel_to_market_cap'),
nupl: createMetricPattern1(this, 'nupl'),
supplyInProfitRelToOwnSupply: createBpsPercentRatioPattern(this, 'supply_in_profit_rel_to_own_supply'),
supplyInLossRelToOwnSupply: createBpsPercentRatioPattern(this, 'supply_in_loss_rel_to_own_supply'),
unrealizedProfitRelToOwnGrossPnl: createBpsPercentRatioPattern(this, 'unrealized_profit_rel_to_own_gross_pnl'),
unrealizedLossRelToOwnGrossPnl: createBpsPercentRatioPattern(this, 'unrealized_loss_rel_to_own_gross_pnl'),
netUnrealizedPnlRelToOwnGrossPnl: createBpsPercentRatioPattern(this, 'net_unrealized_pnl_rel_to_own_gross_pnl'),