Skip to main content

Installing sessions

To enable a session: Examples on this page use @rhinestone/sdk, where rhinestone is the RhinestoneSDK instance from Create a session with a custom setup.
Pass the Session that createSession returned, or the one you stored; do not rebuild it from its definition. These no-delivery examples require fee and gas sponsorship. chain must match the session’s chain. Sign and submit enable/disable transactions with the account owner; the transfer example assumes the account already holds USDC. You can also enable a session with a signature. See Multi-chain sessions for details.

Re-enable a session with a lifetime budget

A permit’s maxAmount without oneTimeUse is a lifetime budget (session.lifetimeBudget). Enabling the session again while it is already enabled resets that budget, so getSessionDetails refuses such a session:
Leave enabled sessions out of getSessionDetails. Pass allowBudgetReset only when you intend to give the session a fresh budget:
Disabling a session and enabling it again also starts a fresh budget.

Checking session status

To check if a session is enabled:

Using sessions

To authorize a transaction with a session key you’ve enabled before:
This will prompt the signature request from the session owner(s) and submit the transaction on their behalf. A session scoped by a cross-chain permit settles only sponsored intents without an app fee unless the permit sets allowFees.
You can also enable and use the session key in one transaction with the enable mode.

Disabling a session

To disable a single enabled session, use disableSession. This only removes a single session: to uninstall the validator entirely (and every session with it), use disable instead.