Chapter 7

Session Keys

Connecting a wallet to a game or DeFi app traditionally grants full signing authority — every prompt can move your entire balance. Session keys fix this by letting a smart wallet issue temporary, scoped keys that expire or hit a spending cap.

A gaming wallet might issue a session key that can only call the game's contract and spend up to 0.1 ETH per day. A trading bot might get permission to swap on one DEX but not withdraw to arbitrary addresses. The smart wallet enforces these limits in validateUserOp.

Session keys are one of the clearest UX wins from account abstraction. Users stay in flow without repeated wallet popups, while developers get predictable, bounded access instead of asking for god-mode approvals.