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

Hydra.Tx.ContestationPeriod

Synopsis

Documentation

newtype ContestationPeriod Source #

A positive, non-zero number of seconds.

Instances

Instances details
Arbitrary ContestationPeriod Source # 
Instance details

Defined in Hydra.Tx.ContestationPeriod

FromJSON ContestationPeriod Source # 
Instance details

Defined in Hydra.Tx.ContestationPeriod

ToJSON ContestationPeriod Source # 
Instance details

Defined in Hydra.Tx.ContestationPeriod

Show ContestationPeriod Source # 
Instance details

Defined in Hydra.Tx.ContestationPeriod

Eq ContestationPeriod Source # 
Instance details

Defined in Hydra.Tx.ContestationPeriod

Ord ContestationPeriod Source # 
Instance details

Defined in Hydra.Tx.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.