import type { Key } from '@hashgraph/sdk';
import { AccountId, Client, PrivateKey } from '@hashgraph/sdk';
import type { NetworkNodeServices } from './network_node_services.js';
import { SoloLogger } from './logging.js';
import { K8 } from './k8.js';
import { type AccountIdWithKeyPairObject } from '../types/index.js';
import { type NodeAlias } from '../types/aliases.js';
export declare class AccountManager {
    private readonly logger?;
    private readonly k8?;
    private _portForwards;
    _nodeClient: Client | null;
    constructor(logger?: SoloLogger, k8?: K8);
    /**
     * Gets the account keys from the Kubernetes secret from which it is stored
     * @param accountId - the account ID for which we want its keys
     * @param namespace - the namespace that is storing the secret
     */
    getAccountKeysFromSecret(accountId: string, namespace: string): Promise<AccountIdWithKeyPairObject>;
    /**
     * Gets the treasury account private key from Kubernetes secret if it exists, else
     * returns the Genesis private key, then will return an AccountInfo object with the
     * accountId, ed25519PrivateKey, publicKey
     * @param namespace - the namespace that the secret is in
     */
    getTreasuryAccountKeys(namespace: string): Promise<AccountIdWithKeyPairObject>;
    /**
     * batch up the accounts into sets to be processed
     * @param [accountRange]
     * @returns an array of arrays of numbers representing the accounts to update
     */
    batchAccounts(accountRange?: number[][]): number[][];
    /** stops and closes the port forwards and the _nodeClient */
    close(): Promise<void>;
    /**
     * loads and initializes the Node Client
     * @param namespace - the namespace of the network
     */
    loadNodeClient(namespace: string): Promise<Client>;
    /**
     * loads and initializes the Node Client, throws a SoloError if anything fails
     * @param namespace - the namespace of the network
     * @param skipNodeAlias - the node alias to skip
     */
    refreshNodeClient(namespace: string, skipNodeAlias?: NodeAlias): Promise<Client>;
    /**
     * if the load balancer IP is not set, then we should use the local host port forward
     * @param networkNodeServices
     * @returns whether to use the local host port forward
     */
    private shouldUseLocalHostPortForward;
    /**
     * Returns a node client that can be used to make calls against
     * @param namespace - the namespace for which the node client resides
     * @param networkNodeServicesMap - a map of the service objects that proxy the nodes
     * @param operatorId - the account id of the operator of the transactions
     * @param operatorKey - the private key of the operator of the transactions
     * @param skipNodeAlias - the node alias to skip
     * @returns a node client that can be used to call transactions
     */
    _getNodeClient(namespace: string, networkNodeServicesMap: Map<string, NetworkNodeServices>, operatorId: string, operatorKey: string, skipNodeAlias: string): Promise<Client>;
    /**
     * pings the node client at a set interval, can throw an exception if the ping fails
     * @param operatorId
     * @private
     */
    private startIntervalPinger;
    private configureNodeAccess;
    /**
     * pings the network node to ensure that the connection is working
     * @param obj - the object containing the network node service and the account id
     * @param accountId - the account id to ping
     * @throws {@link SoloError} if the ping fails
     * @private
     */
    private testNodeClientConnection;
    /**
     * Gets a Map of the Hedera node services and the attributes needed, throws a SoloError if anything fails
     * @param namespace - the namespace of the solo network deployment
     * @returns a map of the network node services
     */
    getNodeServiceMap(namespace: string): Promise<Map<`node${number}`, NetworkNodeServices>>;
    /**
     * updates a set of special accounts keys with a newly generated key and stores them in a Kubernetes secret
     * @param namespace the namespace of the nodes network
     * @param currentSet - the accounts to update
     * @param updateSecrets - whether to delete the secret prior to creating a new secret
     * @param resultTracker - an object to keep track of the results from the accounts that are being updated
     * @returns the updated resultTracker object
     */
    updateSpecialAccountsKeys(namespace: string, currentSet: number[], updateSecrets: boolean, resultTracker: {
        skippedCount: number;
        rejectedCount: number;
        fulfilledCount: number;
    }): Promise<{
        skippedCount: number;
        rejectedCount: number;
        fulfilledCount: number;
    }>;
    /**
     * update the account keys for a given account and store its new key in a Kubernetes secret
     * @param namespace - the namespace of the nodes network
     * @param accountId - the account that will get its keys updated
     * @param genesisKey - the genesis key to compare against
     * @param updateSecrets - whether to delete the secret prior to creating a new secret
     * @returns the result of the call
     */
    updateAccountKeys(namespace: string, accountId: AccountId, genesisKey: PrivateKey, updateSecrets: boolean): Promise<{
        value: string;
        status: string;
    } | {
        reason: string;
        value: string;
        status: string;
    }>;
    /**
     * gets the account info from Hedera network
     * @param accountId - the account
     * @returns the private key of the account
     */
    accountInfoQuery(accountId: AccountId | string): Promise<import("@hashgraph/sdk").AccountInfo>;
    /**
     * gets the account private and public key from the Kubernetes secret from which it is stored
     * @param accountId - the account
     * @returns the private key of the account
     */
    getAccountKeys(accountId: AccountId | string): Promise<Key[]>;
    /**
     * send an account key update transaction to the network of nodes
     * @param accountId - the account that will get its keys updated
     * @param newPrivateKey - the new private key
     * @param oldPrivateKey - the genesis key that is the current key
     * @returns whether the update was successful
     */
    sendAccountKeyUpdate(accountId: AccountId | string, newPrivateKey: PrivateKey | string, oldPrivateKey: PrivateKey | string): Promise<boolean>;
    /**
     * creates a new Hedera account
     * @param namespace - the namespace to store the Kubernetes key secret into
     * @param privateKey - the private key of type PrivateKey
     * @param amount - the amount of HBAR to add to the account
     * @param [setAlias] - whether to set the alias of the account to the public key, requires the ed25519PrivateKey supplied to be ECDSA
     * @returns a custom object with the account information in it
     */
    createNewAccount(namespace: string, privateKey: PrivateKey, amount: number, setAlias?: boolean): Promise<{
        accountId: string;
        privateKey: string;
        publicKey: string;
        balance: number;
        accountAlias?: string;
    }>;
    /**
     * transfer the specified amount of HBAR from one account to another
     * @param fromAccountId - the account to pull the HBAR from
     * @param toAccountId - the account to put the HBAR
     * @param hbarAmount - the amount of HBAR
     * @returns if the transaction was successfully posted
     */
    transferAmount(fromAccountId: AccountId | string, toAccountId: AccountId | string, hbarAmount: number): Promise<boolean>;
    /**
     * Fetch and prepare address book as a base64 string
     */
    prepareAddressBookBase64(): Promise<string>;
    getFileContents(namespace: string, fileNum: number): Promise<string>;
    /**
     * Pings the network node with a grpc call to ensure it is working, throws a SoloError if the ping fails
     * @param obj - the network node object where the key is the network endpoint and the value is the account id
     * @param accountId - the account id to ping
     * @throws {@link SoloError} if the ping fails
     * @private
     */
    private pingNetworkNode;
}
