UNPKG

@ledgerhq/live-common

Version:
32 lines 1.3 kB
import React from "react"; import { LiveAppRegistry } from "./types"; import { AppPlatform, LiveAppManifest, Loadable } from "../../types"; import { AppManifest, Visibility } from "../../../wallet-api/types"; type LiveAppContextType = { state: Loadable<LiveAppRegistry>; provider: string; setProvider: React.Dispatch<React.SetStateAction<string>>; updateManifests: () => Promise<void>; }; export declare const liveAppContext: React.Context<LiveAppContextType>; type FetchLiveAppCatalogPrams = { apiVersions?: string[]; platform: AppPlatform; allowDebugApps: boolean; allowExperimentalApps: boolean; llVersion: string; lang?: string; }; type LiveAppProviderProps = { children: React.ReactNode; parameters: FetchLiveAppCatalogPrams; updateFrequency: number; }; export declare function useRemoteLiveAppManifest(appId?: string): LiveAppManifest | undefined; export declare function useRemoteLiveAppContext(): LiveAppContextType; export declare function useManifests(options?: Partial<Omit<AppManifest, "visibility"> & { visibility: Visibility[]; }>): AppManifest[]; export declare function RemoteLiveAppProvider({ children, parameters, updateFrequency, }: LiveAppProviderProps): React.JSX.Element; export {}; //# sourceMappingURL=index.d.ts.map