> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rhinestone.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# enableSession

> Enable a smart session

The `session` must be a resolved `Session` (the return value of
`toSession(...)`). Re-resolving it here would drop the explicit
`permissions` — a `Session` only carries the derived `actions`, not the
original `SessionDefinition.permissions` — which makes the on-chain digest
computed by `SmartSessionLens.getAndVerifyDigest` diverge from the one
signed in `getSessionDetails`, causing the emissary to reject the enable.

## Import

```ts theme={null}
import { enableSession } from '@rhinestone/sdk/actions/smart-sessions'
```

## Usage

```ts theme={null}
const transaction = await account.prepareTransaction({
  chain,
  calls: [enableSession(session, enableSessionSignature, hashesAndChainIds, sessionToEnableIndex)],
})
```

## Parameters

<ParamField path="session" type="Session" required>
  resolved session to enable
</ParamField>

<ParamField path="enableSessionSignature" type="`0x${string}`" required />

<ParamField path="hashesAndChainIds" type="{ chainId: bigint; sessionDigest: `0x${string}` }[]" required />

<ParamField path="sessionToEnableIndex" type="number" required />

## Returns

<ResponseField name="call" type="LazyCallInput">
  Calls to enable the smart session
</ResponseField>
