- This function deletes the session and its associated key pair from storage.
- If a sessionKey is provided, it will clear the session under that key; otherwise, it will clear the default (active) session.
- Removes the session data from local storage and deletes the corresponding API key pair from the key store.
- Throws an error if the session does not exist or if there is an error during the clearing process.
Package: core
Defined in: clients/core.ts:4708
A promise that resolves when the session is successfully cleared.