# assertSessionKey

> **assertSessionKey**(`sessionKey`, `options`): `void`

Defined in: [synapse-react/src/signer.ts:24](https://github.com/FilOzone/synapse-sdk/blob/628d3a8812e8612a183a3abe3328169fb741260b/packages/synapse-react/src/signer.ts#L24)

Check that a session key can sign for the connected wallet: same chain, and its root is the connected account.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `sessionKey` | [`SessionKey`](/reference/filoz/synapse-core/session-key/interfaces/sessionkey/)\<`"Secp256k1"`\> | The session key. |
| `options` | \{ `account`: `` `0x${string}` `` \| `undefined`; `chainId`: `number`; \} | The connected account (if any) and chain id. |
| `options.account` | `` `0x${string}` `` \| `undefined` | - |
| `options.chainId` | `number` | - |

## Returns

`void`

## Throws

Error if the session key is for a different chain, or belongs to a different root wallet than `account`.