import { CarReader } from '@ipld/car';
import { Transaction } from './transaction';
import { AnyBlock, AnyLink, BulkResult, DbCarHeader, IdxCarHeader, IndexerResult } from './types';
import { BlockView, CID } from 'multiformats';
import { CarStore, HeaderStore } from './store';
declare abstract class Loader {
    name: string;
    headerStore: HeaderStore | undefined;
    carStore: CarStore | undefined;
    carLog: AnyLink[];
    carReaders: Map<string, CarReader>;
    ready: Promise<DbCarHeader | IdxCarHeader>;
    constructor(name: string);
    commit(t: Transaction, done: IndexerResult | BulkResult, compact?: boolean): Promise<AnyLink>;
    protected loadCar(cid: AnyLink): Promise<CarReader>;
    protected ingestCarHead(cid?: AnyLink): Promise<DbCarHeader | IdxCarHeader>;
    protected getMoreReaders(cids: AnyLink[]): Promise<void>;
    getBlock(cid: CID): Promise<AnyBlock | undefined>;
    protected abstract this_parseCarFile(_reader: CarReader): Promise<DbCarHeader | IdxCarHeader>;
    protected abstract this_makeCarFile(_t: Transaction, _result: BulkResult | IndexerResult, _cars: AnyLink[], _compact: boolean): Promise<BlockView<unknown, number, number, 1>>;
    protected abstract this_defaultCarHeader(): DbCarHeader | IdxCarHeader;
}
export declare class DbLoader extends Loader {
    ready: Promise<DbCarHeader>;
    protected this_parseCarFile(reader: CarReader): Promise<DbCarHeader>;
    protected this_makeCarFile(t: Transaction, result: BulkResult, cars: AnyLink[], compact?: boolean): Promise<BlockView<unknown, number, number, 1>>;
    protected this_defaultCarHeader(): DbCarHeader;
}
export declare class IdxLoader extends Loader {
    ready: Promise<IdxCarHeader>;
    protected this_parseCarFile(reader: CarReader): Promise<IdxCarHeader>;
    protected this_makeCarFile(t: Transaction, result: IndexerResult, cars: AnyLink[], compact?: boolean): Promise<BlockView<unknown, number, number, 1>>;
    protected this_defaultCarHeader(): IdxCarHeader;
}
export {};
