This package provides an interface for interacting with the Ogmios Local TX Monitor. It enables users to monitor transactions in the mempool using Ogmios' WebSocket API. It is primarily used in cardano-transaction-lib
.
Import the necessary functions to interact with the mempool:
import Cardano.Ogmios.Mempool (acquireMempoolSnapshot, mempoolSnapshotHasTx, fetchMempoolTxs)
The user of the package is responsible for initializing and maintaining the WebSocket connection. A CTL test case demonstrating how to create a WebSocket and use the Mempool API is available in Test.Ctl.Testnet.Contract.OgmiosMempool. This test provides an example of how to interact with the mempool via WebSockets.