/** Group Text Protocol client wrapper. */ import { PayloadCodec } from "./native"; import { MlsContext } from "./mls"; import { GroupNode, OutboundFrame } from "./node"; export { PayloadCodec }; /** Outcome of {@link GtpClient.accept}. */ export interface GtpAcceptResult { status: "new" | "duplicate" | "error" | string; sender?: number; messageId?: bigint; text?: string; reason?: string; } /** * Group Text Protocol client. * * Tracks idempotency by ``(sender_id, message_id)``. */ export declare class GtpClient { /** Native handle (i32). */ handle: number; private constructor(); /** Create a fresh GTP client. */ static create(): GtpClient; /** * Send a text message. * @param codec - payload encoding (default: CBOR). */ send(node: GroupNode, mls: MlsContext, target: number, messageId: bigint, text: string, codec?: PayloadCodec): OutboundFrame; /** * Accept a plaintext payload delivered by the GBP layer. * `currentEpoch` lets the client auto-reset its idempotency state * when the epoch advances. `codec` must match the `codec` field of the * `payload_received` event. */ accept(plaintext: Buffer, currentEpoch: bigint | number, codec?: PayloadCodec): GtpAcceptResult; /** Clear the idempotency state. Intended for use after an epoch change. */ reset(): void; /** Release the native handle. Idempotent. */ close(): void; [Symbol.dispose](): void; } //# sourceMappingURL=gtp.d.ts.map