Skip to main content
oneTimeUse pins a one-time-use ID on a session. The session can then settle at most one settlement transaction per participating chain. It does not limit the session to one operation. Examples on this page use @rhinestone/sdk, where rhinestone is the RhinestoneSDK instance from Create a session with a custom setup.
With oneTimeUse, the permit’s maxAmount caps that one settlement instead of acting as a lifetime budget.

How it works

  • Every intent the SDK prepares for the session burns the ID first, on each chain it settles on. The policy refuses any settlement that does not burn it.
  • Intents need an explicit source.
  • validUntil is optional. When set, it must be a future Date and bounds every action in the session. Permit, swap, and function windows stay separate policies.
  • OFT and LZ settlement layers require oneTimeUse.
  • A one-time-use session always gets its own salted permission ID.

Policy availability

The SDK uses the deployed OneTimeUseIdPolicy for the session’s chain. Its addresses are exported as ONE_TIME_USE_ID_POLICY_ADDRESS and ONE_TIME_USE_ID_POLICY_ADDRESS_DEV (for useDevContracts) from @rhinestone/sdk/smart-sessions. On a chain without the policy, creating the session throws:

Signing

Leave signing unset. Unless the session holds a Permit2-layer permit such as ACROSS, which compiles claim policies, it has no signing surface and refuses a non-disabled signing mode. See Session signing.

Use the session

Name the funding source explicitly and sign with the session:
Enable the session first, as described in Use a session. After the ID is burned on a chain, create a new session with a fresh ID for the next settlement there.