Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Startup cardano nodes programmatically
Synopsis
- newtype NodeId = NodeId Int
- data NodeLog
- data RunningNode = RunningNode {}
- data DevnetConfig = DevnetConfig {
- dcStateDirectory ∷ FilePath
- dcSystemStart ∷ UTCTime
- dcPorts ∷ PortsConfig
- data CardanoNodeArgs = CardanoNodeArgs {
- nodeSocket ∷ FilePath
- nodeConfigFile ∷ FilePath
- nodeByronGenesisFile ∷ FilePath
- nodeShelleyGenesisFile ∷ FilePath
- nodeAlonzoGenesisFile ∷ FilePath
- nodeConwayGenesisFile ∷ FilePath
- nodeTopologyFile ∷ FilePath
- nodeDatabaseDir ∷ FilePath
- nodeDlgCertFile ∷ Maybe FilePath
- nodeSignKeyFile ∷ Maybe FilePath
- nodeOpCertFile ∷ Maybe FilePath
- nodeKesKeyFile ∷ Maybe FilePath
- nodeVrfKeyFile ∷ Maybe FilePath
- nodePort ∷ Maybe Port
- defaultCardanoNodeArgs ∷ CardanoNodeArgs
- withCardanoNode ∷ Tracer IO NodeLog → NetworkId → FilePath → CardanoNodeArgs → (RunningNode → IO a) → IO a
- getCardanoNodeVersion ∷ IO String
- waitForFullySynchronized ∷ Tracer IO NodeLog → RunningNode → IO ()
- waitForBlock ∷ RunningNode → IO BlockNo
- waitForSocket ∷ RunningNode → IO ()
- withCardanoNodeDevnet ∷ Tracer IO NodeLog → FilePath → (RunningNode → IO a) → IO a
- data GenesisConfigChanges = GenesisConfigChanges {}
- allowLargeTransactions ∷ GenesisConfigChanges
- withCardanoNodeDevnetConfig ∷ Tracer IO NodeLog → FilePath → GenesisConfigChanges → (RunningNode → IO a) → IO a
Documentation
MsgNodeCmdSpec Text | |
MsgCLI [Text] | |
MsgCLIStatus Text Text | |
MsgCLIRetry Text | |
MsgCLIRetryResult Text Int | |
MsgNodeStarting | |
MsgSocketIsReady FilePath | |
MsgSynchronizing | |
MsgNodeIsReady |
Instances
data RunningNode Source #
RunningNode | |
|
data DevnetConfig Source #
Configuration parameters for a single node devnet
DevnetConfig | |
|
Instances
FromJSON DevnetConfig Source # | |
Defined in Convex.Devnet.CardanoNode | |
ToJSON DevnetConfig Source # | |
Defined in Convex.Devnet.CardanoNode toJSON ∷ DevnetConfig → Value Source # toEncoding ∷ DevnetConfig → Encoding Source # toJSONList ∷ [DevnetConfig] → Value Source # | |
Generic DevnetConfig Source # | |
Defined in Convex.Devnet.CardanoNode from ∷ DevnetConfig → Rep DevnetConfig x Source # to ∷ Rep DevnetConfig x → DevnetConfig Source # | |
Show DevnetConfig Source # | |
Defined in Convex.Devnet.CardanoNode | |
Eq DevnetConfig Source # | |
Defined in Convex.Devnet.CardanoNode (==) ∷ DevnetConfig → DevnetConfig → Bool Source # (/=) ∷ DevnetConfig → DevnetConfig → Bool Source # | |
type Rep DevnetConfig Source # | |
Defined in Convex.Devnet.CardanoNode |
data CardanoNodeArgs Source #
Arguments given to the 'cardano-node' command-line to run a node.
withCardanoNode ∷ Tracer IO NodeLog → NetworkId → FilePath → CardanoNodeArgs → (RunningNode → IO a) → IO a Source #
waitForFullySynchronized ∷ Tracer IO NodeLog → RunningNode → IO () Source #
Wait until the node is fully caught up with the network. This can take a while!
waitForBlock ∷ RunningNode → IO BlockNo Source #
Wait until at least one block has been produced (ie. the tip is not genesis)
waitForSocket ∷ RunningNode → IO () Source #
Wait for the node socket file to become available.
withCardanoNodeDevnet Source #
∷ Tracer IO NodeLog | |
→ FilePath | State directory in which credentials, db & logs are persisted. |
→ (RunningNode → IO a) | |
→ IO a |
Start a single cardano-node devnet using the config from config/ and
credentials from configcredentials. Only the Faucet
actor will receive
"initialFunds". Use seedFromFaucet
to distribute funds other wallets.
data GenesisConfigChanges Source #
Modifications to apply to the default genesis configurations
withCardanoNodeDevnetConfig Source #
∷ Tracer IO NodeLog | |
→ FilePath | State directory in which credentials, db & logs are persisted. |
→ GenesisConfigChanges | Changes to apply to the default genesis configurations |
→ (RunningNode → IO a) | |
→ IO a |
Start a single cardano-node devnet using the config from config/ and
credentials from configcredentials. Only the Faucet
actor will receive
"initialFunds". Use seedFromFaucet
to distribute funds other wallets.