What you (the integrator) manage
| Item | Who generates it | Where it lives |
|---|---|---|
| Wallet (signing key) | Your existing wallet flow | The user’s wallet, you don’t touch the private key |
| Viewing key | The SDK | Your storage, encrypted at rest, accessible to the SDK |
Generate a viewing key
Load an existing viewing key
Key storage recommendations
- Server-side: encrypt with a per-user KMS-derived key
- Browser: store encrypted in IndexedDB; never
localStorageif you can avoid it - Mobile: use the platform secure enclave / Keychain
Backup and recovery
Always offer the user an explicit backup flow at viewing-key creation time. If a user loses their viewing key, they lose visibility into past and future intents addressed to them, funds at stealth addresses still belong to them, but they cannot detect them. A reasonable UX:- On viewing-key creation, prompt the user to save a recovery phrase or download an encrypted backup.
- Store a copy in your own backend, encrypted with a key the user controls (e.g., wallet-derived).
- On a new device, the user authenticates and re-imports.
Recovery-phrase encoding is a planned SDK helper. Today, back up the raw viewing key (hex) returned by
POST /recipient/register.Multiple viewing keys per user
Some integrators may want to support multiple viewing keys per user (for example, one per workspace). The SDK supports importing a different viewing key per session:What integrators do not manage
- Encryption of the intent payload, handled by the SDK
- Stealth address derivation, handled by the SDK using the recipient’s viewing key
- Sweep transactions from the stealth address, handled by the SDK using the user’s wallet
Submit an intent
Build, sign, and submit your first intent.