UNPKG

telegram-session-generator

Version:

🚀 A secure and easy-to-use CLI tool for generating Telegram session strings. Perfect for Telegram client development and automation projects.

50 lines • 1.48 kB
import { TelegramSessionConfig, AuthenticationOptions, SessionResult, UserInfo } from './types'; /** * TelegramSessionGenerator - A class to manage Telegram session creation and authentication */ export declare class TelegramSessionGenerator { private client; private config; constructor(config: TelegramSessionConfig); /** * Validate the configuration */ private validateConfig; /** * Create a new session string through interactive authentication */ createSession(options?: AuthenticationOptions): Promise<SessionResult>; /** * Verify an existing session string */ verifySession(sessionString: string): Promise<SessionResult>; /** * Get user information from session string */ getUserInfo(sessionString?: string): Promise<UserInfo | null>; /** * Disconnect the current client */ disconnect(): Promise<void>; /** * Check if client is connected */ isConnected(): boolean; /** * Default phone number prompt (throws error - must be overridden) */ private defaultPhonePrompt; /** * Default verification code prompt (throws error - must be overridden) */ private defaultCodePrompt; /** * Default password prompt (returns empty string) */ private defaultPasswordPrompt; /** * Default error handler */ private defaultErrorHandler; } //# sourceMappingURL=TelegramSessionGenerator.d.ts.map