@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
33 lines • 1.45 kB
TypeScript
import { Observable } from "rxjs";
import type { DeviceId } from "@ledgerhq/types-live";
import { SharedTaskEvent } from "./core";
export type ToggleOnboardingEarlyCheckTaskError = "DeviceInInvalidState" | "InternalError" | "Unknown";
export type ToggleOnboardingEarlyCheckTaskErrorEvent = {
type: "taskError";
error: ToggleOnboardingEarlyCheckTaskError;
};
export type ToggleOnboardingEarlyCheckTaskEvent = {
type: "success";
} | ToggleOnboardingEarlyCheckTaskErrorEvent | SharedTaskEvent;
export type ToggleOnboardingEarlyCheckTaskArgs = {
deviceId: DeviceId;
deviceName: string | null;
toggleType: "enter" | "exit";
};
/**
* During the onboarding, makes the device enter or exit the early security check steps
*
* This task only puts (or moves out) the device to the state/step of the early security check.
* It does not starts any "security checks".
*
* If the device is not in the WELCOME or WELCOME_STEP2 onboarding state, this task will emit
* a "DeviceInInvalidState" event.
*
* @param deviceId The id of the targeted device
* @param toggleType either "enter" or "exit"
* @returns An observable that emits a success, error or shared-task event
*/
export declare const toggleOnboardingEarlyCheckTask: (args: ToggleOnboardingEarlyCheckTaskArgs) => Observable<SharedTaskEvent | ToggleOnboardingEarlyCheckTaskErrorEvent | {
type: "success";
}>;
//# sourceMappingURL=toggleOnboardingEarlyCheck.d.ts.map