{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}

module Cardano.CLI.EraBased.StakeAddress.Option
  ( pStakeAddressCmds
  )
where

import Cardano.Api

import Cardano.CLI.Environment
import Cardano.CLI.EraBased.Common.Option
import Cardano.CLI.EraBased.StakeAddress.Command
import Cardano.CLI.Parser

import Options.Applicative
import Options.Applicative qualified as Opt

pStakeAddressCmds
  :: ()
  => ShelleyBasedEra era
  -> EnvCli
  -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressCmds :: forall era.
ShelleyBasedEra era
-> EnvCli -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressCmds ShelleyBasedEra era
era EnvCli
envCli =
  String
-> InfoMod (StakeAddressCmds era)
-> [Maybe (Parser (StakeAddressCmds era))]
-> Maybe (Parser (StakeAddressCmds era))
forall a.
String -> InfoMod a -> [Maybe (Parser a)] -> Maybe (Parser a)
subInfoParser
    String
"stake-address"
    ( String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (StakeAddressCmds era))
-> String -> InfoMod (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$
        [String] -> String
forall a. Monoid a => [a] -> a
mconcat
          [ String
"Stake address commands."
          ]
    )
    [ Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
Just Parser (StakeAddressCmds era)
forall era. Parser (StakeAddressCmds era)
pStakeAddressKeyGenCmd
    , Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
Just Parser (StakeAddressCmds era)
forall era. Parser (StakeAddressCmds era)
pStakeAddressKeyHashCmd
    , Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
Just (EnvCli -> Parser (StakeAddressCmds era)
forall era. EnvCli -> Parser (StakeAddressCmds era)
pStakeAddressBuildCmd EnvCli
envCli)
    , Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
Just (ShelleyBasedEra era -> Parser (StakeAddressCmds era)
forall era. ShelleyBasedEra era -> Parser (StakeAddressCmds era)
pStakeAddressRegistrationCertificateCmd ShelleyBasedEra era
era)
    , Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
Just (ShelleyBasedEra era -> Parser (StakeAddressCmds era)
forall era. ShelleyBasedEra era -> Parser (StakeAddressCmds era)
pStakeAddressDeregistrationCertificateCmd ShelleyBasedEra era
era)
    , Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
Just (ShelleyBasedEra era -> Parser (StakeAddressCmds era)
forall era. ShelleyBasedEra era -> Parser (StakeAddressCmds era)
pStakeAddressStakeDelegationCertificateCmd ShelleyBasedEra era
era)
    , ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
forall era.
ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressStakeAndVoteDelegationCertificateCmd ShelleyBasedEra era
era
    , ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
forall era.
ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressVoteDelegationCertificateCmd ShelleyBasedEra era
era
    , ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
forall era.
ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressRegistrationAndDelegationCertificateCmd ShelleyBasedEra era
era
    , ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
forall era.
ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressRegistrationAndVoteDelegationCertificateCmd ShelleyBasedEra era
era
    , ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
forall era.
ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressRegistrationStakeAndVoteDelegationCertificateCmd ShelleyBasedEra era
era
    ]

pStakeAddressKeyGenCmd
  :: ()
  => Parser (StakeAddressCmds era)
