MDK Logo
ReferenceUI KitReactUI Kit foundationComponentsDashboards

HashBalanceRevenuePanel

Revenue tab panel for hash balance — site hash revenue, network hashrate, hashprice charts, and currency toggle for per-PH/day units.

Revenue tab panel for hash balance — site hash revenue, network hashrate, hashprice charts, and currency toggle for per-PH/day units.

import { HashBalanceRevenuePanel } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
dataOptionalHashRevenueResponse | null | undefined
logOptionalHashRevenueLogEntry[] | undefined
dateRangeRequiredFinancialDateRange
timeframeTypeOptionalTimeframeTypeValue | null | undefined
isLoadingOptionalboolean | undefined
currencyRequiredHashBalanceCurrency
onCurrencyChangeRequired(currency: HashBalanceCurrency) => void

Usage

Composite financial view for site hash revenue, network hashrate, hashprice, and hash cost. Use HashBalance for the full page (tabs + timeframe controls), or compose HashBalanceRevenuePanel / HashBalanceCostPanel with your own chrome.

HashBalance

PropTypeRequiredDefaultDescription
dataHashRevenueResponse | nullnoRevenue / cost log and summary.
isLoadingbooleannoShow loading state.
isErrorbooleannoShow error state.
errorMessagestringnoError copy when isError.
initialDateRangeFinancialDateRangenoyear-to-dateInitial period.
onDateRangeChange(range, query) => voidnoFired when the user changes the period.
classNamestringnoRoot layout class.
tabsClassNamestringnoTabs wrapper class.
tabsListClassNamestringnoTab list class.
import { HashBalance } from "@tetherto/mdk-react-devkit";

<HashBalance data={response} isLoading={false} />

HashBalanceRevenuePanel

PropTypeRequiredDefaultDescription
dataHashRevenueResponse | nullnoSame payload as HashBalance.
logHashRevenueLogEntry[]noOptional log override.
dateRangeFinancialDateRangeyesActive reporting window.
currencyHashBalanceCurrencyyesUSD or BTC label for per-PH/day units.
onCurrencyChange(currency) => voidyesCurrency toggle handler.
isLoadingbooleannoLoading state.
timeframeTypeTimeframeTypeValue | nullnoYear / month / week mode.

HashBalanceCostPanel

PropTypeRequiredDefaultDescription
dataHashRevenueResponse | nullnoSame payload as HashBalance.
logHashRevenueLogEntry[]noOptional log override.
dateRangeFinancialDateRangeyesActive reporting window.
isLoadingbooleannoLoading state.
timeframeTypeTimeframeTypeValue | nullnoYear / month / week mode.

Examples

