import * as semver from 'semver';
import { ServiceEndpoint, type Long } from '@hiero-ledger/sdk';
import { type NodeAlias, type NodeAliases } from '../types/aliases.js';
import { type CommandFlag } from '../types/flag-types.js';
import { type SoloLogger } from './logging/solo-logger.js';
import { type Duration } from './time/duration.js';
import { type ConsensusNode } from './model/consensus-node.js';
import { type Optional } from '../types/index.js';
import { NamespaceName } from '../types/namespace/namespace-name.js';
import { type K8 } from '../integration/kube/k8.js';
import { type K8Factory } from '../integration/kube/k8-factory.js';
import { type ConfigManager } from './config-manager.js';
import { type Realm, type Shard } from './../types/index.js';
export declare function getInternalAddress(releaseVersion: semver.SemVer | string, namespaceName: NamespaceName, nodeAlias: NodeAlias): string;
export declare function getExternalAddress(consensusNode: ConsensusNode, k8: K8, useLoadBalancer: boolean): Promise<string>;
export declare function sleep(duration: Duration): Promise<void>;
export declare function parseNodeAliases(input: string, consensusNodes?: ConsensusNode[], configManager?: ConfigManager): NodeAliases;
export declare function splitFlagInput(input: string, separator?: string): string[];
/**
 * @param arr - The array to be cloned
 * @returns a new array with the same elements as the input array
 */
export declare function cloneArray<T>(array: T[]): T[];
export declare function getTemporaryDirectory(): string;
export declare function createBackupDirectory(destinationDirectory: string, prefix?: string, currentDate?: Date): string;
export declare function makeBackup(fileMap?: Map<string, string>, removeOld?: boolean): void;
export declare function backupOldTlsKeys(nodeAliases: NodeAliases, keysDirectory: string, currentDate?: Date, directoryPrefix?: string): string;
export declare function backupOldPemKeys(nodeAliases: NodeAliases, keysDirectory: string, currentDate?: Date, directoryPrefix?: string): string;
export declare function isNumeric(string_: string): boolean;
export declare function getEnvironmentValue(environmentVariableArray: string[], name: string): string;
export declare function parseIpAddressToUint8Array(ipAddress: string): Uint8Array<ArrayBuffer>;
/** If the basename of the src did not match expected basename, rename it first, then copy to destination */
export declare function renameAndCopyFile(sourceFilePath: string, expectedBaseName: string, destinationDirectory: string, logger: SoloLogger): void;
/**
 * Add debug options to valuesArg used by helm chart
 * @param valuesArg the valuesArg to update
 * @param debugNodeAlias the node ID to attach the debugger to
 * @param index the index of extraEnv to add the debug options to
 * @returns updated valuesArg
 */
export declare function addDebugOptions(valuesArgument: string, debugNodeAlias: NodeAlias, index?: number): string;
/**
 * Returns an object that can be written to a file without data loss.
 * Contains fields needed for adding a new node through separate commands
 * @param ctx
 * @returns file writable object
 */
export declare function addSaveContextParser(context_: any): Record<string, string>;
/**
 * Initializes objects in the context from a provided string
 * Contains fields needed for adding a new node through separate commands
 * @param ctx - accumulator object
 * @param ctxData - data in string format
 * @returns file writable object
 */
export declare function addLoadContextParser(context_: any, contextData: any): void;
export declare function prepareEndpoints(endpointType: string, endpoints: string[], defaultPort: number | string): ServiceEndpoint[];
/** Adds all the types of flags as properties on the provided argv object */
export declare function addFlagsToArgv(argv: any, flags: {
    required: CommandFlag[];
    optional: CommandFlag[];
}): any;
export declare function resolveValidJsonFilePath(filePath: string, defaultPath?: string): string;
export declare function prepareValuesFiles(valuesFile: string): string;
export declare function populateHelmArguments(valuesMapping: Record<string, string | boolean | number>): string;
/**
 * @param nodeAlias
 * @param consensusNodes
 * @returns context of the node
 */
export declare function extractContextFromConsensusNodes(nodeAlias: NodeAlias, consensusNodes: ConsensusNode[]): Optional<string>;
/**
 * Check if the namespace exists in the context of given consensus nodes
 * @param consensusNodes
 * @param k8Factory
 * @param namespace
 */
export declare function checkNamespace(consensusNodes: ConsensusNode[], k8Factory: K8Factory, namespace: NamespaceName): Promise<void>;
/**
 * Show a banner with the chart name and version
 * @param logger
 * @param chartName The name of the chart
 * @param version The version of the chart
 * @param type The action that was performed such as 'Installed' or 'Upgraded'
 */
export declare function showVersionBanner(logger: SoloLogger, chartName: string, version: string, type?: string): void;
/**
 * Check if the input is a valid IPv4 address
 * @param input
 * @returns true if the input is a valid IPv4 address, false otherwise
 */
export declare function isIPv4Address(input: string): boolean;
/**
 * Convert an IPv4 address to a base64 string
 * @param ipv4 The IPv4 address to convert
 * @returns The base64 encoded string representation of the IPv4 address
 */
export declare function ipv4ToBase64(ipv4: string): string;
export declare function entityId(shard: Shard, realm: Realm, number: Long | number | string): string;
export declare function withTimeout<T>(promise: Promise<T>, duration: Duration, errorMessage?: string): Promise<T>;
/**
 * Checks if a Docker image with the given name and tag exists locally.
 * @param imageName The name of the Docker image (e.g., "block-node-server").
 * @param imageTag The tag of the Docker image (e.g., "0.12.0").
 * @returns True if the image exists, false otherwise.
 */
export declare function checkDockerImageExists(imageName: string, imageTag: string): boolean;
