rhinestone, rhinestoneAccount, and the session owner account.
1
Create the sessions
Define every session before asking the account owner to sign. A session’s chain is part of its authorization:Examples on this page use Each session can use different owners and restrictions. Reusing the same session owner does not make the on-chain sessions interchangeable.
@rhinestone/sdk, where rhinestone is the RhinestoneSDK instance from Create a session with a custom setup.2
Sign once
Get the authorization details, then ask the account owner for one signature:
getSessionDetails reads the required nonce on every session chain and builds one MultiChainSession typed-data message. Store the resolved sessions, sessionDetails.hashesAndChainIds, signature, and indexes together. Rebuilding or reordering the array changes which index enables which session.3
Enable and use each session
Pass a per-chain session map when one transaction can touch several chains. Configure a session for every EVM source chain and for the EVM destination where the account executes. The SDK fails before signing if a required chain has no session.
enableData lets the first operation on a chain enable and use that chain’s session in one flow:Enable a session separately
Use the same signed details to enable one session in an account-owner transaction before the session is used:enableData. Check first with rhinestoneAccount.isSessionEnabled(session) when your application does not track activation reliably.
Constraints
- A session authorization is chain-specific even when its owner and permissions match another chain.
- Session keys cannot sign a chain-agnostic origin payload whose one signature must validate across several chains. Split that operation into per-chain intents.
- Accounts using the K1 validator cannot sign one multi-chain session authorization. Sign and enable one chain at a time.
- Keep the original session order.
sessionToEnableIndexselects an entry in the signedhashesAndChainIdsset.
Cross-chain permits restrict which assets a session may move between chains.
They do not enable the session on those chains. Configure both features when
you need both behaviors. See Cross-chain
permits.