Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.Marlowe.Runtime.Indexer.ChainSeekClient
Synopsis
- data ChainSeekClientSelector r f where
- data ChainSeekClientDependencies m = ChainSeekClientDependencies {
- databaseQueries :: DatabaseQueries m
- chainSyncConnector :: Connector RuntimeChainSeekClient m
- chainSyncQueryConnector :: Connector (QueryClient ChainSyncQuery) m
- pollingInterval :: NominalDiffTime
- marloweScriptHashes :: NESet ScriptHash
- payoutScriptHashes :: NESet ScriptHash
- indexParties :: m ()
- data ChainEvent r
- = RollForward MarloweBlock ChainPoint ChainPoint r
- | RollBackward ChainPoint ChainPoint r
- 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))
- collectToNext :: Monad m => q err result -> tip -> ClientStCollect q err result point tip m a -> ClientStNext q err result point tip m a
Documentation
data ChainSeekClientSelector r f where Source #
Constructors
EmitEvent :: ChainSeekClientSelector r (ChainEvent r) | |
LoadMarloweUTxO :: ChainSeekClientSelector r MarloweUTxO |
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 #