Skip to Content

Wallet API

Use an Ethereum wallet to sign in, get an API key, or authenticate each request without storing a key. Supports agents and headless clients that cannot use browser OAuth or session cookies.

Why wallet-based API

Lifecycle

Onboarding (pick one):

Authenticating requests (pick one):

SIWE endpoints

GET /api/auth/siwe/nonce

Returns { nonce, domain, uri, chainId, version, statement }. Use these to build the EIP-4361 message. Nonce is stored in Redis (5 min TTL); 503 if Redis unavailable. Rate limit: STRICT.

POST /api/auth/siwe/verify

Body: { message, signature } (full SIWE message string and hex signature). Server validates domain (must match app host), verifies signature, consumes nonce, finds or creates user/org, issues API key. Response: { apiKey, address, isNewAccount, user, organization }. Rate limit: STRICT.

Wallet header signature

Any route that uses requireAuthOrApiKey accepts wallet-header auth. If the wallet is unknown, the account is created on first valid signature.

x402 topup

POST /api/v1/topup/10, /50, /100 (x402 payment required):

CORS and proxy

Wallet headers (X-Wallet-Address, X-Timestamp, X-Wallet-Signature) are allowed in CORS. The proxy passes requests that have X-Wallet-Signature (or API key / Bearer token) through without requiring a Privy session so wallet-auth reaches the API.

See also