import { Keypair, PublicKey, Connection } from '@solana/web3.js'; import type { TossUser } from '../types/tossUser'; export declare const SESSION_KEY = "toss_user_session"; type UserSession = { id: string; token: string; expiresAt: number; walletAddress: string; }; export declare class AuthService { static signInWithWallet(walletAddress: string, isTemporary?: boolean): Promise<{ user: TossUser; session: UserSession; }>; static saveSession(session: UserSession): Promise; static getSession(): Promise; static signOut(): Promise; static isWalletUnlocked(): Promise; static unlockWalletWithBiometrics(): Promise; /** * Setup biometric-protected wallet (REQUIRED for security) * * SECURITY CRITICAL: * - Private keypair is encrypted and stored in hardware-secure storage * - Private key NEVER accessible without biometric authentication * - User CANNOT export, backup, or access seed phrase * - Keypair is device-specific and non-custodial * * @param keypair User's Solana keypair (never re-used or exported) * @param useBiometrics Must be true (biometric is mandatory, not optional) */ static setupWalletProtection(keypair: Keypair, useBiometrics?: boolean): Promise; /** * Verify wallet is stored securely (requires biometric to access) * @returns true if wallet exists and requires biometric */ static isKeypairStoredSecurely(): Promise; /** * Get public key only (NO AUTHENTICATION REQUIRED - public key is safe) * Use this for displaying wallet address, sending funds to, etc. */ static getPublicKeyWithoutAuth(): Promise; /** * Lock wallet from memory (does NOT delete stored keypair) * Keypair remains encrypted in secure storage */ static lockWalletFromMemory(): Promise; /** * Permanently delete wallet (IRREVERSIBLE) * Only use for logout or account deletion */ static deleteWalletPermanently(): Promise; /** * Create a secure durable nonce account for offline transactions * REQUIRES biometric authentication for maximum security * * This creates a nonce account that enables: * - Offline transaction creation (with replay protection) * - Biometric-protected signing * - Encrypted storage with Noise Protocol support */ static createSecureNonceAccount(user: TossUser, connection: Connection, userKeypair: Keypair): Promise; /** * Enable offline transactions for a user with nonce account support * Ensures all security measures are in place */ static enableOfflineTransactions(user: TossUser): Promise; /** * Verify nonce account is accessible and valid * Requires biometric authentication */ static verifyNonceAccountAccess(userId: string): Promise; /** * Revoke nonce account (security measure) * Requires biometric verification */ static revokeNonceAccount(userId: string, user: TossUser): Promise; } export {}; //# sourceMappingURL=authService.d.ts.map