What problem does it solve?
This Skill helps developers configure session keys and permission policies for Cartridge Controller so dApps can execute gasless, pre-approved on-chain calls without repeated wallet confirmations or manual keychain approvals. It prevents execute() failures caused by missing merkle proofs, ensures consistent authorization on local Katana and mainnet flows, and centralizes session lifecycle controls like redirects and verified badges.
Core Features & Use Cases
- Policy Definitions: Define SessionPolicies that enumerate allowed contracts, method entrypoints, human-readable names, and descriptions to restrict session calls.
- Spending Limits & Approvals: Configure token approve limits (hex uint) and specify spender addresses to limit on-chain token usage during a session.
- Signed Message Preapproval: Pre-approve typed message schemas and domains so the app can sign messages without repeated prompts.
- Error Handling & UX Modes: Choose errorDisplayMode (modal, notification, silent) and control propagateSessionErrors to surface or suppress UI; note that critical errors may still force modal display.
- Verified Sessions & Redirects: Support verified policy badges for streamlined UX and configure redirect URLs for mobile and cross-platform logout flows.
- Use Case: A mobile web3 game configures policies that allow place_prediction and buy_relic calls with a capped ETH approve so players transact seamlessly without popups.
Quick Start
Create a SessionPolicies object listing your game contract with required entrypoints, include approve limits for tokens, set errorDisplayMode to your preferred mode, and pass policies to Controller on init.