import type { CWIState, CWITransport, CWITransportConfig, CWITransportEventHandler } from './types';
export declare class EmbedTransport implements CWITransport {
    readonly mode: "embed";
    private walletOrigin;
    private iframeUrl;
    private requestTimeoutMs;
    private handshakeTimeoutMs;
    private iframe;
    private pendingInvocations;
    private stateWaiters;
    private lastState;
    private events;
    private isDestroyed;
    constructor(config?: CWITransportConfig);
    private handleMessage;
    private getIframeWindow;
    private ensureIframe;
    private updateIframeVisibility;
    private resolveStateWaiters;
    private waitForState;
    handshake(timeoutMs?: number): Promise<CWIState>;
    invoke<TResult = unknown>(call: string, args?: unknown): Promise<TResult>;
    resume<TResult = unknown>(): Promise<TResult | null>;
    on(event: 'transport', handler: CWITransportEventHandler): void;
    off(event: 'transport', handler: CWITransportEventHandler): void;
    destroy(): void;
}
export declare class RedirectTransport implements CWITransport {
    readonly mode: "redirect";
    private authorizeInitUrl;
    private tokenUrl;
    private redirectUri;
    private timeoutMs;
    private events;
    constructor(config?: CWITransportConfig);
    private savePendingSession;
    private loadPendingSession;
    private clearPendingSession;
    private clearAuthQueryParams;
    private initializeAuthorization;
    invoke<TResult = unknown>(call: string, args?: unknown): Promise<TResult>;
    private exchangeCode;
    resume<TResult = unknown>(searchParams?: URLSearchParams | string): Promise<TResult | null>;
    on(event: 'transport', handler: CWITransportEventHandler): void;
    off(event: 'transport', handler: CWITransportEventHandler): void;
    destroy(): void;
}
export declare class AutoTransport implements CWITransport {
    readonly mode: "auto";
    private embed;
    private redirect;
    private events;
    private selectedTransport;
    private mobileFallback;
    private maxEmbedRetries;
    constructor(config?: CWITransportConfig);
    private selectTransport;
    private shouldTryRedirect;
    private shouldUseRedirectDirectly;
    private shouldRetryEmbed;
    private shouldFallbackToRedirect;
    private toFallbackReason;
    invoke<TResult = unknown>(call: string, args?: unknown): Promise<TResult>;
    resume<TResult = unknown>(searchParams?: URLSearchParams | string): Promise<TResult | null>;
    on(event: 'transport', handler: CWITransportEventHandler): void;
    off(event: 'transport', handler: CWITransportEventHandler): void;
    destroy(): void;
}
export declare const createEmbedTransport: (config?: CWITransportConfig) => EmbedTransport;
export declare const createRedirectTransport: (config?: CWITransportConfig) => RedirectTransport;
export declare const createAutoTransport: (config?: CWITransportConfig) => AutoTransport;
//# sourceMappingURL=transport.d.ts.map