import type { DfuOptions } from './specs/NativeDfuNitro.nitro'; import { DfuState, DfuError } from './specs/NativeDfuNitro.nitro'; export interface DfuProgress { part: number; totalParts: number; progress: number; currentSpeed: number; avgSpeed: number; } export interface DfuManagerOptions extends DfuOptions { onStateChange?: (state: DfuState) => void; onProgress?: (progress: DfuProgress) => void; } export declare class DfuException extends Error { readonly code: DfuError; constructor(code: DfuError, message: string); } export declare class DfuNitroManager { private readonly native; constructor(); /** * Start a DFU process. Returns a Promise that resolves when the DFU * completes successfully, or rejects with a `DfuException` on error/abort. * * Use `onStateChange` and `onProgress` in options to receive live updates. */ startDfu(options: DfuManagerOptions): Promise; /** Pause the current DFU process. */ pause(): void; /** Resume a paused DFU process. */ resume(): void; /** Abort the current DFU process. */ abort(): void; } //# sourceMappingURL=manager.d.ts.map