Skip to main content

Import

Usage

Return Type: SessionState

The hook returns an object with the following properties:

Properties

isInitialized

boolean Indicates whether the Sequence session has been initialized. This is useful for determining when the session data is ready to be used.

walletAddress

\0x$` | null` The current wallet address if connected, or null if no wallet is connected.

sessions

Session[] Array of all active sessions. Each session contains information about the connection type and permissions.

loginMethod

string | null The method used to log in (e.g., ‘email’, ‘social’, etc.) or null if not logged in.

userEmail

string | null The email address associated with the current session, or null if not available.

Example: Checking Session Initialization

Notes

This hook provides real-time access to Sequence session state and automatically updates when session information changes. It’s particularly useful for:
  • Checking if the session is ready before performing operations
  • Accessing wallet connection status
  • Monitoring active sessions and their types
  • Getting user authentication information
The hook automatically subscribes to session updates and will re-render your component when the session state changes.