import { P2P, StateManager } from '@shardeum-foundation/lib-types';
import * as ShardusTypes from '../shardus/shardus-types';
import { Cycle, CycleShardData } from '../state-manager/state-manager-types';
import { hashMap } from './partition-gossip';
import { NetworkClass } from '../network';
/** TYPES */
type txId = string;
type txId2 = string;
type ReceiptMap = Map<txId, txId2[]>;
export declare function calculatePartitionBlock(shard: {
    ourStoredPartitions: number[];
}): Map<number, ReceiptMap>;
export declare function createNetworkHash(hashes: Map<number, string>): P2P.SnapshotTypes.NetworkStateHash;
export declare function updateStateHashesByCycleMap(counter: Cycle['counter'], stateHash: P2P.SnapshotTypes.StateHashes, stateHashesByCycle: Iterable<readonly [number, P2P.SnapshotTypes.StateHashes]>): Map<number, P2P.SnapshotTypes.StateHashes>;
export declare function updateReceiptHashesByCycleMap(counter: Cycle['counter'], receiptHash: P2P.SnapshotTypes.ReceiptHashes, receiptHashesByCycle: Iterable<readonly [number, P2P.SnapshotTypes.ReceiptHashes]>): Map<number, P2P.SnapshotTypes.ReceiptHashes>;
export declare function updateSummaryHashesByCycleMap(counter: Cycle['counter'], summaryHashes: P2P.SnapshotTypes.SummaryHashes, summaryHashesByCycle: Iterable<readonly [number, P2P.SnapshotTypes.SummaryHashes]>): Map<number, P2P.SnapshotTypes.SummaryHashes>;
export declare function savePartitionAndNetworkHashes(shard: CycleShardData, partitionHashes: hashMap, networkHash: P2P.SnapshotTypes.NetworkStateHash): Promise<void>;
export declare function saveReceiptAndNetworkHashes(shard: CycleShardData, receiptMapHashes: hashMap, networkReceiptHash: P2P.SnapshotTypes.NetworkReceiptHash): Promise<void>;
export declare function saveSummaryAndNetworkHashes(shard: CycleShardData, summaryHashes: hashMap, summaryReceiptHash: P2P.SnapshotTypes.NetworkSummarytHash): Promise<void>;
export declare function readOldCycleRecord(): Promise<P2P.CycleCreatorTypes.CycleRecord>;
export declare function readOldNetworkHash(): Promise<{
    hash: string;
}>;
export declare function readOldPartitionHashes(): Promise<{
    hash: string;
    partitionId: string;
}[]>;
export declare function calculateOldDataMap(shardGlobals: StateManager.shardFunctionTypes.ShardGlobals, nodeShardDataMap: StateManager.shardFunctionTypes.NodeShardDataMap, oldPartitionHashMap: Map<number, string>, lastSnapshotCycle: number): Promise<Map<P2P.SnapshotTypes.PartitionNum, ShardusTypes.AccountsCopy[]>>;
export declare function copyOldDataToDataToMigrate(oldDataMap: Map<number, ShardusTypes.AccountsCopy[]>, dataToMigrate: Map<number, ShardusTypes.AccountsCopy[]>): void;
export declare function getMissingPartitions(shardGlobals: StateManager.shardFunctionTypes.ShardGlobals, oldDataMap: Map<number, ShardusTypes.AccountsCopy[]>): number[];
export declare function registerDownloadRoutes(network: NetworkClass, oldDataMap: Map<number, ShardusTypes.AccountsCopy[]>, oldPartitionHashMap: Map<number, string>): void;
export declare function downloadDataFromNode(url: string): Promise<unknown>;
/** If necessary, convert `inputMap` to a plan object. If the value passed to
 * this function is a `Map`, it will be converted. if it is not a `Map`,
 * we'll just return the value as it was passed. */
export declare function convertMapToObj(inputMap: Map<symbol, unknown> | object): object;
export {};
