import { type AccountManager } from '../../core/account-manager.js';
import { type ConfigManager } from '../../core/config-manager.js';
import { type KeyManager } from '../../core/key-manager.js';
import { type ProfileManager } from '../../core/profile-manager.js';
import { type PlatformInstaller } from '../../core/platform-installer.js';
import { type K8Factory } from '../../integration/kube/k8-factory.js';
import { type ChartManager } from '../../core/chart-manager.js';
import { type CertificateManager } from '../../core/certificate-manager.js';
import { type SoloLogger } from '../../core/logging/solo-logger.js';
import { type AnyListrContext, type AnyObject, type ArgvStruct, type ConfigBuilder, type SkipCheck } from '../../types/aliases.js';
import { NodeSubcommandType } from '../../core/enumerations.js';
import { type Lock } from '../../core/lock/lock.js';
import { type SoloListr, type SoloListrTask } from '../../types/index.js';
import { type NodeAddContext } from './config-interfaces/node-add-context.js';
import { type NodeDestroyContext } from './config-interfaces/node-destroy-context.js';
import { type NodeUpdateContext } from './config-interfaces/node-update-context.js';
import { type NodeStatesContext } from './config-interfaces/node-states-context.js';
import { type NodeUpgradeContext } from './config-interfaces/node-upgrade-context.js';
import { type NodeRefreshContext } from './config-interfaces/node-refresh-context.js';
import { type NodeStopContext } from './config-interfaces/node-stop-context.js';
import { type NodeFreezeContext } from './config-interfaces/node-freeze-context.js';
import { type NodeStartContext } from './config-interfaces/node-start-context.js';
import { type NodeRestartContext } from './config-interfaces/node-restart-context.js';
import { type NodeSetupContext } from './config-interfaces/node-setup-context.js';
import { type NodeKeysContext } from './config-interfaces/node-keys-context.js';
import { type CheckedNodesContext } from './config-interfaces/node-common-config-class.js';
import { type RemoteConfigRuntimeStateApi } from '../../business/runtime-state/api/remote-config-runtime-state-api.js';
import { type ComponentFactoryApi } from '../../core/config/remote/api/component-factory-api.js';
import { type LocalConfigRuntimeState } from '../../business/runtime-state/config/local/local-config-runtime-state.js';
import { LockManager } from '../../core/lock/lock-manager.js';
import { type NodeConnectionsContext } from './config-interfaces/node-connections-context.js';
export type LeaseWrapper = {
    lease: Lock;
};
export declare class NodeCommandTasks {
    private readonly logger;
    private readonly accountManager;
    private readonly configManager;
    private readonly k8Factory;
    private readonly platformInstaller;
    private readonly keyManager;
    private readonly profileManager;
    private readonly chartManager;
    private readonly certificateManager;
    private readonly remoteConfig;
    private readonly localConfig;
    private readonly componentFactory;
    constructor(logger: SoloLogger, accountManager: AccountManager, configManager: ConfigManager, k8Factory: K8Factory, platformInstaller: PlatformInstaller, keyManager: KeyManager, profileManager: ProfileManager, chartManager: ChartManager, certificateManager: CertificateManager, remoteConfig: RemoteConfigRuntimeStateApi, localConfig: LocalConfigRuntimeState, componentFactory: ComponentFactoryApi);
    private getFileUpgradeId;
    private _prepareUpgradeZip;
    private _uploadUpgradeZip;
    private copyLocalBuildPathToNode;
    private _uploadPlatformSoftware;
    private _fetchPlatformSoftware;
    private _checkNodeActivenessTask;
    private _checkNetworkNodeActiveness;
    /** Return task for check if node proxies are ready */
    private _checkNodesProxiesTask;
    /**
     * When generating multiple all aliases are read from config.nodeAliases,
     * When generating a single key the alias in config.nodeAlias is used
     */
    private _generateGossipKeys;
    /**
     * When generating multiple all aliases are read from config.nodeAliases,
     * When generating a single key the alias in config.nodeAlias is used
     */
    private _generateGrpcTlsKeys;
    copyGrpcTlsCertificates(): SoloListrTask<NodeAddContext>;
    private _addStake;
    prepareUpgradeZip(): {
        title: string;
        task: (context_: any) => Promise<void>;
    };
    loadAdminKey(): SoloListrTask<NodeUpdateContext | NodeUpgradeContext | NodeDestroyContext>;
    checkExistingNodesStakedAmount(): SoloListrTask<NodeUpdateContext | NodeAddContext | NodeDestroyContext | NodeUpgradeContext>;
    sendPrepareUpgradeTransaction(): SoloListrTask<NodeUpdateContext | NodeAddContext | NodeDestroyContext | NodeUpgradeContext>;
    sendFreezeUpgradeTransaction(): SoloListrTask<NodeUpdateContext | NodeAddContext | NodeDestroyContext | NodeUpgradeContext>;
    sendFreezeTransaction(): SoloListrTask<NodeFreezeContext>;
    /** Download generated config files and key files from the network node,
     *  This function should only be called when updating or destroying a node
     * */
    downloadNodeGeneratedFilesForDynamicAddressBook(): SoloListrTask<NodeUpdateContext | NodeAddContext | NodeDestroyContext>;
    downloadNodeUpgradeFiles(): SoloListrTask<NodeUpgradeContext>;
    private taskCheckNetworkNodePods;
    /** Check if the network node pod is running */
    private checkNetworkNodePod;
    loadConfiguration(argv: ArgvStruct, leaseWrapper: LeaseWrapper, leaseManager: LockManager): {
        title: string;
        task: () => Promise<void>;
    };
    identifyExistingNodes(): SoloListrTask<CheckedNodesContext>;
    uploadStateFiles(skip: SkipCheck | boolean, stateFileDirectory?: string): {
        title: string;
        task: (context_: any) => Promise<void>;
        skip: boolean | SkipCheck;
    };
    identifyNetworkPods(maxAttempts?: number): {
        title: string;
        task: (context_: any, task: any) => import("listr2").Listr<CheckedNodesContext, any, any>;
    };
    fetchPlatformSoftware(aliasesField: string): SoloListrTask<NodeUpgradeContext | NodeUpdateContext | NodeAddContext | NodeDestroyContext | NodeRefreshContext | NodeSetupContext>;
    populateServiceMap(): SoloListrTask<NodeAddContext | NodeDestroyContext>;
    setupNetworkNodes(nodeAliasesProperty: string, isGenesis: boolean): SoloListrTask<NodeUpdateContext | NodeAddContext | NodeDestroyContext | NodeRefreshContext>;
    setupNetworkNodeFolders(): SoloListrTask<NodeSetupContext>;
    showUserMessages(): SoloListrTask<NodeStartContext>;
    setGrpcWebEndpoint(nodeAliasesProperty: string): SoloListrTask<NodeStartContext>;
    private generateNodeOverridesJson;
    /**
     * Generate genesis network json file
     * @param namespace - namespace
     * @param consensusNodes - consensus nodes
     * @param keysDirectory - keys directory
     * @param stagingDirectory - staging directory
     * @param domainNamesMapping
     */
    private generateGenesisNetworkJson;
    prepareStagingDirectory(nodeAliasesProperty: string): AnyListrContext;
    startNodes(nodeAliasesProperty: string): {
        title: string;
        task: (context_: any, task: any) => any;
    };
    enablePortForwarding(enablePortForwardHaProxy?: boolean): {
        title: string;
        task: (context_: any) => Promise<void>;
        skip: (context_: any) => boolean;
    };
    checkAllNodesAreActive(nodeAliasesProperty: string): SoloListrTask<AnyListrContext>;
    checkAllNodesAreFrozen(nodeAliasesProperty: string): {
        title: string;
        task: (context_: any, task: any) => SoloListr<any>;
    };
    checkNodeProxiesAreActive(): SoloListrTask<NodeStartContext | NodeRefreshContext | NodeRestartContext>;
    checkAllNodeProxiesAreActive(): SoloListrTask<NodeUpdateContext | NodeAddContext | NodeDestroyContext | NodeUpgradeContext>;
    triggerStakeWeightCalculate<T extends {
        config: AnyObject;
    }>(transactionType: NodeSubcommandType): SoloListrTask<T>;
    addNodeStakes(): SoloListrTask<NodeStartContext>;
    stakeNewNode(): SoloListrTask<NodeAddContext>;
    stopNodes(nodeAliasesProperty: string): SoloListrTask<NodeStopContext | NodeFreezeContext | NodeDestroyContext>;
    finalize(): SoloListrTask<AnyListrContext>;
    dumpNetworkNodesSaveState(): SoloListrTask<NodeRefreshContext>;
    getNodeLogsAndConfigs(): SoloListrTask<NodeUpdateContext | NodeAddContext | NodeDestroyContext | NodeUpgradeContext>;
    private checkLocalPort;
    private getComponentData;
    private extractDataFromGroup;
    private validateComponentData;
    testAccountCreation(): SoloListrTask<NodeConnectionsContext>;
    prepareDiagnosticsData(): SoloListrTask<NodeConnectionsContext>;
    validateLocalPorts(): SoloListrTask<AnyListrContext>;
    testRelay(): SoloListrTask<NodeConnectionsContext>;
    fetchAccountFromExplorer(): SoloListrTask<NodeConnectionsContext>;
    getNodeStateFiles(): SoloListrTask<NodeStatesContext>;
    checkPVCsEnabled(): SoloListrTask<AnyListrContext>;
    determineNewNodeAccountNumber(): SoloListrTask<NodeAddContext>;
    generateGossipKeys(): SoloListrTask<NodeKeysContext>;
    generateGossipKey(): SoloListrTask<NodeAddContext>;
    generateGrpcTlsKeys(): SoloListrTask<NodeKeysContext>;
    generateGrpcTlsKey(): SoloListrTask<NodeAddContext>;
    loadSigningKeyCertificate(): SoloListrTask<NodeAddContext>;
    computeMTLSCertificateHash(): SoloListrTask<NodeAddContext>;
    prepareGossipEndpoints(): SoloListrTask<NodeAddContext>;
    refreshNodeList(): SoloListrTask<NodeDestroyContext>;
    prepareGrpcServiceEndpoints(): SoloListrTask<NodeAddContext>;
    sendNodeUpdateTransaction(): SoloListrTask<NodeUpdateContext>;
    copyNodeKeysToSecrets(nodeListOverride?: string): SoloListrTask<NodeUpdateContext | NodeAddContext | NodeDestroyContext>;
    updateChartWithConfigMap(title: string, transactionType: NodeSubcommandType, skip?: SkipCheck | boolean): SoloListrTask<NodeDestroyContext | NodeAddContext | NodeUpdateContext>;
    /**
     * Builds the values args for update:
     * - Updates the selected node
     * - Keep the rest the same
     */
    private prepareValuesArgForNodeUpdate;
    /**
     * Builds the values args for add:
     * - Adds the new node
     * - Keeps the rest the same
     */
    private prepareValuesArgForNodeAdd;
    /**
     * Builds the values args for delete:
     * - Remove the specified node
     * - Keeps the rest the same
     */
    private prepareValuesArgForNodeDestroy;
    saveContextData(argv: ArgvStruct, targetFile: string, parser: (context_: AnyListrContext) => AnyObject): SoloListrTask<NodeUpdateContext | NodeAddContext | NodeDestroyContext>;
    loadContextData(argv: ArgvStruct, targetFile: string, parser: (context_: AnyListrContext, contextData: AnyObject) => void): SoloListrTask<AnyListrContext>;
    killNodes(transactionType?: NodeSubcommandType): SoloListrTask<NodeDestroyContext | NodeAddContext>;
    killNodesAndUpdateConfigMap(): SoloListrTask<NodeUpdateContext>;
    checkNodePodsAreRunning(): SoloListrTask<NodeUpdateContext | NodeAddContext | NodeDestroyContext>;
    sleep(title: string, milliseconds: number): SoloListrTask<AnyListrContext>;
    downloadLastState(): SoloListrTask<NodeAddContext>;
    uploadStateToNewNode(): SoloListrTask<NodeAddContext>;
    sendNodeDeleteTransaction(): SoloListrTask<NodeDestroyContext>;
    sendNodeCreateTransaction(): SoloListrTask<NodeAddContext>;
    initialize(argv: ArgvStruct, configInit: ConfigBuilder, lease: Lock | null, shouldLoadNodeClient?: boolean): SoloListrTask<AnyListrContext>;
    addNewConsensusNodeToRemoteConfig(): SoloListrTask<NodeAddContext>;
    downloadHieroComponentLogs(customOutputDirectory?: string): SoloListrTask<AnyListrContext>;
    private downloadPodLogs;
    private downloadBlockNodeLogFiles;
}
