hydra-node-0.19.0: The Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.HeadLogic.Input

Synopsis

Documentation

data Input tx Source #

Inputs that are processed by the head logic (the "core"). Corresponding to each of the "shell" layers, we distinguish between inputs from the client, the network and the chain.

Constructors

ClientInput

Input received from clients via the Hydra.API.

Fields

NetworkInput

Input received from peers via a Hydra.Network.

  • $sel:ttl:ClientInput is a simple counter that's decreased every time the event is reenqueued due to a wait. It's default value is defaultTTL
ChainInput

Input received from the chain via a Hydra.Chain.

Fields

Instances

Instances details
(ArbitraryIsTx tx, IsChainState tx) => Arbitrary (Input tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Input

Methods

arbitrary :: Gen (Input tx)

shrink :: Input tx -> [Input tx]

IsChainState tx => FromJSON (Input tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Input

Methods

parseJSON :: Value -> Parser (Input tx)

parseJSONList :: Value -> Parser [Input tx]

omittedField :: Maybe (Input tx)

IsChainState tx => ToJSON (Input tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Input

Methods

toJSON :: Input tx -> Value

toEncoding :: Input tx -> Encoding

toJSONList :: [Input tx] -> Value

toEncodingList :: [Input tx] -> Encoding

omitField :: Input tx -> Bool

Generic (Input tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Input

Associated Types

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

Methods

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

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

IsChainState tx => Show (Input tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Input

Methods

showsPrec :: Int -> Input tx -> ShowS Source #

show :: Input tx -> String Source #

showList :: [Input tx] -> ShowS Source #

IsChainState tx => Eq (Input tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Input

Methods

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

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

type Rep (Input tx) Source # 
Instance details

Defined in Hydra.HeadLogic.Input

type Rep (Input tx) = D1 ('MetaData "Input" "Hydra.HeadLogic.Input" "hydra-node-0.19.0-6Z4E5vp1s1XJuLOmmEVMTw" 'False) (C1 ('MetaCons "ClientInput" 'PrefixI 'True) (S1 ('MetaSel ('Just "clientInput") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ClientInput tx))) :+: (C1 ('MetaCons "NetworkInput" 'PrefixI 'True) (S1 ('MetaSel ('Just "ttl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TTL) :*: S1 ('MetaSel ('Just "networkEvent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NetworkEvent (Message tx)))) :+: C1 ('MetaCons "ChainInput" 'PrefixI 'True) (S1 ('MetaSel ('Just "chainEvent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ChainEvent tx)))))