| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Node.Types
Description
This module exports data types for logging, events and configuration
Synopsis
- data PABServerLogMsg
- data BlockEvent
- type NodeServerEffects m = '[ChainControlEffect, ChainEffect, State MockNodeServerChainState, LogMsg PABServerLogMsg, Reader (Maybe TxSendHandle), State AppState, LogMsg PABServerLogMsg, m]
- type ChainSyncHandle = Either (ChainSyncHandle Block) (ChainSyncHandle ChainSyncEvent)
- data AppState = AppState {}
- initialAppState :: MonadIO m => [Wallet] -> m AppState
- initialChainState :: MonadIO m => InitialDistribution -> m MockNodeServerChainState
- chainState :: Lens' AppState MockNodeServerChainState
- eventHistory :: Lens' AppState [LogMessage PABServerLogMsg]
- data PABServerConfig = PABServerConfig {}
- data NodeMode
- _MockNode :: Prism' NodeMode ()
- _AlonzoNode :: Prism' NodeMode ()
- newtype NodeUrl = NodeUrl BaseUrl
Logging types
data PABServerLogMsg Source #
Top-level logging data type for structural logging inside the PAB server.
Constructors
Instances
Event types
data BlockEvent Source #
Constructors
| NewSlot | |
| NewTransaction (Tx BabbageEra) |
Instances
Effects
type NodeServerEffects m = '[ChainControlEffect, ChainEffect, State MockNodeServerChainState, LogMsg PABServerLogMsg, Reader (Maybe TxSendHandle), State AppState, LogMsg PABServerLogMsg, m] Source #
type ChainSyncHandle = Either (ChainSyncHandle Block) (ChainSyncHandle ChainSyncEvent) Source #
The types of handles varies based on the type of clients (mocked or real nodes) and we need a generic way of handling either type of response.
State types
Application State
Constructors
| AppState | |
Fields
| |
initialAppState :: MonadIO m => [Wallet] -> m AppState Source #
AppState with an initial transaction that pays some Ada to
the wallets.
initialChainState :: MonadIO m => InitialDistribution -> m MockNodeServerChainState Source #
ChainState with initial values
Lens functions
Config types
data PABServerConfig Source #
Node server configuration
Constructors
| PABServerConfig | |
Fields
| |
Instances
Which node we're connecting to
Constructors
| MockNode | Connect to the PAB mock node. |
| AlonzoNode | Connect to an Alonzo node |
| NoChainSyncEvents | Do not connect to any node for chain sync events. Connect to Alonzo node for slot notifications. |
Instances
| Eq NodeMode Source # | |
| Show NodeMode Source # | |
| Generic NodeMode Source # | |
| ToJSON NodeMode Source # | |
| FromJSON NodeMode Source # | |
| type Rep NodeMode Source # | |
Defined in Cardano.Node.Types type Rep NodeMode = D1 ('MetaData "NodeMode" "Cardano.Node.Types" "plutus-pab-1.1.0.0-FfR7woEUDQq3z789ky1Jcq" 'False) (C1 ('MetaCons "MockNode" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AlonzoNode" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoChainSyncEvents" 'PrefixI 'False) (U1 :: Type -> Type))) | |
_AlonzoNode :: Prism' NodeMode () Source #