{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "mempool-meter", "title": "Mempool meter", "description": "Accessible mempool size and fee summary.", "registryDependencies": [ "dennisonbertram/bitcoin-ui/bitcoin-core", "dennisonbertram/bitcoin-ui/bitcoin-theme" ], "files": [ { "path": "components/bitcoin/mempool-meter.tsx", "content": "import type { ComponentProps } from \"react\";\n\nimport { clampPercent, formatBytes, formatFeeRate } from \"@/lib/bitcoin\";\nimport { componentClasses } from \"@/lib/utils\";\n\nimport { panelStyles, type BitcoinVisualProps } from \"./shared\";\n\nexport type MempoolMeterProps = Omit, \"children\"> &\n BitcoinVisualProps & {\n size: number;\n transactionCount: number;\n medianFeeRate: number;\n /** Scale ceiling in bytes. @default 300_000_000 */\n capacity?: number;\n };\n\nexport function MempoolMeter({\n size,\n transactionCount,\n medianFeeRate,\n capacity = 300_000_000,\n unstyled,\n className,\n ...props\n}: MempoolMeterProps) {\n const percent = clampPercent((Math.max(size, 0) / Math.max(capacity, 1)) * 100);\n\n return (\n \n \n
\n \n Mempool\n \n \n {new Intl.NumberFormat(\"en-US\").format(transactionCount)} transactions\n

\n
\n \n {formatBytes(size)}\n \n \n \n \n \n \n
\n \n Median fee\n \n \n {formatFeeRate(medianFeeRate)}\n \n
\n
\n \n Load\n \n \n {Math.round(percent)}%\n \n
\n \n \n );\n}\n", "type": "registry:component" } ], "type": "registry:component" }