Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Hydra.TUI.Model
Synopsis
- data RootState = RootState {
- nodeHost :: Host
- now :: UTCTime
- connectedState :: ConnectedState
- logState :: LogState
- data ConnectedState
- = Disconnected
- | Connected { }
- data IdentifiedState
- = Unidentified
- | Identified Party
- data NetworkState
- data Connection = Connection {
- me :: IdentifiedState
- peers :: [Host]
- networkState :: Maybe NetworkState
- headState :: HeadState
- type UTxOCheckboxForm e n = Form (Map TxIn (TxOut CtxUTxO, Bool)) e n
- type UTxORadioFieldForm e n = Form (TxIn, TxOut CtxUTxO) e n
- type TxIdRadioFieldForm e n = Form (TxId, TxIn, TxOut CtxUTxO) e n
- type ConfirmingRadioFieldForm e n = Form Bool e n
- data InitializingState = InitializingState {
- remainingParties :: [Party]
- initializingScreen :: InitializingScreen
- data InitializingScreen
- = InitializingHome
- | CommitMenu {
- commitMenu :: UTxOCheckboxForm (HydraEvent Tx) Name
- | ConfirmingAbort { }
- data OpenScreen
- = OpenHome
- | SelectingUTxO { }
- | SelectingUTxOToDecommit { }
- | SelectingUTxOToIncrement { }
- | SelectingDepositIdToRecover { }
- | EnteringAmount {
- utxoSelected :: (TxIn, TxOut CtxUTxO)
- enteringAmountForm :: Form Integer (HydraEvent Tx) Name
- | SelectingRecipient {
- utxoSelected :: (TxIn, TxOut CtxUTxO)
- amountEntered :: Integer
- selectingRecipientForm :: Form SelectAddressItem (HydraEvent Tx) Name
- | EnteringRecipientAddress {
- utxoSelected :: (TxIn, TxOut CtxUTxO)
- amountEntered :: Integer
- enteringRecipientAddressForm :: Form AddressInEra (HydraEvent Tx) Name
- | ConfirmingClose { }
- data SelectAddressItem
- = ManualEntry
- | SelectAddress AddressInEra
- newtype ClosedState = ClosedState {}
- data HeadState
- data PendingIncrementStatus
- data PendingIncrement = PendingIncrement {
- utxoToCommit :: UTxO
- deposit :: TxId
- depositDeadline :: UTCTime
- status :: PendingIncrementStatus
- data ActiveLink = ActiveLink {
- utxo :: UTxO
- pendingUTxOToDecommit :: UTxO
- pendingIncrements :: [PendingIncrement]
- parties :: [Party]
- headId :: HeadId
- activeHeadState :: ActiveHeadState
- data ActiveHeadState
- = Initializing { }
- | Open { }
- | Closed { }
- | FanoutPossible
- | Final
- type Name = Text
- selectingUTxOToIncrementFormL :: Traversal' OpenScreen (UTxORadioFieldForm (HydraEvent Tx) Name)
- selectingUTxOToDecommitFormL :: Traversal' OpenScreen (UTxORadioFieldForm (HydraEvent Tx) Name)
- selectingUTxOFormL :: Traversal' OpenScreen (UTxORadioFieldForm (HydraEvent Tx) Name)
- selectingRecipientFormL :: Traversal' OpenScreen (Form SelectAddressItem (HydraEvent Tx) Name)
- selectingDepositIdToRecoverFormL :: Traversal' OpenScreen (TxIdRadioFieldForm (HydraEvent Tx) Name)
- enteringRecipientAddressFormL :: Traversal' OpenScreen (Form AddressInEra (HydraEvent Tx) Name)
- enteringAmountFormL :: Traversal' OpenScreen (Form Integer (HydraEvent Tx) Name)
- confirmingCloseFormL :: Traversal' OpenScreen (ConfirmingRadioFieldForm (HydraEvent Tx) Name)
- openStateL :: Traversal' ActiveHeadState OpenScreen
- initializingStateL :: Traversal' ActiveHeadState InitializingState
- closedStateL :: Traversal' ActiveHeadState ClosedState
- nowL :: Lens' RootState UTCTime
- nodeHostL :: Lens' RootState Host
- logStateL :: Lens' RootState LogState
- connectedStateL :: Lens' RootState ConnectedState
- connectionL :: Traversal' ConnectedState Connection
- confirmingAbortFormL :: Traversal' InitializingScreen (ConfirmingRadioFieldForm (HydraEvent Tx) Name)
- commitMenuL :: Traversal' InitializingScreen (UTxOCheckboxForm (HydraEvent Tx) Name)
- peersL :: Lens' Connection [Host]
- networkStateL :: Lens' Connection (Maybe NetworkState)
- meL :: Lens' Connection IdentifiedState
- headStateL :: Lens' Connection HeadState
- remainingPartiesL :: Lens' InitializingState [Party]
- initializingScreenL :: Lens' InitializingState InitializingScreen
- activeLinkL :: Traversal' HeadState ActiveLink
- utxoL :: Lens' ActiveLink UTxO
- pendingUTxOToDecommitL :: Lens' ActiveLink UTxO
- pendingIncrementsL :: Lens' ActiveLink [PendingIncrement]
- partiesL :: Lens' ActiveLink [Party]
- headIdL :: Lens' ActiveLink HeadId
- activeHeadStateL :: Lens' ActiveLink ActiveHeadState
- fullFeedbackViewportName :: Name
- shortFeedbackViewportName :: Name
- emptyConnection :: Connection
- newActiveLink :: [Party] -> HeadId -> ActiveLink
- isModalOpen :: RootState -> Bool
Documentation
Constructors
RootState | |
Fields
|
data IdentifiedState Source #
Constructors
Unidentified | |
Identified Party |
data NetworkState Source #
Connectivity of the hydra node to the hydra network.
Constructors
NetworkConnected | |
NetworkDisconnected |
data Connection Source #
Constructors
Connection | |
Fields
|
type UTxOCheckboxForm e n = Form (Map TxIn (TxOut CtxUTxO, Bool)) e n Source #
type UTxORadioFieldForm e n = Form (TxIn, TxOut CtxUTxO) e n Source #
type TxIdRadioFieldForm e n = Form (TxId, TxIn, TxOut CtxUTxO) e n Source #
type ConfirmingRadioFieldForm e n = Form Bool e n Source #
data InitializingState Source #
Constructors
InitializingState | |
Fields
|
data InitializingScreen Source #
Constructors
InitializingHome | |
CommitMenu | |
Fields
| |
ConfirmingAbort | |
Fields |
data OpenScreen Source #
Constructors
OpenHome | |
SelectingUTxO | |
Fields | |
SelectingUTxOToDecommit | |
Fields | |
SelectingUTxOToIncrement | |
Fields | |
SelectingDepositIdToRecover | |
Fields | |
EnteringAmount | |
Fields
| |
SelectingRecipient | |
Fields
| |
EnteringRecipientAddress | |
Fields
| |
ConfirmingClose | |
Fields |
data SelectAddressItem Source #
Constructors
ManualEntry | |
SelectAddress AddressInEra |
Instances
Show SelectAddressItem Source # | |
Defined in Hydra.TUI.Model | |
Eq SelectAddressItem Source # | |
Defined in Hydra.TUI.Model Methods (==) :: SelectAddressItem -> SelectAddressItem -> Bool Source # (/=) :: SelectAddressItem -> SelectAddressItem -> Bool Source # | |
Pretty SelectAddressItem Source # | |
Defined in Hydra.TUI.Model |
newtype ClosedState Source #
Constructors
ClosedState | |
Fields |
data PendingIncrementStatus Source #
Constructors
PendingDeposit | |
FinalizingDeposit |
Instances
Show PendingIncrementStatus Source # | |
Defined in Hydra.TUI.Model |
data PendingIncrement Source #
Constructors
PendingIncrement | |
Fields
|
data ActiveLink Source #
Constructors
ActiveLink | |
Fields
|
data ActiveHeadState Source #
Constructors
Initializing | |
Fields | |
Open | |
Fields | |
Closed | |
Fields | |
FanoutPossible | |
Final |
selectingUTxOToIncrementFormL :: Traversal' OpenScreen (UTxORadioFieldForm (HydraEvent Tx) Name) Source #
selectingUTxOToDecommitFormL :: Traversal' OpenScreen (UTxORadioFieldForm (HydraEvent Tx) Name) Source #
selectingUTxOFormL :: Traversal' OpenScreen (UTxORadioFieldForm (HydraEvent Tx) Name) Source #
selectingRecipientFormL :: Traversal' OpenScreen (Form SelectAddressItem (HydraEvent Tx) Name) Source #
selectingDepositIdToRecoverFormL :: Traversal' OpenScreen (TxIdRadioFieldForm (HydraEvent Tx) Name) Source #
enteringRecipientAddressFormL :: Traversal' OpenScreen (Form AddressInEra (HydraEvent Tx) Name) Source #
enteringAmountFormL :: Traversal' OpenScreen (Form Integer (HydraEvent Tx) Name) Source #
confirmingCloseFormL :: Traversal' OpenScreen (ConfirmingRadioFieldForm (HydraEvent Tx) Name) Source #
openStateL :: Traversal' ActiveHeadState OpenScreen Source #
initializingStateL :: Traversal' ActiveHeadState InitializingState Source #
closedStateL :: Traversal' ActiveHeadState ClosedState Source #
connectedStateL :: Lens' RootState ConnectedState Source #
connectionL :: Traversal' ConnectedState Connection Source #
confirmingAbortFormL :: Traversal' InitializingScreen (ConfirmingRadioFieldForm (HydraEvent Tx) Name) Source #
commitMenuL :: Traversal' InitializingScreen (UTxOCheckboxForm (HydraEvent Tx) Name) Source #
peersL :: Lens' Connection [Host] Source #
networkStateL :: Lens' Connection (Maybe NetworkState) Source #
meL :: Lens' Connection IdentifiedState Source #
headStateL :: Lens' Connection HeadState Source #
remainingPartiesL :: Lens' InitializingState [Party] Source #
activeLinkL :: Traversal' HeadState ActiveLink Source #
utxoL :: Lens' ActiveLink UTxO Source #
pendingUTxOToDecommitL :: Lens' ActiveLink UTxO Source #
pendingIncrementsL :: Lens' ActiveLink [PendingIncrement] Source #
partiesL :: Lens' ActiveLink [Party] Source #
headIdL :: Lens' ActiveLink HeadId Source #
activeHeadStateL :: Lens' ActiveLink ActiveHeadState Source #
newActiveLink :: [Party] -> HeadId -> ActiveLink Source #
isModalOpen :: RootState -> Bool Source #