/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Bytes } from "#general";
export interface BtpHandshakeRequest {
    versions: number[];
    attMtu: number;
    clientWindowSize: number;
}
export interface BtpHandshakeResponse {
    version: number;
    attMtu: number;
    windowSize: number;
}
export interface BtpPacketPayload {
    ackNumber?: number;
    sequenceNumber: number;
    messageLength?: number;
    segmentPayload?: Bytes;
}
export interface DecodedBtpPacketPayload extends BtpPacketPayload {
    segmentPayload: Bytes;
}
export interface BtpHeader {
    isHandshakeRequest: boolean;
    hasManagementOpcode: boolean;
    hasAckNumber: boolean;
    isEndingSegment: boolean;
    isContinuingSegment: boolean;
    isBeginningSegment: boolean;
}
export interface BtpPacket {
    header: BtpHeader;
    payload: BtpPacketPayload;
}
export interface DecodedBtpPacket {
    header: BtpHeader;
    payload: DecodedBtpPacketPayload;
}
export declare enum BtpHeaderBits {
    HandshakeBit = 64,
    ManagementMsg = 32,
    AckMsg = 8,
    EndSegment = 4,
    ContinuingSegment = 2,
    BeginSegment = 1
}
export declare enum BtpOpcode {
    HandshakeManagementOpcode = 108
}
export declare class BtpCodec {
    static decodeBtpHandshakeRequest(data: Bytes): BtpHandshakeRequest;
    static decodeBtpPacket(data: Bytes): DecodedBtpPacket;
    static encodeBtpPacket({ header, payload }: BtpPacket): Bytes;
    static encodeBtpHandshakeRequest({ versions, attMtu, clientWindowSize }: BtpHandshakeRequest): Bytes;
    static encodeBtpHandshakeResponse({ version, attMtu, windowSize }: BtpHandshakeResponse): Bytes;
    private static decodeBtpPacketPayload;
    private static encodeBtpPacketPayload;
    private static decodeHandshakeRequestPayload;
    static decodeBtpHandshakeResponsePayload(data: Bytes): BtpHandshakeResponse;
    private static decodeBtpPacketHeader;
    private static encodeBtpPacketHeader;
    static encodeBleAdvertisementData(discriminator: number, vendorId: number, productId: number, hasAdditionalAdvertisementData?: boolean, isExtendedAnnouncement?: boolean): Uint8Array<ArrayBufferLike>;
    static decodeBleAdvertisementData(data: Bytes): {
        discriminator: number;
        vendorId: number;
        productId: number;
        hasAdditionalAdvertisementData: boolean;
    };
    static decodeBleAdvertisementServiceData(data: Bytes): {
        discriminator: number;
        vendorId: number;
        productId: number;
        hasAdditionalAdvertisementData: boolean;
    };
}
//# sourceMappingURL=BtpCodec.d.ts.map