import { Subject } from "rxjs"; import net from "net"; import Transport from "@ledgerhq/hw-transport"; /** * */ export type SpeculosTransportOpts = { apduPort: number; buttonPort?: number; automationPort?: number; host?: string; }; /** * Speculos TCP transport implementation * * @example * import SpeculosTransport from "@ledgerhq/hw-transport-node-speculos"; * const transport = await SpeculosTransport.open({ apduPort }); * const res = await transport.send(0xE0, 0x01, 0, 0); */ export default class SpeculosTransport extends Transport { static isSupported: () => Promise; static list: () => any; static listen: (_observer: any) => { unsubscribe: () => void; }; /** * */ static open: (opts: SpeculosTransportOpts) => Promise; apduSocket: net.Socket; opts: SpeculosTransportOpts; rejectExchange: (arg0: Error) => void; resolveExchange: (arg0: Buffer) => void; automationSocket: net.Socket | null | undefined; automationEvents: Subject>; constructor(apduSocket: net.Socket, opts: SpeculosTransportOpts); /** * Send a speculos button command * typically "Ll" would press and release the left button * typically "Rr" would press and release the right button * @param {*} command */ button: (command: string) => Promise; exchange(apdu: Buffer): Promise; setScrambleKey(): void; close(): Promise; } //# sourceMappingURL=SpeculosTransport.d.ts.map