/// <reference types="node" />
/// <reference types="node" />
import { Observable } from "rxjs";
import type Transport from "@ledgerhq/hw-transport";
import { type DerivationMode, DeviceInfo, FirmwareUpdateContext } from "@ledgerhq/types-live";
import type { AppOp, SkippedAppOp } from "../apps/types";
import { LockedDeviceEvent } from "./actions/types";
import { DeviceId } from "@ledgerhq/client-ids/ids";
export type RequiresDerivation = {
    currencyId: string;
    path: string;
    derivationMode: DerivationMode;
    forceFormat?: string;
};
export type Input = {
    deviceId: string;
    deviceName: string | null;
    request: ConnectAppRequest;
};
export type ConnectAppRequest = {
    appName: string;
    requiresDerivation?: RequiresDerivation;
    dependencies?: string[];
    requireLatestFirmware?: boolean;
    outdatedApp?: AppAndVersion;
    allowPartialDependencies: boolean;
};
export type AppAndVersion = {
    name: string;
    version: string;
    flags: number | Buffer;
};
export type ConnectAppEvent = {
    type: "unresponsiveDevice";
} | {
    type: "disconnected";
    expected?: boolean;
} | {
    type: "device-update-last-seen";
    deviceInfo: DeviceInfo;
    latestFirmware: FirmwareUpdateContext | null | undefined;
} | {
    type: "device-permission-requested";
} | {
    type: "device-permission-granted";
} | {
    type: "device-id";
    deviceId: DeviceId;
} | {
    type: "app-not-installed";
    appNames: string[];
    appName: string;
} | {
    type: "inline-install";
    progress: number;
    itemProgress: number;
    currentAppOp: AppOp;
    installQueue: string[];
} | {
    type: "some-apps-skipped";
    skippedAppOps: SkippedAppOp[];
} | {
    type: "listing-apps";
} | {
    type: "listed-apps";
    installQueue: string[];
} | {
    type: "dependencies-resolved";
} | {
    type: "latest-firmware-resolved";
} | {
    type: "ask-quit-app";
} | {
    type: "ask-open-app";
    appName: string;
} | {
    type: "has-outdated-app";
    outdatedApp: AppAndVersion;
} | {
    type: "opened";
    app?: AppAndVersion;
    derivation?: {
        address: string;
    };
} | {
    type: "display-upgrade-warning";
    displayUpgradeWarning: boolean;
} | LockedDeviceEvent;
export declare const openAppFromDashboard: (transport: Transport, appName: string) => Observable<ConnectAppEvent>;
export default function connectAppFactory({ isLdmkConnectAppEnabled, }?: {
    isLdmkConnectAppEnabled: boolean;
}): ({ deviceId, deviceName, request }: Input) => Observable<ConnectAppEvent>;
//# sourceMappingURL=connectApp.d.ts.map