import { QueryPropagate, QueryResponse } from '@logsn/protocol';
import { EthereumAddress } from '@streamr/utils';
import { SystemMessageValue } from '../SystemMessageObservable';
import type { SerializedMessageId } from './manageStorageMatrix';
export type PropagatedNessagesByNodeMap = Map<EthereumAddress, Set<SerializedMessageId>>;
/**
 * This function gets the messages that are missing from the primary node.
 * It is necessary because every secondary node must warn the primary node about what messages are missing.
 */
export declare function getMissingPropagatedMessages({ expectedPropagatedMessages, propagates, }: {
    expectedPropagatedMessages: PropagatedNessagesByNodeMap;
    propagates: SystemMessageValue<QueryPropagate>[];
}): [EthereumAddress, Set<string>][];
/**
 * every secondary node must warn the primary node about what messages are missing
 * so if they have more messages than primary's, we flag it as expected from this address
 */
export declare function getExpectedPropagatedMessages({ secondaryNodeResponses, primaryNodeResponse, }: {
    secondaryNodeResponses: SystemMessageValue<QueryResponse>[];
    primaryNodeResponse: SystemMessageValue<QueryResponse>;
}): PropagatedNessagesByNodeMap;
