Skip to content

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.

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 -

void

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