import { AnyLink, DocUpdate, MapFn, DocFragment, StaticProllyOptions, BlockFetcher, ProllyNode, IndexKey, IndexUpdate, QueryOpts, IndexRow } from './types';
import { Transaction } from './transaction';
import { CRDT } from './crdt';
export declare class IndexTree {
    cid: AnyLink | null;
    root: ProllyNode | null;
}
export declare const byKeyOpts: StaticProllyOptions;
export declare const byIdOpts: StaticProllyOptions;
export declare function indexEntriesForChanges(changes: DocUpdate[], mapFn: MapFn): {
    key: [string, string];
    value: DocFragment;
}[];
export declare function bulkIndex(tblocks: Transaction, inIndex: IndexTree, indexEntries: IndexUpdate[], opts: StaticProllyOptions): Promise<IndexTree>;
export declare function loadIndex(tblocks: BlockFetcher, cid: AnyLink, opts: StaticProllyOptions): Promise<ProllyNode>;
export declare function applyQuery(crdt: CRDT, resp: {
    result: IndexRow[];
}, query: QueryOpts): Promise<{
    rows: IndexRow[];
}>;
export declare function encodeRange(range: [DocFragment, DocFragment]): [IndexKey, IndexKey];
export declare function encodeKey(key: string): string;
