hydra-node-0.22.0: The Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Options

Synopsis

Documentation

data Command Source #

Instances

Instances details
Show Command Source # 
Instance details

Defined in Hydra.Options

Eq Command Source # 
Instance details

Defined in Hydra.Options

newtype BlockfrostOptions Source #

Constructors

BlockfrostOptions 

Fields

Instances

Instances details
FromJSON BlockfrostOptions Source # 
Instance details

Defined in Hydra.Options

ToJSON BlockfrostOptions Source # 
Instance details

Defined in Hydra.Options

Generic BlockfrostOptions Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep BlockfrostOptions :: Type -> Type Source #

Show BlockfrostOptions Source # 
Instance details

Defined in Hydra.Options

Eq BlockfrostOptions Source # 
Instance details

Defined in Hydra.Options

type Rep BlockfrostOptions Source # 
Instance details

Defined in Hydra.Options

type Rep BlockfrostOptions = D1 ('MetaData "BlockfrostOptions" "Hydra.Options" "hydra-node-0.22.0-3RX9tiIC3LXIH8z0ykSV06" 'True) (C1 ('MetaCons "BlockfrostOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "projectPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

data CardanoChainConfig Source #

Constructors

CardanoChainConfig 

Fields

Instances

Instances details
FromJSON CardanoChainConfig Source # 
Instance details

Defined in Hydra.Options

ToJSON CardanoChainConfig Source # 
Instance details

Defined in Hydra.Options

Generic CardanoChainConfig Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep CardanoChainConfig :: Type -> Type Source #

Show CardanoChainConfig Source # 
Instance details

Defined in Hydra.Options

Eq CardanoChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep CardanoChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep CardanoChainConfig = D1 ('MetaData "CardanoChainConfig" "Hydra.Options" "hydra-node-0.22.0-3RX9tiIC3LXIH8z0ykSV06" 'False) (C1 ('MetaCons "CardanoChainConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "hydraScriptsTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxId]) :*: (S1 ('MetaSel ('Just "cardanoSigningKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "cardanoVerificationKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]))) :*: ((S1 ('MetaSel ('Just "startChainFrom") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ChainPoint)) :*: S1 ('MetaSel ('Just "contestationPeriod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContestationPeriod)) :*: (S1 ('MetaSel ('Just "depositPeriod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DepositPeriod) :*: S1 ('MetaSel ('Just "chainBackendOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChainBackendOptions)))))

data ChainBackendOptions Source #

Instances

Instances details
FromJSON ChainBackendOptions Source # 
Instance details

Defined in Hydra.Options

ToJSON ChainBackendOptions Source # 
Instance details

Defined in Hydra.Options

Generic ChainBackendOptions Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep ChainBackendOptions :: Type -> Type Source #

Show ChainBackendOptions Source # 
Instance details

Defined in Hydra.Options

Eq ChainBackendOptions Source # 
Instance details

Defined in Hydra.Options

type Rep ChainBackendOptions Source # 
Instance details

Defined in Hydra.Options

type Rep ChainBackendOptions = D1 ('MetaData "ChainBackendOptions" "Hydra.Options" "hydra-node-0.22.0-3RX9tiIC3LXIH8z0ykSV06" 'False) (C1 ('MetaCons "Direct" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DirectOptions)) :+: C1 ('MetaCons "Blockfrost" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockfrostOptions)))

data DirectOptions Source #

Constructors

DirectOptions 

Fields

  • networkId :: NetworkId

    Network identifier to which we expect to connect.

  • nodeSocket :: SocketPath

    Path to a domain socket used to connect to the server.

Instances

Instances details
FromJSON DirectOptions Source # 
Instance details

Defined in Hydra.Options

Methods

parseJSON :: Value -> Parser DirectOptions

parseJSONList :: Value -> Parser [DirectOptions]

omittedField :: Maybe DirectOptions

ToJSON DirectOptions Source # 
Instance details

Defined in Hydra.Options

Generic DirectOptions Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep DirectOptions :: Type -> Type Source #

Show DirectOptions Source # 
Instance details

Defined in Hydra.Options

Eq DirectOptions Source # 
Instance details

Defined in Hydra.Options

type Rep DirectOptions Source # 
Instance details

Defined in Hydra.Options

type Rep DirectOptions = D1 ('MetaData "DirectOptions" "Hydra.Options" "hydra-node-0.22.0-3RX9tiIC3LXIH8z0ykSV06" 'False) (C1 ('MetaCons "DirectOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "networkId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NetworkId) :*: S1 ('MetaSel ('Just "nodeSocket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SocketPath)))

data OfflineChainConfig Source #

Constructors

OfflineChainConfig 

Fields

Instances

Instances details
FromJSON OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

ToJSON OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

Generic OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep OfflineChainConfig :: Type -> Type Source #

Show OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

Eq OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep OfflineChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep OfflineChainConfig = D1 ('MetaData "OfflineChainConfig" "Hydra.Options" "hydra-node-0.22.0-3RX9tiIC3LXIH8z0ykSV06" 'False) (C1 ('MetaCons "OfflineChainConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "offlineHeadSeed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 HeadSeed) :*: (S1 ('MetaSel ('Just "initialUTxOFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "ledgerGenesisFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)))))

data RunOptions Source #

Instances

Instances details
Arbitrary RunOptions Source # 
Instance details

Defined in Hydra.Options

FromJSON RunOptions Source # 
Instance details

Defined in Hydra.Options

Methods

parseJSON :: Value -> Parser RunOptions

parseJSONList :: Value -> Parser [RunOptions]

omittedField :: Maybe RunOptions

ToJSON RunOptions Source # 
Instance details

Defined in Hydra.Options

Methods

toJSON :: RunOptions -> Value

toEncoding :: RunOptions -> Encoding

toJSONList :: [RunOptions] -> Value

toEncodingList :: [RunOptions] -> Encoding

omitField :: RunOptions -> Bool

Generic RunOptions Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep RunOptions :: Type -> Type Source #

Show RunOptions Source # 
Instance details

Defined in Hydra.Options

Eq RunOptions Source # 
Instance details

Defined in Hydra.Options

type Rep RunOptions Source # 
Instance details

Defined in Hydra.Options

type Rep RunOptions = D1 ('MetaData "RunOptions" "Hydra.Options" "hydra-node-0.22.0-3RX9tiIC3LXIH8z0ykSV06" 'False) (C1 ('MetaCons "RunOptions" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "verbosity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Verbosity) :*: S1 ('MetaSel ('Just "nodeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NodeId)) :*: (S1 ('MetaSel ('Just "listen") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Host) :*: S1 ('MetaSel ('Just "advertise") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Host)))) :*: ((S1 ('MetaSel ('Just "peers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Host]) :*: S1 ('MetaSel ('Just "apiHost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IP)) :*: (S1 ('MetaSel ('Just "apiPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PortNumber) :*: S1 ('MetaSel ('Just "tlsCertPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath))))) :*: (((S1 ('MetaSel ('Just "tlsKeyPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)) :*: S1 ('MetaSel ('Just "monitoringPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe PortNumber))) :*: (S1 ('MetaSel ('Just "hydraSigningKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "hydraVerificationKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]))) :*: ((S1 ('MetaSel ('Just "persistenceDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "persistenceRotateAfter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "chainConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChainConfig) :*: (S1 ('MetaSel ('Just "ledgerConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LedgerConfig) :*: S1 ('MetaSel ('Just "whichEtcd") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WhichEtcd)))))))

data ChainConfig Source #

Instances

Instances details
Arbitrary ChainConfig Source # 
Instance details

Defined in Hydra.Options

FromJSON ChainConfig Source # 
Instance details

Defined in Hydra.Options

Methods

parseJSON :: Value -> Parser ChainConfig

parseJSONList :: Value -> Parser [ChainConfig]

omittedField :: Maybe ChainConfig

ToJSON ChainConfig Source # 
Instance details

Defined in Hydra.Options

Methods

toJSON :: ChainConfig -> Value

toEncoding :: ChainConfig -> Encoding

toJSONList :: [ChainConfig] -> Value

toEncodingList :: [ChainConfig] -> Encoding

omitField :: ChainConfig -> Bool

Generic ChainConfig Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep ChainConfig :: Type -> Type Source #

Show ChainConfig Source # 
Instance details

Defined in Hydra.Options

Eq ChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep ChainConfig Source # 
Instance details

Defined in Hydra.Options

newtype LedgerConfig Source #

Instances

Instances details
Arbitrary LedgerConfig Source # 
Instance details

Defined in Hydra.Options

FromJSON LedgerConfig Source # 
Instance details

Defined in Hydra.Options

Methods

parseJSON :: Value -> Parser LedgerConfig

parseJSONList :: Value -> Parser [LedgerConfig]

omittedField :: Maybe LedgerConfig

ToJSON LedgerConfig Source # 
Instance details

Defined in Hydra.Options

Methods

toJSON :: LedgerConfig -> Value

toEncoding :: LedgerConfig -> Encoding

toJSONList :: [LedgerConfig] -> Value

toEncodingList :: [LedgerConfig] -> Encoding

omitField :: LedgerConfig -> Bool

Generic LedgerConfig Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep LedgerConfig :: Type -> Type Source #

Show LedgerConfig Source # 
Instance details

Defined in Hydra.Options

Eq LedgerConfig Source # 
Instance details

Defined in Hydra.Options

type Rep LedgerConfig Source # 
Instance details

Defined in Hydra.Options

type Rep LedgerConfig = D1 ('MetaData "LedgerConfig" "Hydra.Options" "hydra-node-0.22.0-3RX9tiIC3LXIH8z0ykSV06" 'True) (C1 ('MetaCons "CardanoLedgerConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "cardanoLedgerProtocolParametersFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

data PublishOptions Source #

Instances

Instances details
Generic PublishOptions Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep PublishOptions :: Type -> Type Source #

Show PublishOptions Source # 
Instance details

Defined in Hydra.Options

Eq PublishOptions Source # 
Instance details

Defined in Hydra.Options

type Rep PublishOptions Source # 
Instance details

Defined in Hydra.Options

type Rep PublishOptions = D1 ('MetaData "PublishOptions" "Hydra.Options" "hydra-node-0.22.0-3RX9tiIC3LXIH8z0ykSV06" 'False) (C1 ('MetaCons "PublishOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "chainBackendOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ChainBackendOptions) :*: S1 ('MetaSel ('Just "publishSigningKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)))

data BlockfrostChainConfig Source #

Constructors

BlockfrostChainConfig 

Fields

Instances

Instances details
Generic BlockfrostChainConfig Source # 
Instance details

Defined in Hydra.Options

Associated Types

type Rep BlockfrostChainConfig :: Type -> Type Source #

Show BlockfrostChainConfig Source # 
Instance details

Defined in Hydra.Options

Eq BlockfrostChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep BlockfrostChainConfig Source # 
Instance details

Defined in Hydra.Options

type Rep BlockfrostChainConfig = D1 ('MetaData "BlockfrostChainConfig" "Hydra.Options" "hydra-node-0.22.0-3RX9tiIC3LXIH8z0ykSV06" 'False) (C1 ('MetaCons "BlockfrostChainConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "projectPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: (S1 ('MetaSel ('Just "cardanoSigningKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "hydraScriptsTxId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TxId]))))

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 programmatically 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 #

runOptionsParser :: Parser RunOptions Source #

Parser for running the cardano-node with all its RunOptions.

defaultPublishOptions :: PublishOptions Source #

Default options as they should also be provided by runOptionsParser.

defaultRunOptions :: RunOptions Source #

Default options as they should also be provided by runOptionsParser.

networkIdParser :: Parser NetworkId Source #

nodeSocketParser :: Parser SocketPath Source #

offlineHeadSeedParser :: Parser HeadSeed Source #

startChainFromParser :: Parser ChainPoint Source #

contestationPeriodParser :: Parser ContestationPeriod 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.

toArgNetworkId :: NetworkId -> [String] Source #

toArgNodeSocket :: SocketPath -> [String] Source #

data ParserResult a #

Constructors

Success a 
Failure (ParserFailure ParserHelp) 
CompletionInvoked CompletionResult 

Instances

Instances details
Applicative ParserResult 
Instance details

Defined in Options.Applicative.Types

Functor ParserResult 
Instance details

Defined in Options.Applicative.Types

Methods

fmap :: (a -> b) -> ParserResult a -> ParserResult b Source #

(<$) :: a -> ParserResult b -> ParserResult a Source #

Monad ParserResult 
Instance details

Defined in Options.Applicative.Types

Show a => Show (ParserResult a) 
Instance details

Defined in Options.Applicative.Types

renderFailure :: ParserFailure ParserHelp -> String -> (String, ExitCode) #

Orphan instances

Arbitrary IP Source # 
Instance details

Methods

arbitrary :: Gen IP

shrink :: IP -> [IP]