Session Keys
Session keys let you delegate signing permissions under specific conditions to a temporary keypair. With session keys, your app can:- Allow users to interact without constant signature popups
- Enable short-term delegated permissions
- Automate transactions safely under defined rules
Currently supported only on the Biconomy v2.0.0 smart account implementation. Other smart account types will throw errors.
How It Works
The session key flow has two main parts:-
Create & register the session
- Generate a temporary keypair (session key).
- Define metadata (
sessionKeyData
) including:- Session key address (temporary public key)
- Linked user address
- Permission parameters (limits, scope, etc.)
- Deploy or configure a
sessionValidationModule
contract to validateUserOps
. - Register the session on-chain.
-
Use the session key
UserOps
can now be signed by the session key instead of the primary wallet.- The validation module ensures only authorized operations go through.
API & SDK Methods
To work with session keys, use:createSessions
— create and register a new sessionvalidateSession
— validate that aUserOperation
is authorized under the session
- AA SDKs
- AA RPC (createSessions, validateSession)
Example Validation Contract
Here’s an examplesessionValidationModule
contract that implements validateSessionUserOp
:
Solidity
Tutorial Video
Session Keys in Particle Smart Wallet-as-a-Service