/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Bytes, Crypto, HashAlgorithm, MatterError } from "@matter/general";
import { OtaImageHeader } from "./OtaImageHeader.js";
export declare class OtaImageError extends MatterError {
    constructor(message: string, options?: ErrorOptions);
}
/**
 * Reader for OTA image files in Matter/DCL format.
 * Supports reading header information, validating payload digest, and extracting payload data.
 */
export declare class OtaImageReader {
    #private;
    /** Read only the OTA image header from the stream and returns the  parsed header data. */
    static header(streamReader: ReadableStreamDefaultReader<Bytes>): Promise<OtaImageHeader>;
    /** Read and validate the full OTA image file from the stream and returns the header data on success. */
    static file(streamReader: ReadableStreamDefaultReader<Bytes>, crypto: Crypto, expectedTotalSize?: number | bigint, options?: {
        /** Calculate full file checksum to validate the full checksum against DCL information (default: true) */
        calculateFullChecksum?: boolean;
        /** Expected checksum type for the full checksum (default: HashAlgorithm.SHA256) */
        checksumType?: HashAlgorithm;
        /** Expected full file checksum to validate against, usually provided by the DCL */
        expectedChecksum?: string;
    }): Promise<OtaImageHeader>;
    /**
     * Read and validate OTA file, extracting payload to a writable stream.
     * Returns the header information after successful validation and extraction.
     */
    static extractPayload(streamReader: ReadableStreamDefaultReader<Bytes>, payloadWriter: WritableStreamDefaultWriter<Bytes>, crypto: Crypto, expectedTotalSize?: number | bigint): Promise<OtaImageHeader>;
    constructor(streamReader: ReadableStreamDefaultReader<Bytes>, crypto?: Crypto);
    get totalSize(): bigint | undefined;
}
//# sourceMappingURL=OtaImageReader.d.ts.map