| 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 {
- headSeed :: TxOutRef
- headId :: CurrencySymbol
- parties :: [Party]
- contestationPeriod :: ContestationPeriod
- depositPeriod :: DepositPeriod
- version :: SnapshotVersion
- accumulatorHash :: Hash
- headAdaOverhead :: Integer
- data ClosedDatum = ClosedDatum {
- headId :: CurrencySymbol
- parties :: [Party]
- contestationPeriod :: ContestationPeriod
- depositPeriod :: DepositPeriod
- version :: SnapshotVersion
- snapshotNumber :: SnapshotNumber
- contesters :: [PubKeyHash]
- contestationDeadline :: POSIXTime
- accumulatorCommitment :: BuiltinBLS12_381_G1_Element
- headAdaOverhead :: Integer
- data FanoutProgressDatum = FanoutProgressDatum {
- headId :: CurrencySymbol
- parties :: [Party]
- contestationDeadline :: POSIXTime
- accumulatorCommitment :: BuiltinBLS12_381_G1_Element
- headAdaOverhead :: Integer
- progressFromClosed :: ClosedDatum -> FanoutProgressDatum
- data State
- data CloseRedeemer
- = CloseInitial
- | CloseAny { }
- | CloseUnused { }
- | CloseUsed { }
- data ContestRedeemer
- = ContestUnused { }
- | ContestUsed { }
- data IncrementRedeemer = IncrementRedeemer {
- signature :: [Signature]
- snapshotNumber :: SnapshotNumber
- increment :: TxOutRef
- decommitOutputsHash :: Hash
- data DecrementRedeemer = DecrementRedeemer {}
- data Input
- = Increment IncrementRedeemer
- | Decrement DecrementRedeemer
- | Close CloseRedeemer
- | Contest ContestRedeemer
- | Fanout {
- numberOfFanoutOutputs :: Integer
- proof :: BuiltinBLS12_381_G1_Element
- crsRef :: TxOutRef
- | PartialFanout {
- numberOfPartialOutputs :: Integer
- crsRef :: TxOutRef
- | FinalPartialFanout {
- numberOfPartialOutputs :: Integer
- proof :: BuiltinBLS12_381_G1_Element
- crsRef :: TxOutRef
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
data FanoutProgressDatum Source #
Sub-type for intermediate partial fanout state. Carries only the fields needed for subsequent partial fanout steps.
Constructors
| FanoutProgressDatum | |
Fields
| |
Instances
progressFromClosed :: ClosedDatum -> FanoutProgressDatum Source #
Extract the fields needed for partial fanout steps from a ClosedDatum. Called both on-chain (in the validator dispatch) and off-chain (in tx building).
Constructors
| Open OpenDatum | |
| Closed ClosedDatum | |
| Final | |
| FanoutProgress FanoutProgressDatum |
Instances
data CloseRedeemer Source #
Sub-type for close transition with auxiliary data as needed.
Constructors
| CloseInitial | Initial snapshot is used to close. |
| CloseAny | Any snapshot which doesn't contain anything to inc/decrement but snapshot number is higher than zero. |
Fields
| |
| CloseUnused | Closing snapshot refers to the current state version (pending inc/dec not yet applied) |
Fields
| |
| CloseUsed | Closing snapshot refers to the previous state version (pending inc/dec already applied) |
Fields
| |
Instances
data ContestRedeemer Source #
Sub-type for contest transition with auxiliary data as needed.
Constructors
| ContestUnused | Contesting snapshot refers to the current state version (inc/dec not yet applied, or no pending action) |
Fields
| |
| ContestUsed | Contesting snapshot refers to the previous state version (pending inc/dec already applied) |
Fields
| |
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
| Increment IncrementRedeemer | |
| Decrement DecrementRedeemer | |
| Close CloseRedeemer | |
| Contest ContestRedeemer | |
| Fanout | |
Fields
| |
| PartialFanout | |
Fields
| |
| FinalPartialFanout | |
Fields
| |