/// import type { Blockchain } from './blockchain'; import type { BlockHeader } from './primitives'; import { Event } from './event'; import { Logger } from './logger'; /** * This is used to get a non synchronous chain of block events from the blockchain * As blocks are added and removed, this system will call onAdd() and onRemove() in * a guaranteed correct order. If you have this chain: * G -> A1 * * You'll get * - onAdd(G) * - onAdd(A1) * * If you then reorg and have received * G -> A1 * -> B1 -> B2 * * - onAdd(G) * - onAdd(A1) * - onRemove(A1) * - onAdd(B1) * - onAdd(B2) */ export declare class ChainProcessor { chain: Blockchain; hash: Buffer | null; sequence: number | null; logger: Logger; onAdd: Event<[block: BlockHeader]>; onRemove: Event<[block: BlockHeader]>; maxQueueSize: number | null; constructor(options: { logger?: Logger; chain: Blockchain; head: Buffer | null; maxQueueSize?: number | null; }); private add; private remove; update({ signal }?: { signal?: AbortSignal; }): Promise<{ hashChanged: boolean; }>; } //# sourceMappingURL=chainProcessor.d.ts.map