///
import { Provider } from '@fuel-ts/providers';
import type { ChildProcessWithoutNullStreams } from 'child_process';
import type { WalletUnlocked } from '../wallets';
export type LaunchNodeOptions = {
ip?: string;
port?: string;
args?: string[];
useSystemFuelCore?: boolean;
loggingEnabled?: boolean;
debugEnabled?: boolean;
basePath?: string;
};
export type LaunchNodeResult = Promise<{
cleanup: () => void;
ip: string;
port: string;
chainConfigPath: string;
}>;
export type KillNodeParams = {
child: ChildProcessWithoutNullStreams;
configPath: string;
killFn: (pid: number) => void;
state: {
isDead: boolean;
};
};
export declare const killNode: (params: KillNodeParams) => void;
/**
* Launches a fuel-core node.
* @param ip - the ip to bind to. (optional, defaults to 0.0.0.0)
* @param port - the port to bind to. (optional, defaults to 4000 or the next available port)
* @param args - additional arguments to pass to fuel-core.
* @param useSystemFuelCore - whether to use the system fuel-core binary or the one provided by the \@fuel-ts/fuel-core package.
* @param loggingEnabled - whether the node should output logs. (optional, defaults to true)
* @param debugEnabled - whether the node should log debug messages. (optional, defaults to false)
* @param basePath - the base path to use for the temporary folder. (optional, defaults to os.tmpdir())
* */
export declare const launchNode: ({ ip, port, args, useSystemFuelCore, loggingEnabled, debugEnabled, basePath, }: LaunchNodeOptions) => LaunchNodeResult;
export type LaunchNodeAndGetWalletsResult = Promise<{
wallets: WalletUnlocked[];
stop: () => void;
provider: Provider;
}>;
/**
* Launches a fuel-core node and returns a provider, 10 wallets, and a cleanup function to stop the node.
* @param launchNodeOptions - options to launch the fuel-core node with.
* @param walletCount - the number of wallets to generate. (optional, defaults to 10)
* */
export declare const launchNodeAndGetWallets: ({ launchNodeOptions, walletCount, }?: {
launchNodeOptions?: Partial | undefined;
walletCount?: number | undefined;
}) => LaunchNodeAndGetWalletsResult;
//# sourceMappingURL=launchNode.d.ts.map