Refreshes the session associated with the specified session key, or the active session by default.
This function refreshes the session and updates the session token and key pair associated with the given session key.
If a sessionKey is provided, it will refresh the session under that key; otherwise, it will use the current active session key.
Optionally allows specifying a new expiration time for the session, a custom public key, and whether to invalidate the existing session after refreshing.
Makes a request to the Turnkey API to stamp a new login and stores the refreshed session token.
Automatically manages key pair cleanup and session storage to ensure consistency.
Optionally allows stamping the request with a specific stamper (StamperType.Passkey, StamperType.ApiKey, or StamperType.Wallet).