hydra-tx-0.19.0: Hydra transaction library
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Chain.ChainState

Synopsis

Documentation

newtype ChainSlot Source #

A generic description for a chain slot all implementions need to use.

Constructors

ChainSlot Natural 

Instances

Instances details
Arbitrary ChainSlot Source # 
Instance details

Defined in Hydra.Chain.ChainState

FromJSON ChainSlot Source # 
Instance details

Defined in Hydra.Chain.ChainState

Methods

parseJSON :: Value -> Parser ChainSlot

parseJSONList :: Value -> Parser [ChainSlot]

omittedField :: Maybe ChainSlot

ToJSON ChainSlot Source # 
Instance details

Defined in Hydra.Chain.ChainState

Methods

toJSON :: ChainSlot -> Value

toEncoding :: ChainSlot -> Encoding

toJSONList :: [ChainSlot] -> Value

toEncodingList :: [ChainSlot] -> Encoding

omitField :: ChainSlot -> Bool

Generic ChainSlot Source # 
Instance details

Defined in Hydra.Chain.ChainState

Associated Types

type Rep ChainSlot :: Type -> Type Source #

Num ChainSlot Source # 
Instance details

Defined in Hydra.Chain.ChainState

Show ChainSlot Source # 
Instance details

Defined in Hydra.Chain.ChainState

Eq ChainSlot Source # 
Instance details

Defined in Hydra.Chain.ChainState

Ord ChainSlot Source # 
Instance details

Defined in Hydra.Chain.ChainState

type Rep ChainSlot Source # 
Instance details

Defined in Hydra.Chain.ChainState

type Rep ChainSlot = D1 ('MetaData "ChainSlot" "Hydra.Chain.ChainState" "hydra-tx-0.19.0-GruKCDFrYmltVsR6Cb5jZ" 'True) (C1 ('MetaCons "ChainSlot" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)))

class (IsTx tx, Eq (ChainStateType tx), Show (ChainStateType tx), FromJSON (ChainStateType tx), ToJSON (ChainStateType tx), Arbitrary (ChainStateType tx)) => IsChainState tx where Source #

Types that can be used on-chain by the Hydra protocol. XXX: Find a better name for this. Maybe IsChainTx or IsL1Tx?

Associated Types

type ChainStateType tx = c | c -> tx Source #

Type of what to keep as L1 chain state. XXX: Why is this not always UTxOType?

Methods

chainStateSlot :: ChainStateType tx -> ChainSlot Source #

Get the chain slot for a chain state. NOTE: For any sequence of a encountered, we assume monotonically increasing slots.