import type { AuthAndWalletRpcReturnType, AuthLoginReturnType, AuthProvider } from "../../interfaces/auth"; import type { ClientIdWithQuerierType, SendEmailOtpReturnType } from "../../interfaces/embedded-wallets/embedded-wallets"; import type { EmbeddedWalletIframeCommunicator } from "../../utils/iFrameCommunication/EmbeddedWalletIframeCommunicator"; export type LoginQuerierTypes = { loginWithCustomAuthEndpoint: { payload: string; encryptionKey: string; }; loginWithCustomJwt: { jwt: string; encryptionKey?: string; }; loginWithThirdwebModal: undefined | { email: string; }; sendThirdwebSmsLoginOtp: { phoneNumber: string; }; sendThirdwebEmailLoginOtp: { email: string; }; verifyThirdwebEmailLoginOtp: { email: string; otp: string; recoveryCode?: string; }; verifyThirdwebSmsLoginOtp: { phoneNumber: string; otp: string; recoveryCode?: string; }; injectDeveloperClientId: void; getHeadlessOauthLoginLink: { authProvider: AuthProvider; }; }; type OauthLoginType = { openedWindow?: Window | null; closeOpenedWindow?: (openedWindow: Window) => void; }; export declare abstract class AbstractLogin { protected LoginQuerier: EmbeddedWalletIframeCommunicator; protected preLogin: () => Promise; protected postLogin: (authResults: AuthAndWalletRpcReturnType) => Promise; protected clientId: string; /** * Used to manage the user's auth states. This should not be instantiated directly. * Call {@link EmbeddedWalletSdk.auth} instead. * */ constructor({ querier, preLogin, postLogin, clientId, }: ClientIdWithQuerierType & { preLogin: () => Promise; postLogin: (authDetails: AuthAndWalletRpcReturnType) => Promise; }); abstract loginWithCustomJwt(args: { jwt: string; encryptionKey: string; }): Promise; abstract loginWithCustomAuthEndpoint(args: { payload: string; encryptionKey: string; }): Promise; abstract loginWithModal(args?: MODAL): Promise; abstract loginWithEmailOtp(args: EMAIL_MODAL): Promise; abstract loginWithOauth(args: OauthLoginType & { oauthProvider: AuthProvider; }): Promise; sendEmailLoginOtp({ email, }: LoginQuerierTypes["sendThirdwebEmailLoginOtp"]): Promise; sendSmsLoginOtp({ phoneNumber, }: LoginQuerierTypes["sendThirdwebSmsLoginOtp"]): Promise; abstract verifyEmailLoginOtp(args: EMAIL_VERIFICATION): Promise; abstract verifySmsLoginOtp(args: { phoneNumber: string; otp: string; recoveryCode?: string; }): Promise; } export {}; //# sourceMappingURL=abstract-login.d.ts.map