All projections start by obtaining a source/producer, which is an Observable<ProjectionEvent<{}>>.
These events are very similar to Chain Sync events, but there are some important differences:
Block format is compatible with types from @cardano-sdk/core package.
Events include some additional properties: {eraSummaries, genesisParameters, epochNo, crossEpochBoundary}.
RollBackward events include block data (instead of just specifying the rollback point),
and are emitted once for each rolled back block.
Source observable can be piped through a series of RxJS operators, which may add some properties to the event.
In an nutshell, type ProjectionEvent<T> = ProjectionEvent<{}> & T.
All projections start by obtaining a source/producer, which is an
Observable<ProjectionEvent<{}>>
. These events are very similar to Chain Sync events, but there are some important differences:@cardano-sdk/core
package.{eraSummaries, genesisParameters, epochNo, crossEpochBoundary}
.RollBackward
events include block data (instead of just specifying the rollback point), and are emitted once for each rolled back block.ExtraProps (Generic Parameter)
Source observable can be piped through a series of RxJS operators, which may add some properties to the event. In an nutshell,
type ProjectionEvent<T> = ProjectionEvent<{}> & T
.