Interface IndexingCycleHandler<TDbContext, TContextData>

Central indexing component that handles special/overall cases - see its methods.

Type Parameters

Hierarchy

  • IndexingCycleHandler

Methods

  • Executed after block is already indexed, after the related database transaction is committed.

    Parameters

    • block: Block
    • contextData: TContextData

    Returns void | PromiseLike<void>

  • Executed after all other indexers are executed. This is an ideal place to refine your indexed data or write them to database in optimal way.

    Parameters

    • block: Block
    • dbContext: TDbContext
    • contextData: TContextData

    Returns void | PromiseLike<void>

  • Executed before all other indexers execute.

    Parameters

    • block: Block
    • dbContext: TDbContext
    • contextData: TContextData

    Returns void | PromiseLike<void>

  • Creates your custom data that flows through all indexers when indexing a block. It flows in indexingContext.data or as a dedicated parameter. If not implemented, then undefined is used.

    Parameters

    • block: Block
    • dbContext: TDbContext

    Returns TContextData | PromiseLike<TContextData>

  • Should roll back indexed changed on blockchain reorganization.

    Parameters

    Returns void | PromiseLike<void>

Generated using TypeDoc