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

Hydra.ContestationPeriod

Synopsis

Documentation

newtype ContestationPeriod Source #

A positive, non-zero number of seconds.

Instances

Instances details
Arbitrary ContestationPeriod Source # 
Instance details

Defined in Hydra.ContestationPeriod

FromJSON ContestationPeriod Source # 
Instance details

Defined in Hydra.ContestationPeriod

Methods

parseJSON :: Value -> Parser ContestationPeriod

parseJSONList :: Value -> Parser [ContestationPeriod]

ToJSON ContestationPeriod Source # 
Instance details

Defined in Hydra.ContestationPeriod

Show ContestationPeriod Source # 
Instance details

Defined in Hydra.ContestationPeriod

Eq ContestationPeriod Source # 
Instance details

Defined in Hydra.ContestationPeriod

Ord ContestationPeriod Source # 
Instance details

Defined in Hydra.ContestationPeriod

fromNominalDiffTime :: MonadFail m => NominalDiffTime -> m ContestationPeriod Source #

Create a ContestationPeriod from a NominalDiffTime. This will fail if a negative NominalDiffTime is provided and truncates to 1s if values < 1s are given.

toChain :: ContestationPeriod -> ContestationPeriod Source #

Convert an off-chain contestation period to its on-chain representation.

fromChain :: ContestationPeriod -> ContestationPeriod Source #

Convert an on-chain contestation period to its off-chain representation. NOTE: Does truncate to whole seconds.