mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-10 06:53:33 -07:00
134 lines
3.5 KiB
JavaScript
134 lines
3.5 KiB
JavaScript
import {
|
|
createCohortSeries,
|
|
createCohortSeriesFromKeys,
|
|
} from "./cohort-series.js";
|
|
import {
|
|
ageRanges,
|
|
amountRanges,
|
|
classes,
|
|
epochs,
|
|
spendableTypes,
|
|
} from "./groups.js";
|
|
import { colors } from "../utils/colors.js";
|
|
|
|
export const capitalizationSeries = createCohortSeries([
|
|
{
|
|
label: "Market cap",
|
|
color: colors.green,
|
|
metric: (client) => client.series.supply.marketCap.usd,
|
|
},
|
|
{
|
|
label: "Realized cap",
|
|
color: colors.orange,
|
|
metric: (client) => client.series.cohorts.utxo.all.realized.cap.usd,
|
|
},
|
|
]);
|
|
|
|
export const marketCapSeries = createCohortSeries([
|
|
{
|
|
label: "Market cap",
|
|
color: colors.green,
|
|
metric: (client) => client.series.supply.marketCap.usd,
|
|
},
|
|
]);
|
|
|
|
export const realizedCapSeries = createCohortSeries([
|
|
{
|
|
label: "Realized cap",
|
|
color: colors.orange,
|
|
metric: (client) => client.series.cohorts.utxo.all.realized.cap.usd,
|
|
},
|
|
]);
|
|
|
|
export const marketCapTermSeries = createCohortSeries([
|
|
{
|
|
label: "STH",
|
|
color: colors.sky,
|
|
metric: (client) => client.series.cohorts.utxo.sth.supply.total.usd,
|
|
},
|
|
{
|
|
label: "LTH",
|
|
color: colors.orange,
|
|
metric: (client) => client.series.cohorts.utxo.lth.supply.total.usd,
|
|
},
|
|
]);
|
|
|
|
export const realizedCapTermSeries = createCohortSeries([
|
|
{
|
|
label: "STH",
|
|
color: colors.sky,
|
|
metric: (client) => client.series.cohorts.utxo.sth.realized.cap.usd,
|
|
},
|
|
{
|
|
label: "LTH",
|
|
color: colors.orange,
|
|
metric: (client) => client.series.cohorts.utxo.lth.realized.cap.usd,
|
|
},
|
|
]);
|
|
|
|
export const marketCapAgeSeries = createCohortSeriesFromKeys(
|
|
ageRanges,
|
|
(key) => (client) =>
|
|
client.series.cohorts.utxo.ageRange[key].supply.total.usd,
|
|
);
|
|
|
|
export const realizedCapAgeSeries = createCohortSeriesFromKeys(
|
|
ageRanges,
|
|
(key) => (client) =>
|
|
client.series.cohorts.utxo.ageRange[key].realized.cap.usd,
|
|
);
|
|
|
|
export const marketCapUtxoBalanceSeries = createCohortSeriesFromKeys(
|
|
amountRanges,
|
|
(key) => (client) =>
|
|
client.series.cohorts.utxo.amountRange[key].supply.total.usd,
|
|
);
|
|
|
|
export const realizedCapUtxoBalanceSeries = createCohortSeriesFromKeys(
|
|
amountRanges,
|
|
(key) => (client) =>
|
|
client.series.cohorts.utxo.amountRange[key].realized.cap.usd,
|
|
);
|
|
|
|
export const marketCapAddressBalanceSeries = createCohortSeriesFromKeys(
|
|
amountRanges,
|
|
(key) => (client) =>
|
|
client.series.cohorts.addr.amountRange[key].supply.total.usd,
|
|
);
|
|
|
|
export const realizedCapAddressBalanceSeries = createCohortSeriesFromKeys(
|
|
amountRanges,
|
|
(key) => (client) =>
|
|
client.series.cohorts.addr.amountRange[key].realized.cap.usd,
|
|
);
|
|
|
|
export const marketCapTypeSeries = createCohortSeriesFromKeys(
|
|
spendableTypes,
|
|
(key) => (client) => client.series.cohorts.utxo.type[key].supply.total.usd,
|
|
);
|
|
|
|
export const realizedCapTypeSeries = createCohortSeriesFromKeys(
|
|
spendableTypes,
|
|
(key) => (client) => client.series.cohorts.utxo.type[key].realized.cap.usd,
|
|
);
|
|
|
|
export const marketCapEpochSeries = createCohortSeriesFromKeys(
|
|
epochs,
|
|
(key) => (client) => client.series.cohorts.utxo.epoch[key].supply.total.usd,
|
|
);
|
|
|
|
export const realizedCapEpochSeries = createCohortSeriesFromKeys(
|
|
epochs,
|
|
(key) => (client) => client.series.cohorts.utxo.epoch[key].realized.cap.usd,
|
|
);
|
|
|
|
export const marketCapClassSeries = createCohortSeriesFromKeys(
|
|
classes,
|
|
(key) => (client) => client.series.cohorts.utxo.class[key].supply.total.usd,
|
|
);
|
|
|
|
export const realizedCapClassSeries = createCohortSeriesFromKeys(
|
|
classes,
|
|
(key) => (client) => client.series.cohorts.utxo.class[key].realized.cap.usd,
|
|
);
|