import type { KasaCredentials } from "./types.js"; export interface KlapTransportOptions { host: string; port?: number; credentials?: KasaCredentials; timeout?: number; } /** * KLAP v2 transport for TP-Link Kasa devices. * * Communicates over HTTP on port 80 using the KLAP v2 handshake and * encryption protocol. */ export declare class KlapTransport { private readonly host; private readonly port; private readonly credentials; private readonly timeout; private readonly baseUrl; private session; private klapKey; private klapIv; private klapSig; constructor(options: KlapTransportOptions); /** * Perform the two-step KLAP v2 handshake. * * 1. POST /app/handshake1 with 16-byte local seed * 2. Verify remote auth hash * 3. POST /app/handshake2 with local auth hash * 4. Derive session keys * 5. Store session state (cookie, keys, seq) */ handshake(): Promise; /** * Send a JSON command to the device. * * Encrypts the payload, sends it as POST /app/request?seq=N, and * decrypts the response. Re-handshakes on auth errors (once). */ send(request: object): Promise; /** Clear session state. */ close(): void; } //# sourceMappingURL=KlapTransport.d.ts.map