Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module exports data types for logging, events and configuration
Synopsis
- data PABServerLogMsg
-
data
BlockEvent
- = NewSlot
- | NewTransaction ( Tx BabbageEra )
- 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
{
- pscBaseUrl :: BaseUrl
- pscInitialTxWallets :: [WalletNumber]
- pscSocketPath :: FilePath
- pscKeptBlocks :: Integer
- pscSlotConfig :: SlotConfig
- pscNetworkId :: NetworkIdWrapper
- pscProtocolParametersJsonPath :: Maybe FilePath
- pscPassphrase :: Maybe Text
- pscNodeMode :: NodeMode
- 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.
Instances
Event types
data BlockEvent Source #
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
AppState | |
|
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
PABServerConfig | |
|
Instances
Which node we're connecting to
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.2.0.0-CtfsFiD4ohhEkbPm9mkCAB" '
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 #