UNPKG

ipfsd-ctl

Version:
36 lines 1.26 kB
import ControllerRemote from './ipfsd-client.js'; import type { Controller, ControllerOptions, ControllerOptionsOverrides, Factory } from './index.js'; export interface ControllerOptionsOverridesWithEndpoint { js?: ControllerOptionsWithEndpoint; go?: ControllerOptionsWithEndpoint; proc?: ControllerOptionsWithEndpoint; } export interface ControllerOptionsWithEndpoint extends ControllerOptions { endpoint: string; } /** * Factory class to spawn ipfsd controllers */ declare class DefaultFactory implements Factory { opts: ControllerOptionsWithEndpoint; controllers: Controller[]; private readonly overrides; constructor(options?: ControllerOptions, overrides?: ControllerOptionsOverrides); /** * Utility method to get a temporary directory * useful in browsers to be able to generate temp * repos manually */ tmpDir(options?: ControllerOptions): Promise<string>; _spawnRemote(options: ControllerOptionsWithEndpoint): Promise<ControllerRemote>; /** * Spawn an IPFSd Controller */ spawn(options?: ControllerOptions): Promise<Controller>; /** * Stop all controllers */ clean(): Promise<void>; } export default DefaultFactory; //# sourceMappingURL=factory.d.ts.map