import * as native from './native'; import { SynXLib } from './native'; export declare type Session = { context: native.Pointer; user: number; token: string; }; export declare type LaunchOptions = { library: SynXLib; session: Session; automaticDispose: boolean; }; export declare type Launcher = { library: SynXLib; ready: boolean; session: Session; }; /** * Creates and sets up the Synapse X launcher, which is the final step required before the user * can launch a node. This must be done after the user has authenticated, but before the node * server is launched. **Do not forget to invoke `launcherDispose` when the software exits!** * If you want synapsekit to handle disposing for you, pass the `automaticDispose` option. */ export declare function launcher(options: LaunchOptions): Promise; /** * Disposes the Synapse X launcher, releasing all resources used by it. This should be called * when the software exits, or when the launcher is no longer needed. * @param launcher The launcher instance to dispose. * @returns A promise that resolves when the launcher has been disposed. * @throws If the launcher is not ready. * @throws If the launcher could not be disposed. */ export declare function launcherDispose(launcher: Launcher): Promise; /** * Updates the Synapse X installation. If `callback` is passed, then it will be invoked with update progress information, * such as the size of the content being downloaded, or how many files are left to download. Function completes when the * updating process has finished. If no update is available, this function will end almost instantly. */ export declare function launcherUpdate(launcher: Launcher, callback?: (progress: number, total: number) => void): Promise;