import { Transaction } from '@subql/x-sequelize'; import { BlockRangeDtoInterface } from '../../../admin'; import { PoiRepo, ProofOfIndex } from '../../entities'; export declare const POI_ENTITY_NAME = "_poi"; export interface IPoi { model: PoiRepo; bulkUpsert(proofs: ProofOfIndex[], tx?: Transaction): Promise; /** * Gets the 100 blocks <= to the start height where there is an operation. * This can be used to determine the last blocks that had data to index. * */ getPoiBlocksBefore(startHeight: number): Promise; } export declare function ensureProofOfIndexId(poi: ProofOfIndex): ProofOfIndex; export declare class PlainPoiModel implements IPoi { readonly model: PoiRepo; constructor(model: PoiRepo); getFirst(): Promise; getPoiById(id: number): Promise; getStartAndEndBlock(): Promise; getPoiBlocksByRange(startHeight: number, endHeight?: number): Promise; bulkUpsert(proofs: ProofOfIndex[], tx: Transaction): Promise; getPoiBlocksBefore(startHeight: number, options?: { limit: number; }): Promise; }