import * as net from "node:net"; import { ByteStream } from "./stream"; export type DeviceProperties = { ConnectionType: string; DeviceID: number; ProductID?: number; SerialNumber: string; LocationID?: number; USBSerialNumber?: string; }; export type Device = { DeviceID: number; Properties: DeviceProperties; }; export type PairRecord = { HostID: string; HostCertificate: Uint8Array; HostPrivateKey: Uint8Array; RootCertificate: Uint8Array; DeviceCertificate?: Uint8Array; SystemBUID: string; WiFiMACAddress?: string; EscrowBag?: Uint8Array; }; export type RawSocket = net.Socket; export declare function listDevices(): Promise; export declare function readPairRecord(udid: string): Promise; /** * Open a tunnel to a TCP port on the device. The returned socket+stream is a * raw byte channel — the next layer owns framing. */ export declare function connect(deviceID: number, port: number): Promise<{ socket: net.Socket; stream: ByteStream; detach: () => void; }>;