Type Alias SmartSessionActions<TModularSmartAccount>

SmartSessionActions: {
    grantPermission: (
        args: GrantPermissionParameters<TModularSmartAccount>,
    ) => Promise<GrantPermissionResponse>;
    usePermission: (
        args: UsePermissionParameters<TModularSmartAccount>,
    ) => Promise<Hash>;
}

Defines the shape of actions available for creating smart sessions.

Type Parameters

  • TModularSmartAccount extends ModularSmartAccount | undefined

    Type of the modular smart account, extending ModularSmartAccount or undefined.

Type declaration

  • grantPermission: (
        args: GrantPermissionParameters<TModularSmartAccount>,
    ) => Promise<GrantPermissionResponse>

    Creates multiple sessions for a modular smart account. This differs from usePermission in that it grants the permission on chain immediately. It is also known as "USE_MODE", and it means that the permission is granted on chain immediately, and the permission is later redeemed when the user operation is sent.

  • usePermission: (args: UsePermissionParameters<TModularSmartAccount>) => Promise<Hash>

    Uses a session to perform an action.