@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
20 lines • 1.01 kB
TypeScript
import { Observable } from "rxjs";
import Transport from "@ledgerhq/hw-transport";
import type { DeviceInfo } from "@ledgerhq/types-live";
export type FlashMcuOrBootloaderCommandRequest = {
targetId: DeviceInfo["targetId"];
version: string;
};
export type FlashMcuCommandEvent = {
type: "progress";
progress: number;
};
/**
* Creates a scriptrunner connection with the /mcu API endpoint of the HSM in order to flash the MCU
* or the Bootloader of a device (both use the same endpoint with version different parameters)
* @param transport The transport object to contact the device
* @param param1 The versions details of the MCU or Bootloader to be installed
* @returns An observable that emits the events according to the progression of the firmware installation
*/
export declare function flashMcuOrBootloaderCommand(transport: Transport, { targetId, version }: FlashMcuOrBootloaderCommandRequest): Observable<FlashMcuCommandEvent>;
//# sourceMappingURL=flashMcuOrBootloader.d.ts.map