Module

Ctl.Internal.Testnet.Server

#Channels

type Channels a = { stderr :: EventSource a, stdout :: EventSource a }

#StartedTestnetCluster

newtype StartedTestnetCluster

Constructors

Instances

#startKupo

startKupo :: forall r r'. { kupoConfig :: ServerConfig | r } -> { nodeConfigPath :: FilePath, nodeSocketPath :: FilePath | r' } -> Ref (Array (Aff Unit)) -> Aff (ManagedProcess /\ String)

#startOgmios

startOgmios :: forall r r'. { ogmiosConfig :: ServerConfig | r } -> { nodeConfigPath :: FilePath, nodeSocketPath :: FilePath | r' } -> Aff ManagedProcess

#startTestnetCluster

startTestnetCluster :: TestnetConfig -> Ref (Array (Aff Unit)) -> Logger -> Aff StartedTestnetCluster

Start the testnet cluster, initializing the state with the given UTxO distribution. Also initializes an extra payment key (aka ourKey) with some UTxOs for use with further testnet setup. ourKey has funds proportional to the total amount of the UTxOs in the passed distribution, so it can be used to handle transaction fees.

#makeClusterContractEnv

makeClusterContractEnv :: forall r. Ref (Array (Aff Unit)) -> { clearLogs :: Aff Unit, customLogger :: Maybe (LogLevel -> Message -> Aff Unit), logger :: Logger, printLogs :: Aff Unit, updatedConfig :: Record (ClusterConfig r) } -> Aff { clearLogs :: Aff Unit, env :: ContractEnv, printLogs :: Aff Unit }

Makes cluster ContractEnv with configured logs suppression and cleanup scheduled.

#mkLogging

mkLogging :: forall r. Record (LogParams r) -> Effect { clearLogs :: Aff Unit, customLogger :: Maybe (LogLevel -> Message -> Aff Unit), logger :: Logger, printLogs :: Aff Unit, updatedConfig :: Record (LogParams r) }

Modules