{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Cardano.CLI.EraBased.Options.Genesis
( pGenesisCmds
)
where
import Cardano.Api hiding (QueryInShelleyBasedEra (..))
import qualified Cardano.Api.Byron as Byron
import qualified Cardano.Api.Experimental as Exp
import Cardano.Api.Ledger (Coin (..))
import Cardano.CLI.Environment (EnvCli (..))
import Cardano.CLI.EraBased.Commands.Genesis
import Cardano.CLI.EraBased.Options.Common
import Cardano.CLI.Parser
import Cardano.CLI.Types.Common
import Data.Maybe
import Data.Word (Word64)
import Options.Applicative hiding (help, str)
import qualified Options.Applicative as Opt
pGenesisCmds
:: ()
=> ShelleyBasedEra era
-> EnvCli
-> Maybe (Parser (GenesisCmds era))
pGenesisCmds :: forall era.
ShelleyBasedEra era -> EnvCli -> Maybe (Parser (GenesisCmds era))
pGenesisCmds ShelleyBasedEra era
era EnvCli
envCli =
String
-> InfoMod (GenesisCmds era)
-> [Maybe (Parser (GenesisCmds era))]
-> Maybe (Parser (GenesisCmds era))
forall a.
String -> InfoMod a -> [Maybe (Parser a)] -> Maybe (Parser a)
subInfoParser
String
"genesis"
( String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (GenesisCmds era))
-> String -> InfoMod (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Genesis block commands."
]
)
[ Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a. a -> Maybe a
Just (Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era)))
-> Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"key-gen-genesis" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (GenesisCmds era)
forall era. Parser (GenesisCmds era)
pGenesisKeyGen (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Create a Shelley genesis key pair"
, Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a. a -> Maybe a
Just (Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era)))
-> Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"key-gen-delegate" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (GenesisCmds era)
forall era. Parser (GenesisCmds era)
pGenesisDelegateKeyGen (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Create a Shelley genesis delegate key pair"
, Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a. a -> Maybe a
Just (Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era)))
-> Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"key-gen-utxo" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (GenesisCmds era)
forall era. Parser (GenesisCmds era)
pGenesisUTxOKeyGen (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Create a Shelley genesis UTxO key pair"
, Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a. a -> Maybe a
Just (Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era)))
-> Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"key-hash" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (GenesisCmds era)
forall era. Parser (GenesisCmds era)
pGenesisKeyHash (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Print the identifier (hash) of a public key"
, Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a. a -> Maybe a
Just (Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era)))
-> Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"get-ver-key" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (GenesisCmds era)
forall era. Parser (GenesisCmds era)
pGenesisVerKey (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Derive the verification key from a signing key"
, Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a. a -> Maybe a
Just (Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era)))
-> Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"initial-addr" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (GenesisCmds era)
forall era. EnvCli -> Parser (GenesisCmds era)
pGenesisAddr EnvCli
envCli) (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the address for an initial UTxO based on the verification key"
, Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a. a -> Maybe a
Just (Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era)))
-> Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"initial-txin" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (GenesisCmds era)
forall era. EnvCli -> Parser (GenesisCmds era)
pGenesisTxIn EnvCli
envCli) (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Get the TxIn for an initial UTxO based on the verification key"
, ShelleyBasedEra era
-> (ShelleyBasedEra era -> Parser (GenesisCmds era))
-> Maybe (Parser (GenesisCmds era))
forall (eon :: * -> *) era a.
Eon eon =>
ShelleyBasedEra era -> (eon era -> a) -> Maybe a
forShelleyBasedEraInEonMaybe
ShelleyBasedEra era
era
( \ShelleyBasedEra era
sbe ->
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"create-cardano" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
forall era.
ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreateCardano ShelleyBasedEra era
sbe EnvCli
envCli) (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (GenesisCmds era))
-> String -> InfoMod (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Create a Byron and Shelley genesis file from a genesis "
, String
"template and genesis/delegation/spending keys."
]
)
, ShelleyBasedEra era
-> (ShelleyBasedEra era -> Parser (GenesisCmds era))
-> Maybe (Parser (GenesisCmds era))
forall (eon :: * -> *) era a.
Eon eon =>
ShelleyBasedEra era -> (eon era -> a) -> Maybe a
forShelleyBasedEraInEonMaybe ShelleyBasedEra era
era ((ShelleyBasedEra era -> Parser (GenesisCmds era))
-> Maybe (Parser (GenesisCmds era)))
-> (ShelleyBasedEra era -> Parser (GenesisCmds era))
-> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$ \ShelleyBasedEra era
sbe ->
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"create" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
forall era.
ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreate ShelleyBasedEra era
sbe EnvCli
envCli) (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (GenesisCmds era))
-> String -> InfoMod (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Create a Shelley genesis file from a genesis "
, String
"template and genesis/delegation/spending keys."
]
, ShelleyBasedEra era
-> (ShelleyBasedEra era -> Parser (GenesisCmds era))
-> Maybe (Parser (GenesisCmds era))
forall (eon :: * -> *) era a.
Eon eon =>
ShelleyBasedEra era -> (eon era -> a) -> Maybe a
forShelleyBasedEraInEonMaybe ShelleyBasedEra era
era ((ShelleyBasedEra era -> Parser (GenesisCmds era))
-> Maybe (Parser (GenesisCmds era)))
-> (ShelleyBasedEra era -> Parser (GenesisCmds era))
-> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$ \ShelleyBasedEra era
sbe ->
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"create-staked" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
forall era.
ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreateStaked ShelleyBasedEra era
sbe EnvCli
envCli) (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (GenesisCmds era))
-> String -> InfoMod (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Create a staked Shelley genesis file from a genesis "
, String
"template and genesis/delegation/spending keys."
]
, ShelleyBasedEra era
-> (Era era -> Parser (GenesisCmds era))
-> Maybe (Parser (GenesisCmds era))
forall (eon :: * -> *) era a.
Eon eon =>
ShelleyBasedEra era -> (eon era -> a) -> Maybe a
forShelleyBasedEraInEonMaybe ShelleyBasedEra era
era ((Era era -> Parser (GenesisCmds era))
-> Maybe (Parser (GenesisCmds era)))
-> (Era era -> Parser (GenesisCmds era))
-> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$ \Era era
sbe ->
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"create-testnet-data" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (Era era -> EnvCli -> Parser (GenesisCmds era)
forall era. Era era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreateTestNetData Era era
sbe EnvCli
envCli) (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (GenesisCmds era))
-> String -> InfoMod (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"Create data to use for starting a testnet."
]
, Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a. a -> Maybe a
Just (Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era)))
-> Parser (GenesisCmds era) -> Maybe (Parser (GenesisCmds era))
forall a b. (a -> b) -> a -> b
$
String -> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"hash" (ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era))
-> ParserInfo (GenesisCmds era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Parser (GenesisCmds era)
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (GenesisCmds era)
forall era. Parser (GenesisCmds era)
pGenesisHash (InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era))
-> InfoMod (GenesisCmds era) -> ParserInfo (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
String -> InfoMod (GenesisCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Compute the hash of a genesis file"
]
pGenesisKeyGen :: Parser (GenesisCmds era)
pGenesisKeyGen :: forall era. Parser (GenesisCmds era)
pGenesisKeyGen =
(GenesisKeyGenGenesisCmdArgs -> GenesisCmds era)
-> Parser GenesisKeyGenGenesisCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap GenesisKeyGenGenesisCmdArgs -> GenesisCmds era
forall era. GenesisKeyGenGenesisCmdArgs -> GenesisCmds era
GenesisKeyGenGenesis (Parser GenesisKeyGenGenesisCmdArgs -> Parser (GenesisCmds era))
-> Parser GenesisKeyGenGenesisCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
VerificationKeyFile 'Out
-> SigningKeyFile 'Out -> GenesisKeyGenGenesisCmdArgs
GenesisKeyGenGenesisCmdArgs
(VerificationKeyFile 'Out
-> SigningKeyFile 'Out -> GenesisKeyGenGenesisCmdArgs)
-> Parser (VerificationKeyFile 'Out)
-> Parser (SigningKeyFile 'Out -> GenesisKeyGenGenesisCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (VerificationKeyFile 'Out)
forall keyrole. Parser (File (VerificationKey keyrole) 'Out)
pVerificationKeyFileOut
Parser (SigningKeyFile 'Out -> GenesisKeyGenGenesisCmdArgs)
-> Parser (SigningKeyFile 'Out)
-> Parser GenesisKeyGenGenesisCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (SigningKeyFile 'Out)
forall keyrole. Parser (File (SigningKey keyrole) 'Out)
pSigningKeyFileOut
pGenesisDelegateKeyGen :: Parser (GenesisCmds era)
pGenesisDelegateKeyGen :: forall era. Parser (GenesisCmds era)
pGenesisDelegateKeyGen =
(GenesisKeyGenDelegateCmdArgs -> GenesisCmds era)
-> Parser GenesisKeyGenDelegateCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap GenesisKeyGenDelegateCmdArgs -> GenesisCmds era
forall era. GenesisKeyGenDelegateCmdArgs -> GenesisCmds era
GenesisKeyGenDelegate (Parser GenesisKeyGenDelegateCmdArgs -> Parser (GenesisCmds era))
-> Parser GenesisKeyGenDelegateCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
VerificationKeyFile 'Out
-> SigningKeyFile 'Out
-> OpCertCounterFile 'Out
-> GenesisKeyGenDelegateCmdArgs
GenesisKeyGenDelegateCmdArgs
(VerificationKeyFile 'Out
-> SigningKeyFile 'Out
-> OpCertCounterFile 'Out
-> GenesisKeyGenDelegateCmdArgs)
-> Parser (VerificationKeyFile 'Out)
-> Parser
(SigningKeyFile 'Out
-> OpCertCounterFile 'Out -> GenesisKeyGenDelegateCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (VerificationKeyFile 'Out)
forall keyrole. Parser (File (VerificationKey keyrole) 'Out)
pVerificationKeyFileOut
Parser
(SigningKeyFile 'Out
-> OpCertCounterFile 'Out -> GenesisKeyGenDelegateCmdArgs)
-> Parser (SigningKeyFile 'Out)
-> Parser (OpCertCounterFile 'Out -> GenesisKeyGenDelegateCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (SigningKeyFile 'Out)
forall keyrole. Parser (File (SigningKey keyrole) 'Out)
pSigningKeyFileOut
Parser (OpCertCounterFile 'Out -> GenesisKeyGenDelegateCmdArgs)
-> Parser (OpCertCounterFile 'Out)
-> Parser GenesisKeyGenDelegateCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (OpCertCounterFile 'Out)
forall (direction :: FileDirection).
Parser (File OpCertCounter direction)
pOperatorCertIssueCounterFile
pGenesisUTxOKeyGen :: Parser (GenesisCmds era)
pGenesisUTxOKeyGen :: forall era. Parser (GenesisCmds era)
pGenesisUTxOKeyGen =
(GenesisKeyGenUTxOCmdArgs -> GenesisCmds era)
-> Parser GenesisKeyGenUTxOCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap GenesisKeyGenUTxOCmdArgs -> GenesisCmds era
forall era. GenesisKeyGenUTxOCmdArgs -> GenesisCmds era
GenesisKeyGenUTxO (Parser GenesisKeyGenUTxOCmdArgs -> Parser (GenesisCmds era))
-> Parser GenesisKeyGenUTxOCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
VerificationKeyFile 'Out
-> SigningKeyFile 'Out -> GenesisKeyGenUTxOCmdArgs
GenesisKeyGenUTxOCmdArgs
(VerificationKeyFile 'Out
-> SigningKeyFile 'Out -> GenesisKeyGenUTxOCmdArgs)
-> Parser (VerificationKeyFile 'Out)
-> Parser (SigningKeyFile 'Out -> GenesisKeyGenUTxOCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (VerificationKeyFile 'Out)
forall keyrole. Parser (File (VerificationKey keyrole) 'Out)
pVerificationKeyFileOut
Parser (SigningKeyFile 'Out -> GenesisKeyGenUTxOCmdArgs)
-> Parser (SigningKeyFile 'Out) -> Parser GenesisKeyGenUTxOCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (SigningKeyFile 'Out)
forall keyrole. Parser (File (SigningKey keyrole) 'Out)
pSigningKeyFileOut
pGenesisKeyHash :: Parser (GenesisCmds era)
pGenesisKeyHash :: forall era. Parser (GenesisCmds era)
pGenesisKeyHash =
VerificationKeyFile 'In -> GenesisCmds era
forall era. VerificationKeyFile 'In -> GenesisCmds era
GenesisCmdKeyHash
(VerificationKeyFile 'In -> GenesisCmds era)
-> Parser (VerificationKeyFile 'In) -> Parser (GenesisCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (VerificationKeyFile 'In)
pVerificationKeyFileIn
pGenesisVerKey :: Parser (GenesisCmds era)
pGenesisVerKey :: forall era. Parser (GenesisCmds era)
pGenesisVerKey =
(GenesisVerKeyCmdArgs -> GenesisCmds era)
-> Parser GenesisVerKeyCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap GenesisVerKeyCmdArgs -> GenesisCmds era
forall era. GenesisVerKeyCmdArgs -> GenesisCmds era
GenesisVerKey (Parser GenesisVerKeyCmdArgs -> Parser (GenesisCmds era))
-> Parser GenesisVerKeyCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
VerificationKeyFile 'Out
-> SigningKeyFile 'In -> GenesisVerKeyCmdArgs
GenesisVerKeyCmdArgs
(VerificationKeyFile 'Out
-> SigningKeyFile 'In -> GenesisVerKeyCmdArgs)
-> Parser (VerificationKeyFile 'Out)
-> Parser (SigningKeyFile 'In -> GenesisVerKeyCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (VerificationKeyFile 'Out)
forall keyrole. Parser (File (VerificationKey keyrole) 'Out)
pVerificationKeyFileOut
Parser (SigningKeyFile 'In -> GenesisVerKeyCmdArgs)
-> Parser (SigningKeyFile 'In) -> Parser GenesisVerKeyCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (SigningKeyFile 'In)
pSigningKeyFileIn
pGenesisAddr :: EnvCli -> Parser (GenesisCmds era)
pGenesisAddr :: forall era. EnvCli -> Parser (GenesisCmds era)
pGenesisAddr EnvCli
envCli =
(GenesisAddrCmdArgs -> GenesisCmds era)
-> Parser GenesisAddrCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap GenesisAddrCmdArgs -> GenesisCmds era
forall era. GenesisAddrCmdArgs -> GenesisCmds era
GenesisAddr (Parser GenesisAddrCmdArgs -> Parser (GenesisCmds era))
-> Parser GenesisAddrCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
VerificationKeyFile 'In
-> NetworkId -> Maybe (File () 'Out) -> GenesisAddrCmdArgs
GenesisAddrCmdArgs
(VerificationKeyFile 'In
-> NetworkId -> Maybe (File () 'Out) -> GenesisAddrCmdArgs)
-> Parser (VerificationKeyFile 'In)
-> Parser (NetworkId -> Maybe (File () 'Out) -> GenesisAddrCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (VerificationKeyFile 'In)
pVerificationKeyFileIn
Parser (NetworkId -> Maybe (File () 'Out) -> GenesisAddrCmdArgs)
-> Parser NetworkId
-> Parser (Maybe (File () 'Out) -> GenesisAddrCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser NetworkId
pNetworkId EnvCli
envCli
Parser (Maybe (File () 'Out) -> GenesisAddrCmdArgs)
-> Parser (Maybe (File () 'Out)) -> Parser GenesisAddrCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pGenesisTxIn :: EnvCli -> Parser (GenesisCmds era)
pGenesisTxIn :: forall era. EnvCli -> Parser (GenesisCmds era)
pGenesisTxIn EnvCli
envCli =
(GenesisTxInCmdArgs -> GenesisCmds era)
-> Parser GenesisTxInCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap GenesisTxInCmdArgs -> GenesisCmds era
forall era. GenesisTxInCmdArgs -> GenesisCmds era
GenesisTxIn (Parser GenesisTxInCmdArgs -> Parser (GenesisCmds era))
-> Parser GenesisTxInCmdArgs -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
VerificationKeyFile 'In
-> NetworkId -> Maybe (File () 'Out) -> GenesisTxInCmdArgs
GenesisTxInCmdArgs
(VerificationKeyFile 'In
-> NetworkId -> Maybe (File () 'Out) -> GenesisTxInCmdArgs)
-> Parser (VerificationKeyFile 'In)
-> Parser (NetworkId -> Maybe (File () 'Out) -> GenesisTxInCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (VerificationKeyFile 'In)
pVerificationKeyFileIn
Parser (NetworkId -> Maybe (File () 'Out) -> GenesisTxInCmdArgs)
-> Parser NetworkId
-> Parser (Maybe (File () 'Out) -> GenesisTxInCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser NetworkId
pNetworkId EnvCli
envCli
Parser (Maybe (File () 'Out) -> GenesisTxInCmdArgs)
-> Parser (Maybe (File () 'Out)) -> Parser GenesisTxInCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
pGenesisCreateCardano :: ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreateCardano :: forall era.
ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreateCardano ShelleyBasedEra era
sbe EnvCli
envCli =
(GenesisCreateCardanoCmdArgs era -> GenesisCmds era)
-> Parser (GenesisCreateCardanoCmdArgs era)
-> Parser (GenesisCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap GenesisCreateCardanoCmdArgs era -> GenesisCmds era
forall era. GenesisCreateCardanoCmdArgs era -> GenesisCmds era
GenesisCreateCardano (Parser (GenesisCreateCardanoCmdArgs era)
-> Parser (GenesisCmds era))
-> Parser (GenesisCreateCardanoCmdArgs era)
-> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
ShelleyBasedEra era
-> GenesisDir
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era
forall era.
ShelleyBasedEra era
-> GenesisDir
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era
GenesisCreateCardanoCmdArgs ShelleyBasedEra era
sbe
(GenesisDir
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser GenesisDir
-> Parser
(Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser GenesisDir
pGenesisDir
Parser
(Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser Word
-> Parser
(Word
-> Maybe SystemStart
-> Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pGenesisNumGenesisKeys
Parser
(Word
-> Maybe SystemStart
-> Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser Word
-> Parser
(Maybe SystemStart
-> Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pGenesisNumUTxOKeys
Parser
(Maybe SystemStart
-> Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser (Maybe SystemStart)
-> Parser
(Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe SystemStart)
pMaybeSystemStart
Parser
(Maybe Coin
-> BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser (Maybe Coin)
-> Parser
(BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Coin)
pInitialSupplyNonDelegated
Parser
(BlockCount
-> Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser BlockCount
-> Parser
(Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Word64 -> BlockCount
Byron.BlockCount (Word64 -> BlockCount) -> Parser Word64 -> Parser BlockCount
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser Word64
pSecurityParam)
Parser
(Word
-> Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser Word
-> Parser
(Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pSlotLength
Parser
(Rational
-> NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser Rational
-> Parser
(NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Rational
pSlotCoefficient
Parser
(NetworkId
-> String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser NetworkId
-> Parser
(String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser NetworkId
pNetworkId EnvCli
envCli
Parser
(String
-> String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser String
-> Parser
(String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String -> String -> Parser String
parseFilePath
String
"byron-template"
String
"JSON file with genesis defaults for each byron."
Parser
(String
-> String
-> String
-> Maybe String
-> GenesisCreateCardanoCmdArgs era)
-> Parser String
-> Parser
(String
-> String -> Maybe String -> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String -> String -> Parser String
parseFilePath
String
"shelley-template"
String
"JSON file with genesis defaults for each shelley."
Parser
(String
-> String -> Maybe String -> GenesisCreateCardanoCmdArgs era)
-> Parser String
-> Parser
(String -> Maybe String -> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String -> String -> Parser String
parseFilePath
String
"alonzo-template"
String
"JSON file with genesis defaults for alonzo."
Parser (String -> Maybe String -> GenesisCreateCardanoCmdArgs era)
-> Parser String
-> Parser (Maybe String -> GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> String -> String -> Parser String
parseFilePath
String
"conway-template"
String
"JSON file with genesis defaults for conway."
Parser (Maybe String -> GenesisCreateCardanoCmdArgs era)
-> Parser (Maybe String)
-> Parser (GenesisCreateCardanoCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe String)
pNodeConfigTemplate
pGenesisCreate :: ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreate :: forall era.
ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreate ShelleyBasedEra era
sbe EnvCli
envCli =
(GenesisCreateCmdArgs era -> GenesisCmds era)
-> Parser (GenesisCreateCmdArgs era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap GenesisCreateCmdArgs era -> GenesisCmds era
forall era. GenesisCreateCmdArgs era -> GenesisCmds era
GenesisCreate (Parser (GenesisCreateCmdArgs era) -> Parser (GenesisCmds era))
-> Parser (GenesisCreateCmdArgs era) -> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
ShelleyBasedEra era
-> KeyOutputFormat
-> GenesisDir
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> NetworkId
-> GenesisCreateCmdArgs era
forall era.
ShelleyBasedEra era
-> KeyOutputFormat
-> GenesisDir
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> NetworkId
-> GenesisCreateCmdArgs era
GenesisCreateCmdArgs ShelleyBasedEra era
sbe
(KeyOutputFormat
-> GenesisDir
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> NetworkId
-> GenesisCreateCmdArgs era)
-> Parser KeyOutputFormat
-> Parser
(GenesisDir
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> NetworkId
-> GenesisCreateCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser KeyOutputFormat
pKeyOutputFormat
Parser
(GenesisDir
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> NetworkId
-> GenesisCreateCmdArgs era)
-> Parser GenesisDir
-> Parser
(Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> NetworkId
-> GenesisCreateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser GenesisDir
pGenesisDir
Parser
(Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> NetworkId
-> GenesisCreateCmdArgs era)
-> Parser Word
-> Parser
(Word
-> Maybe SystemStart
-> Maybe Coin
-> NetworkId
-> GenesisCreateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pGenesisNumGenesisKeys
Parser
(Word
-> Maybe SystemStart
-> Maybe Coin
-> NetworkId
-> GenesisCreateCmdArgs era)
-> Parser Word
-> Parser
(Maybe SystemStart
-> Maybe Coin -> NetworkId -> GenesisCreateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pGenesisNumUTxOKeys
Parser
(Maybe SystemStart
-> Maybe Coin -> NetworkId -> GenesisCreateCmdArgs era)
-> Parser (Maybe SystemStart)
-> Parser (Maybe Coin -> NetworkId -> GenesisCreateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe SystemStart)
pMaybeSystemStart
Parser (Maybe Coin -> NetworkId -> GenesisCreateCmdArgs era)
-> Parser (Maybe Coin)
-> Parser (NetworkId -> GenesisCreateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Coin)
pInitialSupplyNonDelegated
Parser (NetworkId -> GenesisCreateCmdArgs era)
-> Parser NetworkId -> Parser (GenesisCreateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser NetworkId
pNetworkId EnvCli
envCli
pGenesisCreateStaked :: ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreateStaked :: forall era.
ShelleyBasedEra era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreateStaked ShelleyBasedEra era
sbe EnvCli
envCli =
(GenesisCreateStakedCmdArgs era -> GenesisCmds era)
-> Parser (GenesisCreateStakedCmdArgs era)
-> Parser (GenesisCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap GenesisCreateStakedCmdArgs era -> GenesisCmds era
forall era. GenesisCreateStakedCmdArgs era -> GenesisCmds era
GenesisCreateStaked (Parser (GenesisCreateStakedCmdArgs era)
-> Parser (GenesisCmds era))
-> Parser (GenesisCreateStakedCmdArgs era)
-> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
ShelleyBasedEra era
-> KeyOutputFormat
-> GenesisDir
-> Word
-> Word
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era
forall era.
ShelleyBasedEra era
-> KeyOutputFormat
-> GenesisDir
-> Word
-> Word
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era
GenesisCreateStakedCmdArgs ShelleyBasedEra era
sbe
(KeyOutputFormat
-> GenesisDir
-> Word
-> Word
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
-> Parser KeyOutputFormat
-> Parser
(GenesisDir
-> Word
-> Word
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser KeyOutputFormat
pKeyOutputFormat
Parser
(GenesisDir
-> Word
-> Word
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
-> Parser GenesisDir
-> Parser
(Word
-> Word
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser GenesisDir
pGenesisDir
Parser
(Word
-> Word
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
-> Parser Word
-> Parser
(Word
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pGenesisNumGenesisKeys
Parser
(Word
-> Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
-> Parser Word
-> Parser
(Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pGenesisNumUTxOKeys
Parser
(Word
-> Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
-> Parser Word
-> Parser
(Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pGenesisNumPools
Parser
(Word
-> Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
-> Parser Word
-> Parser
(Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pGenesisNumStDelegs
Parser
(Maybe SystemStart
-> Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
-> Parser (Maybe SystemStart)
-> Parser
(Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe SystemStart)
pMaybeSystemStart
Parser
(Maybe Coin
-> Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
-> Parser (Maybe Coin)
-> Parser
(Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Coin)
pInitialSupplyNonDelegated
Parser
(Coin
-> NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
-> Parser Coin
-> Parser
(NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Coin
pInitialSupplyDelegated
Parser
(NetworkId
-> Word
-> Word
-> Word
-> Maybe String
-> GenesisCreateStakedCmdArgs era)
-> Parser NetworkId
-> Parser
(Word
-> Word -> Word -> Maybe String -> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> EnvCli -> Parser NetworkId
pNetworkId EnvCli
envCli
Parser
(Word
-> Word -> Word -> Maybe String -> GenesisCreateStakedCmdArgs era)
-> Parser Word
-> Parser
(Word -> Word -> Maybe String -> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pBulkPoolCredFiles
Parser
(Word -> Word -> Maybe String -> GenesisCreateStakedCmdArgs era)
-> Parser Word
-> Parser (Word -> Maybe String -> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pBulkPoolsPerFile
Parser (Word -> Maybe String -> GenesisCreateStakedCmdArgs era)
-> Parser Word
-> Parser (Maybe String -> GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pStuffedUtxoCount
Parser (Maybe String -> GenesisCreateStakedCmdArgs era)
-> Parser (Maybe String) -> Parser (GenesisCreateStakedCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser String -> Parser (Maybe String)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
Opt.optional Parser String
pRelayJsonFp
where
pRelayJsonFp :: Parser FilePath
pRelayJsonFp :: Parser String
pRelayJsonFp =
String -> String -> Parser String
parseFilePath String
"relay-specification-file" String
"JSON file that specifies the relays of each stake pool."
pGenesisCreateTestNetData :: Exp.Era era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreateTestNetData :: forall era. Era era -> EnvCli -> Parser (GenesisCmds era)
pGenesisCreateTestNetData Era era
era EnvCli
envCli =
(GenesisCreateTestNetDataCmdArgs -> GenesisCmds era)
-> Parser GenesisCreateTestNetDataCmdArgs
-> Parser (GenesisCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap GenesisCreateTestNetDataCmdArgs -> GenesisCmds era
forall era. GenesisCreateTestNetDataCmdArgs -> GenesisCmds era
GenesisCreateTestNetData (Parser GenesisCreateTestNetDataCmdArgs
-> Parser (GenesisCmds era))
-> Parser GenesisCreateTestNetDataCmdArgs
-> Parser (GenesisCmds era)
forall a b. (a -> b) -> a -> b
$
Era era
-> Maybe String
-> Maybe String
-> Maybe String
-> Word
-> Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs
forall era.
Era era
-> Maybe String
-> Maybe String
-> Maybe String
-> Word
-> Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs
GenesisCreateTestNetDataCmdArgs Era era
era
(Maybe String
-> Maybe String
-> Maybe String
-> Word
-> Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser (Maybe String)
-> Parser
(Maybe String
-> Maybe String
-> Word
-> Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser String -> Parser (Maybe String)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (String -> Parser String
pSpecFile String
"shelley")
Parser
(Maybe String
-> Maybe String
-> Word
-> Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser (Maybe String)
-> Parser
(Maybe String
-> Word
-> Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser String -> Parser (Maybe String)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (String -> Parser String
pSpecFile String
"alonzo")
Parser
(Maybe String
-> Word
-> Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser (Maybe String)
-> Parser
(Word
-> Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser String -> Parser (Maybe String)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (String -> Parser String
pSpecFile String
"conway")
Parser
(Word
-> Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser Word
-> Parser
(Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pNumGenesisKeys
Parser
(Word
-> StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser Word
-> Parser
(StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pNumPools
Parser
(StakeDelegators
-> Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser StakeDelegators
-> Parser
(Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser StakeDelegators
pNumStakeDelegs
Parser
(Word
-> DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser Word
-> Parser
(DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (case Era era
era of Era era
Exp.BabbageEra -> Word -> Parser Word
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure Word
0; Era era
Exp.ConwayEra -> Parser Word
pNumCommittee)
Parser
(DRepCredentials
-> Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser DRepCredentials
-> Parser
(Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (case Era era
era of Era era
Exp.BabbageEra -> DRepCredentials -> Parser DRepCredentials
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (DRepCredentials -> Parser DRepCredentials)
-> DRepCredentials -> Parser DRepCredentials
forall a b. (a -> b) -> a -> b
$ CredentialGenerationMode -> Word -> DRepCredentials
DRepCredentials CredentialGenerationMode
OnDisk Word
0; Era era
Exp.ConwayEra -> Parser DRepCredentials
pNumDReps)
Parser
(Word
-> Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser Word
-> Parser
(Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pNumStuffedUtxoCount
Parser
(Word
-> Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser Word
-> Parser
(Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser Word
pNumUtxoKeys
Parser
(Maybe Coin
-> Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser (Maybe Coin)
-> Parser
(Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Coin)
pSupply
Parser
(Maybe Coin
-> Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser (Maybe Coin)
-> Parser
(Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe Coin)
pSupplyDelegated
Parser
(Maybe NetworkId
-> Maybe String
-> Maybe SystemStart
-> String
-> GenesisCreateTestNetDataCmdArgs)
-> Parser (Maybe NetworkId)
-> Parser
(Maybe String
-> Maybe SystemStart -> String -> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser NetworkId -> Parser (Maybe NetworkId)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (EnvCli -> Parser NetworkId
pNetworkIdForTestnetData EnvCli
envCli)
Parser
(Maybe String
-> Maybe SystemStart -> String -> GenesisCreateTestNetDataCmdArgs)
-> Parser (Maybe String)
-> Parser
(Maybe SystemStart -> String -> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser String -> Parser (Maybe String)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
Opt.optional Parser String
pRelays
Parser
(Maybe SystemStart -> String -> GenesisCreateTestNetDataCmdArgs)
-> Parser (Maybe SystemStart)
-> Parser (String -> GenesisCreateTestNetDataCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (Maybe SystemStart)
pMaybeSystemStart
Parser (String -> GenesisCreateTestNetDataCmdArgs)
-> Parser String -> Parser GenesisCreateTestNetDataCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser String
pOutputDir
where
pSpecFile :: String -> Parser String
pSpecFile String
eraStr =
String -> String -> Parser String
parseFilePath
(String
"spec-" String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
eraStr)
(String
"The " String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
eraStr String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
" specification file to use as input. A default one is generated if omitted.")
pNumGenesisKeys :: Parser Word
pNumGenesisKeys =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"genesis-keys"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The number of genesis keys to make (default is 3)."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
3
]
pNumPools :: Parser Word
pNumPools :: Parser Word
pNumPools =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"pools"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The number of stake pool credential sets to make (default is 0)."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
pNumCommittee :: Parser Word
pNumCommittee :: Parser Word
pNumCommittee =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"committee-keys"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The number of constitutional committee credentials to make (default is 0)."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
pNumDReps :: Parser DRepCredentials
pNumDReps :: Parser DRepCredentials
pNumDReps =
CredentialGenerationMode
-> String -> String -> Parser DRepCredentials
pDReps CredentialGenerationMode
OnDisk String
"drep-keys" String
"Credentials are written to disk."
Parser DRepCredentials
-> Parser DRepCredentials -> Parser DRepCredentials
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> CredentialGenerationMode
-> String -> String -> Parser DRepCredentials
pDReps CredentialGenerationMode
Transient String
"transient-drep-keys" String
"The credentials are NOT written to disk."
where
pDReps :: CredentialGenerationMode -> String -> String -> Parser DRepCredentials
pDReps :: CredentialGenerationMode
-> String -> String -> Parser DRepCredentials
pDReps CredentialGenerationMode
mode String
modeOptionName String
modeExplanation =
CredentialGenerationMode -> Word -> DRepCredentials
DRepCredentials CredentialGenerationMode
mode
(Word -> DRepCredentials) -> Parser Word -> Parser DRepCredentials
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option
ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader
( [Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
modeOptionName
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help (String -> Mod OptionFields Word)
-> String -> Mod OptionFields Word
forall a b. (a -> b) -> a -> b
$ String
"The number of DRep credentials to make (default is 0). " String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
modeExplanation
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
)
pNumStakeDelegs :: Parser StakeDelegators
pNumStakeDelegs :: Parser StakeDelegators
pNumStakeDelegs =
CredentialGenerationMode
-> String -> String -> Parser StakeDelegators
pStakeDelegators CredentialGenerationMode
OnDisk String
"stake-delegators" String
"Credentials are written to disk."
Parser StakeDelegators
-> Parser StakeDelegators -> Parser StakeDelegators
forall a. Parser a -> Parser a -> Parser a
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> CredentialGenerationMode
-> String -> String -> Parser StakeDelegators
pStakeDelegators CredentialGenerationMode
Transient String
"transient-stake-delegators" String
"The credentials are NOT written to disk."
where
pStakeDelegators :: CredentialGenerationMode -> String -> String -> Parser StakeDelegators
pStakeDelegators :: CredentialGenerationMode
-> String -> String -> Parser StakeDelegators
pStakeDelegators CredentialGenerationMode
mode String
modeOptionName String
modeExplanation =
CredentialGenerationMode -> Word -> StakeDelegators
StakeDelegators CredentialGenerationMode
mode
(Word -> StakeDelegators) -> Parser Word -> Parser StakeDelegators
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option
ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader
( [Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
modeOptionName
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help (String -> Mod OptionFields Word)
-> String -> Mod OptionFields Word
forall a b. (a -> b) -> a -> b
$
String
"The number of stake delegator credential sets to make (default is 0). " String -> String -> String
forall a. Semigroup a => a -> a -> a
<> String
modeExplanation
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
)
pNumStuffedUtxoCount :: Parser Word
pNumStuffedUtxoCount :: Parser Word
pNumStuffedUtxoCount =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"stuffed-utxo"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The number of fake UTxO entries to generate (default is 0)."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
pNumUtxoKeys :: Parser Word
pNumUtxoKeys :: Parser Word
pNumUtxoKeys =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"utxo-keys"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The number of UTxO keys to make (default is 0)."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
pSupply :: Parser (Maybe Coin)
pSupply :: Parser (Maybe Coin)
pSupply =
Parser Coin -> Parser (Maybe Coin)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
Opt.optional (Parser Coin -> Parser (Maybe Coin))
-> Parser Coin -> Parser (Maybe Coin)
forall a b. (a -> b) -> a -> b
$
(Integer -> Coin) -> Parser Integer -> Parser Coin
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Integer -> Coin
Coin (Parser Integer -> Parser Coin) -> Parser Integer -> Parser Coin
forall a b. (a -> b) -> a -> b
$
ReadM Integer -> Mod OptionFields Integer -> Parser Integer
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Integer
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Integer -> Parser Integer)
-> Mod OptionFields Integer -> Parser Integer
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Integer] -> Mod OptionFields Integer
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Integer
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"total-supply"
, String -> Mod OptionFields Integer
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"LOVELACE"
, String -> Mod OptionFields Integer
forall (f :: * -> *) a. String -> Mod f a
Opt.help (String -> Mod OptionFields Integer)
-> String -> Mod OptionFields Integer
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"The maximum possible amount of Lovelace, which is evenly distributed across stake holders. Overrides the value from the shelley genesis."
, String
" If --delegated-supply is specified, a part of this amount will be delegated."
]
]
pSupplyDelegated :: Parser (Maybe Coin)
pSupplyDelegated :: Parser (Maybe Coin)
pSupplyDelegated =
Parser Coin -> Parser (Maybe Coin)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
Opt.optional (Parser Coin -> Parser (Maybe Coin))
-> Parser Coin -> Parser (Maybe Coin)
forall a b. (a -> b) -> a -> b
$
(Integer -> Coin) -> Parser Integer -> Parser Coin
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Integer -> Coin
Coin (Parser Integer -> Parser Coin) -> Parser Integer -> Parser Coin
forall a b. (a -> b) -> a -> b
$
ReadM Integer -> Mod OptionFields Integer -> Parser Integer
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Integer
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Integer -> Parser Integer)
-> Mod OptionFields Integer -> Parser Integer
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Integer] -> Mod OptionFields Integer
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Integer
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"delegated-supply"
, String -> Mod OptionFields Integer
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"LOVELACE"
, String -> Mod OptionFields Integer
forall (f :: * -> *) a. String -> Mod f a
Opt.help (String -> Mod OptionFields Integer)
-> String -> Mod OptionFields Integer
forall a b. (a -> b) -> a -> b
$
[String] -> String
forall a. Monoid a => [a] -> a
mconcat
[ String
"The amount of the total supply which is evenly delegated. Defaulted to half of the total supply."
, String
" Cannot be more than the amount specified with --total-supply."
]
]
pRelays :: Parser FilePath
pRelays :: Parser String
pRelays =
String -> String -> Parser String
parseFilePath String
"relays" String
"JSON file specifying the relays of each stake pool."
pOutputDir :: Parser String
pOutputDir =
Mod OptionFields String -> Parser String
forall s. IsString s => Mod OptionFields s -> Parser s
Opt.strOption (Mod OptionFields String -> Parser String)
-> Mod OptionFields String -> Parser String
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields String] -> Mod OptionFields String
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields String
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"out-dir"
, String -> Mod OptionFields String
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"DIR"
, String -> Mod OptionFields String
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The directory where to generate the data. Created if not existing."
]
pGenesisHash :: Parser (GenesisCmds era)
pGenesisHash :: forall era. Parser (GenesisCmds era)
pGenesisHash =
GenesisFile -> GenesisCmds era
forall era. GenesisFile -> GenesisCmds era
GenesisHashFile (GenesisFile -> GenesisCmds era)
-> Parser GenesisFile -> Parser (GenesisCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> Parser GenesisFile
pGenesisFile String
"The genesis file."
pGenesisDir :: Parser GenesisDir
pGenesisDir :: Parser GenesisDir
pGenesisDir =
(String -> GenesisDir) -> Parser String -> Parser GenesisDir
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap String -> GenesisDir
GenesisDir (Parser String -> Parser GenesisDir)
-> Parser String -> Parser GenesisDir
forall a b. (a -> b) -> a -> b
$
Mod OptionFields String -> Parser String
forall s. IsString s => Mod OptionFields s -> Parser s
Opt.strOption (Mod OptionFields String -> Parser String)
-> Mod OptionFields String -> Parser String
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields String] -> Mod OptionFields String
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields String
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"genesis-dir"
, String -> Mod OptionFields String
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"DIR"
, String -> Mod OptionFields String
forall (f :: * -> *) a. String -> Mod f a
Opt.help
String
"The genesis directory containing the genesis template and required genesis/delegation/spending keys."
]
pMaybeSystemStart :: Parser (Maybe SystemStart)
pMaybeSystemStart :: Parser (Maybe SystemStart)
pMaybeSystemStart =
Parser SystemStart -> Parser (Maybe SystemStart)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
Opt.optional (Parser SystemStart -> Parser (Maybe SystemStart))
-> Parser SystemStart -> Parser (Maybe SystemStart)
forall a b. (a -> b) -> a -> b
$
(String -> SystemStart) -> Parser String -> Parser SystemStart
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (UTCTime -> SystemStart
SystemStart (UTCTime -> SystemStart)
-> (String -> UTCTime) -> String -> SystemStart
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> UTCTime
convertTime) (Parser String -> Parser SystemStart)
-> Parser String -> Parser SystemStart
forall a b. (a -> b) -> a -> b
$
Mod OptionFields String -> Parser String
forall s. IsString s => Mod OptionFields s -> Parser s
Opt.strOption (Mod OptionFields String -> Parser String)
-> Mod OptionFields String -> Parser String
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields String] -> Mod OptionFields String
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields String
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"start-time"
, String -> Mod OptionFields String
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"UTC-TIME"
, String -> Mod OptionFields String
forall (f :: * -> *) a. String -> Mod f a
Opt.help
String
"The genesis start time in YYYY-MM-DDThh:mm:ssZ format. If unspecified, will be the current time +30 seconds."
]
pGenesisNumGenesisKeys :: Parser Word
pGenesisNumGenesisKeys :: Parser Word
pGenesisNumGenesisKeys =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"gen-genesis-keys"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The number of genesis keys to make [default is 3]."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
3
]
pNodeConfigTemplate :: Parser (Maybe FilePath)
pNodeConfigTemplate :: Parser (Maybe String)
pNodeConfigTemplate = Parser String -> Parser (Maybe String)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (Parser String -> Parser (Maybe String))
-> Parser String -> Parser (Maybe String)
forall a b. (a -> b) -> a -> b
$ String -> String -> Parser String
parseFilePath String
"node-config-template" String
"the node config template"
pGenesisNumUTxOKeys :: Parser Word
pGenesisNumUTxOKeys :: Parser Word
pGenesisNumUTxOKeys =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"gen-utxo-keys"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The number of UTxO keys to make [default is 0]."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
pGenesisNumPools :: Parser Word
pGenesisNumPools :: Parser Word
pGenesisNumPools =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"gen-pools"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The number of stake pool credential sets to make [default is 0]."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
pGenesisNumStDelegs :: Parser Word
pGenesisNumStDelegs :: Parser Word
pGenesisNumStDelegs =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"gen-stake-delegs"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The number of stake delegator credential sets to make [default is 0]."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
pStuffedUtxoCount :: Parser Word
pStuffedUtxoCount :: Parser Word
pStuffedUtxoCount =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"num-stuffed-utxo"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"The number of fake UTxO entries to generate [default is 0]."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
pInitialSupplyNonDelegated :: Parser (Maybe Coin)
pInitialSupplyNonDelegated :: Parser (Maybe Coin)
pInitialSupplyNonDelegated =
Parser Coin -> Parser (Maybe Coin)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
Opt.optional (Parser Coin -> Parser (Maybe Coin))
-> Parser Coin -> Parser (Maybe Coin)
forall a b. (a -> b) -> a -> b
$
(Integer -> Coin) -> Parser Integer -> Parser Coin
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Integer -> Coin
Coin (Parser Integer -> Parser Coin) -> Parser Integer -> Parser Coin
forall a b. (a -> b) -> a -> b
$
ReadM Integer -> Mod OptionFields Integer -> Parser Integer
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Integer
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Integer -> Parser Integer)
-> Mod OptionFields Integer -> Parser Integer
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Integer] -> Mod OptionFields Integer
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Integer
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"supply"
, String -> Mod OptionFields Integer
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"LOVELACE"
, String -> Mod OptionFields Integer
forall (f :: * -> *) a. String -> Mod f a
Opt.help
String
"The initial coin supply in Lovelace which will be evenly distributed across initial, non-delegating stake holders."
]
pInitialSupplyDelegated :: Parser Coin
pInitialSupplyDelegated :: Parser Coin
pInitialSupplyDelegated =
(Maybe Integer -> Coin) -> Parser (Maybe Integer) -> Parser Coin
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (Integer -> Coin
Coin (Integer -> Coin)
-> (Maybe Integer -> Integer) -> Maybe Integer -> Coin
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Integer -> Maybe Integer -> Integer
forall a. a -> Maybe a -> a
fromMaybe Integer
0) (Parser (Maybe Integer) -> Parser Coin)
-> Parser (Maybe Integer) -> Parser Coin
forall a b. (a -> b) -> a -> b
$
Parser Integer -> Parser (Maybe Integer)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
Opt.optional (Parser Integer -> Parser (Maybe Integer))
-> Parser Integer -> Parser (Maybe Integer)
forall a b. (a -> b) -> a -> b
$
ReadM Integer -> Mod OptionFields Integer -> Parser Integer
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Integer
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Integer -> Parser Integer)
-> Mod OptionFields Integer -> Parser Integer
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Integer] -> Mod OptionFields Integer
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Integer
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"supply-delegated"
, String -> Mod OptionFields Integer
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"LOVELACE"
, String -> Mod OptionFields Integer
forall (f :: * -> *) a. String -> Mod f a
Opt.help
String
"The initial coin supply in Lovelace which will be evenly distributed across initial, delegating stake holders."
, Integer -> Mod OptionFields Integer
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Integer
0
]
pSecurityParam :: Parser Word64
pSecurityParam :: Parser Word64
pSecurityParam =
ReadM Word64 -> Mod OptionFields Word64 -> Parser Word64
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word64
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word64 -> Parser Word64)
-> Mod OptionFields Word64 -> Parser Word64
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word64] -> Mod OptionFields Word64
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word64
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"security-param"
, String -> Mod OptionFields Word64
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word64
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Security parameter for genesis file [default is 108]."
, Word64 -> Mod OptionFields Word64
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word64
108
]
pSlotLength :: Parser Word
pSlotLength :: Parser Word
pSlotLength =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"slot-length"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"slot length (ms) parameter for genesis file [default is 1000]."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
1_000
]
pSlotCoefficient :: Parser Rational
pSlotCoefficient :: Parser Rational
pSlotCoefficient =
ReadM Rational -> Mod OptionFields Rational -> Parser Rational
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Rational
readRationalUnitInterval (Mod OptionFields Rational -> Parser Rational)
-> Mod OptionFields Rational -> Parser Rational
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Rational] -> Mod OptionFields Rational
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Rational
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"slot-coefficient"
, String -> Mod OptionFields Rational
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"RATIONAL"
, String -> Mod OptionFields Rational
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Slot Coefficient for genesis file [default is .05]."
, Rational -> Mod OptionFields Rational
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Rational
0.05
]
pBulkPoolCredFiles :: Parser Word
pBulkPoolCredFiles :: Parser Word
pBulkPoolCredFiles =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"bulk-pool-cred-files"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Generate bulk pool credential files [default is 0]."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]
pBulkPoolsPerFile :: Parser Word
pBulkPoolsPerFile :: Parser Word
pBulkPoolsPerFile =
ReadM Word -> Mod OptionFields Word -> Parser Word
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option ReadM Word
forall a. (Typeable a, Integral a, Bits a) => ReadM a
integralReader (Mod OptionFields Word -> Parser Word)
-> Mod OptionFields Word -> Parser Word
forall a b. (a -> b) -> a -> b
$
[Mod OptionFields Word] -> Mod OptionFields Word
forall a. Monoid a => [a] -> a
mconcat
[ String -> Mod OptionFields Word
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"bulk-pools-per-file"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"INT"
, String -> Mod OptionFields Word
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Each bulk pool to contain this many pool credential sets [default is 0]."
, Word -> Mod OptionFields Word
forall (f :: * -> *) a. HasValue f => a -> Mod f a
Opt.value Word
0
]