mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-30 14:58:08 +00:00
BlockchainProductLayout draws every field it is handed with t(), and the fifteen product views mark their copy with phrase() where it is written. The index and the chain directory wrap their own words; chain names, code samples and figures stay as they are. The back arrow and the call-to-action arrows mirror under dir="rtl", and the two disclosure heads align to the start instead of the left.
101 lines
3.2 KiB
TypeScript
101 lines
3.2 KiB
TypeScript
'use client'
|
|
|
|
import React from "react";
|
|
import {
|
|
Radio,
|
|
Zap,
|
|
Clock,
|
|
Globe,
|
|
Shield,
|
|
RefreshCw,
|
|
Database,
|
|
Activity,
|
|
BarChart3,
|
|
} from "lucide-react";
|
|
import { phrase } from "@hanzo/i18n";
|
|
import BlockchainProductLayout, { type CodeExample } from "@/components/blockchain/BlockchainProductLayout";
|
|
|
|
const HanzoWebsockets = ({ codeExamples }: { codeExamples: CodeExample[] }) => {
|
|
return (
|
|
<BlockchainProductLayout
|
|
slug="websockets"
|
|
name={phrase("Websockets")}
|
|
tagline={phrase("Live blockchain data streaming")}
|
|
description={phrase("Real-time bidirectional communication with blockchain networks. Subscribe to blocks, transactions, logs, and pending transactions with persistent WebSocket connections.")}
|
|
icon={Radio}
|
|
features={[
|
|
{
|
|
icon: Radio,
|
|
title: phrase("Persistent Connections"),
|
|
description: phrase("Long-lived WebSocket connections with automatic reconnection."),
|
|
},
|
|
{
|
|
icon: Zap,
|
|
title: phrase("Real-time Streaming"),
|
|
description: phrase("Instant delivery of blocks, transactions, and events."),
|
|
},
|
|
{
|
|
icon: Activity,
|
|
title: phrase("Pending Transactions"),
|
|
description: phrase("Subscribe to mempool for pending transaction visibility."),
|
|
},
|
|
{
|
|
icon: Clock,
|
|
title: phrase("Low Latency"),
|
|
description: phrase("Sub-100ms latency for time-sensitive applications."),
|
|
},
|
|
{
|
|
icon: Globe,
|
|
title: phrase("Multi-chain Streams"),
|
|
description: phrase("Stream from multiple chains on a single connection."),
|
|
},
|
|
{
|
|
icon: Shield,
|
|
title: phrase("Authenticated Sessions"),
|
|
description: phrase("Secure connections with API key authentication."),
|
|
},
|
|
{
|
|
icon: RefreshCw,
|
|
title: phrase("Auto-reconnect"),
|
|
description: phrase("Automatic reconnection with message replay on disconnect."),
|
|
},
|
|
{
|
|
icon: Database,
|
|
title: phrase("Filtered Subscriptions"),
|
|
description: phrase("Subscribe to specific addresses, topics, or event types."),
|
|
},
|
|
{
|
|
icon: BarChart3,
|
|
title: phrase("Connection Metrics"),
|
|
description: phrase("Monitor connection health and message throughput."),
|
|
},
|
|
]}
|
|
useCases={[
|
|
{
|
|
title: phrase("Trading Applications"),
|
|
description: phrase("Real-time price feeds and order book updates for DEXs."),
|
|
},
|
|
{
|
|
title: phrase("Mempool Monitoring"),
|
|
description: phrase("Track pending transactions for MEV and arbitrage."),
|
|
},
|
|
{
|
|
title: phrase("Live Dashboards"),
|
|
description: phrase("Real-time blockchain activity and network stats."),
|
|
},
|
|
{
|
|
title: phrase("Bot Infrastructure"),
|
|
description: phrase("High-frequency trading and automated strategies."),
|
|
},
|
|
]}
|
|
chains={[
|
|
"Ethereum", "Polygon", "Arbitrum", "Optimism", "Base",
|
|
"BNB Chain", "Avalanche", "zkSync", "Scroll", "Linea",
|
|
]}
|
|
codeExamples={codeExamples}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default HanzoWebsockets;
|