marlowe-runtime-0.0.5: Runtime system for running Marlowe financial contracts on the Cardano Computation Layer
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Marlowe.Runtime.Indexer.ChainSeekClient

Synopsis

Documentation

data ChainSeekClientDependencies m Source #

Injectable dependencies for the chain sync client

Constructors

ChainSeekClientDependencies 

Fields

data ChainEvent r Source #

A change to the chain with respect to Marlowe contracts

Constructors

RollForward MarloweBlock ChainPoint ChainPoint r

A change in which a new block of Marlowe transactions is added to the chain.

RollBackward ChainPoint ChainPoint r

A change in which the chain is reverted to a previous point, discarding later blocks.

chainSeekClient :: forall r s env m. (MonadUnliftIO m, MonadInjectEvent r (ChainSeekClientSelector r) s m, MonadFail m, WithLog env Message m) => Component m (ChainSeekClientDependencies m) (STM Bool, STM (ChainEvent r)) Source #

A component that runs a chain sync client to traverse the blockchain and extract blocks of Marlowe transactions. The sequence of changes to the chain can be read by repeatedly running the resulting STM action.

collectToNext :: Monad m => q err result -> tip -> ClientStCollect q err result point tip m a -> ClientStNext q err result point tip m a Source #