Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Marconi.Cardano.Indexers.EpochNonce
Description
Store Nonce in a SQLIte table
Synopsis
- data EpochNonce = EpochNonce !EpochNo !Nonce !BlockNo
- nonceEpochNo :: Lens' EpochNonce EpochNo
- nonceNonce :: Lens' EpochNonce Nonce
- nonceBlockNo :: Lens' EpochNonce BlockNo
- mkEpochNonceIndexer :: (MonadIO m, MonadError IndexerError m) => SQLiteDBLocation -> m (SQLiteIndexer EpochNonce)
- newtype EpochNonceWorkerConfig input = EpochNonceWorkerConfig {
- epochNonceWorkerConfigExtractor :: input -> EpochNo
- epochNonceWorker :: forall input m n. (MonadIO m, MonadError IndexerError m, MonadIO n) => StandardWorkerConfig n input EpochNonce -> EpochNonceWorkerConfig input -> SQLiteDBLocation -> m (WorkerIndexer n input EpochNonce (WithTrace n SQLiteIndexer))
- newtype NonceByEpochNoQuery = NonceByEpochNoQuery EpochNo
- getEpochNonce :: ExtLedgerStateEvent -> Maybe EpochNonce
- getEpochNo :: ExtLedgerState (CardanoBlock StandardCrypto) -> Maybe EpochNo
Event types and lenses
data EpochNonce #
Event for Nonce
storage
Constructors
EpochNonce !EpochNo !Nonce !BlockNo |
Instances
nonceEpochNo :: Lens' EpochNonce EpochNo #
nonceNonce :: Lens' EpochNonce Nonce #
nonceBlockNo :: Lens' EpochNonce BlockNo #
Create an indexer
mkEpochNonceIndexer :: (MonadIO m, MonadError IndexerError m) => SQLiteDBLocation -> m (SQLiteIndexer EpochNonce) #
Smart constructor that creates a FileIndexer
that stores Nonce.
Create a worker
newtype EpochNonceWorkerConfig input #
Constructors
EpochNonceWorkerConfig | |
Fields
|
epochNonceWorker :: forall input m n. (MonadIO m, MonadError IndexerError m, MonadIO n) => StandardWorkerConfig n input EpochNonce -> EpochNonceWorkerConfig input -> SQLiteDBLocation -> m (WorkerIndexer n input EpochNonce (WithTrace n SQLiteIndexer)) #
Queries
newtype NonceByEpochNoQuery #
Constructors
NonceByEpochNoQuery EpochNo |
Instances
FromJSON NonceByEpochNoQuery # | |
Defined in Marconi.Cardano.Indexers.EpochNonce Methods parseJSON :: Value -> Parser NonceByEpochNoQuery parseJSONList :: Value -> Parser [NonceByEpochNoQuery] | |
ToJSON NonceByEpochNoQuery # | |
Defined in Marconi.Cardano.Indexers.EpochNonce Methods toJSON :: NonceByEpochNoQuery -> Value toEncoding :: NonceByEpochNoQuery -> Encoding toJSONList :: [NonceByEpochNoQuery] -> Value toEncodingList :: [NonceByEpochNoQuery] -> Encoding | |
(MonadIO m, MonadError (QueryError NonceByEpochNoQuery) m) => Queryable m event NonceByEpochNoQuery SQLiteIndexer # | |
Defined in Marconi.Cardano.Indexers.EpochNonce Methods query :: Point event -> NonceByEpochNoQuery -> SQLiteIndexer event -> m (Result NonceByEpochNoQuery) Source # queryLatest :: NonceByEpochNoQuery -> SQLiteIndexer event -> m (Result NonceByEpochNoQuery) Source # | |
type Result NonceByEpochNoQuery # | |
Defined in Marconi.Cardano.Indexers.EpochNonce |