Safe HaskellNone



Running emulator actions that produce streams of events


Emulator streams

data EmulatorConfig Source #




initialDist :: InitialChainState -> InitialDistribution Source #

The wallets' initial funds

runTraceStream :: forall effs. EmulatorConfig -> Eff '[State EmulatorState, LogMsg EmulatorEvent', MultiAgentEffect, MultiAgentControlEffect, ChainEffect, ChainControlEffect, Error EmulatorRuntimeError] () -> Stream (Of (LogMessage EmulatorEvent)) (Eff effs) (Maybe EmulatorErr, EmulatorState) Source #

Turn an emulator action into a Stream of emulator log messages, returning the final state of the emulator.

Stream manipulation

takeUntilSlot :: forall effs a. Slot -> Stream (Of (LogMessage EmulatorEvent)) (Eff effs) a -> Stream (Of (LogMessage EmulatorEvent)) (Eff effs) () Source #

Finish the stream at the end of the given slot.

filterLogLevel :: forall effs a. LogLevel -> Stream (Of (LogMessage EmulatorEvent)) (Eff effs) a -> Stream (Of (LogMessage EmulatorEvent)) (Eff effs) a Source #

Remove from the stream all log messages whose log level is lower than the the given level.

Consuming streams

foldStreamM :: forall m a b c. Monad m => FoldM m a b -> Stream (Of a) m c -> m (Of b c) Source #

Apply a fold to an effectful stream of events.

foldEmulatorStreamM :: forall effs a b. FoldM (Eff effs) EmulatorEvent b -> Stream (Of (LogMessage EmulatorEvent)) (Eff effs) a -> Eff effs (Of b a) Source #

Consume an emulator event stream.