@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
20 lines • 1.17 kB
TypeScript
import { $Shape } from "utility-types";
import { AppOp, State, Action, ListAppsResult, AppsDistribution } from "./types";
import { App } from "@ledgerhq/types-live";
export declare const initState: ({ deviceModelId, appsListNames, installed, appByName, ...listAppsResult }: ListAppsResult, appsToRestore?: string[]) => State;
export declare const reducer: (state: State, action: Action) => State;
declare const defaultConfig: {
warnMemoryRatio: number;
sortApps: boolean;
};
export declare const distribute: (state: State, config?: $Shape<typeof defaultConfig>) => AppsDistribution;
export declare function getBlockSize(state: State): number;
export declare const isIncompleteState: (state: State) => boolean;
export declare const isOutOfMemoryState: (state: State) => boolean;
export declare const isLiveSupportedApp: (app: App) => boolean;
export declare const updateAllProgress: (state: State) => number;
export declare const getActionPlan: (state: State) => AppOp[];
export declare const getNextAppOp: (state: State) => AppOp | null | undefined;
export declare const predictOptimisticState: (state: State) => State;
export {};
//# sourceMappingURL=logic.d.ts.map