Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Command
- data DirectChainConfig = DirectChainConfig {
- networkId :: NetworkId
- nodeSocket :: SocketPath
- hydraScriptsTxId :: TxId
- cardanoSigningKey :: FilePath
- cardanoVerificationKeys :: [FilePath]
- startChainFrom :: Maybe ChainPoint
- contestationPeriod :: ContestationPeriod
- data OfflineChainConfig = OfflineChainConfig {}
- data RunOptions = RunOptions {
- verbosity :: Verbosity
- nodeId :: NodeId
- host :: IP
- port :: PortNumber
- peers :: [Host]
- apiHost :: IP
- apiPort :: PortNumber
- tlsCertPath :: Maybe FilePath
- tlsKeyPath :: Maybe FilePath
- monitoringPort :: Maybe PortNumber
- hydraSigningKey :: FilePath
- hydraVerificationKeys :: [FilePath]
- persistenceDir :: FilePath
- chainConfig :: ChainConfig
- ledgerConfig :: LedgerConfig
- data ChainConfig
- data InvalidOptions
- newtype LedgerConfig = CardanoLedgerConfig {}
- newtype GenerateKeyPair = GenerateKeyPair {}
- data PublishOptions = PublishOptions {
- publishNetworkId :: NetworkId
- publishNodeSocket :: SocketPath
- publishSigningKey :: FilePath
- toArgs :: RunOptions -> [String]
- hydraNodeVersion :: Version
- defaultContestationPeriod :: ContestationPeriod
- validateRunOptions :: RunOptions -> Either InvalidOptions ()
- genChainPoint :: Gen ChainPoint
- commandParser :: Parser Command
- runOptionsParser :: Parser RunOptions
- offlineModeParser :: Parser RunOptions
- publishOptionsParser :: Parser PublishOptions
- outputFileParser :: Parser FilePath
- networkIdParser :: Parser NetworkId
- nodeSocketParser :: Parser SocketPath
- cardanoSigningKeyFileParser :: Parser FilePath
- genFilePath :: String -> Gen FilePath
- genDirPath :: Gen FilePath
- defaultRunOptions :: RunOptions
- defaultDirectChainConfig :: DirectChainConfig
- defaultLedgerConfig :: LedgerConfig
- verbosityParser :: Parser Verbosity
- nodeIdParser :: Parser NodeId
- hostParser :: Parser IP
- portParser :: Parser PortNumber
- peerParser :: Parser Host
- apiHostParser :: Parser IP
- apiPortParser :: Parser PortNumber
- tlsCertPathParser :: Parser FilePath
- tlsKeyPathParser :: Parser FilePath
- monitoringPortParser :: Parser PortNumber
- hydraSigningKeyFileParser :: Parser FilePath
- hydraVerificationKeyFileParser :: Parser FilePath
- persistenceDirParser :: Parser FilePath
- directChainConfigParser :: Parser DirectChainConfig
- offlineChainConfigParser :: Parser OfflineChainConfig
- ledgerConfigParser :: Parser LedgerConfig
- cardanoLedgerProtocolParametersParser :: Parser FilePath
- defaultOfflineChainConfig :: OfflineChainConfig
- initialUTxOFileParser :: Parser FilePath
- ledgerGenesisFileParser :: Parser (Maybe FilePath)
- hydraScriptsTxIdParser :: Parser TxId
- cardanoVerificationKeyFileParser :: Parser FilePath
- startChainFromParser :: Parser ChainPoint
- contestationPeriodParser :: Parser ContestationPeriod
- hydraNodeCommand :: ParserInfo Command
- parseHydraCommand :: IO Command
- parseHydraCommandFromArgs :: [String] -> ParserResult Command
- toArgApiPort :: PortNumber -> [String]
- toArgNetworkId :: NetworkId -> [String]
- toArgNodeSocket :: SocketPath -> [String]
- data ParserResult a
- = Success a
- | Failure (ParserFailure ParserHelp)
- | CompletionInvoked CompletionResult
- renderFailure :: ParserFailure ParserHelp -> String -> (String, ExitCode)
Documentation
Instances
data DirectChainConfig Source #
DirectChainConfig | |
|
Instances
data OfflineChainConfig Source #
OfflineChainConfig | |
|
Instances
data RunOptions Source #
RunOptions | |
|
Instances
data ChainConfig Source #
Instances
data InvalidOptions Source #
Instances
Show InvalidOptions Source # | |
Defined in Hydra.Options | |
Eq InvalidOptions Source # | |
Defined in Hydra.Options (==) :: InvalidOptions -> InvalidOptions -> Bool Source # (/=) :: InvalidOptions -> InvalidOptions -> Bool Source # |
newtype LedgerConfig Source #
Instances
newtype GenerateKeyPair Source #
Instances
Show GenerateKeyPair Source # | |
Defined in Hydra.Options | |
Eq GenerateKeyPair Source # | |
Defined in Hydra.Options (==) :: GenerateKeyPair -> GenerateKeyPair -> Bool Source # (/=) :: GenerateKeyPair -> GenerateKeyPair -> Bool Source # |
data PublishOptions Source #
PublishOptions | |
|
Instances
Show PublishOptions Source # | |
Defined in Hydra.Options | |
Eq PublishOptions Source # | |
Defined in Hydra.Options (==) :: PublishOptions -> PublishOptions -> Bool Source # (/=) :: PublishOptions -> PublishOptions -> Bool Source # |
toArgs :: RunOptions -> [String] Source #
Convert an Options
instance into the corresponding list of command-line arguments.
This is useful in situations where one wants to programatically define Options
, providing
some measure of type safety, without having to juggle with strings.
defaultContestationPeriod :: ContestationPeriod Source #
validateRunOptions :: RunOptions -> Either InvalidOptions () Source #
Validate cmd line arguments for hydra-node and check if they make sense before actually running the node.
Rules we apply:
- Check if number of parties is bigger than our hardcoded limit
(by looking at loaded hydra or cardano keys and comparing it to the maximumNumberOfParties
)
- Check that number of loaded hydra keys match with the number of loaded cardano keys
(by comparing lengths of the two lists)
genChainPoint :: Gen ChainPoint Source #
commandParser :: Parser Command Source #
runOptionsParser :: Parser RunOptions Source #
Parser for running the cardano-node with all its RunOptions
.
offlineModeParser :: Parser RunOptions Source #
Alternative parser to runOptionsParser
for running the cardano-node in
offline mode.
publishOptionsParser :: Parser PublishOptions Source #
outputFileParser :: Parser FilePath Source #
networkIdParser :: Parser NetworkId Source #
nodeSocketParser :: Parser SocketPath Source #
cardanoSigningKeyFileParser :: Parser FilePath Source #
genFilePath :: String -> Gen FilePath Source #
genDirPath :: Gen FilePath Source #
defaultRunOptions :: RunOptions Source #
Default options as they should also be provided by runOptionsParser
.
verbosityParser :: Parser Verbosity Source #
nodeIdParser :: Parser NodeId Source #
hostParser :: Parser IP Source #
portParser :: Parser PortNumber Source #
peerParser :: Parser Host Source #
apiHostParser :: Parser IP Source #
apiPortParser :: Parser PortNumber Source #
tlsCertPathParser :: Parser FilePath Source #
tlsKeyPathParser :: Parser FilePath Source #
monitoringPortParser :: Parser PortNumber Source #
hydraSigningKeyFileParser :: Parser FilePath Source #
hydraVerificationKeyFileParser :: Parser FilePath Source #
persistenceDirParser :: Parser FilePath Source #
directChainConfigParser :: Parser DirectChainConfig Source #
offlineChainConfigParser :: Parser OfflineChainConfig Source #
ledgerConfigParser :: Parser LedgerConfig Source #
cardanoLedgerProtocolParametersParser :: Parser FilePath Source #
initialUTxOFileParser :: Parser FilePath Source #
ledgerGenesisFileParser :: Parser (Maybe FilePath) Source #
hydraScriptsTxIdParser :: Parser TxId Source #
cardanoVerificationKeyFileParser :: Parser FilePath Source #
startChainFromParser :: Parser ChainPoint Source #
contestationPeriodParser :: Parser ContestationPeriod Source #
hydraNodeCommand :: ParserInfo Command Source #
parseHydraCommand :: IO Command Source #
Parse command-line arguments into a Option
or exit with failure and error message.
parseHydraCommandFromArgs :: [String] -> ParserResult Command Source #
Pure parsing of Option
from a list of arguments.
toArgApiPort :: PortNumber -> [String] Source #
toArgNetworkId :: NetworkId -> [String] Source #
toArgNodeSocket :: SocketPath -> [String] Source #
data ParserResult a #
Success a | |
Failure (ParserFailure ParserHelp) | |
CompletionInvoked CompletionResult |
Instances
Applicative ParserResult | |
Defined in Options.Applicative.Types pure :: a -> ParserResult a Source # (<*>) :: ParserResult (a -> b) -> ParserResult a -> ParserResult b Source # liftA2 :: (a -> b -> c) -> ParserResult a -> ParserResult b -> ParserResult c Source # (*>) :: ParserResult a -> ParserResult b -> ParserResult b Source # (<*) :: ParserResult a -> ParserResult b -> ParserResult a Source # | |
Functor ParserResult | |
Defined in Options.Applicative.Types fmap :: (a -> b) -> ParserResult a -> ParserResult b Source # (<$) :: a -> ParserResult b -> ParserResult a Source # | |
Monad ParserResult | |
Defined in Options.Applicative.Types (>>=) :: ParserResult a -> (a -> ParserResult b) -> ParserResult b Source # (>>) :: ParserResult a -> ParserResult b -> ParserResult b Source # return :: a -> ParserResult a Source # | |
Show a => Show (ParserResult a) | |
Defined in Options.Applicative.Types |
renderFailure :: ParserFailure ParserHelp -> String -> (String, ExitCode) #