- Server-driven trades or payments without prompting the user every time
- Background workers that act on the user’s behalf
- Time-boxed automations (e.g. “rebalance once an hour for the next 24h”)
staging-integration/staging-sessions.test.ts and staging-session-execute.test.ts.
Initialise
1. Create a session key
Generates a fresh key pair locally and encrypts the private key. Nothing on-chain yet.2. Register on-chain
The user’s wallet signs a transaction that authorises the session key. Chipi’s paymaster covers gas. Wait for confirmation before using the key — Starknet blocks settle in ~20-40s.3. Execute a transaction with the session key
Once registered, your server can call any allowed entrypoint without the user’s PIN. Below: a self-transfer of 0.001 USDC.calls in the same executeTransactionWithSession invocation — they execute as a single multicall.
4. Revoke
When you’re done — or the user logs out — revoke immediately. The on-chain revocation makes the key unusable even if the encrypted private key leaks.getSessionData reads through a non-paymaster RPC, which can lag the paymaster RPC used for register/revoke by a few seconds. If you need a definitive on-chain confirmation, wait for the revoke tx to settle (e.g. via Voyager) before calling getSessionData.Putting it together
For production, prefer a webhook (configured at
/configure/notifications) over polling — you can register the session key, return a 202 to your user, and trigger executeTransactionWithSession from the webhook handler when the register tx confirms.✅ Verified against the live API on 2026-05-11.
