/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { Bytes, Crypto, IdentifiedHashAlgorithm } from "@matter/general"; /** * Result from OtaImageWriter.create() containing the OTA image and checksum information. */ export interface OtaImageWriterResult { /** The complete OTA image file */ image: Bytes; /** Checksum of the full file (header + payload), base64 encoded */ fullFileChecksum: string; /** Checksum algorithm type (defaults to SHA-256) */ fullFileChecksumType: IdentifiedHashAlgorithm; } /** * Writer for creating OTA (Over-The-Air) update image files. * * This class creates properly formatted OTA images that comply with the Matter specification, * including file identifier, header encoding, and payload digest computation. * * The class can be used to convert raw firmware payloads into OTA image files suitable for distribution. * It does not use a streaming approach, so it requires the entire payload to be available in memory what is ok for now. */ export declare class OtaImageWriter { /** * Create a complete OTA image file. * * @param crypto - Crypto implementation for computing hash digests * @param options - Image configuration options * @param options.imageDigestType - Hash algorithm for payload digest (defaults to SHA-256) * @param options.fullFileChecksumType - Hash algorithm for full file checksum (defaults to SHA-256) * @returns OTA image result containing the image data and full file checksum */ static create(crypto: Crypto, options: { vendorId: number; productId: number; softwareVersion: number; softwareVersionString: string; minApplicableSoftwareVersion?: number; maxApplicableSoftwareVersion?: number; releaseNotesUrl?: string; payload: Bytes; imageDigestType?: IdentifiedHashAlgorithm; fullFileChecksumType?: IdentifiedHashAlgorithm; }): Promise; } //# sourceMappingURL=OtaImageWriter.d.ts.map