/// /// /// import type EventEmitter from 'events'; export type OneKeyDeviceCommType = 'usb' | 'webusb' | 'ble' | 'webble' | 'electron-ble' | 'bridge' | 'emulator'; export type OneKeyUsbDeviceInfo = { path: string; }; export type OneKeyDeviceInfoWithSession = OneKeyUsbDeviceInfo & { session?: string | null; debugSession?: string | null; debug: boolean; }; export type OneKeyMobileDeviceInfo = { id: string; name: string | null; }; export type OneKeyDeviceInfoBase = { commType: OneKeyDeviceCommType; }; export type OneKeyDeviceInfo = OneKeyDeviceInfoBase & OneKeyDeviceInfoWithSession & OneKeyMobileDeviceInfo; export type AcquireInput = { path?: string; previous?: string | null; uuid?: string; forceCleanRunPromise?: boolean; }; export type MessageFromOneKey = { type: string; message: Record; }; type ITransportInitFn = (logger?: any, emitter?: EventEmitter, plugin?: LowlevelTransportSharedPlugin) => Promise; export type Transport = { enumerate(): Promise>; listen(old?: Array): Promise>; acquire(input: AcquireInput): Promise; release(session: string, onclose: boolean): Promise; configure(signedData: JSON | string): Promise; call(session: string, name: string, data: Record): Promise; post(session: string, name: string, data: Record): Promise; read(session: string): Promise; cancel(): Promise; disconnect?: (session: string) => Promise; promptDeviceAccess?: () => Promise; init: ITransportInitFn; stop(): void; configured: boolean; version: string; name: string; activeName?: string; isOutdated: boolean; }; export type LowLevelDevice = OneKeyDeviceInfoBase & { id: string; name: string; }; export type LowlevelTransportSharedPlugin = { enumerate: () => Promise; send: (uuid: string, data: string) => Promise; receive: () => Promise; connect: (uuid: string) => Promise; disconnect: (uuid: string) => Promise; init: () => Promise; version: string; }; export {}; //# sourceMappingURL=transport.d.ts.map