/* @flow */ // does not have session export type TrezorDeviceInfo = { path: string; } export type TrezorDeviceInfoWithSession = TrezorDeviceInfo & { session: ?string; } export type AcquireInput = { path: string; previous: ?string; checkPrevious: boolean; } export type MessageFromTrezor = {type: string, message: Object}; export type Transport = { enumerate(): Promise>; listen(old: ?Array): Promise>; acquire(input: AcquireInput): Promise; release(session: string): Promise; configure(signedData: string): Promise; call(session: string, name: string, data: Object): Promise; // resolves when the transport can be used; rejects when it cannot init(debug: ?boolean): Promise; configured: boolean; version: string; name: string; }