{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC7B,yEAAyE;IACzE,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,+EAA+E;IAC/E,KAAK,IAAI,IAAI,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACrC,gDAAgD;IAChD,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IAChC,yCAAyC;IACzC,OAAO,IAAI,IAAI,CAAC;IAChB,4CAA4C;IAC5C,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC5B;AAED,oGAAoG;AACpG,MAAM,MAAM,oBAAoB,GAAG,CAAC,QAAQ,EAAE,qBAAqB,KAAK,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC","sourcesContent":["export interface ByteTransport {\n\t/** Sends one byte chunk. Calls must be delivered in invocation order. */\n\tsend(chunk: Uint8Array): Promise<void>;\n\t/** Closes the transport. Implementations must make repeated calls harmless. */\n\tclose(): void;\n}\n\nexport interface ByteTransportHandlers {\n\t/** Delivers an arbitrary inbound byte chunk. */\n\tonData(chunk: Uint8Array): void;\n\t/** Reports an orderly terminal close. */\n\tonClose(): void;\n\t/** Reports a terminal transport failure. */\n\tonError(error: Error): void;\n}\n\n/** Creates a fresh connected, authenticated transport. Exactly one terminal handler is expected. */\nexport type ByteTransportFactory = (handlers: ByteTransportHandlers) => ByteTransport | Promise<ByteTransport>;\n"]}