hydra-tui-0.16.0: TUI for managing a Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Client

Synopsis

Documentation

data HydraEvent tx Source #

Constructors

ClientConnected 
ClientDisconnected 
Update (TimedServerOutput tx) 
Tick UTCTime 

Instances

Instances details
Generic (HydraEvent tx) Source # 
Instance details

Defined in Hydra.Client

Associated Types

type Rep (HydraEvent tx) :: Type -> Type Source #

Methods

from :: HydraEvent tx -> Rep (HydraEvent tx) x Source #

to :: Rep (HydraEvent tx) x -> HydraEvent tx Source #

Show (TimedServerOutput tx) => Show (HydraEvent tx) Source # 
Instance details

Defined in Hydra.Client

Eq (TimedServerOutput tx) => Eq (HydraEvent tx) Source # 
Instance details

Defined in Hydra.Client

Methods

(==) :: HydraEvent tx -> HydraEvent tx -> Bool Source #

(/=) :: HydraEvent tx -> HydraEvent tx -> Bool Source #

type Rep (HydraEvent tx) Source # 
Instance details

Defined in Hydra.Client

type Rep (HydraEvent tx) = D1 ('MetaData "HydraEvent" "Hydra.Client" "hydra-tui-0.16.0-JFj6a2OEHyL7Wdi6OlO2vT" 'False) ((C1 ('MetaCons "ClientConnected" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ClientDisconnected" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Update" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TimedServerOutput tx))) :+: C1 ('MetaCons "Tick" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime))))

data Client tx m Source #

Handle to interact with Hydra node

Constructors

Client 

Fields

  • sendInput :: ClientInput tx -> m ()

    Send some input to the server.

  • sk :: SigningKey PaymentKey
     
  • externalCommit :: UTxO -> m ()
     

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 :: (ToJSON (ClientInput tx), FromJSON (TimedServerOutput tx)) => Options -> ClientComponent tx IO a Source #

Provide a component to interact with Hydra node.

data ClientError Source #

Instances

Instances details
Exception ClientError Source # 
Instance details

Defined in Hydra.Client

Generic ClientError Source # 
Instance details

Defined in Hydra.Client

Associated Types

type Rep ClientError :: Type -> Type Source #

Show ClientError Source # 
Instance details

Defined in Hydra.Client

Eq ClientError Source # 
Instance details

Defined in Hydra.Client

type Rep ClientError Source # 
Instance details

Defined in Hydra.Client

type Rep ClientError = D1 ('MetaData "ClientError" "Hydra.Client" "hydra-tui-0.16.0-JFj6a2OEHyL7Wdi6OlO2vT" 'False) (C1 ('MetaCons "ClientJSONDecodeError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))