/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Environment } from "#environment/Environment.js";
import { AppAddress } from "#net/AppAddress.js";
import { Abort } from "#util/Abort.js";
import { Bytes } from "#util/Bytes.js";
import { MaybePromise } from "#util/Promises.js";
export interface MqttEndpoint {
    subscribe(topic: string, options?: MqttEndpoint.SubscriptionOptions): AsyncIterableIterator<MqttEndpoint.Message, void, void>;
    publish(message: MqttEndpoint.Message): Promise<void>;
    close(): Promise<void>;
}
export declare namespace MqttEndpoint {
    interface Message {
        topic: string;
        payload: Bytes | string | null;
        retain?: boolean;
        contentType?: string;
        responseTopic?: string;
        correlationData?: Bytes;
        qos?: 0 | 1 | 2;
    }
    function Message(message: Message): Message;
    interface ConnectionOptions {
        address: AppAddress.Definition;
        certificate?: string;
        key?: string;
        environment?: Environment;
        will?: Message;
        onUp?: (endpoint: MqttEndpoint) => MaybePromise<void>;
        onDown?: (endpoint: MqttEndpoint) => MaybePromise<void>;
    }
    interface SubscriptionOptions {
        noLocal?: boolean;
        abort?: Abort.Signal;
    }
}
//# sourceMappingURL=MqttEndpoint.d.ts.map