ipfsd-ctl
Version:
Spawn IPFS Daemons, Kubo or...
46 lines • 1.49 kB
TypeScript
import type { KuboNode, KuboInfo, KuboInitOptions, KuboOptions, KuboStartOptions, KuboStopOptions } from './index.js';
import type { KuboRPCClient } from 'kubo-rpc-client';
/**
* Node for daemon nodes
*/
export default class KuboDaemon implements KuboNode {
options: KuboOptions & Required<Pick<KuboOptions, 'rpc'>>;
private readonly disposable;
private subprocess?;
private _api?;
private readonly repo;
private readonly stdout;
private readonly stderr;
private readonly _exec?;
private readonly env;
private readonly initArgs?;
private readonly startArgs?;
private readonly stopArgs?;
constructor(options: KuboOptions);
get api(): KuboRPCClient;
get exec(): string;
info(): Promise<KuboInfo>;
/**
* Delete the repo that was being used. If the node was marked as disposable
* this will be called automatically when the process is exited.
*/
cleanup(): Promise<void>;
init(args?: KuboInitOptions): Promise<void>;
/**
* Start the daemon
*/
start(args?: KuboStartOptions): Promise<void>;
stop(options?: KuboStopOptions): Promise<void>;
/**
* Call `ipfs config`
*
* If no `key` is passed, the whole config is returned as an object.
*/
_getConfig(): Promise<any>;
/**
* Replace the current config with the provided one
*/
_replaceConfig(config: any): Promise<void>;
private getVersion;
}
//# sourceMappingURL=daemon.d.ts.map