hydra-node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.HeadLogic.StateEvent

Synopsis

State change events as used by Hydra.Node

data StateEvent tx Source #

A state change event with an event id that is the common entity to be loaded from an EventSource and sent to EventSinks.

Constructors

StateEvent 

Instances

Instances details
IsChainState tx => FromJSON (StateEvent tx) Source # 
Instance details

Defined in Hydra.HeadLogic.StateEvent

Methods

parseJSON :: Value -> Parser (StateEvent tx)

parseJSONList :: Value -> Parser [StateEvent tx]

omittedField :: Maybe (StateEvent tx)

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

Defined in Hydra.HeadLogic.StateEvent

Methods

toJSON :: StateEvent tx -> Value

toEncoding :: StateEvent tx -> Encoding

toJSONList :: [StateEvent tx] -> Value

toEncodingList :: [StateEvent tx] -> Encoding

omitField :: StateEvent tx -> Bool

Generic (StateEvent tx) Source # 
Instance details

Defined in Hydra.HeadLogic.StateEvent

Associated Types

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

Methods

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

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

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

Defined in Hydra.HeadLogic.StateEvent

IsChainState tx => FromCBOR (StateEvent tx) Source # 
Instance details

Defined in Hydra.HeadLogic.StateEvent

Methods

fromCBOR :: Decoder s (StateEvent tx)

label :: Proxy (StateEvent tx) -> Text

IsChainState tx => ToCBOR (StateEvent tx) Source # 
Instance details

Defined in Hydra.HeadLogic.StateEvent

Methods

toCBOR :: StateEvent tx -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (StateEvent tx) -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [StateEvent tx] -> Size

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

Defined in Hydra.HeadLogic.StateEvent

Methods

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

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

HasEventId (StateEvent tx) Source # 
Instance details

Defined in Hydra.HeadLogic.StateEvent

type Rep (StateEvent tx) Source # 
Instance details

Defined in Hydra.HeadLogic.StateEvent

type Rep (StateEvent tx) = D1 ('MetaData "StateEvent" "Hydra.HeadLogic.StateEvent" "hydra-node-2.3.0-1cgalYNmLJQC1YXlYVq7mp" 'False) (C1 ('MetaCons "StateEvent" 'PrefixI 'True) (S1 ('MetaSel ('Just "eventId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 EventId) :*: (S1 ('MetaSel ('Just "stateChanged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (StateChanged tx)) :*: S1 ('MetaSel ('Just "time") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime))))