assertSessionKey
assertSessionKey(
sessionKey,options):void
Defined in: synapse-react/src/signer.ts:24
Check that a session key can sign for the connected wallet: same chain, and its root is the connected account.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
sessionKey | 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
Section titled “Returns”void
Throws
Section titled “Throws”Error if the session key is for a different chain, or belongs to a different root wallet than account.