import type { KasaCredentials } from "./types.js"; export interface AesTransportOptions { host: string; port?: number; credentials?: KasaCredentials; timeout?: number; } /** * AES (Tapo-protocol) transport for TP-Link Kasa devices. * * Communicates over HTTP on port 80 using RSA handshake for session key * exchange, AES-CBC encryption for commands, and securePassthrough wrapping. */ export declare class AesTransport { private readonly host; private readonly port; private readonly credentials; private readonly timeout; private readonly baseUrl; private session; constructor(options: AesTransportOptions); /** * Perform the AES handshake and login. * * 1. Generate RSA key pair * 2. POST /app with handshake request containing public key * 3. Decrypt response to get AES session key + IV * 4. Store session cookie * 5. POST login_device with hashed credentials to get auth token */ handshake(): Promise; /** * Send a JSON command to the device. * * Encrypts the payload with AES-CBC, wraps it in a securePassthrough * request, and sends it to POST /app?token=TOKEN. Decrypts and parses * the response. Re-handshakes on auth errors (once). */ send(request: object): Promise; /** Clear session state. */ close(): void; } //# sourceMappingURL=AesTransport.d.ts.map