Session keys only work with CHIPI wallets - not READY wallets. Make sure your wallet was created with
walletType: "CHIPI".Usage
Parameters
Return Value
Returns an object containing:SessionKeyData Structure
Example Implementation
Security Considerations
Never store session keys in your backend database. This defeats the purpose of self-custodial security. Store only in client-side secure storage.
Best Practices
- Set short durations - Use 1-6 hours, not days
- Clear on logout - Always remove session from storage when user logs out
- Register on-chain - After creating, use
useAddSessionKeyToContractto register it
This hook only generates the session keypair locally. You must call
useAddSessionKeyToContract to register it on-chain before it can be used for transactions.