Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Marconi.Cardano.Indexers.Spent
Contents
Synopsis
- data SpentInfo = SpentInfo TxIn TxId
- type SpentInfoEvent = NonEmpty SpentInfo
- spentTxOutRef :: Lens' SpentInfo TxIn
- spentAtTxId :: Lens' SpentInfo TxId
- type SpentIndexer = SQLiteIndexer SpentInfoEvent
- mkSpentIndexer :: (MonadIO m, MonadError IndexerError m) => SQLiteDBLocation -> m (SQLiteIndexer SpentInfoEvent)
- spentWorker :: (MonadIO n, MonadError IndexerError n, MonadIO m) => StandardWorkerConfig m input SpentInfoEvent -> SQLiteDBLocation -> n (StandardWorker m input SpentInfoEvent SQLiteIndexer)
- spentBuilder :: (MonadIO n, MonadError IndexerError n) => SecurityParam -> CatchupConfig -> Trace IO Text -> FilePath -> n (StandardWorker IO [AnyTxBody] SpentInfoEvent SQLiteIndexer)
- type StandardSpentIndexer m = StandardSQLiteIndexer m SpentInfoEvent
- catchupConfigEventHook :: Trace IO Text -> FilePath -> CatchupEvent -> IO ()
- getInputs :: TxBody era -> [SpentInfo]
Event
Instances
type SpentInfoEvent = NonEmpty SpentInfo #
An alias for a non-empty list of SpentInfo
, it's the event potentially produced on each block
spentTxOutRef :: Lens' SpentInfo TxIn #
spentAtTxId :: Lens' SpentInfo TxId #
Indexer and worker
type SpentIndexer = SQLiteIndexer SpentInfoEvent #
A raw SQLite indexer for Spent
mkSpentIndexer :: (MonadIO m, MonadError IndexerError m) => SQLiteDBLocation -> m (SQLiteIndexer SpentInfoEvent) #
Arguments
:: (MonadIO n, MonadError IndexerError n, MonadIO m) | |
=> StandardWorkerConfig m input SpentInfoEvent | General configuration of a worker |
-> SQLiteDBLocation | SQLite database location |
-> n (StandardWorker m input SpentInfoEvent SQLiteIndexer) |
A minimal worker for the UTXO indexer, with catchup and filtering.
spentBuilder :: (MonadIO n, MonadError IndexerError n) => SecurityParam -> CatchupConfig -> Trace IO Text -> FilePath -> n (StandardWorker IO [AnyTxBody] SpentInfoEvent SQLiteIndexer) #
Convenience wrapper around spentWorker
with some defaults for
creating StandardWorkerConfig
, including a preprocessor.
type StandardSpentIndexer m = StandardSQLiteIndexer m SpentInfoEvent #
A SQLite Spent indexer with Catchup
catchupConfigEventHook :: Trace IO Text -> FilePath -> CatchupEvent -> IO () #