UNPKG

@ledgerhq/live-common

Version:
33 lines 1.63 kB
import { DeviceId } from "@ledgerhq/types-live"; import { FullActionState } from "./core"; import { ToggleOnboardingEarlyCheckTaskError } from "../tasks/toggleOnboardingEarlyCheck"; import { Observable } from "rxjs"; export type ToggleOnboardingEarlyCheckActionArgs = { deviceId: DeviceId; deviceName: string | null; toggleType: "enter" | "exit"; }; export type ToggleOnboardingEarlyCheckActionErrorName = ToggleOnboardingEarlyCheckTaskError; export type ToggleOnboardingEarlyCheckActionState = FullActionState<{ toggleStatus: "none" | "success" | "failure"; error: { type: "ToggleOnboardingEarlyCheckError"; name: ToggleOnboardingEarlyCheckActionErrorName; } | null; }>; export declare const initialState: ToggleOnboardingEarlyCheckActionState; /** * During the onboarding, makes the device enter or exit the early security check steps * * This action 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 action will emit * a "DeviceInInvalidState" event. * * @param deviceId A device id, or an empty string if device is usb plugged * @param toggleType either "enter" or "exit" * @returns An observable that emits updates on the of the onboarding early check toggling state */ export declare function toggleOnboardingEarlyCheckAction({ deviceId, deviceName, toggleType, }: ToggleOnboardingEarlyCheckActionArgs): Observable<ToggleOnboardingEarlyCheckActionState>; //# sourceMappingURL=toggleOnboardingEarlyCheck.d.ts.map