Copyright | (c) 2025 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
GeniusYield.Providers.CacheMempool
Description
Synopsis
- augmentQueryUTxOWithMempool ∷ GYQueryUTxO → IO [GYTx] → NominalDiffTime → IO GYQueryUTxO
- augmentQueryUTxO ∷ GYQueryUTxO → a → (a → IO (Map GYTxOutRef (GYUTxO, Maybe GYDatum))) → GYQueryUTxO
- splitTxsInsOuts ∷ [GYTx] → (Set GYTxOutRef, Map GYTxOutRef (GYUTxO, Maybe GYDatum))
- splitTxsOutsModuloIns ∷ [GYTx] → Map GYTxOutRef (GYUTxO, Maybe GYDatum)
- outsWithDatumsToMap ∷ [(GYUTxO, Maybe GYDatum)] → Map GYTxOutRef (GYUTxO, Maybe GYDatum)
- outsWithDatumsMapToOuts ∷ Map GYTxOutRef (GYUTxO, Maybe GYDatum) → GYUTxOs
Documentation
Arguments
∷ GYQueryUTxO | The query to augment. |
→ IO [GYTx] | The function to fetch mempool transactions. |
→ NominalDiffTime | The interval to cache the mempool transactions so as to avoid querying mempool with high frequency. |
→ IO GYQueryUTxO |
Augment the query with mempool transactions.
Arguments
∷ GYQueryUTxO | The query to augment. |
→ a | Placeholder for a particular data store. |
→ (a → IO (Map GYTxOutRef (GYUTxO, Maybe GYDatum))) | Function fetch outputs (modulo inputs) from the data store. |
→ GYQueryUTxO |
Augment the query with mempool transactions.
splitTxsInsOuts ∷ [GYTx] → (Set GYTxOutRef, Map GYTxOutRef (GYUTxO, Maybe GYDatum)) #
Split the transactions into inputs & outputs.
splitTxsOutsModuloIns ∷ [GYTx] → Map GYTxOutRef (GYUTxO, Maybe GYDatum) #
outsWithDatumsToMap ∷ [(GYUTxO, Maybe GYDatum)] → Map GYTxOutRef (GYUTxO, Maybe GYDatum) #