UNPKG

@ledgerhq/live-common

Version:
47 lines 2.09 kB
import { SeedPhraseType } from "@ledgerhq/types-live"; export declare const fromSeedPhraseTypeToNbOfSeedWords: Map<SeedPhraseType, number>; export declare enum OnboardingStep { WelcomeScreen1 = "WELCOME_SCREEN_1", WelcomeScreen2 = "WELCOME_SCREEN_2", WelcomeScreen3 = "WELCOME_SCREEN_3", WelcomeScreen4 = "WELCOME_SCREEN_4", WelcomeScreenReminder = "WELCOME_SCREEN_REMINDER", OnboardingEarlyCheck = "ONBOARDING_EARLY_CHECK", ChooseName = "CHOOSE_NAME", Pin = "PIN", SetupChoice = "SETUP_CHOICE", NewDevice = "NEW_DEVICE",// path "new device" & currentSeedWordIndex available NewDeviceConfirming = "NEW_DEVICE_CONFIRMING",// path "new device" & currentSeedWordIndex available SetupChoiceRestore = "SETUP_CHOICE_RESTORE",// choosing between restoring a see directly (RestoreSeed) or use Recover (RecoverRestore) RestoreSeed = "RESTORE_SEED",// path "restore seed" & currentSeedWordIndex available RecoverRestore = "RECOVER_RESTORE",// path "restore with Recover" SafetyWarning = "SAFETY WARNING", Ready = "READY", BackupCharon = "BACKUP_CHARON", RestoreCharon = "RESTORE_CHARON" } export type OnboardingState = { isOnboarded: boolean; isInRecoveryMode: boolean; seedPhraseType: SeedPhraseType; currentOnboardingStep: OnboardingStep; currentSeedWordIndex: number; charonSupported: boolean; charonStatus: CharonStatus | null; }; export declare enum CharonStatus { Rejected = 1, Choice = 2, Running = 3, Naming = 4, Ready = 5 } export declare const fromBitsToCharonStatusMap: Map<number, CharonStatus>; /** * Extracts the onboarding state of the device * @param flagsBytes Buffer of bytes of length onboardingFlagsBytesLength representing the device state flags * @param charonStatusFlags Buffer of bytes of length charonStatusFlagsLength representing the charon status flags * @returns An OnboardingState */ export declare const extractOnboardingState: (flagsBytes: Buffer, charonState?: Buffer) => OnboardingState; //# sourceMappingURL=extractOnboardingState.d.ts.map