import { MaybePromise } from '../../../types/utils.js'; import { ITelegramClient } from '../../client.types.js'; import { MaybeDynamic, User } from '../../types/index.js'; /** * Execute the [QR login flow](https://core.telegram.org/api/qr-login). * * This method will resolve once the authorization is complete, * returning the authorized user. */ export declare function signInQr(client: ITelegramClient, params: { /** * Function that will be called whenever the login URL is changed. * * The app is expected to display `url` as a QR code to the user */ onUrlUpdated: (url: string, expires: Date) => void; /** * Function that will be called when the user has scanned the QR code * (i.e. when `updateLoginToken` is received), and the library is finalizing the auth */ onQrScanned?: () => void; /** Password for 2FA */ password?: MaybeDynamic; /** * Function that will be called after the server has rejected the password. * * Note that in case {@link password} is not a function, * this callback will never be called, and an error will be thrown instead. */ invalidPasswordCallback?: () => MaybePromise; /** Abort signal */ abortSignal?: AbortSignal; }): Promise;