/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { ScopedStorage } from "#bdx/ScopedStorage.js";
import { PeerAddress } from "#peer/PeerAddress.js";
import { MessageExchange } from "#protocol/MessageExchange.js";
import { ProtocolHandler } from "#protocol/ProtocolHandler.js";
import { Duration, Environment, Environmental, Observable } from "@matter/general";
import { Message } from "../codec/MessageCodec.js";
import { BdxSession } from "./BdxSession.js";
import { BdxSessionConfiguration } from "./BdxSessionConfiguration.js";
/** BDX protocol handler. */
export declare class BdxProtocol implements ProtocolHandler {
    #private;
    readonly id = 2;
    readonly requiresSecureSession = true;
    static [Environmental.create](env: Environment): BdxProtocol;
    get sessionStarted(): Observable<[session: BdxSession, scope: string], void>;
    get sessionClosed(): Observable<[session: BdxSession, scope: string], void>;
    enablePeerForScope(peer: PeerAddress, storage: ScopedStorage, config?: BdxProtocol.Config): boolean;
    disablePeerForScope(peer: PeerAddress, storage: ScopedStorage, force?: boolean): Promise<void>;
    onNewExchange(exchange: MessageExchange, message: Message): Promise<void>;
    close(): Promise<void>;
    sessionFor(peerAddress: PeerAddress, scope: string): BdxSession | undefined;
}
export declare namespace BdxProtocol {
    interface Config extends BdxSessionConfiguration.Config {
        messageTimeout?: Duration;
    }
}
//# sourceMappingURL=BdxProtocol.d.ts.map