Documentation Index
Fetch the complete documentation index at: https://docs.0xkey.io/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Node.js 18+
- A 0xkey organization (Dashboard or local stack via
./local-dev.sh start) - Auth Proxy enabled for your organization (Dashboard → Auth / Wallet Kit)
Step 1 — Configure Auth Proxy in the Dashboard
Choose auth methods
Enable the methods you need (e.g. Email OTP and Passkeys for a typical embedded wallet).
Step 2 — Create a Next.js app (optional)
Step 3 — Environment variables
Create.env.local:
Local development (super-repo stack)
When running./local-dev.sh start with local-gateway:
| Variable | Local value |
|---|---|
NEXT_PUBLIC_BASE_URL | https://api.0xkey.com |
NEXT_PUBLIC_AUTH_PROXY_URL | https://auth.0xkey.com |
NEXT_PUBLIC_ORGANIZATION_ID | From /tmp/0xkey-local-dev/pids/dev-org-id.txt after bootstrap |
NEXT_PUBLIC_AUTH_PROXY_CONFIG_ID | Fixed dev ID 00000000-0000-4000-8000-0000000000b1 (see local-dev skill) |
127.0.0.1 0xkey.com api.0xkey.com auth.0xkey.com app.0xkey.com to /etc/hosts and trust the local-gateway CA certificate.
Step 4 — Wrap your app with ZeroXKeyProvider
With the App Router, keep layout.tsx as a server component and add a client providers.tsx:
app/providers.tsx
app/layout.tsx
Step 5 — Log in or sign up
handleLogin opens a modal with every auth method enabled in your Auth Proxy config.
Step 6 — Sign a message or transaction
After login, usehandleSignMessage, handleSignTransaction, or the lower-level clients documented in signing examples.
Phase 1 limits. On-chain broadcast and gas sponsorship are not production-ready —
eth_send_raw_transaction returns a mock receipt today. Design signing-first flows and check the Roadmap before relying on send helpers.Reference implementations
- react-wallet-kit example — comprehensive EWK demo
- demo-embedded-wallet — minimal integration sample
Troubleshooting
| Issue | Check |
|---|---|
| CORS / origin rejected | Auth Proxy allowed origins in Dashboard |
| Passkey fails locally | rpId must match page hostname; use https://app.0xkey.com via local-gateway |
| Auth Proxy 404 | NEXT_PUBLIC_AUTH_PROXY_URL and config ID |
| API stamp errors | Organization ID matches the org that owns the proxy config |