| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Client
Synopsis
- data HydraEvent tx
- = ClientConnected
- | ClientDisconnected
- | Update (ApiMessage tx)
- | Tick UTCTime
- data Client tx m = Client {
- sendInput :: ClientInput tx -> m ()
- sk :: Secret (SigningKey PaymentKey)
- externalCommit :: UTxO -> m ()
- recoverCommit :: TxId -> m ()
- type ClientCallback tx m = HydraEvent tx -> m ()
- type ClientComponent tx m a = ClientCallback tx m -> (Client tx m -> m a) -> m a
- withClient :: forall tx a. IsChainState tx => Options -> ClientComponent tx IO a
- data ClientError = ClientJSONDecodeError String ByteString
Documentation
data HydraEvent tx Source #
Constructors
| ClientConnected | |
| ClientDisconnected | |
| Update (ApiMessage tx) | |
| Tick UTCTime |
Instances
Handle to interact with Hydra node
Constructors
| Client | |
Fields
| |
type ClientCallback tx m = HydraEvent tx -> m () Source #
Callback for receiving server outputs.
type ClientComponent tx m a = ClientCallback tx m -> (Client tx m -> m a) -> m a Source #
A type tying both receiving output and sending input into a Component.
withClient :: forall tx a. IsChainState tx => Options -> ClientComponent tx IO a Source #
Provide a component to interact with Hydra node.
data ClientError Source #
Constructors
| ClientJSONDecodeError String ByteString |