import type { UploadMetaFnParams, UploadDataFnParams, DownloadMetaFnParams, DownloadDataFnParams } from './types';
import type { AnyLink, Loader } from '@fireproof/encrypted-blockstore';
import { EventBlock } from '@alanshaw/pail/clock';
import { MemoryBlockstore } from '@alanshaw/pail/block';
import type { Link } from 'multiformats';
import { TaskManager } from './task-manager';
export type CarClockHead = Link<DbMetaEventBlock>[];
export type Connectable = {
    blockstore: {
        loader: Loader;
    };
    name: string;
};
export declare abstract class Connection {
    ready: Promise<any>;
    loaded: Promise<any>;
    eventBlocks: MemoryBlockstore;
    parents: CarClockHead;
    loader?: Loader;
    taskManager?: TaskManager;
    abstract metaUpload(bytes: Uint8Array, params: UploadMetaFnParams): Promise<Uint8Array[] | null>;
    abstract dataUpload(bytes: Uint8Array, params: UploadDataFnParams, opts?: {
        public?: boolean;
    }): Promise<void | AnyLink>;
    abstract metaDownload(params: DownloadMetaFnParams): Promise<Uint8Array[] | null>;
    abstract dataDownload(params: DownloadDataFnParams): Promise<Uint8Array | null>;
    constructor();
    setLoader(loader: Loader): void;
    refresh(): Promise<void>;
    connect({ loader }: {
        loader: Loader;
    }): void;
    connectMeta({ loader }: {
        loader: Loader;
    }): void;
    connectStorage({ loader }: {
        loader: Loader;
    }): void;
    createEventBlock(bytes: Uint8Array): Promise<DbMetaEventBlock>;
    decodeEventBlock(bytes: Uint8Array): Promise<DbMetaEventBlock>;
    getDashboardURL(compact?: boolean): Promise<URL>;
    openDashboard(): void;
}
export type DbMetaEventBlock = EventBlock<{
    dbMeta: Uint8Array;
}>;