pStakeAddressKeyGenCmd :: forall era. Parser (StakeAddressCmds era)
pStakeAddressKeyGenCmd = do
  Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
    (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"key-gen"
    (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
      ( KeyOutputFormat
-> VerificationKeyFile 'Out
-> SigningKeyFile 'Out
-> StakeAddressCmds era
forall era.
KeyOutputFormat
-> VerificationKeyFile 'Out
-> SigningKeyFile 'Out
-> StakeAddressCmds era
StakeAddressKeyGenCmd
          (KeyOutputFormat
 -> VerificationKeyFile 'Out
 -> SigningKeyFile 'Out
 -> StakeAddressCmds era)
-> Parser KeyOutputFormat
-> Parser
     (VerificationKeyFile 'Out
      -> SigningKeyFile 'Out -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser KeyOutputFormat
pKeyOutputFormat
          Parser
  (VerificationKeyFile 'Out
   -> SigningKeyFile 'Out -> StakeAddressCmds era)
-> Parser (VerificationKeyFile 'Out)
-> Parser (SigningKeyFile 'Out -> StakeAddressCmds 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 (VerificationKeyFile 'Out)
forall keyrole. Parser (File (VerificationKey keyrole) 'Out)
pVerificationKeyFileOut
          Parser (SigningKeyFile 'Out -> StakeAddressCmds era)
-> Parser (SigningKeyFile 'Out) -> Parser (StakeAddressCmds 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 (SigningKeyFile 'Out)
forall keyrole. Parser (File (SigningKey keyrole) 'Out)
pSigningKeyFileOut
      )
    (InfoMod (StakeAddressCmds era)
 -> ParserInfo (StakeAddressCmds era))
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Create a stake address key pair"

pStakeAddressKeyHashCmd
  :: ()
  => Parser (StakeAddressCmds era)
pStakeAddressKeyHashCmd :: forall era. Parser (StakeAddressCmds era)
pStakeAddressKeyHashCmd =
  Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
    (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"key-hash"
    (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
      ( VerificationKeyOrFile StakeKey
-> Maybe (File () 'Out) -> StakeAddressCmds era
forall era.
VerificationKeyOrFile StakeKey
-> Maybe (File () 'Out) -> StakeAddressCmds era
StakeAddressKeyHashCmd
          (VerificationKeyOrFile StakeKey
 -> Maybe (File () 'Out) -> StakeAddressCmds era)
-> Parser (VerificationKeyOrFile StakeKey)
-> Parser (Maybe (File () 'Out) -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe String -> Parser (VerificationKeyOrFile StakeKey)
pStakeVerificationKeyOrFile Maybe String
forall a. Maybe a
Nothing
          Parser (Maybe (File () 'Out) -> StakeAddressCmds era)
-> Parser (Maybe (File () 'Out)) -> Parser (StakeAddressCmds 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 (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
      )
    (InfoMod (StakeAddressCmds era)
 -> ParserInfo (StakeAddressCmds era))
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Print the hash of a stake address key"

pStakeAddressBuildCmd
  :: ()
  => EnvCli
  -> Parser (StakeAddressCmds era)
pStakeAddressBuildCmd :: forall era. EnvCli -> Parser (StakeAddressCmds era)
pStakeAddressBuildCmd EnvCli
envCli = do
  Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
    (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"build"
    (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
      ( StakeVerifier
-> NetworkId -> Maybe (File () 'Out) -> StakeAddressCmds era
forall era.
StakeVerifier
-> NetworkId -> Maybe (File () 'Out) -> StakeAddressCmds era
StakeAddressBuildCmd
          (StakeVerifier
 -> NetworkId -> Maybe (File () 'Out) -> StakeAddressCmds era)
-> Parser StakeVerifier
-> Parser
     (NetworkId -> Maybe (File () 'Out) -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe String -> Parser StakeVerifier
pStakeVerifier Maybe String
forall a. Maybe a
Nothing
          Parser (NetworkId -> Maybe (File () 'Out) -> StakeAddressCmds era)
-> Parser NetworkId
-> Parser (Maybe (File () 'Out) -> StakeAddressCmds 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 (Maybe (File () 'Out) -> StakeAddressCmds era)
-> Parser (Maybe (File () 'Out)) -> Parser (StakeAddressCmds 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 (File () 'Out))
forall content. Parser (Maybe (File content 'Out))
pMaybeOutputFile
      )
    (InfoMod (StakeAddressCmds era)
 -> ParserInfo (StakeAddressCmds era))
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Build a stake address"

pStakeAddressRegistrationCertificateCmd
  :: ()
  => ShelleyBasedEra era
  -> Parser (StakeAddressCmds era)
pStakeAddressRegistrationCertificateCmd :: forall era. ShelleyBasedEra era -> Parser (StakeAddressCmds era)
pStakeAddressRegistrationCertificateCmd ShelleyBasedEra era
sbe = do
  Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$
    String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"registration-certificate" (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$
      Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
        ( ShelleyBasedEra era
-> StakeIdentifier
-> Maybe (Featured ConwayEraOnwards era Coin)
-> File () 'Out
-> StakeAddressCmds era
forall era.
ShelleyBasedEra era
-> StakeIdentifier
-> Maybe (Featured ConwayEraOnwards era Coin)
-> File () 'Out
-> StakeAddressCmds era
StakeAddressRegistrationCertificateCmd ShelleyBasedEra era
sbe
            (StakeIdentifier
 -> Maybe (Featured ConwayEraOnwards era Coin)
 -> File () 'Out
 -> StakeAddressCmds era)
-> Parser StakeIdentifier
-> Parser
     (Maybe (Featured ConwayEraOnwards era Coin)
      -> File () 'Out -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe String -> Parser StakeIdentifier
pStakeIdentifier Maybe String
forall a. Maybe a
Nothing
            Parser
  (Maybe (Featured ConwayEraOnwards era Coin)
   -> File () 'Out -> StakeAddressCmds era)
-> Parser (Maybe (Featured ConwayEraOnwards era Coin))
-> Parser (File () 'Out -> StakeAddressCmds era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> CardanoEra era
-> Parser Coin
-> Parser (Maybe (Featured ConwayEraOnwards era Coin))
forall (eon :: * -> *) (f :: * -> *) era a.
(Eon eon, ToCardanoEra f) =>
f era -> Parser a -> Parser (Maybe (Featured eon era a))
pFeatured (ShelleyBasedEra era -> CardanoEra era
forall era. ShelleyBasedEra era -> CardanoEra era
forall (eon :: * -> *) era.
ToCardanoEra eon =>
eon era -> CardanoEra era
toCardanoEra ShelleyBasedEra era
sbe) Parser Coin
pKeyRegistDeposit
            Parser (File () 'Out -> StakeAddressCmds era)
-> Parser (File () 'Out) -> Parser (StakeAddressCmds 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 (File () 'Out)
forall content. Parser (File content 'Out)
pOutputFile
        )
        InfoMod (StakeAddressCmds era)
forall {a}. InfoMod a
desc
 where
  desc :: InfoMod a
desc = String -> InfoMod a
forall a. String -> InfoMod a
Opt.progDesc String
"Create a stake address registration certificate"

pStakeAddressDeregistrationCertificateCmd
  :: ()
  => ShelleyBasedEra era
  -> Parser (StakeAddressCmds era)
pStakeAddressDeregistrationCertificateCmd :: forall era. ShelleyBasedEra era -> Parser (StakeAddressCmds era)
pStakeAddressDeregistrationCertificateCmd ShelleyBasedEra era
sbe =
  Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
    (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"deregistration-certificate"
    (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
      ( ShelleyBasedEra era
-> StakeIdentifier
-> Maybe (Featured ConwayEraOnwards era Coin)
-> File () 'Out
-> StakeAddressCmds era
forall era.
ShelleyBasedEra era
-> StakeIdentifier
-> Maybe (Featured ConwayEraOnwards era Coin)
-> File () 'Out
-> StakeAddressCmds era
StakeAddressDeregistrationCertificateCmd ShelleyBasedEra era
sbe
          (StakeIdentifier
 -> Maybe (Featured ConwayEraOnwards era Coin)
 -> File () 'Out
 -> StakeAddressCmds era)
-> Parser StakeIdentifier
-> Parser
     (Maybe (Featured ConwayEraOnwards era Coin)
      -> File () 'Out -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe String -> Parser StakeIdentifier
pStakeIdentifier Maybe String
forall a. Maybe a
Nothing
          Parser
  (Maybe (Featured ConwayEraOnwards era Coin)
   -> File () 'Out -> StakeAddressCmds era)
-> Parser (Maybe (Featured ConwayEraOnwards era Coin))
-> Parser (File () 'Out -> StakeAddressCmds era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> CardanoEra era
-> Parser Coin
-> Parser (Maybe (Featured ConwayEraOnwards era Coin))
forall (eon :: * -> *) (f :: * -> *) era a.
(Eon eon, ToCardanoEra f) =>
f era -> Parser a -> Parser (Maybe (Featured eon era a))
pFeatured (ShelleyBasedEra era -> CardanoEra era
forall era. ShelleyBasedEra era -> CardanoEra era
forall (eon :: * -> *) era.
ToCardanoEra eon =>
eon era -> CardanoEra era
toCardanoEra ShelleyBasedEra era
sbe) Parser Coin
pKeyRegistDeposit
          Parser (File () 'Out -> StakeAddressCmds era)
-> Parser (File () 'Out) -> Parser (StakeAddressCmds 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 (File () 'Out)
forall content. Parser (File content 'Out)
pOutputFile
      )
    (InfoMod (StakeAddressCmds era)
 -> ParserInfo (StakeAddressCmds era))
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Create a stake address deregistration certificate"

pStakeAddressStakeDelegationCertificateCmd
  :: ()
  => ShelleyBasedEra era
  -> Parser (StakeAddressCmds era)
pStakeAddressStakeDelegationCertificateCmd :: forall era. ShelleyBasedEra era -> Parser (StakeAddressCmds era)
pStakeAddressStakeDelegationCertificateCmd ShelleyBasedEra era
sbe = do
  Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
    (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-delegation-certificate"
    (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
      ( ShelleyBasedEra era
-> StakeIdentifier
-> VerificationKeyOrHashOrFile StakePoolKey
-> File () 'Out
-> StakeAddressCmds era
forall era.
ShelleyBasedEra era
-> StakeIdentifier
-> VerificationKeyOrHashOrFile StakePoolKey
-> File () 'Out
-> StakeAddressCmds era
StakeAddressStakeDelegationCertificateCmd ShelleyBasedEra era
sbe
          (StakeIdentifier
 -> VerificationKeyOrHashOrFile StakePoolKey
 -> File () 'Out
 -> StakeAddressCmds era)
-> Parser StakeIdentifier
-> Parser
     (VerificationKeyOrHashOrFile StakePoolKey
      -> File () 'Out -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe String -> Parser StakeIdentifier
pStakeIdentifier Maybe String
forall a. Maybe a
Nothing
          Parser
  (VerificationKeyOrHashOrFile StakePoolKey
   -> File () 'Out -> StakeAddressCmds era)
-> Parser (VerificationKeyOrHashOrFile StakePoolKey)
-> Parser (File () 'Out -> StakeAddressCmds era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe String -> Parser (VerificationKeyOrHashOrFile StakePoolKey)
pStakePoolVerificationKeyOrHashOrFile Maybe String
forall a. Maybe a
Nothing
          Parser (File () 'Out -> StakeAddressCmds era)
-> Parser (File () 'Out) -> Parser (StakeAddressCmds 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 (File () 'Out)
forall content. Parser (File content 'Out)
pOutputFile
      )
    (InfoMod (StakeAddressCmds era)
 -> ParserInfo (StakeAddressCmds era))
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc
    (String -> InfoMod (StakeAddressCmds era))
-> String -> InfoMod (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
      [ String
"Create a stake address stake delegation certificate, which when submitted in a transaction "
      , String
"delegates stake to a stake pool."
      ]

pStakeAddressStakeAndVoteDelegationCertificateCmd
  :: ()
  => ShelleyBasedEra era
  -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressStakeAndVoteDelegationCertificateCmd :: forall era.
ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressStakeAndVoteDelegationCertificateCmd ShelleyBasedEra era
era = do
  ConwayEraOnwards era
w <- ShelleyBasedEra era -> Maybe (ConwayEraOnwards era)
forall (eon :: * -> *) era.
Eon eon =>
ShelleyBasedEra era -> Maybe (eon era)
forShelleyBasedEraMaybeEon ShelleyBasedEra era
era
  Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
    (Parser (StakeAddressCmds era)
 -> Maybe (Parser (StakeAddressCmds era)))
-> Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a b. (a -> b) -> a -> b
$ Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
    (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"stake-and-vote-delegation-certificate"
    (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
      ( ConwayEraOnwards era
-> StakeIdentifier
-> VerificationKeyOrHashOrFile StakePoolKey
-> VoteDelegationTarget
-> File () 'Out
-> StakeAddressCmds era
forall era.
ConwayEraOnwards era
-> StakeIdentifier
-> VerificationKeyOrHashOrFile StakePoolKey
-> VoteDelegationTarget
-> File () 'Out
-> StakeAddressCmds era
StakeAddressStakeAndVoteDelegationCertificateCmd ConwayEraOnwards era
w
          (StakeIdentifier
 -> VerificationKeyOrHashOrFile StakePoolKey
 -> VoteDelegationTarget
 -> File () 'Out
 -> StakeAddressCmds era)
-> Parser StakeIdentifier
-> Parser
     (VerificationKeyOrHashOrFile StakePoolKey
      -> VoteDelegationTarget -> File () 'Out -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe String -> Parser StakeIdentifier
pStakeIdentifier Maybe String
forall a. Maybe a
Nothing
          Parser
  (VerificationKeyOrHashOrFile StakePoolKey
   -> VoteDelegationTarget -> File () 'Out -> StakeAddressCmds era)
-> Parser (VerificationKeyOrHashOrFile StakePoolKey)
-> Parser
     (VoteDelegationTarget -> File () 'Out -> StakeAddressCmds era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe String -> Parser (VerificationKeyOrHashOrFile StakePoolKey)
pStakePoolVerificationKeyOrHashOrFile Maybe String
forall a. Maybe a
Nothing
          Parser
  (VoteDelegationTarget -> File () 'Out -> StakeAddressCmds era)
-> Parser VoteDelegationTarget
-> Parser (File () 'Out -> StakeAddressCmds 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 VoteDelegationTarget
pVoteDelegationTarget
          Parser (File () 'Out -> StakeAddressCmds era)
-> Parser (File () 'Out) -> Parser (StakeAddressCmds 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 (File () 'Out)
forall content. Parser (File content 'Out)
pOutputFile
      )
    (InfoMod (StakeAddressCmds era)
 -> ParserInfo (StakeAddressCmds era))
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc
    (String -> InfoMod (StakeAddressCmds era))
-> String -> InfoMod (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
      [ String
"Create a stake address stake and vote delegation certificate, which when submitted in a transaction "
      , String
"delegates stake to a stake pool and a DRep."
      ]

pStakeAddressVoteDelegationCertificateCmd
  :: ()
  => ShelleyBasedEra era
  -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressVoteDelegationCertificateCmd :: forall era.
ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressVoteDelegationCertificateCmd ShelleyBasedEra era
era = do
  ConwayEraOnwards era
w <- ShelleyBasedEra era -> Maybe (ConwayEraOnwards era)
forall (eon :: * -> *) era.
Eon eon =>
ShelleyBasedEra era -> Maybe (eon era)
forShelleyBasedEraMaybeEon ShelleyBasedEra era
era
  Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
    (Parser (StakeAddressCmds era)
 -> Maybe (Parser (StakeAddressCmds era)))
-> Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a b. (a -> b) -> a -> b
$ Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
    (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"vote-delegation-certificate"
    (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
      ( ConwayEraOnwards era
-> StakeIdentifier
-> VoteDelegationTarget
-> File () 'Out
-> StakeAddressCmds era
forall era.
ConwayEraOnwards era
-> StakeIdentifier
-> VoteDelegationTarget
-> File () 'Out
-> StakeAddressCmds era
StakeAddressVoteDelegationCertificateCmd ConwayEraOnwards era
w
          (StakeIdentifier
 -> VoteDelegationTarget -> File () 'Out -> StakeAddressCmds era)
-> Parser StakeIdentifier
-> Parser
     (VoteDelegationTarget -> File () 'Out -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe String -> Parser StakeIdentifier
pStakeIdentifier Maybe String
forall a. Maybe a
Nothing
          Parser
  (VoteDelegationTarget -> File () 'Out -> StakeAddressCmds era)
-> Parser VoteDelegationTarget
-> Parser (File () 'Out -> StakeAddressCmds 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 VoteDelegationTarget
pVoteDelegationTarget
          Parser (File () 'Out -> StakeAddressCmds era)
-> Parser (File () 'Out) -> Parser (StakeAddressCmds 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 (File () 'Out)
forall content. Parser (File content 'Out)
pOutputFile
      )
    (InfoMod (StakeAddressCmds era)
 -> ParserInfo (StakeAddressCmds era))
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc
    (String -> InfoMod (StakeAddressCmds era))
-> String -> InfoMod (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
      [ String
"Create a stake address vote delegation certificate, which when submitted in a transaction "
      , String
"delegates stake to a DRep."
      ]

pStakeAddressRegistrationAndDelegationCertificateCmd
  :: ()
  => ShelleyBasedEra era
  -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressRegistrationAndDelegationCertificateCmd :: forall era.
ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressRegistrationAndDelegationCertificateCmd ShelleyBasedEra era
era = do
  ConwayEraOnwards era
w <- ShelleyBasedEra era -> Maybe (ConwayEraOnwards era)
forall (eon :: * -> *) era.
Eon eon =>
ShelleyBasedEra era -> Maybe (eon era)
forShelleyBasedEraMaybeEon ShelleyBasedEra era
era
  Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
    (Parser (StakeAddressCmds era)
 -> Maybe (Parser (StakeAddressCmds era)))
-> Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a b. (a -> b) -> a -> b
$ Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
    (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"registration-and-delegation-certificate"
    (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
      ( ConwayEraOnwards era
-> StakeIdentifier
-> VerificationKeyOrHashOrFile StakePoolKey
-> Coin
-> File () 'Out
-> StakeAddressCmds era
forall era.
ConwayEraOnwards era
-> StakeIdentifier
-> VerificationKeyOrHashOrFile StakePoolKey
-> Coin
-> File () 'Out
-> StakeAddressCmds era
StakeAddressRegistrationAndDelegationCertificateCmd ConwayEraOnwards era
w
          (StakeIdentifier
 -> VerificationKeyOrHashOrFile StakePoolKey
 -> Coin
 -> File () 'Out
 -> StakeAddressCmds era)
-> Parser StakeIdentifier
-> Parser
     (VerificationKeyOrHashOrFile StakePoolKey
      -> Coin -> File () 'Out -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe String -> Parser StakeIdentifier
pStakeIdentifier Maybe String
forall a. Maybe a
Nothing
          Parser
  (VerificationKeyOrHashOrFile StakePoolKey
   -> Coin -> File () 'Out -> StakeAddressCmds era)
-> Parser (VerificationKeyOrHashOrFile StakePoolKey)
-> Parser (Coin -> File () 'Out -> StakeAddressCmds era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe String -> Parser (VerificationKeyOrHashOrFile StakePoolKey)
pStakePoolVerificationKeyOrHashOrFile Maybe String
forall a. Maybe a
Nothing
          Parser (Coin -> File () 'Out -> StakeAddressCmds era)
-> Parser Coin -> Parser (File () 'Out -> StakeAddressCmds 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
pKeyRegistDeposit
          Parser (File () 'Out -> StakeAddressCmds era)
-> Parser (File () 'Out) -> Parser (StakeAddressCmds 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 (File () 'Out)
forall content. Parser (File content 'Out)
pOutputFile
      )
    (InfoMod (StakeAddressCmds era)
 -> ParserInfo (StakeAddressCmds era))
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc
    (String -> InfoMod (StakeAddressCmds era))
-> String -> InfoMod (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
      [ String
"Create a stake address registration and delegation certificate, which when submitted in a transaction "
      , String
"registers a stake address and delegates stake to a stake pool."
      ]

pStakeAddressRegistrationAndVoteDelegationCertificateCmd
  :: ()
  => ShelleyBasedEra era
  -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressRegistrationAndVoteDelegationCertificateCmd :: forall era.
ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressRegistrationAndVoteDelegationCertificateCmd ShelleyBasedEra era
era = do
  ConwayEraOnwards era
w <- ShelleyBasedEra era -> Maybe (ConwayEraOnwards era)
forall (eon :: * -> *) era.
Eon eon =>
ShelleyBasedEra era -> Maybe (eon era)
forShelleyBasedEraMaybeEon ShelleyBasedEra era
era
  Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
    (Parser (StakeAddressCmds era)
 -> Maybe (Parser (StakeAddressCmds era)))
-> Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a b. (a -> b) -> a -> b
$ Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
    (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"registration-and-vote-delegation-certificate"
    (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
      ( ConwayEraOnwards era
-> StakeIdentifier
-> VoteDelegationTarget
-> Coin
-> File () 'Out
-> StakeAddressCmds era
forall era.
ConwayEraOnwards era
-> StakeIdentifier
-> VoteDelegationTarget
-> Coin
-> File () 'Out
-> StakeAddressCmds era
StakeAddressRegistrationAndVoteDelegationCertificateCmd ConwayEraOnwards era
w
          (StakeIdentifier
 -> VoteDelegationTarget
 -> Coin
 -> File () 'Out
 -> StakeAddressCmds era)
-> Parser StakeIdentifier
-> Parser
     (VoteDelegationTarget
      -> Coin -> File () 'Out -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe String -> Parser StakeIdentifier
pStakeIdentifier Maybe String
forall a. Maybe a
Nothing
          Parser
  (VoteDelegationTarget
   -> Coin -> File () 'Out -> StakeAddressCmds era)
-> Parser VoteDelegationTarget
-> Parser (Coin -> File () 'Out -> StakeAddressCmds 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 VoteDelegationTarget
pVoteDelegationTarget
          Parser (Coin -> File () 'Out -> StakeAddressCmds era)
-> Parser Coin -> Parser (File () 'Out -> StakeAddressCmds 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
pKeyRegistDeposit
          Parser (File () 'Out -> StakeAddressCmds era)
-> Parser (File () 'Out) -> Parser (StakeAddressCmds 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 (File () 'Out)
forall content. Parser (File content 'Out)
pOutputFile
      )
    (InfoMod (StakeAddressCmds era)
 -> ParserInfo (StakeAddressCmds era))
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc
    (String -> InfoMod (StakeAddressCmds era))
-> String -> InfoMod (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
      [ String
"Create a stake address registration and vote delegation certificate, which when submitted in a transaction "
      , String
"registers a stake address and delegates votes to a DRep or pre-defined voting option."
      ]

pStakeAddressRegistrationStakeAndVoteDelegationCertificateCmd
  :: ()
  => ShelleyBasedEra era
  -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressRegistrationStakeAndVoteDelegationCertificateCmd :: forall era.
ShelleyBasedEra era -> Maybe (Parser (StakeAddressCmds era))
pStakeAddressRegistrationStakeAndVoteDelegationCertificateCmd ShelleyBasedEra era
era = do
  ConwayEraOnwards era
w <- ShelleyBasedEra era -> Maybe (ConwayEraOnwards era)
forall (eon :: * -> *) era.
Eon eon =>
ShelleyBasedEra era -> Maybe (eon era)
forShelleyBasedEraMaybeEon ShelleyBasedEra era
era
  Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
    (Parser (StakeAddressCmds era)
 -> Maybe (Parser (StakeAddressCmds era)))
-> Parser (StakeAddressCmds era)
-> Maybe (Parser (StakeAddressCmds era))
forall a b. (a -> b) -> a -> b
$ Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.hsubparser
    (Mod CommandFields (StakeAddressCmds era)
 -> Parser (StakeAddressCmds era))
-> Mod CommandFields (StakeAddressCmds era)
-> Parser (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
commandWithMetavar String
"registration-stake-and-vote-delegation-certificate"
    (ParserInfo (StakeAddressCmds era)
 -> Mod CommandFields (StakeAddressCmds era))
-> ParserInfo (StakeAddressCmds era)
-> Mod CommandFields (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ Parser (StakeAddressCmds era)
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info
      ( ConwayEraOnwards era
-> StakeIdentifier
-> VerificationKeyOrHashOrFile StakePoolKey
-> VoteDelegationTarget
-> Coin
-> File () 'Out
-> StakeAddressCmds era
forall era.
ConwayEraOnwards era
-> StakeIdentifier
-> VerificationKeyOrHashOrFile StakePoolKey
-> VoteDelegationTarget
-> Coin
-> File () 'Out
-> StakeAddressCmds era
StakeAddressRegistrationStakeAndVoteDelegationCertificateCmd ConwayEraOnwards era
w
          (StakeIdentifier
 -> VerificationKeyOrHashOrFile StakePoolKey
 -> VoteDelegationTarget
 -> Coin
 -> File () 'Out
 -> StakeAddressCmds era)
-> Parser StakeIdentifier
-> Parser
     (VerificationKeyOrHashOrFile StakePoolKey
      -> VoteDelegationTarget
      -> Coin
      -> File () 'Out
      -> StakeAddressCmds era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe String -> Parser StakeIdentifier
pStakeIdentifier Maybe String
forall a. Maybe a
Nothing
          Parser
  (VerificationKeyOrHashOrFile StakePoolKey
   -> VoteDelegationTarget
   -> Coin
   -> File () 'Out
   -> StakeAddressCmds era)
-> Parser (VerificationKeyOrHashOrFile StakePoolKey)
-> Parser
     (VoteDelegationTarget
      -> Coin -> File () 'Out -> StakeAddressCmds era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Maybe String -> Parser (VerificationKeyOrHashOrFile StakePoolKey)
pStakePoolVerificationKeyOrHashOrFile Maybe String
forall a. Maybe a
Nothing
          Parser
  (VoteDelegationTarget
   -> Coin -> File () 'Out -> StakeAddressCmds era)
-> Parser VoteDelegationTarget
-> Parser (Coin -> File () 'Out -> StakeAddressCmds 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 VoteDelegationTarget
pVoteDelegationTarget
          Parser (Coin -> File () 'Out -> StakeAddressCmds era)
-> Parser Coin -> Parser (File () 'Out -> StakeAddressCmds 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
pKeyRegistDeposit
          Parser (File () 'Out -> StakeAddressCmds era)
-> Parser (File () 'Out) -> Parser (StakeAddressCmds 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 (File () 'Out)
forall content. Parser (File content 'Out)
pOutputFile
      )
    (InfoMod (StakeAddressCmds era)
 -> ParserInfo (StakeAddressCmds era))
-> InfoMod (StakeAddressCmds era)
-> ParserInfo (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ String -> InfoMod (StakeAddressCmds era)
forall a. String -> InfoMod a
Opt.progDesc
    (String -> InfoMod (StakeAddressCmds era))
-> String -> InfoMod (StakeAddressCmds era)
forall a b. (a -> b) -> a -> b
$ [String] -> String
forall a. Monoid a => [a] -> a
mconcat
      [ String
"Create a stake address registration, stake delegation and vote delegation certificate, which when submitted in a transaction "
      , String
"registers a stake address, delgates stake to a pool, and delegates votes to a DRep or pre-defined voting option."
      ]