Class SessionKeyManagerModule

Hierarchy (view full)

Constructors

Properties

entryPointAddress: `0x${string}`
merkleTree: MerkleTree
mockEcdsaSessionKeySig: `0x${string}` = "0x73c3ac716c487ca34bb858247b5ccf1dc354fbaabdd089af3b2ac8e78ba85a4959a2d76250325bd67c11771c31fccda87c33ceec17cc0de912690521bb95ffcb1b"
moduleAddress: `0x${string}`
sessionStorageClient: ISessionStorage
version: "V1_0_0" = "V1_0_0"

Methods

  • Revokes specified sessions by generating a new Merkle root and updating the session statuses to "REVOKED".

    This method performs the following steps:

    1. Calls revokeSessions on the session storage client to get new leaf nodes for the sessions to be revoked.
    2. Constructs new leaf data from the session details, including validity periods and session validation module.
    3. Hashes the leaf data using keccak256 and adds them to the Merkle tree.
    4. Creates a new Merkle tree with the updated leaves and updates the internal Merkle tree reference.
    5. Sets the new Merkle root in the session storage.
    6. Updates the status of each specified session to "REVOKED" in the session storage.

    Parameters

    • sessionIDs: string[]

      An array of session IDs to be revoked.

    Returns Promise<string>

    A promise that resolves to the new Merkle root as a hexadecimal string.

  • Update the session data pending state to active

    Parameters

    • param: SessionSearchParam

      The search param to find the session data

    • status: SessionStatus

      The status to be updated

    Returns Promise<void>