| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.TUI.Model
Synopsis
- data TUIEvent tx
- = NodeEvent (HydraEvent tx)
- | UTxOQueryResult (Map TxIn (TxOut CtxUTxO))
- | L1UTxORefresh (Map TxIn (TxOut CtxUTxO))
- | FuelUTxORefresh (Map TxIn (TxOut CtxUTxO))
- | TxBuildError Text
- data RootState = RootState {
- nodeHost :: Host
- now :: UTCTime
- timeZone :: TimeZone
- connectedState :: ConnectedState
- logState :: LogState
- activeTab :: ActiveTab
- eventDetailRaw :: Bool
- eventHistoryList :: List Name LogMessage
- pendingAction :: Maybe Text
- l1UTxO :: Maybe (Map TxIn (TxOut CtxUTxO))
- fuelVk :: Maybe (VerificationKey PaymentKey)
- fuelUTxO :: Maybe (Map TxIn (TxOut CtxUTxO))
- previousTab :: ActiveTab
- theme :: Theme
- recoveryForm :: Maybe (TxIdRadioFieldForm (HydraEvent Tx) Name)
- fanoutSelectionForm :: Maybe (UTxOCheckboxForm (HydraEvent Tx) Name)
- eventHistoryFilter :: EventHistoryFilter
- data ConnectedState
- = Disconnected
- | Connected { }
- data IdentifiedState
- = Unidentified
- | Identified Party
- data NetworkState
- data ChainSyncedStatus
- = InSync
- | CatchingUp
- data PeerStatus
- data Connection = Connection {
- me :: IdentifiedState
- peers :: [(Host, PeerStatus)]
- networkState :: Maybe NetworkState
- chainSyncedStatus :: ChainSyncedStatus
- 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 e n
- type ConfirmingRadioFieldForm e n = Form Bool e n
- data OpenScreen
- = OpenHome
- | LoadingUTxOForIncrement
- | NoUTxOToIncrement
- | SelectingUTxO { }
- | SelectingUTxOToDecommit { }
- | SelectingUTxOToIncrement { }
- | EnteringAmount {
- utxoSelected :: (TxIn, TxOut CtxUTxO)
- enteringAmountForm :: Form Double (HydraEvent Tx) Name
- | SelectingRecipient {
- utxoSelected :: (TxIn, TxOut CtxUTxO)
- amountEntered :: Double
- selectingRecipientForm :: Form SelectAddressItem (HydraEvent Tx) Name
- | EnteringRecipientAddress {
- utxoSelected :: (TxIn, TxOut CtxUTxO)
- amountEntered :: Double
- 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
- = Open { }
- | Closed { }
- | FanoutPossible
- | FanningOut {
- fanoutRemaining :: UTxO
- fanoutMode :: FanoutProgressMode
- | Final
- type Name = Text
- data ActiveTab
- 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)
- enteringRecipientAddressFormL :: Traversal' OpenScreen (Form AddressInEra (HydraEvent Tx) Name)
- enteringAmountFormL :: Traversal' OpenScreen (Form Double (HydraEvent Tx) Name)
- confirmingCloseFormL :: Traversal' OpenScreen (ConfirmingRadioFieldForm (HydraEvent Tx) Name)
- openStateL :: Traversal' ActiveHeadState OpenScreen
- closedStateL :: Traversal' ActiveHeadState ClosedState
- timeZoneL :: Lens' RootState TimeZone
- themeL :: Lens' RootState Theme
- recoveryFormL :: Lens' RootState (Maybe (TxIdRadioFieldForm (HydraEvent Tx) Name))
- previousTabL :: Lens' RootState ActiveTab
- pendingActionL :: Lens' RootState (Maybe Text)
- nowL :: Lens' RootState UTCTime
- logStateL :: Lens' RootState LogState
- l1UTxOL :: Lens' RootState (Maybe (Map TxIn (TxOut CtxUTxO)))
- fuelVkL :: Lens' RootState (Maybe (VerificationKey PaymentKey))
- fuelUTxOL :: Lens' RootState (Maybe (Map TxIn (TxOut CtxUTxO)))
- fanoutSelectionFormL :: Lens' RootState (Maybe (UTxOCheckboxForm (HydraEvent Tx) Name))
- eventHistoryListL :: Lens' RootState (List Name LogMessage)
- eventHistoryFilterL :: Lens' RootState EventHistoryFilter
- eventDetailRawL :: Lens' RootState Bool
- connectedStateL :: Lens' RootState ConnectedState
- activeTabL :: Lens' RootState ActiveTab
- connectionL :: Traversal' ConnectedState Connection
- peersL :: Lens' Connection [(Host, PeerStatus)]
- networkStateL :: Lens' Connection (Maybe NetworkState)
- meL :: Lens' Connection IdentifiedState
- headStateL :: Lens' Connection HeadState
- chainSyncedStatusL :: Lens' Connection ChainSyncedStatus
- activeLinkL :: Traversal' HeadState ActiveLink
- utxoL :: Lens' ActiveLink UTxO
- pendingUTxOToDecommitL :: Lens' ActiveLink UTxO
- pendingIncrementsL :: Lens' ActiveLink [PendingIncrement]
- activeHeadStateL :: Lens' ActiveLink ActiveHeadState
- eventHistoryListName :: Name
- mainUTxOViewportName :: Name
- fundsL2ViewportName :: Name
- fundsL1ViewportName :: Name
- fundsFuelViewportName :: Name
- fanoutSelectionViewportName :: Name
- emptyEventHistoryList :: List Name LogMessage
- emptyConnection :: Connection
- newActiveLink :: [Party] -> HeadId -> ActiveLink
- isModalOpen :: RootState -> Bool
- recoverHeadState :: UTCTime -> HeadState -> NodeState Tx -> HeadState
Documentation
TUI-local event wrapper so we can inject async results alongside Hydra node events.
Constructors
| NodeEvent (HydraEvent tx) | |
| UTxOQueryResult (Map TxIn (TxOut CtxUTxO)) | |
| L1UTxORefresh (Map TxIn (TxOut CtxUTxO)) | |
| FuelUTxORefresh (Map TxIn (TxOut CtxUTxO)) | |
| TxBuildError Text |
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 ChainSyncedStatus Source #
Synchronization status of the hydra node to the cardano chain.
Constructors
| InSync | |
| CatchingUp |
data PeerStatus Source #
Constructors
| PeerIsConnected | |
| PeerIsDisconnected | |
| PeerIsUnknown |
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 e n Source #
type ConfirmingRadioFieldForm e n = Form Bool e n Source #
data OpenScreen Source #
Constructors
| OpenHome | |
| LoadingUTxOForIncrement | |
| NoUTxOToIncrement | |
| SelectingUTxO | |
Fields | |
| SelectingUTxOToDecommit | |
Fields | |
| SelectingUTxOToIncrement | |
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
| Open | |
Fields | |
| Closed | |
Fields | |
| FanoutPossible | |
| FanningOut | A selective partial fanout is in progress (on-chain |
Fields
| |
| Final | |
Constructors
| MainTab | |
| FundsTab | |
| EventHistoryTab | |
| ModalTab |
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 #
enteringRecipientAddressFormL :: Traversal' OpenScreen (Form AddressInEra (HydraEvent Tx) Name) Source #
enteringAmountFormL :: Traversal' OpenScreen (Form Double (HydraEvent Tx) Name) Source #
confirmingCloseFormL :: Traversal' OpenScreen (ConfirmingRadioFieldForm (HydraEvent Tx) Name) Source #
openStateL :: Traversal' ActiveHeadState OpenScreen Source #
closedStateL :: Traversal' ActiveHeadState ClosedState Source #
recoveryFormL :: Lens' RootState (Maybe (TxIdRadioFieldForm (HydraEvent Tx) Name)) Source #
previousTabL :: Lens' RootState ActiveTab Source #
pendingActionL :: Lens' RootState (Maybe Text) Source #
fanoutSelectionFormL :: Lens' RootState (Maybe (UTxOCheckboxForm (HydraEvent Tx) Name)) Source #
eventHistoryListL :: Lens' RootState (List Name LogMessage) Source #
eventDetailRawL :: Lens' RootState Bool Source #
connectedStateL :: Lens' RootState ConnectedState Source #
activeTabL :: Lens' RootState ActiveTab Source #
connectionL :: Traversal' ConnectedState Connection Source #
peersL :: Lens' Connection [(Host, PeerStatus)] Source #
networkStateL :: Lens' Connection (Maybe NetworkState) Source #
meL :: Lens' Connection IdentifiedState Source #
headStateL :: Lens' Connection HeadState Source #
chainSyncedStatusL :: Lens' Connection ChainSyncedStatus Source #
activeLinkL :: Traversal' HeadState ActiveLink Source #
utxoL :: Lens' ActiveLink UTxO Source #
pendingUTxOToDecommitL :: Lens' ActiveLink UTxO Source #
pendingIncrementsL :: Lens' ActiveLink [PendingIncrement] Source #
activeHeadStateL :: Lens' ActiveLink ActiveHeadState Source #
emptyEventHistoryList :: List Name LogMessage Source #
newActiveLink :: [Party] -> HeadId -> ActiveLink Source #
isModalOpen :: RootState -> Bool Source #