import { GoogleAuthInfo, Signer, SignerState, TwoFactorAuthConfig } from "@iov/gdrive-custodian"; type VoidCallback = () => void; export declare class GDriveCustodian { private authInfo?; protected signer?: Signer; initialized: boolean; static create(googleClientID: string, mnemonicLength: 12 | 24, signAuthPath: string, twoFactorAuthConfig?: TwoFactorAuthConfig): GDriveCustodian; attach(): Promise; setStateChangeListener(listener: (state: SignerState, data?: any) => void): void; removeStateChangeListener(): void; connect(): VoidCallback; detach(): void; getSigner(): Signer; getIdToken(): string; /** * Call this to respond with a token (TOTP) to custodian in order to move forward with login 2FA flow * @param token - provided by user (i.e TOTP) */ authenticateWith2fa(token: string): Promise; /** * Utility function to validate with 2FA in delicate scenarios * This is not required at login flow (implicitly called there) * @param token * @returns boolean */ validateWith2fa(token: string): Promise; /** * Use this to setup authinfo when SignerState === Authenticated * @param authInfo */ setAuthInfo(authInfo: GoogleAuthInfo): void; } export {};