restrictToActions to drop the fallback. For that permission ID, the session’s permissions and actions are then the only calls it can run, and any other call reverts:
Examples on this page use @rhinestone/sdk, where rhinestone is the RhinestoneSDK instance from Create a session with a custom setup.
"none" mode uses a zero salt, so a reused signer produces the same permission ID even when the actions change. Enabling that ID again adds policies rather than replacing previous ones. Strict mode separates different restricted definitions, but the signer still controls every earlier permission ID until you revoke it. If you are narrowing authority, revoke the previous broader session.
The tradeoffs:
- 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.