Tooling
ModuleKit
Reference
Testing
Smart Sessions
Addsession

⚠️ Deprecation Notice

ModuleKit was developed by Rhinestone and is no longer actively supported. If you're building modules and need assistance, reach out to Rhinestone at gm@rhinestone.dev


title: "addSession"

Create a new session on the smart sessions validator.

Usage

PermissionId permissionId = instance.addSession(session);

Parameters

instance

The instance of the account used for testing.

session (optional)

The session to add to the smart sessions validator. Alternatively, you can use the fields below to add a session by using the default validator.

salt (optional)

  • Type: bytes32

The salt to use for the session.

userOpPolicies (optional)

The user operation policies to use for the session.

erc7739Policy (optional)

The ERC7739 policy to use for the session.

actionDatas (optional)

The action policies to use for the session.

Returns

permissionId

  • Type: PermissionId | bytes32

The permission id for the session created.