import React, { useState } from 'react'; import { Server, Globe, TestTube, Code, Wifi, Copy, Check } from 'lucide-react'; interface ChainSpec { id: string; name: string; type: 'Live' | 'Development' | 'Local'; icon: React.ReactNode; endpoint: string; chainId: string; validators: number; features: string[]; color: string; } const chainSpecs: ChainSpec[] = [ { id: 'mainnet', name: 'PezkuwiChain Mainnet', type: 'Live', icon: , endpoint: 'wss://mainnet.pezkuwichain.io', chainId: '0x1234...abcd', validators: 100, features: ['Production', 'Real Tokenomics', 'Full Security'], color: 'from-purple-500 to-purple-600' }, { id: 'staging', name: 'PezkuwiChain Staging', type: 'Live', icon: , endpoint: 'wss://staging.pezkuwichain.io', chainId: '0x5678...efgh', validators: 20, features: ['Pre-production', 'Testing Features', 'Beta Access'], color: 'from-cyan-500 to-cyan-600' }, { id: 'testnet', name: 'Real Testnet', type: 'Live', icon: , endpoint: 'wss://testnet.pezkuwichain.io', chainId: '0x9abc...ijkl', validators: 8, features: ['Test Tokens', 'Full Features', 'Public Testing'], color: 'from-teal-500 to-teal-600' }, { id: 'beta', name: 'Beta Testnet', type: 'Live', icon: , endpoint: 'wss://beta.pezkuwichain.io', chainId: '0xdef0...mnop', validators: 4, features: ['Experimental', 'New Features', 'Limited Access'], color: 'from-orange-500 to-orange-600' }, { id: 'development', name: 'Development', type: 'Development', icon: , endpoint: 'ws://127.0.0.1:9944', chainId: '0xlocal...dev', validators: 1, features: ['Single Node', 'Fast Block Time', 'Dev Tools'], color: 'from-green-500 to-green-600' }, { id: 'local', name: 'Local Testnet', type: 'Local', icon: , endpoint: 'ws://127.0.0.1:9945', chainId: '0xlocal...test', validators: 2, features: ['Multi-node', 'Local Testing', 'Custom Config'], color: 'from-indigo-500 to-indigo-600' } ]; const ChainSpecs: React.FC = () => { const [copiedId, setCopiedId] = useState(null); const [selectedSpec, setSelectedSpec] = useState(chainSpecs[0]); const copyToClipboard = (text: string, id: string) => { navigator.clipboard.writeText(text); setCopiedId(id); setTimeout(() => setCopiedId(null), 2000); }; return (

Chain Specifications

Multiple network environments for development, testing, and production

{chainSpecs.map((spec) => (
setSelectedSpec(spec)} className={`cursor-pointer p-4 rounded-xl border transition-all ${ selectedSpec.id === spec.id ? 'bg-gray-900 border-purple-500' : 'bg-gray-950/50 border-gray-800 hover:border-gray-700' }`} >
{spec.icon}
{spec.type}

{spec.name}

{spec.validators} validators
))}
{/* Selected Chain Details */}

{selectedSpec.icon}
{selectedSpec.name}

{selectedSpec.endpoint}
{selectedSpec.chainId}
{selectedSpec.features.map((feature) => ( {feature} ))}

Connection Example

// Using @polkadot/api
import
{'{ ApiPromise, WsProvider }'}
from
'@polkadot/api';
const
provider =
new
WsProvider(
'{selectedSpec.endpoint}'
);
const
api =
await
ApiPromise.create
({'{ provider }'});
Network Stats
Block Time: 6s
Finality: GRANDPA
Consensus: Aura
Runtime: v1.0.0
); }; export default ChainSpecs;