| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Contract.HeadState
Synopsis
- type SnapshotNumber = Integer
- type SnapshotVersion = Integer
- type Hash = BuiltinByteString
- type Signature = BuiltinByteString
- data OpenDatum = OpenDatum {
- headId :: CurrencySymbol
- parties :: [Party]
- contestationPeriod :: ContestationPeriod
- version :: SnapshotVersion
- utxoHash :: Hash
- data ClosedDatum = ClosedDatum {
- headId :: CurrencySymbol
- parties :: [Party]
- contestationPeriod :: ContestationPeriod
- version :: SnapshotVersion
- snapshotNumber :: SnapshotNumber
- utxoHash :: Hash
- alphaUTxOHash :: Hash
- omegaUTxOHash :: Hash
- contesters :: [PubKeyHash]
- contestationDeadline :: POSIXTime
- data State
- = Initial {
- contestationPeriod :: ContestationPeriod
- parties :: [Party]
- headId :: CurrencySymbol
- seed :: TxOutRef
- | Open OpenDatum
- | Closed ClosedDatum
- | Final
- = Initial {
- data CloseRedeemer
- = CloseInitial
- | CloseAny { }
- | CloseUnusedDec { }
- | CloseUsedDec { }
- | CloseUnusedInc { }
- | CloseUsedInc { }
- data ContestRedeemer
- = ContestCurrent { }
- | ContestUsedDec { }
- | ContestUnusedDec { }
- | ContestUnusedInc { }
- | ContestUsedInc { }
- data IncrementRedeemer = IncrementRedeemer {
- signature :: [Signature]
- snapshotNumber :: SnapshotNumber
- increment :: TxOutRef
- data DecrementRedeemer = DecrementRedeemer {}
- data Input
Documentation
type SnapshotNumber = Integer Source #
type SnapshotVersion = Integer Source #
Sub-type for the open state-machine state.
Constructors
| OpenDatum | |
Fields
| |
Instances
data ClosedDatum Source #
Sub-type for the closed state-machine state.
Constructors
| ClosedDatum | |
Fields
| |
Instances
Constructors
| Initial | |
Fields
| |
| Open OpenDatum | |
| Closed ClosedDatum | |
| Final | |
Instances
data CloseRedeemer Source #
Sub-type for close transition with auxiliary data as needed.
Constructors
| CloseInitial | Intial snapshot is used to close. |
| CloseAny | Any snapshot which doesn't contain anything to inc/decrement but snapshot number is higher than zero. |
| CloseUnusedDec | Closing snapshot refers to the current state version |
| CloseUsedDec | Closing snapshot refers to the previous state version |
Fields
| |
| CloseUnusedInc | Closing snapshot refers to the current state version |
Fields
| |
| CloseUsedInc | Closing snapshot refers to the previous state version |
Fields
| |
Instances
data ContestRedeemer Source #
Sub-type for contest transition with auxiliary data as needed.
Constructors
| ContestCurrent | Contesting snapshot refers to the current state version |
| ContestUsedDec | Contesting snapshot refers to the previous state version |
Fields
| |
| ContestUnusedDec | Redeemer to use when the decommit was not yet observed but we closed the Head. |
| ContestUnusedInc | Redeemer to use when the commit was not yet observed but we closed the Head. |
Fields
| |
| ContestUsedInc | |
Instances
data IncrementRedeemer Source #
Sub-type for increment transition
Constructors
| IncrementRedeemer | |
Fields
| |
Instances
data DecrementRedeemer Source #
Sub-type for decrement transition with auxiliary data as needed.
Constructors
| DecrementRedeemer | |
Fields
| |
Instances
Constructors
| CollectCom | |
| Increment IncrementRedeemer | |
| Decrement DecrementRedeemer | |
| Close CloseRedeemer | |
| Contest ContestRedeemer | |
| Abort | |
| Fanout | |