What Are Session Keys?
Session keys are temporary keypairs that let your app execute transactions on behalf of a user without requiring their private key for every action. Instead of prompting users to sign each transaction, you register a session key on-chain with specific permissions (time limit, call limit, allowed functions) and then use it silently. This enables gasless, popup-free UX for gaming, DeFi automation, social apps, and subscriptions.Session keys only work with CHIPI wallets (SNIP-9 compatible). They are not supported on READY wallets.
When to Use Session Keys
How It Works
- Owner signature:
[r, s](2 elements) - Session signature:
[sessionPubKey, r, s, validUntil](4 elements)
Frontend Implementation
1. Create a Session Key
2. Register On-Chain
3. Execute Transactions
4. Check Session Status
5. Revoke on Logout
Session Configuration
Restricting Permissions
For security, whitelist specific entrypoints:Security Best Practices
Never store session keys in your backend database. This defeats self-custodial security. Store only in client-side secure storage.
- Always revoke on logout - Never leave active sessions
- Set short durations - 1-6 hours, not days
- Limit maxCalls - Set realistic limits based on expected usage
- Whitelist entrypoints - Restrict to only the functions your app needs
- Monitor remaining calls - Create new sessions before exhaustion
Related
- Session Hooks Reference - Individual hook API docs
- Backend Sessions Quickstart - Server-side implementation
- Backend Sessions Methods - Detailed backend API
