Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
<!doctype html>
<html lang="en">
<head>
<script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<style>[hidden]{display:none!important}</style>
<script>(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title data-i18n="wallet.meta_title">My Wallet — three.ws</title>
<meta name="description" content="Your master wallet for all three.ws activity — fund agents, send, receive, and pay for skills." data-i18n-attr="content:wallet.meta_description"/>
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="/fonts/fonts.css" />
<style>
:root {
color-scheme: dark;
--bg: #050505;
--surface-0: #0b0b0b;
--surface-1: #111111;
--surface-2: #181818;
--surface-3: #1e1e1e;
--hairline: #1c1c1c;
--hairline-strong: #2a2a2a;
--text: #f6f6f6;
--text-2: #a8a8a8;
--text-3: #6a6a6a;
--text-4: #4a4a4a;
--accent: #ffffff;
--green: #4ade80;
--red: #f87171;
--yellow: #fbbf24;
--font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
--font-body: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
--font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); }
body { font-size: 15px; line-height: 1.55; min-height: 100vh; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.nav { border-bottom: 1px solid var(--hairline); background: rgba(5,5,5,0.92); backdrop-filter: blur(20px); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: 900px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; font-size: 16px; color: var(--text); text-decoration: none; }
.brand-mark { width: 18px; height: 18px; border: 1.5px solid var(--text); border-radius: 3px; }
.nav-back { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); padding: 6px 0; transition: color 0.15s; }
.nav-back:hover { color: var(--text); }
.nav-back svg { width: 14px; height: 14px; }
.page { max-width: 740px; margin: 0 auto; padding: 40px 24px 80px; }
/* ── Wallet hero ── */
.wallet-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.wallet-hero-left { display: flex; flex-direction: column; gap: 6px; }
.wallet-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; color: var(--text); margin: 0; }
.wallet-subtitle { font-size: 13px; color: var(--text-3); margin: 0; }
.wallet-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.wallet-total-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-4); }
.wallet-total-value { font-family: var(--font-display); font-size: 32px; font-weight: 700; letter-spacing: -0.04em; color: var(--text); }
.wallet-total-value.skeleton { width: 120px; height: 36px; border-radius: 6px; background: var(--surface-2); animation: pulse 1.4s ease-in-out infinite; }
/* ── Setup banner ── */
.setup-card { border: 1px solid var(--hairline-strong); border-radius: 16px; background: var(--surface-1); padding: 40px; text-align: center; }
.setup-icon { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%); border: 1px solid var(--hairline-strong); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.setup-icon svg { width: 28px; height: 28px; color: var(--text-2); }
.setup-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.setup-desc { font-size: 14px; color: var(--text-2); margin: 0 0 28px; max-width: 400px; margin-left: auto; margin-right: auto; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: var(--text); color: var(--bg); border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity 0.15s, transform 0.12s; }
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: default; }
.btn-secondary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: transparent; color: var(--text); border: 1px solid var(--hairline-strong); border-radius: 10px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-4); }
.btn-secondary:disabled { opacity: 0.4; cursor: default; }
/* ── Tabs ── */
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--hairline); margin-bottom: 28px; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { appearance: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--text-3); background: transparent; border: none; border-bottom: 2px solid transparent; padding: 10px 14px; cursor: pointer; white-space: nowrap; transition: color 0.14s, border-color 0.14s; border-radius: 6px 6px 0 0; }
.tab:hover { color: var(--text-2); background: rgba(255,255,255,0.03); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.tab:focus-visible { outline: 2px solid rgba(255,255,255,0.3); outline-offset: -2px; }
.tab-panel[hidden] { display: none; }
/* ── Cards ── */
.card { border: 1px solid var(--hairline-strong); border-radius: 14px; background: var(--surface-1); padding: 20px 22px; margin-bottom: 16px; }
.card-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-4); margin: 0 0 16px; font-weight: 600; }
/* ── Balance grid ── */
.balance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.balance-item { background: var(--surface-2); border-radius: 10px; padding: 14px 16px; }
.balance-item-label { font-size: 11px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; font-weight: 600; }
.balance-item-value { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--text); }
.balance-item-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; font-family: var(--font-mono); }
.balance-item-value.skeleton { width: 80px; height: 24px; border-radius: 4px; background: var(--surface-3); animation: pulse 1.4s ease-in-out infinite; }
/* ── Address display ── */
.addr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.addr-row + .addr-row { margin-top: 8px; }
.addr-label { font-size: 11px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 4px; }
.addr-value { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); word-break: break-all; }
.copy-btn { flex-shrink: 0; padding: 6px 10px; background: transparent; border: 1px solid var(--hairline-strong); border-radius: 6px; color: var(--text-3); font-size: 11px; cursor: pointer; transition: color 0.15s, border-color 0.15s; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.copy-btn:hover { color: var(--text); border-color: var(--text-3); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }
/* ── QR code ── */
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 0; }
.qr-box { width: 160px; height: 160px; background: #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.qr-box canvas { display: block; }
.qr-hint { font-size: 12px; color: var(--text-3); text-align: center; max-width: 280px; }
/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-input { width: 100%; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--hairline-strong); border-radius: 8px; color: var(--text); font: 14px/1.4 var(--font-body); outline: none; transition: border-color 0.15s; }
.form-input:focus { border-color: rgba(255,255,255,0.25); }
.form-input::placeholder { color: var(--text-4); }
.form-hint { font-size: 11px; color: var(--text-4); margin-top: 5px; }
.form-row { display: flex; gap: 10px; align-items: flex-end; }
.form-row .form-group { flex: 1; }
select.form-input { cursor: pointer; }
.max-btn { padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--hairline-strong); border-radius: 8px; color: var(--text-3); font-size: 12px; font-weight: 600; cursor: pointer; transition: color 0.15s; white-space: nowrap; }
.max-btn:hover { color: var(--text); }
/* ── Agent list ── */
.agent-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; }
.agent-row + .agent-row { margin-top: 8px; }
.agent-avatar { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--hairline-strong); object-fit: cover; flex-shrink: 0; }
.agent-info { flex: 1; min-width: 0; }
.agent-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-addr { font-family: var(--font-mono); font-size: 10px; color: var(--text-4); margin-top: 2px; }
.fund-btn { flex-shrink: 0; padding: 7px 14px; background: transparent; border: 1px solid var(--hairline-strong); border-radius: 8px; color: var(--text-3); font-size: 12px; font-weight: 600; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.fund-btn:hover { color: var(--text); border-color: var(--text-3); }
.fund-btn:disabled { opacity: 0.4; cursor: default; }
/* ── History ── */
.tx-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.tx-row:last-child { border-bottom: none; }
.tx-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.tx-icon.in { background: rgba(74,222,128,0.1); color: var(--green); }
.tx-icon.out { background: rgba(248,113,113,0.1); color: var(--red); }
.tx-icon.neutral { background: var(--surface-2); color: var(--text-3); }
.tx-body { flex: 1; min-width: 0; }
.tx-summary { font-size: 13px; font-weight: 500; color: var(--text-2); }
.tx-time { font-size: 11px; color: var(--text-4); margin-top: 2px; font-family: var(--font-mono); }
.tx-amount { font-family: var(--font-mono); font-size: 12px; text-align: right; }
.tx-amount.in { color: var(--green); }
.tx-amount.out { color: var(--red); }
.tx-link { font-size: 10px; color: var(--text-4); }
.tx-link:hover { color: var(--text-2); }
/* ── Toast ── */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--surface-3); border: 1px solid var(--hairline-strong); border-radius: 10px; padding: 12px 20px; font-size: 13px; color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 9999; transition: transform 0.22s cubic-bezier(.22,1,.36,1), opacity 0.22s; opacity: 0; pointer-events: none; white-space: nowrap; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast.error { border-color: rgba(248,113,113,0.4); color: var(--red); }
.toast.success { border-color: rgba(74,222,128,0.4); color: var(--green); }
/* ── Status ── */
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--green); box-shadow: 0 0 6px rgba(74,222,128,0.5); }
.status-dot.warn { background: var(--yellow); box-shadow: 0 0 6px rgba(251,191,36,0.5); }
/* ── Auth gate ── */
.auth-gate { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 24px; gap: 16px; }
.auth-gate-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); margin: 0; }
.auth-gate-desc { font-size: 14px; color: var(--text-3); margin: 0; max-width: 340px; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (max-width: 500px) {
.wallet-hero { flex-direction: column; }
.wallet-total { align-items: flex-start; }
.page { padding: 24px 16px 60px; }
}
</style>
</head>
<body>
<nav class="nav">
<div class="nav-inner">
<a class="brand" href="/">
<div class="brand-mark"></div>
three.ws
</a>
<a class="nav-back" href="/dashboard">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 12H5M12 5l-7 7 7 7"/></svg>
Dashboard
</a>
</div>
</nav>
<main class="page">
<div id="mw-root"></div>
</main>
<div id="toast" class="toast" role="status" aria-live="polite"></div>
<script type="module" src="/src/user-wallet.js"></script>
<!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->
<script type="module" src="/i18n.js"></script>
</body>
</html>