/** * Auth Response Types * * Response types for authentication operations. */ /** * Response to a challenge request. */ export interface ChallengeResponse { /** Unique nonce for this challenge */ nonce: string; /** Message to be signed by the user's wallet */ message: string; /** Unix timestamp when the challenge expires */ expiresAt: number; } export interface User { /** Unique identifier for the user */ id: string; /** Wallet address of the user */ address: string; /** Username of the user */ username?: string; } /** * Authentication state containing all tokens and metadata * * Returned by authentication methods and contains the tokens needed for API access. */ export interface AuthState { /** JWT access token for authenticated requests */ accessToken: string; /** JWT refresh token for token renewal and revocation */ refreshToken: string; /** Unix timestamp (in seconds) when the access token expires */ expiresAt: number; /** Information about the authenticated user */ user: User; } export interface ApplicationInfo { /** Unique identifier for the application */ id: string; /** Human-readable name of the application */ name: string; /** Client ID for frontend authentication */ clientId: string; } /** * Response to a backend authentication request. */ export interface BackendAuthResponse { /** JWT access token for authenticated requests */ accessToken: string; /** Unix timestamp when the access token expires */ expiresAt: number; /** Information about the application */ application: ApplicationInfo; } /** * Response to a token refresh request. */ export interface TokenRefreshResponse { /** New JWT access token */ accessToken: string; /** Unix timestamp when the access token expires */ expiresAt: number; }