restrictToActions to drop the fallback. The session’s permissions and actions are then the only calls it can run, and any other call reverts:
- The session can no longer sign arbitrary Orchestrator intents. Only its explicit permissions and actions execute.
- It needs at least one permission or action. A restricted session with neither is rejected.
- It cannot be combined with
crossChainPermitsorclaimPolicies, whose spending and time-frame guardrails live inside the fallback. - Signing defaults to
disabled, so the session key cannot sign an approval off-chain. Setsigningexplicitly if the session needs ERC-1271 signatures.
Requires
@rhinestone/sdk 2.6.0 or later.Raw scoped actions
Permissions are derived from an ABI, so they can only address calls you can name as a function on a contract. Useactions for the rest — a call whose ABI you don’t have, or one you want to scope by selector directly:
target, a selector, and optional policies. Three rules the SDK enforces:
- An entry must be scoped: both
targetandselectorare required. A fallback-shaped entry is rejected, because it would map to the wildcard fallback target. - An entry may not target the fallback sentinel, which would reintroduce the wildcard the restriction drops.
- A raw action must not collide with a
permissionsentry on the same(target, selector)pair. The two share one on-chain action id, so merge them into a single entry instead.
restrictToActions.