import { Abi } from 'eosjs/dist/eosjs-rpc-interfaces'; import { FullShipBlock, IBlockRequest, IExtractedShipDelta, IExtractedShipTrace, ShipBlockResponse } from './ship'; export interface IAbiProvider { init(): Promise; getAbi(contract: string, blockNum: number): Promise; setAbi(contract: string, blockNum: number, abi: Abi): Promise; } export interface IShipConsumer { consume(block: ShipBlockResponse): Promise; getRequestBlockConfig(): Promise; getRequiredDeltas(): string[]; } export interface IProcessedBlockRepository { updateReversibleBlock(resp: ShipBlockResponse): Promise; getLastProcessedBlock(): Promise; getReversibleBlocks(): Promise>; updateLastProcessedBlock(resp: ShipBlockResponse): Promise; } export interface IBlockProcessor { onBlockStart(data: { block: FullShipBlock; }): Promise; processBlock(data: { block: FullShipBlock; traces: IExtractedShipTrace[]; deltas: IExtractedShipDelta[]; }): Promise; onBlockFinished(data: { block: FullShipBlock; }): Promise; }