import { OnApplicationShutdown } from '@nestjs/common'; import { Transaction } from '@subql/x-sequelize'; import { ProofOfIndex, ProofOfIndexHuman, SyncedProofOfIndex } from '../entities/Poi.entity'; import { IStoreModelProvider } from '../storeModelProvider'; import { IPoi, PlainPoiModel } from '../storeModelProvider/poi'; /** * Poi service responsible for Poi creation. * Also, could migrate previous poi table and recorded rewind poi */ export declare class PoiService implements OnApplicationShutdown { private storeModelProvider; private isShutdown; private _poiRepo?; constructor(storeModelProvider: IStoreModelProvider); onApplicationShutdown(): void; static PoiToHuman(proofOfIndex: ProofOfIndex | SyncedProofOfIndex): ProofOfIndexHuman; get poiRepo(): IPoi; get plainPoiRepo(): PlainPoiModel; /** * Init poi service, prepare poiRepo for rewind etc * Migrate poi if required. * @param schema */ init(schema: string): Promise; /** * Migrate previous poi table (with mmr etc) * @param schema * @private */ private migratePoi; rewind(targetBlockHeight: number, transaction: Transaction): Promise; }