import type { HashRevenueResponse } from '@domain/types/finance'import { getInitialHashBalanceDateRange, HashBalanceCostPanel } from '@tetherto/mdk-react-devkit'const mockHashBalanceData: HashRevenueResponse = {  log: [    {      ts: Date.UTC(2026, 4, 15, 12),      revenueBTC: 0.01,      feesBTC: 0,      revenueUSD: 100,      feesUSD: 0,      btcPrice: 60_000,      hashrateMhs: 1,      hashRevenueBTCPerPHsPerDay: 0.00001,      hashRevenueUSDPerPHsPerDay: 0.4,      hashCostBTCPerPHsPerDay: 0,      hashCostUSDPerPHsPerDay: 0,      networkHashPriceBTCPerPHsPerDay: 0.007,      networkHashPriceUSDPerPHsPerDay: 0.01,      networkHashrateMhs: 36_000_000_000_000,    },  ],  summary: {    avgHashRevenueBTCPerPHsPerDay: 0.00001,    avgHashRevenueUSDPerPHsPerDay: 0.4,    avgHashCostBTCPerPHsPerDay: 0,    avgHashCostUSDPerPHsPerDay: 0,    avgNetworkHashPriceBTCPerPHsPerDay: 0.007,    avgNetworkHashPriceUSDPerPHsPerDay: 0.01,    totalRevenueBTC: 0.01,    totalRevenueUSD: 100,    totalFeesBTC: 0,    totalFeesUSD: 0,  },}export const HashBalanceCostPanelExample = () => (  <div className="mdk-example-row">    <HashBalanceCostPanel      data={mockHashBalanceData}      dateRange={getInitialHashBalanceDateRange(new Date(2026, 4, 19))}      isLoading={false}    />  </div>)
import type { HashRevenueResponse } from '@domain/types/finance'import {  CURRENCY,  getInitialHashBalanceDateRange,  type HashBalanceCurrency,  HashBalanceRevenuePanel,} from '@tetherto/mdk-react-devkit'import { useState } from 'react'const mockHashBalanceData: HashRevenueResponse = {  log: [    {      ts: Date.UTC(2026, 4, 15, 12),      revenueBTC: 0.01,      feesBTC: 0,      revenueUSD: 100,      feesUSD: 0,      btcPrice: 60_000,      hashrateMhs: 1,      hashRevenueBTCPerPHsPerDay: 0.00001,      hashRevenueUSDPerPHsPerDay: 0.4,      hashCostBTCPerPHsPerDay: 0,      hashCostUSDPerPHsPerDay: 0,      networkHashPriceBTCPerPHsPerDay: 0.007,      networkHashPriceUSDPerPHsPerDay: 0.01,      networkHashrateMhs: 36_000_000_000_000,    },  ],  summary: {    avgHashRevenueBTCPerPHsPerDay: 0.00001,    avgHashRevenueUSDPerPHsPerDay: 0.4,    avgHashCostBTCPerPHsPerDay: 0,    avgHashCostUSDPerPHsPerDay: 0,    avgNetworkHashPriceBTCPerPHsPerDay: 0.007,    avgNetworkHashPriceUSDPerPHsPerDay: 0.01,    totalRevenueBTC: 0.01,    totalRevenueUSD: 100,    totalFeesBTC: 0,    totalFeesUSD: 0,  },}export const HashBalanceRevenuePanelExample = () => {  const [currency, setCurrency] = useState<HashBalanceCurrency>(CURRENCY.USD_LABEL)  return (    <div className="mdk-example-row">      <HashBalanceRevenuePanel        data={mockHashBalanceData}        dateRange={getInitialHashBalanceDateRange(new Date(2026, 4, 19))}        currency={currency}        onCurrencyChange={setCurrency}        isLoading={false}      />    </div>  )}
import type { HashRevenueResponse } from '@domain/types/finance'import { HashBalance } from '@tetherto/mdk-react-devkit'const mockHashBalanceData: HashRevenueResponse = {  log: [    {      ts: Date.UTC(2026, 4, 15, 12),      revenueBTC: 0.01,      feesBTC: 0,      revenueUSD: 100,      feesUSD: 0,      btcPrice: 60_000,      hashrateMhs: 1,      hashRevenueBTCPerPHsPerDay: 0.00001,      hashRevenueUSDPerPHsPerDay: 0.4,      hashCostBTCPerPHsPerDay: 0,      hashCostUSDPerPHsPerDay: 0,      networkHashPriceBTCPerPHsPerDay: 0.007,      networkHashPriceUSDPerPHsPerDay: 0.01,      networkHashrateMhs: 36_000_000_000_000,    },  ],  summary: {    avgHashRevenueBTCPerPHsPerDay: 0.00001,    avgHashRevenueUSDPerPHsPerDay: 0.4,    avgHashCostBTCPerPHsPerDay: 0,    avgHashCostUSDPerPHsPerDay: 0,    avgNetworkHashPriceBTCPerPHsPerDay: 0.007,    avgNetworkHashPriceUSDPerPHsPerDay: 0.01,    totalRevenueBTC: 0.01,    totalRevenueUSD: 100,    totalFeesBTC: 0,    totalFeesUSD: 0,  },}export const HashBalanceExample = () => (  <div className="mdk-example-row">    <HashBalance data={mockHashBalanceData} isLoading={false} />  </div>)