Overview
Cavos uses session keys for all transactions. After creating a session, users can execute unlimited transactions without any signature prompts.[!NOTE] All transactions are signed with the session key, not the user’s private key. The private key is cleared from memory after session creation.
Prerequisites
Before executing transactions, you need an active session:Basic Transaction
Once a session is active, transactions execute without prompts:Call Format
Each call follows the starknet.jsCall interface:
[!IMPORTANT]
The call must match a method in your session policy’s allowedMethods. Calls to unauthorized methods will fail.
Multiple Calls (Multicall)
Execute multiple calls atomically in a single transaction:- Approve + Swap
- Multi-token transfers
- Complex DeFi operations
Gasless by Default
All transactions through session keys are gasless:- User pays nothing
- Gas is sponsored by AVNU Paymaster
- No ETH balance required
Session Policy Enforcement
Transactions are validated against your session policy:Error Handling
Transaction Status
Theexecute() function returns the transaction hash immediately. To track status:
Common Patterns
ERC20 Transfer
Approve + Action
Session Lifecycle
| State | execute() Behavior |
|---|---|
| No session | Throws “No active session” |
| Active session | Signs with session key ✅ |
| Expired session | Throws “Session has expired” |
| Method not in policy | Throws “not allowed by session” |

