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
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
export interface ChainAddress {
|
|
chain: string
|
|
chainId?: number
|
|
address: string
|
|
format?: string
|
|
}
|
|
|
|
export interface AddressListProps {
|
|
addresses: ChainAddress[]
|
|
}
|
|
|
|
export function AddressList({ addresses }: AddressListProps) {
|
|
if (addresses.length === 0) {
|
|
return (
|
|
<p className="text-sm text-muted-foreground">No derived addresses.</p>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<div className="space-y-2">
|
|
{addresses.map((a) => (
|
|
<div
|
|
key={`${a.chain}-${a.address}`}
|
|
className="flex items-center justify-between rounded-md border border-border bg-muted/30 px-3 py-2"
|
|
>
|
|
<div className="min-w-0 flex-1">
|
|
<p className="text-xs font-medium">
|
|
{a.chain}
|
|
{a.chainId != null && (
|
|
<span className="ml-1 text-muted-foreground">({a.chainId})</span>
|
|
)}
|
|
{a.format && (
|
|
<span className="ml-2 text-muted-foreground">[{a.format}]</span>
|
|
)}
|
|
</p>
|
|
<p className="mt-0.5 truncate font-mono text-xs text-muted-foreground">
|
|
{a.address}
|
|
</p>
|
|
</div>
|
|
<button
|
|
onClick={() => navigator.clipboard.writeText(a.address)}
|
|
className="ml-2 shrink-0 rounded px-2 py-1 text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
>
|
|
Copy
|
|
</button>
|
|
</div>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|