import { NetworkType } from 'symbol-sdk';
import { Logger } from '../logger';
export declare type Password = string | false | undefined;
export declare class KnownError extends Error {
    readonly known = true;
}
/**
 * The operation to migrate the data.
 */
export interface Migration {
    readonly description: string;
    migrate(from: any): any;
}
export declare class BootstrapUtils {
    static readonly defaultTargetFolder = "target";
    static readonly targetNodesFolder = "nodes";
    static readonly targetGatewaysFolder = "gateways";
    static readonly targetExplorersFolder = "explorers";
    static readonly targetWalletsFolder = "wallets";
    static readonly targetDatabasesFolder = "databases";
    static readonly targetNemesisFolder = "nemesis";
    static readonly defaultWorkingDir = ".";
    static readonly CURRENT_USER = "current";
    private static readonly pulledImages;
    static readonly VERSION: any;
    /**
     * The folder where this npm module is installed. It defines where the default presets, configurations, etc are located.
     */
    static readonly ROOT_FOLDER: string;
    static stopProcess: boolean;
    private static onProcessListener;
    static getFilesRecursively(path: string): string[];
    static download(logger: Logger, url: string, dest: string): Promise<{
        downloaded: boolean;
        fileLocation: string;
    }>;
    static logSameLineMessage(message: string): void;
    static deleteFolder(logger: Logger, folder: string, excludeFiles?: string[]): void;
    private static deleteFolderRecursive;
    static deleteFile(file: string): void;
    static validateIsDefined(value: any, message: string): void;
    static validateIsTrue(value: boolean, message: string): void;
    static pullImage(logger: Logger, image: string): Promise<void>;
    static resolveRootFolder(): string;
    static runImageUsingExec(logger: Logger, { catapultAppFolder, image, userId, workdir, cmds, binds, }: {
        catapultAppFolder?: string;
        image: string;
        userId?: string;
        workdir?: string;
        cmds: string[];
        binds: string[];
    }): Promise<{
        stdout: string;
        stderr: string;
    }>;
    static toAns1(privateKey: string): string;
    static secureString(text: string): string;
    static sleep(ms: number): Promise<any>;
    static poll(logger: Logger, promiseFunction: () => Promise<boolean>, totalPollingTime: number, pollIntervalMs: number): Promise<boolean>;
    static generateConfiguration(templateContext: any, copyFrom: string, copyTo: string, excludeFiles?: string[], includeFiles?: string[]): Promise<void>;
    static chmodRecursive(path: string, mode: string | number): Promise<void>;
    static runTemplate(template: string, templateContext: any): string;
    static mkdir(path: string): Promise<void>;
    static mkdirParentFolder(fileName: string): Promise<void>;
    static writeYaml(path: string, object: any, password: string | undefined): Promise<void>;
    static pruneEmpty(obj: any): any;
    static toYaml(object: any): string;
    static fromYaml(yamlString: string): any;
    static loadYaml(fileLocation: string, password: Password): any;
    static loadFileAsText(fileLocation: string): string;
    static writeTextFile(path: string, text: string): Promise<void>;
    static readTextFile(path: string): Promise<string>;
    private static dockerUserId;
    static resolveDockerUserFromParam(logger: Logger, paramUser: string | undefined): Promise<string | undefined>;
    static createImageUsingExec(logger: Logger, targetFolder: string, dockerFile: string, tag: string): Promise<string>;
    static exec(logger: Logger, runCommand: string): Promise<{
        stdout: string;
        stderr: string;
    }>;
    static spawn(logger: Logger, command: string, args: string[], useLogger: boolean, logPrefix?: string): Promise<string>;
    static getDockerUserGroup(logger: Logger): Promise<string>;
    static isRoot(): boolean;
    static isWindows(): boolean;
    static validateFolder(workingDirFullPath: string): void;
    static getTargetFolder(target: string, absolute: boolean, ...paths: string[]): string;
    static getTargetNodesFolder(target: string, absolute: boolean, ...paths: string[]): string;
    static getTargetGatewayFolder(target: string, absolute: boolean, ...paths: string[]): string;
    static getTargetNemesisFolder(target: string, absolute: boolean, ...paths: string[]): string;
    static getTargetDatabasesFolder(target: string, absolute: boolean, ...paths: string[]): string;
    private static initialize;
    private static add;
    private static minus;
    static computerMemory(percentage: number): number;
    static toAmount(renderedText: string | number): string;
    static toHex(renderedText: string): string;
    static toSimpleHex(renderedText: string): string;
    static toJson(object: any): string;
    static formatJson(string: string): string;
    static splitCsv(object: string): string[];
    static toSeconds(serverDuration: string): number;
    static migrate<T extends {
        version?: number;
    }>(logger: Logger, entityName: string, versioned: T, migrations?: Migration[]): T;
    static getNetworkIdentifier(networkType: NetworkType): string;
    static getNetworkName(networkType: NetworkType): string;
    static resolveWorkingDirPath(workingDir: string, path: string): string;
    static createDerFile(privateKey: string, file: string): void;
    static isYmlFile(string: string): boolean;
    static validatePassword(password: string): string;
}
