Module

Contract.Backend.Ogmios.Mempool

A module for interacting with Ogmios' Local TX Monitor These functions only work with Ogmios backend (not Blockfrost!). https://ogmios.dev/mini-protocols/local-tx-monitor/

#fetchMempoolTxs

fetchMempoolTxs :: MempoolSnapshotAcquired -> MempoolM (Array Transaction)

Recursively request the next TX in the mempool until Ogmios does not respond with a new TX.

#withMempoolSnapshot

withMempoolSnapshot :: forall a. (MempoolSnapshotAcquired -> MempoolM a) -> MempoolM a

A bracket-style function for working with mempool snapshots - ensures release in the presence of exceptions

#MempoolEnv

type MempoolEnv = { customLogger :: Maybe (LogLevel -> Message -> Aff Unit), logLevel :: LogLevel, ogmiosWs :: OgmiosWebSocket, suppressLogs :: Boolean }

Instances

#MempoolM

Modules