Skip to main content

Haskell packages

The Hydra project consists of several Haskell packages, each serving distinct parts of the protocol. While some packages are internal and tailored specifically to Hydra, others offer more generic functionalities that could benefit other projects tackling similar challenges. Haddock documentation is provided for most packages.

Public packages

PackageDescription
hydra-preludeCustom Hydra prelude used across other Hydra packages
hydra-cardano-apiA wrapper around the cardano-api, with era-specialized types and extra utilities (haddocks unavailable: GHC 9.6.7 haddock panics on the re-exported Cardano.Api types)

Generic packages

Standalone libraries under libs/, not specific to Hydra:

PackageDescription
cborg-generic-taggedConstructor-name-tagged generic CBOR encoding
contra-tracer-jsonStructured JSON logging over contra-tracer
event-sourcingConduit-based event sourcing with a SQLite backend and log rotation
io-classes-labelledLabel-attaching wrappers over io-classes STM and async primitives
persistent-queueA crash-safe, file-backed, bounded FIFO queue
secretA type-level barrier for values that must never be shown or serialised
test-network-portsCollision-free localhost TCP port allocation for test suites

Internal packages

PackageDescription
hydra-nodeThe Hydra node
hydra-node testsThe Hydra node test code
hydra-txHydra transaction library
hydra-tuiTerminal User Interface (TUI) for managing a Hydra node
hydra-plutusHydra Plutus contracts
hydra-clusterIntegration test suite using a local cluster of Cardano and Hydra nodes