<!-- TokenOS docs · Platform · Markdown mirror of https://tokenos.ai/docs/security · HTML: https://tokenos.ai/docs/security · index: https://tokenos.ai/llms.txt -->

# Security & wallet sessions

There are no passwords on TokenOS. Your wallet is your identity: writes are signed per action, reads use a short-lived session minted from one signature, previews are sandboxed, and every fee destination is configured server-side.

### Signed requests (writes)

Build, iterate, deploy, launch, approve and other state-changing calls carry a wallet signature over the *exact* request body.

**Message that is signed**

```text
TokenOS request: {wallet}:{nonce}:{timestamp}:{sha256(canonical JSON of the body)}
```

| Rule | Value |
| --- | --- |
| Fields | wallet_signature · wallet_nonce · wallet_timestamp · user_wallet (body) — or headers X-Wallet-Signature / X-Wallet-Nonce / X-Wallet-Timestamp / X-Wallet-Address |
| Freshness | timestamp may be up to 300 s in the past and at most 30 s in the future |
| Replay | each (wallet, nonce) is stored once (10-minute TTL) — a captured request cannot be replayed |
| Chains | Solana (ed25519) and EVM (EIP-191 personal_sign) |
| Binding | the body hash is part of the message, so a signature cannot be reused for a different payload |

The frontend helper `lib/walletSigning.js` does this for you; API users must reproduce the canonical JSON (sorted keys, no whitespace) before hashing.

### Wallet sessions (reads)

- One signature mints a **30-minute** JWT (`typ: wallet`) stored per tab; `lib/walletSession.js` shares the in-flight mint, persists it and backs off for 60 s after a failure.
- Own-data GETs send `Authorization: Bearer <session>` — dashboard, runs, Autopilots, inbox, MCP servers. Never sign a GET.
- Result: one wallet prompt every 30 minutes per tab, including reloads. Admin pages use the same pattern with a 30-minute admin session.

### Previews and generated code

- Previews run in an opaque-origin sandbox with a strict CSP and Permissions-Policy; wallet access is relayed only after explicit consent — see [Preview sandbox & wallet bridge](https://tokenos.ai/docs/preview-sandbox).
- Generated apps never contain a keyed RPC URL. Solana reads go through the allow-listed proxy `/api/solana-rpc`; a startup migration scrubbed historical bundles.
- Preview paths are validated against traversal; outbound fetches from the backend go through an SSRF guard.

### Payments

- Credit purchases, agent fees and x402 calls are verified on chain (recipient, amount, age, single use) before anything is granted.
- Every fee destination and the platform fee rate live in server configuration and are surfaced only through quotes — the client never hardcodes a wallet.
- Credit deductions by admins are admin-session gated, idempotent and audited; the credit ledger is append-only.

### Rate limits and blocklists

| Surface | Limit |
| --- | --- |
| Free agent try | 3 / day / IP |
| Agent Builder test runs | 5 / hour / wallet |
| Referral tracking | 6 / min / IP · 8 / min / code · 50 lifetime / code |
| Build & paid routes | Per-IP sliding window (complements the edge WAF) |
| Blocklists | IP blocklist with access log; wallet blocklist excludes flagged wallets from grants and bonuses |

### Enterprise & compute

Compute nodes run inside Intel TDX trust domains with remote attestation (RA-TLS); operators cannot inspect workloads. Node operators complete identity verification with Didit. Enterprise onboarding and custom SLAs: [info@tokenos.ai](mailto:info@tokenos.ai).

### Reporting

> **Note — Found something?**
> Report security issues to [info@tokenos.ai](mailto:info@tokenos.ai) or through the support desk. Findings are tracked in the admin Security Register and acknowledged in the changelog once fixed.

---

*Platform · TokenOS documentation. Canonical page: https://tokenos.ai/docs/security. All docs as Markdown: https://tokenos.ai/llms.txt. Payments on TokenOS are for metered usage only; nothing on this page is investment advice or a promise of income.*
