mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
Complete MPC wallet management platform rivaling Fireblocks/Utila/Fordefi: Backend (Go): - REST API with 60+ endpoints on chi router (pkg/api/) - PostgreSQL schema with 13 tables (pkg/db/) - JWT + MFA auth, bcrypt passwords, API key management - Policy engine (deny/approve/require_approval) - Transaction signing flow with approval workflow - Subscription scheduler for recurring payments - Payment requests with public pay pages - Safe + ERC-4337 smart wallet integration (pkg/smart/) - Rate limiting, webhook delivery (HMAC-SHA256), audit logging - 27 passing tests (auth, policy engine, middleware) Frontend (Next.js 14): - 27 routes with monochrome dark theme (Tailwind + Geist fonts) - Full API client with JWT auto-refresh - React Query hooks for all resources - Pages: dashboard, vaults, wallets, transactions, policies, whitelist, team, settings, API keys, webhooks, audit, subscriptions, payments, smart wallets Infrastructure: - Dockerfiles for API (Go) and dashboard (Next.js standalone) - compose.yml for local development (PostgreSQL + API + dashboard) - K8s manifests for mpc.lux.network + cloud.lux.network - GitHub Actions deploy workflow (build → push GHCR → kubectl apply) - TLS via cert-manager, Traefik IngressRoute for both domains
26 lines
950 B
TypeScript
26 lines
950 B
TypeScript
const chainMeta: Record<string, { label: string; color: string }> = {
|
|
ethereum: { label: 'Ethereum', color: 'text-blue-400' },
|
|
bitcoin: { label: 'Bitcoin', color: 'text-amber-400' },
|
|
solana: { label: 'Solana', color: 'text-purple-400' },
|
|
lux: { label: 'Lux', color: 'text-zinc-300' },
|
|
xrpl: { label: 'XRPL', color: 'text-zinc-400' },
|
|
ton: { label: 'TON', color: 'text-cyan-400' },
|
|
}
|
|
|
|
interface ChainIconProps {
|
|
chain: string
|
|
className?: string
|
|
}
|
|
|
|
export function ChainIcon({ chain, className = '' }: ChainIconProps) {
|
|
const meta = chainMeta[chain.toLowerCase()] ?? { label: chain, color: 'text-muted-foreground' }
|
|
return (
|
|
<span className={`inline-flex items-center gap-1.5 text-sm font-medium ${meta.color} ${className}`}>
|
|
<span className="flex h-5 w-5 items-center justify-center rounded-full bg-muted text-[10px] font-bold uppercase">
|
|
{meta.label.charAt(0)}
|
|
</span>
|
|
{meta.label}
|
|
</span>
|
|
)
|
|
}
|