/// <reference types="node" />
import { Tx } from '@node-dlc/bitcoin';
import { EventEmitter } from 'events';
import { DlcTransactions } from '../messages/DlcTransactions';
import { IDlcStore } from './DlcStore';
import { HasHash, HasHeight, IChainFilterChainClient } from './IChainFilterChainClient';
export declare enum SyncState {
    Unsynced = 0,
    Syncing = 1,
    Synced = 2
}
export interface ILogger {
    area: string;
    instance: string;
    trace(...args: any[]): void;
    debug(...args: any[]): void;
    info(...args: any[]): void;
    warn(...args: any[]): void;
    error(...args: any[]): void;
    sub(area: string, instance?: string): ILogger;
}
/**
 * ChainManager validates and stores dlc txs
 * from chain updates
 */
export declare class ChainManager extends EventEmitter {
    blockHeight: number;
    started: boolean;
    syncState: SyncState;
    isSynchronizing: boolean;
    chainClient: IChainFilterChainClient;
    logger: ILogger;
    dlcStore: IDlcStore;
    dlcTxsList: DlcTransactions[];
    constructor(logger: ILogger, chainClient: IChainFilterChainClient, dlcStore: IDlcStore);
    /**
     * Starts the chain manager. This method will load information
     * from the chain store, determine when the last information
     * was obtained, validate the existing messages
     */
    start(blockHeight?: number): Promise<void>;
    updateFundBroadcast(dlcTxs: DlcTransactions): Promise<void>;
    updateCloseBroadcast(dlcTxs: DlcTransactions): Promise<void>;
    updateFundEpoch(dlcTxs: DlcTransactions, block: HasHeight & HasHash): Promise<void>;
    updateCloseEpoch(dlcTxs: DlcTransactions, tx: Tx, block: HasHeight & HasHash): Promise<void>;
    private _restoreState;
    private _validateUtxos;
    private _validateClosingUtxos;
    private _checkOutpoints;
}
