For the complete documentation index, see llms.txt.

Session Key Status

Check whether a session key is installed on a smart account.

When a session key is created, you can use its address immediately in a counterfactual way. But the validator plugin is not installed onchain until the first UserOp with that session key is executed. `isSessionKeyInstalled` queries the account to see if the plugin is already present. `isSessionKeyInstalled` tells you whether a session key is already installed on a smart account. ZeroDev plugins are **lazy installed**, which means the session key validator is only deployed when the account sends

Session Key Status

Check whether a session key is installed on a smart account.

For the complete documentation index, see llms.txt.

When a session key is created, you can use its address immediately in a counterfactual way. But the validator plugin is not installed onchain until the first UserOp with that session key is executed. isSessionKeyInstalled queries the account to see if the plugin is already present.

isSessionKeyInstalled tells you whether a session key is already installed on a smart account. ZeroDev plugins are lazy installed, which means the session key validator is only deployed when the account sends its first UserOp that uses that session key. This helper lets you check that state so you can decide whether to prompt the user for a first transaction.


Usage

index.ts
import { isSessionKeyInstalled } from "@namera-ai/sdk/session-key";
import { publicClient } from "./clients";

const isInstalled = await isSessionKeyInstalled(publicClient, {
  accountAddress: "0x_SMART_ACCOUNT_ADDRESS",
  sessionKeyAddress: "0x_SESSION_KEY_ADDRESS",
});

If isInstalled is false, the session key has not been installed yet. The first UserOp signed by that key will install it. There is no additional transaction needed for installing a session key.

On this page