hydra-plutus-0.19.0: Hydra Plutus Contracts
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Contract.HeadState

Synopsis

Documentation

type Hash = BuiltinByteString Source #

type Signature = BuiltinByteString Source #

data OpenDatum Source #

Sub-type for the open state-machine state.

Constructors

OpenDatum 

Fields

Instances

Instances details
Generic OpenDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

Associated Types

type Rep OpenDatum :: Type -> Type Source #

Show OpenDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

FromData OpenDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

fromBuiltinData :: BuiltinData -> Maybe OpenDatum

ToData OpenDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

toBuiltinData :: OpenDatum -> BuiltinData

UnsafeFromData OpenDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

unsafeFromBuiltinData :: BuiltinData -> OpenDatum

type Rep OpenDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

type Rep OpenDatum = D1 ('MetaData "OpenDatum" "Hydra.Contract.HeadState" "hydra-plutus-0.19.0-GnF2WpVD9y0FLxIAE5jUsh" 'False) (C1 ('MetaCons "OpenDatum" 'PrefixI 'True) ((S1 ('MetaSel ('Just "headId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CurrencySymbol) :*: S1 ('MetaSel ('Just "parties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Party])) :*: (S1 ('MetaSel ('Just "contestationPeriod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContestationPeriod) :*: (S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotVersion) :*: S1 ('MetaSel ('Just "utxoHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Hash)))))

data ClosedDatum Source #

Sub-type for the closed state-machine state.

Constructors

ClosedDatum 

Fields

Instances

Instances details
Generic ClosedDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

Associated Types

type Rep ClosedDatum :: Type -> Type Source #

Show ClosedDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

FromData ClosedDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

fromBuiltinData :: BuiltinData -> Maybe ClosedDatum

ToData ClosedDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

toBuiltinData :: ClosedDatum -> BuiltinData

UnsafeFromData ClosedDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

unsafeFromBuiltinData :: BuiltinData -> ClosedDatum

type Rep ClosedDatum Source # 
Instance details

Defined in Hydra.Contract.HeadState

type Rep ClosedDatum = D1 ('MetaData "ClosedDatum" "Hydra.Contract.HeadState" "hydra-plutus-0.19.0-GnF2WpVD9y0FLxIAE5jUsh" 'False) (C1 ('MetaCons "ClosedDatum" 'PrefixI 'True) (((S1 ('MetaSel ('Just "headId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CurrencySymbol) :*: S1 ('MetaSel ('Just "parties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Party])) :*: (S1 ('MetaSel ('Just "contestationPeriod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContestationPeriod) :*: S1 ('MetaSel ('Just "version") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotVersion))) :*: ((S1 ('MetaSel ('Just "snapshotNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotNumber) :*: S1 ('MetaSel ('Just "utxoHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Hash)) :*: (S1 ('MetaSel ('Just "deltaUTxOHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Hash) :*: (S1 ('MetaSel ('Just "contesters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PubKeyHash]) :*: S1 ('MetaSel ('Just "contestationDeadline") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 POSIXTime))))))

data State Source #

Constructors

Initial 

Fields

Open OpenDatum 
Closed ClosedDatum 
Final 

Instances

Instances details
Generic State Source # 
Instance details

Defined in Hydra.Contract.HeadState

Associated Types

type Rep State :: Type -> Type Source #

Methods

from :: State -> Rep State x Source #

to :: Rep State x -> State Source #

Show State Source # 
Instance details

Defined in Hydra.Contract.HeadState

FromData State Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

fromBuiltinData :: BuiltinData -> Maybe State

ToData State Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

toBuiltinData :: State -> BuiltinData

UnsafeFromData State Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

unsafeFromBuiltinData :: BuiltinData -> State

type Rep State Source # 
Instance details

Defined in Hydra.Contract.HeadState

data CloseRedeemer Source #

Sub-type for close transition with auxiliary data as needed.

Constructors

CloseInitial

Intial snapshot is used to close.

CloseUnused

Closing snapshot refers to the current state version

Fields

CloseUsed

Closing snapshot refers to the previous state version

Fields

Instances

Instances details
Generic CloseRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Associated Types

type Rep CloseRedeemer :: Type -> Type Source #

Show CloseRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

FromData CloseRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

fromBuiltinData :: BuiltinData -> Maybe CloseRedeemer

ToData CloseRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

toBuiltinData :: CloseRedeemer -> BuiltinData

UnsafeFromData CloseRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

unsafeFromBuiltinData :: BuiltinData -> CloseRedeemer

type Rep CloseRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

type Rep CloseRedeemer = D1 ('MetaData "CloseRedeemer" "Hydra.Contract.HeadState" "hydra-plutus-0.19.0-GnF2WpVD9y0FLxIAE5jUsh" 'False) (C1 ('MetaCons "CloseInitial" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CloseUnused" 'PrefixI 'True) (S1 ('MetaSel ('Just "signature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Signature])) :+: C1 ('MetaCons "CloseUsed" 'PrefixI 'True) (S1 ('MetaSel ('Just "signature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Signature]) :*: S1 ('MetaSel ('Just "alreadyDecommittedUTxOHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Hash))))

data ContestRedeemer Source #

Sub-type for contest transition with auxiliary data as needed.

Constructors

ContestCurrent

Contesting snapshot refers to the current state version

Fields

ContestOutdated

Contesting snapshot refers to the previous state version

Fields

Instances

Instances details
Generic ContestRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Associated Types

type Rep ContestRedeemer :: Type -> Type Source #

Show ContestRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

FromData ContestRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

fromBuiltinData :: BuiltinData -> Maybe ContestRedeemer

ToData ContestRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

toBuiltinData :: ContestRedeemer -> BuiltinData

UnsafeFromData ContestRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

unsafeFromBuiltinData :: BuiltinData -> ContestRedeemer

type Rep ContestRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

type Rep ContestRedeemer = D1 ('MetaData "ContestRedeemer" "Hydra.Contract.HeadState" "hydra-plutus-0.19.0-GnF2WpVD9y0FLxIAE5jUsh" 'False) (C1 ('MetaCons "ContestCurrent" 'PrefixI 'True) (S1 ('MetaSel ('Just "signature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Signature])) :+: C1 ('MetaCons "ContestOutdated" 'PrefixI 'True) (S1 ('MetaSel ('Just "signature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Signature]) :*: S1 ('MetaSel ('Just "alreadyDecommittedUTxOHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Hash)))

data DecrementRedeemer Source #

Sub-type for decrement transition with auxiliary data as needed.

Instances

Instances details
Generic DecrementRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Associated Types

type Rep DecrementRedeemer :: Type -> Type Source #

Show DecrementRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

FromData DecrementRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

fromBuiltinData :: BuiltinData -> Maybe DecrementRedeemer

ToData DecrementRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

toBuiltinData :: DecrementRedeemer -> BuiltinData

UnsafeFromData DecrementRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

unsafeFromBuiltinData :: BuiltinData -> DecrementRedeemer

type Rep DecrementRedeemer Source # 
Instance details

Defined in Hydra.Contract.HeadState

type Rep DecrementRedeemer = D1 ('MetaData "DecrementRedeemer" "Hydra.Contract.HeadState" "hydra-plutus-0.19.0-GnF2WpVD9y0FLxIAE5jUsh" 'False) (C1 ('MetaCons "DecrementRedeemer" 'PrefixI 'True) (S1 ('MetaSel ('Just "signature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Signature]) :*: (S1 ('MetaSel ('Just "snapshotNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnapshotNumber) :*: S1 ('MetaSel ('Just "numberOfDecommitOutputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))))

data Input Source #

Instances

Instances details
Generic Input Source # 
Instance details

Defined in Hydra.Contract.HeadState

Associated Types

type Rep Input :: Type -> Type Source #

Methods

from :: Input -> Rep Input x Source #

to :: Rep Input x -> Input Source #

Show Input Source # 
Instance details

Defined in Hydra.Contract.HeadState

FromData Input Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

fromBuiltinData :: BuiltinData -> Maybe Input

ToData Input Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

toBuiltinData :: Input -> BuiltinData

UnsafeFromData Input Source # 
Instance details

Defined in Hydra.Contract.HeadState

Methods

unsafeFromBuiltinData :: BuiltinData -> Input

type Rep Input Source # 
Instance details

Defined in Hydra.Contract.HeadState