import { RecoveryMethod } from '@openfort/openfort-js'; import type { OTPResponse } from '../../../shared/hooks/useRecoveryOTP.js'; import type { RecoverableWallet, SetActiveEmbeddedWalletResult } from '../../../shared/types.js'; import { type SetRouteOptions } from '../../Openfort/types.js'; /** * Callbacks the entries below report through instead of touching React state, * so a recovery attempt can keep running inside a persistent operation after * the page that started it unmounts. */ type RecoveryContext = { setActive: (opts: { address: string; password?: string; recoveryMethod?: RecoveryMethod; otpCode?: string; passkeyId?: string; }) => Promise; setRoute: (options: SetRouteOptions) => void; setError: (e: string | false) => void; otp: { isEnabled: boolean; request: () => Promise; }; setNeedsOTP: (n: boolean) => void; setOtpResponse: (r: OTPResponse | null) => void; password?: string; otpCode?: string; passkeyId?: string; }; export type AutomaticRecoveryOutcome = { status: 'success'; } | { status: 'needs-recovery'; } | { status: 'otp-required'; } | { status: 'error'; }; export declare const passwordRecovery: (wallet: RecoverableWallet, ctx: RecoveryContext) => Promise; export declare const passkeyRecovery: (wallet: RecoverableWallet, ctx: RecoveryContext) => Promise; export declare function automaticRecovery(wallet: RecoverableWallet, ctx: RecoveryContext): Promise; export {};