{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}

module Cardano.CLI.EraBased.Options.Transaction
  ( pTransactionCmds
  )
where

import           Cardano.Api hiding (QueryInShelleyBasedEra (..))
import qualified Cardano.Api.Experimental as Exp

import           Cardano.CLI.Environment (EnvCli (..))
import           Cardano.CLI.EraBased.Commands.Transaction
import           Cardano.CLI.EraBased.Options.Common
import           Cardano.CLI.Parser
import           Cardano.CLI.Types.Common

import           Data.Foldable
import           Options.Applicative hiding (help, str)
import qualified Options.Applicative as Opt
import qualified Options.Applicative.Help as H
import           Prettyprinter (line)

{- HLINT ignore "Use <$>" -}
{- HLINT ignore "Move brackets to avoid $" -}

pTransactionCmds
  :: ()
  => ShelleyBasedEra era
  -> EnvCli
  -> Maybe (Parser (TransactionCmds era))
pTransactionCmds :: forall era.
ShelleyBasedEra era
-> EnvCli -> Maybe (Parser (TransactionCmds era))
pTransactionCmds ShelleyBasedEra era
era' EnvCli
envCli =
  String
-> InfoMod (TransactionCmds era)
-> [Maybe (Parser (TransactionCmds era))]
-> Maybe (Parser (TransactionCmds era))
forall a.
String -> InfoMod a -> [Maybe (Parser a)] -> Maybe (Parser a)
subInfoParser
    String
"transaction"
    ( String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (TransactionCmds era))
-> String -> InfoMod (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
        [String] -> String
forall a. Monoid a => [a] -> a
mconcat
          [ String
"Transaction commands."
          ]
    )
    [ Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
        String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"build-raw" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (ShelleyBasedEra era -> Parser (TransactionCmds era)
forall era. ShelleyBasedEra era -> Parser (TransactionCmds era)
pTransactionBuildRaw ShelleyBasedEra era
era') (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
            Maybe Doc -> InfoMod (TransactionCmds era)
forall a. Maybe Doc -> InfoMod a
Opt.progDescDoc (Maybe Doc -> InfoMod (TransactionCmds era))
-> Maybe Doc -> InfoMod (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
              Doc -> Maybe Doc
forall a. a -> Maybe a
Just (Doc -> Maybe Doc) -> Doc -> Maybe Doc
forall a b. (a -> b) -> a -> b
$
                [Doc] -> Doc
forall a. Monoid a => [a] -> a
mconcat
                  [ forall a ann. Pretty a => a -> Doc ann
pretty @String String
"Build a transaction (low-level, inconvenient)"
                  , Doc
forall ann. Doc ann
line
                  , Doc
forall ann. Doc ann
line
                  , Doc -> Doc
H.yellow (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
                      [Doc] -> Doc
forall a. Monoid a => [a] -> a
mconcat
                        [ Doc
"Please note "
                        , Doc -> Doc
H.underline Doc
"the order"
                        , Doc
" of some cmd options is crucial. If used incorrectly may produce "
                        , Doc
"undesired tx body. See nested [] notation above for details."
                        ]
                  ]
    , ShelleyBasedEra era
-> EnvCli -> Maybe (Parser (TransactionCmds era))
forall era.
ShelleyBasedEra era
-> EnvCli -> Maybe (Parser (TransactionCmds era))
pTransactionBuildCmd ShelleyBasedEra era
era' EnvCli
envCli
    , ShelleyBasedEra era
-> Maybe (Parser (TransactionCmds era))
-> (MaryEraOnwards era -> Maybe (Parser (TransactionCmds era)))
-> Maybe (Parser (TransactionCmds era))
forall (eon :: * -> *) era a.
Eon eon =>
ShelleyBasedEra era -> a -> (eon era -> a) -> a
forShelleyBasedEraInEon ShelleyBasedEra era
era' Maybe (Parser (TransactionCmds era))
forall a. Maybe a
Nothing (MaryEraOnwards era
-> EnvCli -> Maybe (Parser (TransactionCmds era))
forall era.
MaryEraOnwards era
-> EnvCli -> Maybe (Parser (TransactionCmds era))
`pTransactionBuildEstimateCmd` EnvCli
envCli)
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
        String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"sign" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (TransactionCmds era)
forall era. EnvCli -> Parser (TransactionCmds era)
pTransactionSign EnvCli
envCli) (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
            String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Sign a transaction"
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
        String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"witness" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (TransactionCmds era)
forall era. EnvCli -> Parser (TransactionCmds era)
pTransactionCreateWitness EnvCli
envCli) (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
            String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Create a transaction witness"
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
        String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"assemble" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (TransactionCmds era)
forall era. Parser (TransactionCmds era)
pTransactionAssembleTxBodyWit (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
            String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Assemble a tx body and witness(es) to form a transaction"
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just Parser (TransactionCmds era)
forall era. Parser (TransactionCmds era)
pSignWitnessBackwardCompatible
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
        String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"submit" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (EnvCli -> Parser (TransactionCmds era)
forall era. EnvCli -> Parser (TransactionCmds era)
pTransactionSubmit EnvCli
envCli) (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
            String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc (String -> InfoMod (TransactionCmds era))
-> String -> InfoMod (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
              [String] -> String
forall a. Monoid a => [a] -> a
mconcat
                [ String
"Submit a transaction to the local node whose Unix domain socket "
                , String
"is obtained from the CARDANO_NODE_SOCKET_PATH environment variable."
                ]
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
        String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"policyid" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (TransactionCmds era)
forall era. Parser (TransactionCmds era)
pTransactionPolicyId (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
            String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Calculate the PolicyId from the monetary policy script."
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
        String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"calculate-min-fee" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (TransactionCmds era)
forall era. Parser (TransactionCmds era)
pTransactionCalculateMinFee (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
            String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Calculate the minimum fee for a transaction."
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
        String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"calculate-min-required-utxo" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (ShelleyBasedEra era -> Parser (TransactionCmds era)
forall era. ShelleyBasedEra era -> Parser (TransactionCmds era)
pTransactionCalculateMinReqUTxO ShelleyBasedEra era
era') (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
            String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Calculate the minimum required UTxO for a transaction output."
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$ ShelleyBasedEra era -> Parser (TransactionCmds era)
forall era. ShelleyBasedEra era -> Parser (TransactionCmds era)
pCalculateMinRequiredUtxoBackwardCompatible ShelleyBasedEra era
era'
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
        String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"hash-script-data" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (TransactionCmds era)
forall era. Parser (TransactionCmds era)
pTxHashScriptData (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
            String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Calculate the hash of script data."
    , Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
Just (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
        String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"txid" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (TransactionCmds era)
forall era. Parser (TransactionCmds era)
pTransactionId (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
            String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Print a transaction identifier."
    ]

-- Backwards compatible parsers
calcMinValueInfo :: ShelleyBasedEra era -> ParserInfo (TransactionCmds era)
calcMinValueInfo :: forall era. ShelleyBasedEra era -> ParserInfo (TransactionCmds era)
calcMinValueInfo ShelleyBasedEra era
era' =
  Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (ShelleyBasedEra era -> Parser (TransactionCmds era)
forall era. ShelleyBasedEra era -> Parser (TransactionCmds era)
pTransactionCalculateMinReqUTxO ShelleyBasedEra era
era') (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"DEPRECATED: Use 'calculate-min-required-utxo' instead."

pCalculateMinRequiredUtxoBackwardCompatible :: ShelleyBasedEra era -> Parser (TransactionCmds era)
pCalculateMinRequiredUtxoBackwardCompatible :: forall era. ShelleyBasedEra era -> Parser (TransactionCmds era)
pCalculateMinRequiredUtxoBackwardCompatible ShelleyBasedEra era
era' =
  Mod CommandFields (TransactionCmds era)
-> Parser (TransactionCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.subparser (Mod CommandFields (TransactionCmds era)
 -> Parser (TransactionCmds era))
-> Mod CommandFields (TransactionCmds era)
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    String
-> ParserInfo (TransactionCmds era)
-> Mod CommandFields (TransactionCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
Opt.command String
"calculate-min-value" (ShelleyBasedEra era -> ParserInfo (TransactionCmds era)
forall era. ShelleyBasedEra era -> ParserInfo (TransactionCmds era)
calcMinValueInfo ShelleyBasedEra era
era') Mod CommandFields (TransactionCmds era)
-> Mod CommandFields (TransactionCmds era)
-> Mod CommandFields (TransactionCmds era)
forall a. Semigroup a => a -> a -> a
<> Mod CommandFields (TransactionCmds era)
forall (f :: * -> *) a. Mod f a
Opt.internal

assembleInfo :: ParserInfo (TransactionCmds era)
assembleInfo :: forall era. ParserInfo (TransactionCmds era)
assembleInfo =
  Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info Parser (TransactionCmds era)
forall era. Parser (TransactionCmds era)
pTransactionAssembleTxBodyWit (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    String -> InfoMod (TransactionCmds era)
forall a. String -> InfoMod a
Opt.progDesc String
"Assemble a tx body and witness(es) to form a transaction"

pSignWitnessBackwardCompatible :: Parser (TransactionCmds era)
pSignWitnessBackwardCompatible :: forall era. Parser (TransactionCmds era)
pSignWitnessBackwardCompatible =
  Mod CommandFields (TransactionCmds era)
-> Parser (TransactionCmds era)
forall a. Mod CommandFields a -> Parser a
Opt.subparser (Mod CommandFields (TransactionCmds era)
 -> Parser (TransactionCmds era))
-> Mod CommandFields (TransactionCmds era)
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    String
-> ParserInfo (TransactionCmds era)
-> Mod CommandFields (TransactionCmds era)
forall a. String -> ParserInfo a -> Mod CommandFields a
Opt.command String
"sign-witness" ParserInfo (TransactionCmds era)
forall era. ParserInfo (TransactionCmds era)
assembleInfo Mod CommandFields (TransactionCmds era)
-> Mod CommandFields (TransactionCmds era)
-> Mod CommandFields (TransactionCmds era)
forall a. Semigroup a => a -> a -> a
<> Mod CommandFields (TransactionCmds era)
forall (f :: * -> *) a. Mod f a
Opt.internal

pScriptValidity :: Parser ScriptValidity
pScriptValidity :: Parser ScriptValidity
pScriptValidity =
  [Parser ScriptValidity] -> Parser ScriptValidity
forall (t :: * -> *) (f :: * -> *) a.
(Foldable t, Alternative f) =>
t (f a) -> f a
asum
    [ ScriptValidity
-> Mod FlagFields ScriptValidity -> Parser ScriptValidity
forall a. a -> Mod FlagFields a -> Parser a
Opt.flag' ScriptValidity
ScriptValid (Mod FlagFields ScriptValidity -> Parser ScriptValidity)
-> Mod FlagFields ScriptValidity -> Parser ScriptValidity
forall a b. (a -> b) -> a -> b
$
        [Mod FlagFields ScriptValidity] -> Mod FlagFields ScriptValidity
forall a. Monoid a => [a] -> a
mconcat
          [ String -> Mod FlagFields ScriptValidity
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"script-valid"
          , String -> Mod FlagFields ScriptValidity
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Assertion that the script is valid. (default)"
          ]
    , ScriptValidity
-> Mod FlagFields ScriptValidity -> Parser ScriptValidity
forall a. a -> Mod FlagFields a -> Parser a
Opt.flag' ScriptValidity
ScriptInvalid (Mod FlagFields ScriptValidity -> Parser ScriptValidity)
-> Mod FlagFields ScriptValidity -> Parser ScriptValidity
forall a b. (a -> b) -> a -> b
$
        [Mod FlagFields ScriptValidity] -> Mod FlagFields ScriptValidity
forall a. Monoid a => [a] -> a
mconcat
          [ String -> Mod FlagFields ScriptValidity
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"script-invalid"
          , String -> Mod FlagFields ScriptValidity
forall (f :: * -> *) a. String -> Mod f a
Opt.help (String -> Mod FlagFields ScriptValidity)
-> String -> Mod FlagFields ScriptValidity
forall a b. (a -> b) -> a -> b
$
              [String] -> String
forall a. Monoid a => [a] -> a
mconcat
                [ String
"Assertion that the script is invalid.  "
                , String
"If a transaction is submitted with such a script, "
                , String
"the script will fail and the collateral will be taken."
                ]
          ]
    ]

pTransactionBuildCmd
  :: ShelleyBasedEra era -> EnvCli -> Maybe (Parser (TransactionCmds era))
pTransactionBuildCmd :: forall era.
ShelleyBasedEra era
-> EnvCli -> Maybe (Parser (TransactionCmds era))
pTransactionBuildCmd ShelleyBasedEra era
sbe EnvCli
envCli = do
  Era era
era' <- CardanoEra era -> Maybe (Era era)
forall (eon :: * -> *) era.
Eon eon =>
CardanoEra era -> Maybe (eon era)
forEraMaybeEon (ShelleyBasedEra era -> CardanoEra era
forall era. ShelleyBasedEra era -> CardanoEra era
forall (eon :: * -> *) era.
ToCardanoEra eon =>
eon era -> CardanoEra era
toCardanoEra ShelleyBasedEra era
sbe)
  Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
    String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"build" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
      Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (Era era -> Parser (TransactionCmds era)
pCmd Era era
era') (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
        Maybe Doc -> InfoMod (TransactionCmds era)
forall a. Maybe Doc -> InfoMod a
Opt.progDescDoc (Maybe Doc -> InfoMod (TransactionCmds era))
-> Maybe Doc -> InfoMod (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Doc -> Maybe Doc
forall a. a -> Maybe a
Just (Doc -> Maybe Doc) -> Doc -> Maybe Doc
forall a b. (a -> b) -> a -> b
$
            [Doc] -> Doc
forall a. Monoid a => [a] -> a
mconcat
              [ forall a ann. Pretty a => a -> Doc ann
pretty @String String
"Build a balanced transaction (automatically calculates fees)"
              , Doc
forall ann. Doc ann
line
              , Doc
forall ann. Doc ann
line
              , Doc -> Doc
H.yellow (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
                  [Doc] -> Doc
forall a. Monoid a => [a] -> a
mconcat
                    [ Doc
"Please note "
                    , Doc -> Doc
H.underline Doc
"the order"
                    , Doc
" of some cmd options is crucial. If used incorrectly may produce "
                    , Doc
"undesired tx body. See nested [] notation above for details."
                    ]
              ]
 where
  pCmd :: Era era -> Parser (TransactionCmds era)
pCmd Era era
era' = do
    (TransactionBuildCmdArgs era -> TransactionCmds era)
-> Parser (TransactionBuildCmdArgs era)
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionBuildCmdArgs era -> TransactionCmds era
forall era. TransactionBuildCmdArgs era -> TransactionCmds era
TransactionBuildCmd (Parser (TransactionBuildCmdArgs era)
 -> Parser (TransactionCmds era))
-> Parser (TransactionBuildCmdArgs era)
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
      Era era
-> SocketPath
-> ConsensusModeParams
-> NetworkId
-> Maybe ScriptValidity
-> Maybe Word
-> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
-> [TxIn]
-> [RequiredSigner]
-> [TxIn]
-> Maybe TxOutShelleyBasedEra
-> Maybe Coin
-> [TxOutAnyEra]
-> TxOutChangeAddress
-> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
-> Maybe SlotNo
-> TxValidityUpperBound era
-> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> TxMetadataJsonSchema
-> [ScriptFile]
-> [MetadataFile]
-> Maybe
     (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
-> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Maybe TxTreasuryDonation
-> TxBuildOutputOptions
-> TransactionBuildCmdArgs era
forall era.
Era era
-> SocketPath
-> ConsensusModeParams
-> NetworkId
-> Maybe ScriptValidity
-> Maybe Word
-> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
-> [TxIn]
-> [RequiredSigner]
-> [TxIn]
-> Maybe TxOutShelleyBasedEra
-> Maybe Coin
-> [TxOutAnyEra]
-> TxOutChangeAddress
-> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
-> Maybe SlotNo
-> TxValidityUpperBound era
-> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> TxMetadataJsonSchema
-> [ScriptFile]
-> [MetadataFile]
-> Maybe
     (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
-> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Maybe TxTreasuryDonation
-> TxBuildOutputOptions
-> TransactionBuildCmdArgs era
TransactionBuildCmdArgs Era era
era'
        (SocketPath
 -> ConsensusModeParams
 -> NetworkId
 -> Maybe ScriptValidity
 -> Maybe Word
 -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
 -> [TxIn]
 -> [RequiredSigner]
 -> [TxIn]
 -> Maybe TxOutShelleyBasedEra
 -> Maybe Coin
 -> [TxOutAnyEra]
 -> TxOutChangeAddress
 -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
 -> Maybe SlotNo
 -> TxValidityUpperBound era
 -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> TxMetadataJsonSchema
 -> [ScriptFile]
 -> [MetadataFile]
 -> Maybe
      (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
 -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> Maybe TxTreasuryDonation
 -> TxBuildOutputOptions
 -> TransactionBuildCmdArgs era)
-> Parser SocketPath
-> Parser
     (ConsensusModeParams
      -> NetworkId
      -> Maybe ScriptValidity
      -> Maybe Word
      -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> EnvCli -> Parser SocketPath
pSocketPath EnvCli
envCli
        Parser
  (ConsensusModeParams
   -> NetworkId
   -> Maybe ScriptValidity
   -> Maybe Word
   -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser ConsensusModeParams
-> Parser
     (NetworkId
      -> Maybe ScriptValidity
      -> Maybe Word
      -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 ConsensusModeParams
pConsensusModeParams
        Parser
  (NetworkId
   -> Maybe ScriptValidity
   -> Maybe Word
   -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser NetworkId
-> Parser
     (Maybe ScriptValidity
      -> Maybe Word
      -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 ScriptValidity
   -> Maybe Word
   -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser (Maybe ScriptValidity)
-> Parser
     (Maybe Word
      -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 ScriptValidity -> Parser (Maybe ScriptValidity)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser ScriptValidity
pScriptValidity
        Parser
  (Maybe Word
   -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser (Maybe Word)
-> Parser
     ([(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 -> Parser (Maybe Word)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser Word
pWitnessOverride
        Parser
  ([(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
-> Parser
     ([TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 (TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))
-> Parser [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
some (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))
pTxIn ShelleyBasedEra era
sbe BalanceTxExecUnits
AutoBalance)
        Parser
  ([TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser [TxIn]
-> Parser
     ([RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 TxIn -> Parser [TxIn]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser TxIn
pReadOnlyReferenceTxIn
        Parser
  ([RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser [RequiredSigner]
-> Parser
     ([TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 RequiredSigner -> Parser [RequiredSigner]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser RequiredSigner
pRequiredSigner
        Parser
  ([TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser [TxIn]
-> Parser
     (Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 TxIn -> Parser [TxIn]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser TxIn
pTxInCollateral
        Parser
  (Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser (Maybe TxOutShelleyBasedEra)
-> Parser
     (Maybe Coin
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 TxOutShelleyBasedEra -> Parser (Maybe TxOutShelleyBasedEra)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser TxOutShelleyBasedEra
pReturnCollateral
        Parser
  (Maybe Coin
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser (Maybe Coin)
-> Parser
     ([TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 -> Parser (Maybe Coin)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser Coin
pTotalCollateral
        Parser
  ([TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser [TxOutAnyEra]
-> Parser
     (TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 TxOutAnyEra -> Parser [TxOutAnyEra]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser TxOutAnyEra
pTxOut
        Parser
  (TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser TxOutChangeAddress
-> Parser
     (Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 TxOutChangeAddress
pChangeAddress
        Parser
  (Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser (Maybe (Value, [ScriptWitnessFiles WitCtxMint]))
-> Parser
     (Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 (Value, [ScriptWitnessFiles WitCtxMint])
-> Parser (Maybe (Value, [ScriptWitnessFiles WitCtxMint]))
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (Value, [ScriptWitnessFiles WitCtxMint])
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (Value, [ScriptWitnessFiles WitCtxMint])
pMintMultiAsset ShelleyBasedEra era
sbe BalanceTxExecUnits
AutoBalance)
        Parser
  (Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser (Maybe SlotNo)
-> Parser
     (TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 SlotNo -> Parser (Maybe SlotNo)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser SlotNo
pInvalidBefore
        Parser
  (TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser (TxValidityUpperBound era)
-> Parser
     ([(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era -> Parser (TxValidityUpperBound era)
forall era.
ShelleyBasedEra era -> Parser (TxValidityUpperBound era)
pInvalidHereafter ShelleyBasedEra era
sbe
        Parser
  ([(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser
     [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     ([(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 (CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))
-> Parser
     [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))
pCertificateFile ShelleyBasedEra era
sbe BalanceTxExecUnits
AutoBalance)
        Parser
  ([(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser
     [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     (TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 (StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))
-> Parser
     [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     (StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     (StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))
pWithdrawal ShelleyBasedEra era
sbe BalanceTxExecUnits
AutoBalance)
        Parser
  (TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser TxMetadataJsonSchema
-> Parser
     ([ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 TxMetadataJsonSchema
pTxMetadataJsonSchema
        Parser
  ([ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser [ScriptFile]
-> Parser
     ([MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 ScriptFile -> Parser [ScriptFile]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many
          ( String -> Maybe String -> String -> Parser ScriptFile
pScriptFor
              String
"auxiliary-script-file"
              Maybe String
forall a. Maybe a
Nothing
              String
"Filepath of auxiliary script(s)"
          )
        Parser
  ([MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser [MetadataFile]
-> Parser
     (Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 MetadataFile -> Parser [MetadataFile]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser MetadataFile
pMetadataFile
        Parser
  (Maybe
     (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser
     (Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile)))
-> Parser
     ([(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs 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 (Maybe UpdateProposalFile)
-> Parser
     (Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile)))
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 UpdateProposalFile -> Parser (Maybe UpdateProposalFile)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser UpdateProposalFile
pUpdateProposalFile)
        Parser
  ([(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     ([(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe TxTreasuryDonation
      -> TxBuildOutputOptions
      -> TransactionBuildCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
pVoteFiles ShelleyBasedEra era
sbe BalanceTxExecUnits
AutoBalance
        Parser
  ([(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe TxTreasuryDonation
   -> TxBuildOutputOptions
   -> TransactionBuildCmdArgs era)
-> Parser
     [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     (Maybe TxTreasuryDonation
      -> TxBuildOutputOptions -> TransactionBuildCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
pProposalFiles ShelleyBasedEra era
sbe BalanceTxExecUnits
AutoBalance
        Parser
  (Maybe TxTreasuryDonation
   -> TxBuildOutputOptions -> TransactionBuildCmdArgs era)
-> Parser (Maybe TxTreasuryDonation)
-> Parser (TxBuildOutputOptions -> TransactionBuildCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era -> Parser (Maybe TxTreasuryDonation)
forall era.
ShelleyBasedEra era -> Parser (Maybe TxTreasuryDonation)
pTreasuryDonation ShelleyBasedEra era
sbe
        Parser (TxBuildOutputOptions -> TransactionBuildCmdArgs era)
-> Parser TxBuildOutputOptions
-> Parser (TransactionBuildCmdArgs 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 TxBuildOutputOptions
pTxBuildOutputOptions

-- | Estimate the transaction fees without access to a live node.
pTransactionBuildEstimateCmd
  :: forall era. MaryEraOnwards era -> EnvCli -> Maybe (Parser (TransactionCmds era))
pTransactionBuildEstimateCmd :: forall era.
MaryEraOnwards era
-> EnvCli -> Maybe (Parser (TransactionCmds era))
pTransactionBuildEstimateCmd MaryEraOnwards era
eon' EnvCli
_envCli = do
  Era era
era' <- CardanoEra era -> Maybe (Era era)
forall (eon :: * -> *) era.
Eon eon =>
CardanoEra era -> Maybe (eon era)
forEraMaybeEon (MaryEraOnwards era -> CardanoEra era
forall era. MaryEraOnwards era -> CardanoEra era
forall (eon :: * -> *) era.
ToCardanoEra eon =>
eon era -> CardanoEra era
toCardanoEra MaryEraOnwards era
eon')
  Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Parser (TransactionCmds era)
 -> Maybe (Parser (TransactionCmds era)))
-> Parser (TransactionCmds era)
-> Maybe (Parser (TransactionCmds era))
forall a b. (a -> b) -> a -> b
$
    String
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a. String -> ParserInfo a -> Parser a
subParser String
"build-estimate" (ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era))
-> ParserInfo (TransactionCmds era) -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
      Parser (TransactionCmds era)
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a. Parser a -> InfoMod a -> ParserInfo a
Opt.info (Era era -> Parser (TransactionCmds era)
pCmd Era era
era') (InfoMod (TransactionCmds era) -> ParserInfo (TransactionCmds era))
-> InfoMod (TransactionCmds era)
-> ParserInfo (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
        Maybe Doc -> InfoMod (TransactionCmds era)
forall a. Maybe Doc -> InfoMod a
Opt.progDescDoc (Maybe Doc -> InfoMod (TransactionCmds era))
-> Maybe Doc -> InfoMod (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
          Doc -> Maybe Doc
forall a. a -> Maybe a
Just (Doc -> Maybe Doc) -> Doc -> Maybe Doc
forall a b. (a -> b) -> a -> b
$
            [Doc] -> Doc
forall a. Monoid a => [a] -> a
mconcat
              [ forall a ann. Pretty a => a -> Doc ann
pretty @String
                  String
"Build a balanced transaction without access to a live node (automatically estimates fees)"
              , Doc
forall ann. Doc ann
line
              , Doc
forall ann. Doc ann
line
              , Doc -> Doc
H.yellow (Doc -> Doc) -> Doc -> Doc
forall a b. (a -> b) -> a -> b
$
                  [Doc] -> Doc
forall a. Monoid a => [a] -> a
mconcat
                    [ Doc
"Please note "
                    , Doc -> Doc
H.underline Doc
"the order"
                    , Doc
" of some cmd options is crucial. If used incorrectly may produce "
                    , Doc
"undesired tx body. See nested [] notation above for details."
                    ]
              ]
 where
  pCmd :: Exp.Era era -> Parser (TransactionCmds era)
  pCmd :: Era era -> Parser (TransactionCmds era)
pCmd Era era
era' = do
    let sbe :: ShelleyBasedEra era
sbe = Era era -> ShelleyBasedEra era
forall era. Era era -> ShelleyBasedEra era
Exp.eraToSbe Era era
era'
    (TransactionBuildEstimateCmdArgs era -> TransactionCmds era)
-> Parser (TransactionBuildEstimateCmdArgs era)
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionBuildEstimateCmdArgs era -> TransactionCmds era
forall era.
TransactionBuildEstimateCmdArgs era -> TransactionCmds era
TransactionBuildEstimateCmd (Parser (TransactionBuildEstimateCmdArgs era)
 -> Parser (TransactionCmds era))
-> Parser (TransactionBuildEstimateCmdArgs era)
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
      Era era
-> Maybe ScriptValidity
-> Int
-> Maybe Int
-> ProtocolParamsFile
-> Value
-> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
-> [TxIn]
-> [RequiredSigner]
-> [TxIn]
-> Maybe TxOutShelleyBasedEra
-> [TxOutAnyEra]
-> TxOutChangeAddress
-> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
-> Maybe SlotNo
-> TxValidityUpperBound era
-> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Maybe Coin
-> Maybe ReferenceScriptSize
-> TxMetadataJsonSchema
-> [ScriptFile]
-> [MetadataFile]
-> Maybe
     (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
-> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
-> TxBodyFile 'Out
-> TransactionBuildEstimateCmdArgs era
forall era.
Era era
-> Maybe ScriptValidity
-> Int
-> Maybe Int
-> ProtocolParamsFile
-> Value
-> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
-> [TxIn]
-> [RequiredSigner]
-> [TxIn]
-> Maybe TxOutShelleyBasedEra
-> [TxOutAnyEra]
-> TxOutChangeAddress
-> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
-> Maybe SlotNo
-> TxValidityUpperBound era
-> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Maybe Coin
-> Maybe ReferenceScriptSize
-> TxMetadataJsonSchema
-> [ScriptFile]
-> [MetadataFile]
-> Maybe
     (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
-> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
-> TxBodyFile 'Out
-> TransactionBuildEstimateCmdArgs era
TransactionBuildEstimateCmdArgs Era era
era'
        (Maybe ScriptValidity
 -> Int
 -> Maybe Int
 -> ProtocolParamsFile
 -> Value
 -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
 -> [TxIn]
 -> [RequiredSigner]
 -> [TxIn]
 -> Maybe TxOutShelleyBasedEra
 -> [TxOutAnyEra]
 -> TxOutChangeAddress
 -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
 -> Maybe SlotNo
 -> TxValidityUpperBound era
 -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> Maybe Coin
 -> Maybe ReferenceScriptSize
 -> TxMetadataJsonSchema
 -> [ScriptFile]
 -> [MetadataFile]
 -> Maybe
      (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
 -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
 -> TxBodyFile 'Out
 -> TransactionBuildEstimateCmdArgs era)
-> Parser (Maybe ScriptValidity)
-> Parser
     (Int
      -> Maybe Int
      -> ProtocolParamsFile
      -> Value
      -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser ScriptValidity -> Parser (Maybe ScriptValidity)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser ScriptValidity
pScriptValidity
        Parser
  (Int
   -> Maybe Int
   -> ProtocolParamsFile
   -> Value
   -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser Int
-> Parser
     (Maybe Int
      -> ProtocolParamsFile
      -> Value
      -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 Int
pNumberOfShelleyKeyWitnesses
        Parser
  (Maybe Int
   -> ProtocolParamsFile
   -> Value
   -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser (Maybe Int)
-> Parser
     (ProtocolParamsFile
      -> Value
      -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 Int -> Parser (Maybe Int)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser Int
pNumberOfByronKeyWitnesses
        Parser
  (ProtocolParamsFile
   -> Value
   -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser ProtocolParamsFile
-> Parser
     (Value
      -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 ProtocolParamsFile
pProtocolParamsFile
        Parser
  (Value
   -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser Value
-> Parser
     ([(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 Value
pTotalUTxOValue
        Parser
  ([(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
-> Parser
     ([TxIn]
      -> [RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 (TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))
-> Parser [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
some (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))
pTxIn ShelleyBasedEra era
sbe BalanceTxExecUnits
ManualBalance)
        Parser
  ([TxIn]
   -> [RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser [TxIn]
-> Parser
     ([RequiredSigner]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 TxIn -> Parser [TxIn]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser TxIn
pReadOnlyReferenceTxIn
        Parser
  ([RequiredSigner]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser [RequiredSigner]
-> Parser
     ([TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 RequiredSigner -> Parser [RequiredSigner]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser RequiredSigner
pRequiredSigner
        Parser
  ([TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser [TxIn]
-> Parser
     (Maybe TxOutShelleyBasedEra
      -> [TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 TxIn -> Parser [TxIn]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser TxIn
pTxInCollateral
        Parser
  (Maybe TxOutShelleyBasedEra
   -> [TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser (Maybe TxOutShelleyBasedEra)
-> Parser
     ([TxOutAnyEra]
      -> TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 TxOutShelleyBasedEra -> Parser (Maybe TxOutShelleyBasedEra)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser TxOutShelleyBasedEra
pReturnCollateral
        Parser
  ([TxOutAnyEra]
   -> TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser [TxOutAnyEra]
-> Parser
     (TxOutChangeAddress
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 TxOutAnyEra -> Parser [TxOutAnyEra]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser TxOutAnyEra
pTxOut
        Parser
  (TxOutChangeAddress
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser TxOutChangeAddress
-> Parser
     (Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 TxOutChangeAddress
pChangeAddress
        Parser
  (Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser (Maybe (Value, [ScriptWitnessFiles WitCtxMint]))
-> Parser
     (Maybe SlotNo
      -> TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 (Value, [ScriptWitnessFiles WitCtxMint])
-> Parser (Maybe (Value, [ScriptWitnessFiles WitCtxMint]))
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (Value, [ScriptWitnessFiles WitCtxMint])
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (Value, [ScriptWitnessFiles WitCtxMint])
pMintMultiAsset ShelleyBasedEra era
sbe BalanceTxExecUnits
ManualBalance)
        Parser
  (Maybe SlotNo
   -> TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser (Maybe SlotNo)
-> Parser
     (TxValidityUpperBound era
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 SlotNo -> Parser (Maybe SlotNo)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser SlotNo
pInvalidBefore
        Parser
  (TxValidityUpperBound era
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser (TxValidityUpperBound era)
-> Parser
     ([(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era -> Parser (TxValidityUpperBound era)
forall era.
ShelleyBasedEra era -> Parser (TxValidityUpperBound era)
pInvalidHereafter ShelleyBasedEra era
sbe
        Parser
  ([(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser
     [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     ([(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 (CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))
-> Parser
     [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))
pCertificateFile ShelleyBasedEra era
sbe BalanceTxExecUnits
ManualBalance)
        Parser
  ([(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser
     [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     (Maybe Coin
      -> Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 (StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))
-> Parser
     [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     (StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     (StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))
pWithdrawal ShelleyBasedEra era
sbe BalanceTxExecUnits
ManualBalance)
        Parser
  (Maybe Coin
   -> Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser (Maybe Coin)
-> Parser
     (Maybe ReferenceScriptSize
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 -> Parser (Maybe Coin)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser Coin
pTotalCollateral
        Parser
  (Maybe ReferenceScriptSize
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser (Maybe ReferenceScriptSize)
-> Parser
     (TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 ReferenceScriptSize -> Parser (Maybe ReferenceScriptSize)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser ReferenceScriptSize
pReferenceScriptSize
        Parser
  (TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser TxMetadataJsonSchema
-> Parser
     ([ScriptFile]
      -> [MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 TxMetadataJsonSchema
pTxMetadataJsonSchema
        Parser
  ([ScriptFile]
   -> [MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser [ScriptFile]
-> Parser
     ([MetadataFile]
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 ScriptFile -> Parser [ScriptFile]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many
          ( String -> Maybe String -> String -> Parser ScriptFile
pScriptFor
              String
"auxiliary-script-file"
              Maybe String
forall a. Maybe a
Nothing
              String
"Filepath of auxiliary script(s)"
          )
        Parser
  ([MetadataFile]
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser [MetadataFile]
-> Parser
     (Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 MetadataFile -> Parser [MetadataFile]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser MetadataFile
pMetadataFile
        Parser
  (Maybe
     (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser
     (Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile)))
-> Parser
     ([(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs 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 (Maybe UpdateProposalFile)
-> Parser
     (Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile)))
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 UpdateProposalFile -> Parser (Maybe UpdateProposalFile)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser UpdateProposalFile
pUpdateProposalFile)
        Parser
  ([(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     ([(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildEstimateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
pVoteFiles ShelleyBasedEra era
sbe BalanceTxExecUnits
ManualBalance
        Parser
  ([(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildEstimateCmdArgs era)
-> Parser
     [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out -> TransactionBuildEstimateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
pProposalFiles ShelleyBasedEra era
sbe BalanceTxExecUnits
ManualBalance
        Parser
  (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out -> TransactionBuildEstimateCmdArgs era)
-> Parser (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation))
-> Parser (TxBodyFile 'Out -> TransactionBuildEstimateCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era
-> Parser (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation))
forall era.
ShelleyBasedEra era
-> Parser (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation))
pCurrentTreasuryValueAndDonation ShelleyBasedEra era
sbe
        Parser (TxBodyFile 'Out -> TransactionBuildEstimateCmdArgs era)
-> Parser (TxBodyFile 'Out)
-> Parser (TransactionBuildEstimateCmdArgs 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 (TxBodyFile 'Out)
pTxBodyFileOut

pChangeAddress :: Parser TxOutChangeAddress
pChangeAddress :: Parser TxOutChangeAddress
pChangeAddress =
  (AddressAny -> TxOutChangeAddress)
-> Parser AddressAny -> Parser TxOutChangeAddress
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap AddressAny -> TxOutChangeAddress
TxOutChangeAddress (Parser AddressAny -> Parser TxOutChangeAddress)
-> Parser AddressAny -> Parser TxOutChangeAddress
forall a b. (a -> b) -> a -> b
$
    ReadM AddressAny
-> Mod OptionFields AddressAny -> Parser AddressAny
forall a. ReadM a -> Mod OptionFields a -> Parser a
Opt.option (Parser AddressAny -> ReadM AddressAny
forall a. Parser a -> ReadM a
readerFromParsecParser Parser AddressAny
parseAddressAny) (Mod OptionFields AddressAny -> Parser AddressAny)
-> Mod OptionFields AddressAny -> Parser AddressAny
forall a b. (a -> b) -> a -> b
$
      [Mod OptionFields AddressAny] -> Mod OptionFields AddressAny
forall a. Monoid a => [a] -> a
mconcat
        [ String -> Mod OptionFields AddressAny
forall (f :: * -> *) a. HasName f => String -> Mod f a
Opt.long String
"change-address"
        , String -> Mod OptionFields AddressAny
forall (f :: * -> *) a. HasMetavar f => String -> Mod f a
Opt.metavar String
"ADDRESS"
        , String -> Mod OptionFields AddressAny
forall (f :: * -> *) a. String -> Mod f a
Opt.help String
"Address where ADA in excess of the tx fee will go to."
        ]

pTransactionBuildRaw :: ShelleyBasedEra era -> Parser (TransactionCmds era)
pTransactionBuildRaw :: forall era. ShelleyBasedEra era -> Parser (TransactionCmds era)
pTransactionBuildRaw ShelleyBasedEra era
era' =
  (TransactionBuildRawCmdArgs era -> TransactionCmds era)
-> Parser (TransactionBuildRawCmdArgs era)
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionBuildRawCmdArgs era -> TransactionCmds era
forall era. TransactionBuildRawCmdArgs era -> TransactionCmds era
TransactionBuildRawCmd (Parser (TransactionBuildRawCmdArgs era)
 -> Parser (TransactionCmds era))
-> Parser (TransactionBuildRawCmdArgs era)
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    ShelleyBasedEra era
-> Maybe ScriptValidity
-> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
-> [TxIn]
-> [TxIn]
-> Maybe TxOutShelleyBasedEra
-> Maybe Coin
-> [RequiredSigner]
-> [TxOutAnyEra]
-> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
-> Maybe SlotNo
-> TxValidityUpperBound era
-> Coin
-> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> TxMetadataJsonSchema
-> [ScriptFile]
-> [MetadataFile]
-> Maybe ProtocolParamsFile
-> Maybe
     (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
-> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
-> TxBodyFile 'Out
-> TransactionBuildRawCmdArgs era
forall era.
ShelleyBasedEra era
-> Maybe ScriptValidity
-> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
-> [TxIn]
-> [TxIn]
-> Maybe TxOutShelleyBasedEra
-> Maybe Coin
-> [RequiredSigner]
-> [TxOutAnyEra]
-> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
-> Maybe SlotNo
-> TxValidityUpperBound era
-> Coin
-> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> TxMetadataJsonSchema
-> [ScriptFile]
-> [MetadataFile]
-> Maybe ProtocolParamsFile
-> Maybe
     (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
-> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
-> TxBodyFile 'Out
-> TransactionBuildRawCmdArgs era
TransactionBuildRawCmdArgs ShelleyBasedEra era
era'
      (Maybe ScriptValidity
 -> [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
 -> [TxIn]
 -> [TxIn]
 -> Maybe TxOutShelleyBasedEra
 -> Maybe Coin
 -> [RequiredSigner]
 -> [TxOutAnyEra]
 -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
 -> Maybe SlotNo
 -> TxValidityUpperBound era
 -> Coin
 -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> TxMetadataJsonSchema
 -> [ScriptFile]
 -> [MetadataFile]
 -> Maybe ProtocolParamsFile
 -> Maybe
      (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
 -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
 -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
 -> TxBodyFile 'Out
 -> TransactionBuildRawCmdArgs era)
-> Parser (Maybe ScriptValidity)
-> Parser
     ([(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
      -> [TxIn]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [RequiredSigner]
      -> [TxOutAnyEra]
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser ScriptValidity -> Parser (Maybe ScriptValidity)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser ScriptValidity
pScriptValidity
      Parser
  ([(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
   -> [TxIn]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [RequiredSigner]
   -> [TxOutAnyEra]
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
-> Parser
     ([TxIn]
      -> [TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [RequiredSigner]
      -> [TxOutAnyEra]
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 (TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))
-> Parser [(TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
some (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (TxIn, Maybe (ScriptWitnessFiles WitCtxTxIn))
pTxIn ShelleyBasedEra era
era' BalanceTxExecUnits
ManualBalance)
      Parser
  ([TxIn]
   -> [TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [RequiredSigner]
   -> [TxOutAnyEra]
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser [TxIn]
-> Parser
     ([TxIn]
      -> Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [RequiredSigner]
      -> [TxOutAnyEra]
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 TxIn -> Parser [TxIn]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser TxIn
pReadOnlyReferenceTxIn
      Parser
  ([TxIn]
   -> Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [RequiredSigner]
   -> [TxOutAnyEra]
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser [TxIn]
-> Parser
     (Maybe TxOutShelleyBasedEra
      -> Maybe Coin
      -> [RequiredSigner]
      -> [TxOutAnyEra]
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 TxIn -> Parser [TxIn]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser TxIn
pTxInCollateral
      Parser
  (Maybe TxOutShelleyBasedEra
   -> Maybe Coin
   -> [RequiredSigner]
   -> [TxOutAnyEra]
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser (Maybe TxOutShelleyBasedEra)
-> Parser
     (Maybe Coin
      -> [RequiredSigner]
      -> [TxOutAnyEra]
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 TxOutShelleyBasedEra -> Parser (Maybe TxOutShelleyBasedEra)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser TxOutShelleyBasedEra
pReturnCollateral
      Parser
  (Maybe Coin
   -> [RequiredSigner]
   -> [TxOutAnyEra]
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser (Maybe Coin)
-> Parser
     ([RequiredSigner]
      -> [TxOutAnyEra]
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 -> Parser (Maybe Coin)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser Coin
pTotalCollateral
      Parser
  ([RequiredSigner]
   -> [TxOutAnyEra]
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser [RequiredSigner]
-> Parser
     ([TxOutAnyEra]
      -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 RequiredSigner -> Parser [RequiredSigner]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser RequiredSigner
pRequiredSigner
      Parser
  ([TxOutAnyEra]
   -> Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser [TxOutAnyEra]
-> Parser
     (Maybe (Value, [ScriptWitnessFiles WitCtxMint])
      -> Maybe SlotNo
      -> TxValidityUpperBound era
      -> Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 TxOutAnyEra -> Parser [TxOutAnyEra]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser TxOutAnyEra
pTxOut
      Parser
  (Maybe (Value, [ScriptWitnessFiles WitCtxMint])
   -> Maybe SlotNo
   -> TxValidityUpperBound era
   -> Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser (Maybe (Value, [ScriptWitnessFiles WitCtxMint]))
-> Parser
     (Maybe SlotNo
      -> TxValidityUpperBound era
      -> Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 (Value, [ScriptWitnessFiles WitCtxMint])
-> Parser (Maybe (Value, [ScriptWitnessFiles WitCtxMint]))
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (Value, [ScriptWitnessFiles WitCtxMint])
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (Value, [ScriptWitnessFiles WitCtxMint])
pMintMultiAsset ShelleyBasedEra era
era' BalanceTxExecUnits
ManualBalance)
      Parser
  (Maybe SlotNo
   -> TxValidityUpperBound era
   -> Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser (Maybe SlotNo)
-> Parser
     (TxValidityUpperBound era
      -> Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 SlotNo -> Parser (Maybe SlotNo)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser SlotNo
pInvalidBefore
      Parser
  (TxValidityUpperBound era
   -> Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser (TxValidityUpperBound era)
-> Parser
     (Coin
      -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era -> Parser (TxValidityUpperBound era)
forall era.
ShelleyBasedEra era -> Parser (TxValidityUpperBound era)
pInvalidHereafter ShelleyBasedEra era
era'
      Parser
  (Coin
   -> [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser Coin
-> Parser
     ([(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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
pTxFee
      Parser
  ([(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser
     [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     ([(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 (CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))
-> Parser
     [(CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser (CertificateFile, Maybe (ScriptWitnessFiles WitCtxStake))
pCertificateFile ShelleyBasedEra era
era' BalanceTxExecUnits
ManualBalance)
      Parser
  ([(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser
     [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     (TxMetadataJsonSchema
      -> [ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 (StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))
-> Parser
     [(StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many (ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     (StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     (StakeAddress, Coin, Maybe (ScriptWitnessFiles WitCtxStake))
pWithdrawal ShelleyBasedEra era
era' BalanceTxExecUnits
ManualBalance)
      Parser
  (TxMetadataJsonSchema
   -> [ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser TxMetadataJsonSchema
-> Parser
     ([ScriptFile]
      -> [MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 TxMetadataJsonSchema
pTxMetadataJsonSchema
      Parser
  ([ScriptFile]
   -> [MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser [ScriptFile]
-> Parser
     ([MetadataFile]
      -> Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 ScriptFile -> Parser [ScriptFile]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many (String -> Maybe String -> String -> Parser ScriptFile
pScriptFor String
"auxiliary-script-file" Maybe String
forall a. Maybe a
Nothing String
"Filepath of auxiliary script(s)")
      Parser
  ([MetadataFile]
   -> Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser [MetadataFile]
-> Parser
     (Maybe ProtocolParamsFile
      -> Maybe
           (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 MetadataFile -> Parser [MetadataFile]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser MetadataFile
pMetadataFile
      Parser
  (Maybe ProtocolParamsFile
   -> Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser (Maybe ProtocolParamsFile)
-> Parser
     (Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
      -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs 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 ProtocolParamsFile -> Parser (Maybe ProtocolParamsFile)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser ProtocolParamsFile
pProtocolParamsFile
      Parser
  (Maybe
     (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile))
   -> [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser
     (Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile)))
-> Parser
     ([(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era
-> Parser (Maybe UpdateProposalFile)
-> Parser
     (Maybe
        (Featured ShelleyToBabbageEra era (Maybe UpdateProposalFile)))
forall (eon :: * -> *) (f :: * -> *) era a.
(Eon eon, ToCardanoEra f) =>
f era -> Parser a -> Parser (Maybe (Featured eon era a))
pFeatured ShelleyBasedEra era
era' (Parser UpdateProposalFile -> Parser (Maybe UpdateProposalFile)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser UpdateProposalFile
pUpdateProposalFile)
      Parser
  ([(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     ([(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
      -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out
      -> TransactionBuildRawCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser [(VoteFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
pVoteFiles ShelleyBasedEra era
era' BalanceTxExecUnits
ManualBalance
      Parser
  ([(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
   -> Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out
   -> TransactionBuildRawCmdArgs era)
-> Parser
     [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
-> Parser
     (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
      -> TxBodyFile 'Out -> TransactionBuildRawCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
forall era.
ShelleyBasedEra era
-> BalanceTxExecUnits
-> Parser
     [(ProposalFile 'In, Maybe (ScriptWitnessFiles WitCtxStake))]
pProposalFiles ShelleyBasedEra era
era' BalanceTxExecUnits
ManualBalance
      Parser
  (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation)
   -> TxBodyFile 'Out -> TransactionBuildRawCmdArgs era)
-> Parser (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation))
-> Parser (TxBodyFile 'Out -> TransactionBuildRawCmdArgs era)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ShelleyBasedEra era
-> Parser (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation))
forall era.
ShelleyBasedEra era
-> Parser (Maybe (TxCurrentTreasuryValue, TxTreasuryDonation))
pCurrentTreasuryValueAndDonation ShelleyBasedEra era
era'
      Parser (TxBodyFile 'Out -> TransactionBuildRawCmdArgs era)
-> Parser (TxBodyFile 'Out)
-> Parser (TransactionBuildRawCmdArgs 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 (TxBodyFile 'Out)
pTxBodyFileOut

pTransactionSign :: EnvCli -> Parser (TransactionCmds era)
pTransactionSign :: forall era. EnvCli -> Parser (TransactionCmds era)
pTransactionSign EnvCli
envCli =
  (TransactionSignCmdArgs -> TransactionCmds era)
-> Parser TransactionSignCmdArgs -> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionSignCmdArgs -> TransactionCmds era
forall era. TransactionSignCmdArgs -> TransactionCmds era
TransactionSignCmd (Parser TransactionSignCmdArgs -> Parser (TransactionCmds era))
-> Parser TransactionSignCmdArgs -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    InputTxBodyOrTxFile
-> [WitnessSigningData]
-> Maybe NetworkId
-> TxFile 'Out
-> TransactionSignCmdArgs
TransactionSignCmdArgs
      (InputTxBodyOrTxFile
 -> [WitnessSigningData]
 -> Maybe NetworkId
 -> TxFile 'Out
 -> TransactionSignCmdArgs)
-> Parser InputTxBodyOrTxFile
-> Parser
     ([WitnessSigningData]
      -> Maybe NetworkId -> TxFile 'Out -> TransactionSignCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser InputTxBodyOrTxFile
pInputTxOrTxBodyFile
      Parser
  ([WitnessSigningData]
   -> Maybe NetworkId -> TxFile 'Out -> TransactionSignCmdArgs)
-> Parser [WitnessSigningData]
-> Parser
     (Maybe NetworkId -> TxFile 'Out -> TransactionSignCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser WitnessSigningData -> Parser [WitnessSigningData]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser WitnessSigningData
pWitnessSigningData
      Parser (Maybe NetworkId -> TxFile 'Out -> TransactionSignCmdArgs)
-> Parser (Maybe NetworkId)
-> Parser (TxFile 'Out -> TransactionSignCmdArgs)
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
pNetworkId EnvCli
envCli)
      Parser (TxFile 'Out -> TransactionSignCmdArgs)
-> Parser (TxFile 'Out) -> Parser TransactionSignCmdArgs
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser (TxFile 'Out)
pTxFileOut

pTransactionCreateWitness :: EnvCli -> Parser (TransactionCmds era)
pTransactionCreateWitness :: forall era. EnvCli -> Parser (TransactionCmds era)
pTransactionCreateWitness EnvCli
envCli =
  (TransactionWitnessCmdArgs -> TransactionCmds era)
-> Parser TransactionWitnessCmdArgs -> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionWitnessCmdArgs -> TransactionCmds era
forall era. TransactionWitnessCmdArgs -> TransactionCmds era
TransactionWitnessCmd (Parser TransactionWitnessCmdArgs -> Parser (TransactionCmds era))
-> Parser TransactionWitnessCmdArgs -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    TxBodyFile 'In
-> WitnessSigningData
-> Maybe NetworkId
-> File () 'Out
-> TransactionWitnessCmdArgs
TransactionWitnessCmdArgs
      (TxBodyFile 'In
 -> WitnessSigningData
 -> Maybe NetworkId
 -> File () 'Out
 -> TransactionWitnessCmdArgs)
-> Parser (TxBodyFile 'In)
-> Parser
     (WitnessSigningData
      -> Maybe NetworkId -> File () 'Out -> TransactionWitnessCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (TxBodyFile 'In)
pTxBodyFileIn
      Parser
  (WitnessSigningData
   -> Maybe NetworkId -> File () 'Out -> TransactionWitnessCmdArgs)
-> Parser WitnessSigningData
-> Parser
     (Maybe NetworkId -> File () 'Out -> TransactionWitnessCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser WitnessSigningData
pWitnessSigningData
      Parser
  (Maybe NetworkId -> File () 'Out -> TransactionWitnessCmdArgs)
-> Parser (Maybe NetworkId)
-> Parser (File () 'Out -> TransactionWitnessCmdArgs)
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
pNetworkId EnvCli
envCli)
      Parser (File () 'Out -> TransactionWitnessCmdArgs)
-> Parser (File () 'Out) -> Parser TransactionWitnessCmdArgs
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

pTransactionAssembleTxBodyWit :: Parser (TransactionCmds era)
pTransactionAssembleTxBodyWit :: forall era. Parser (TransactionCmds era)
pTransactionAssembleTxBodyWit =
  (TransactionSignWitnessCmdArgs -> TransactionCmds era)
-> Parser TransactionSignWitnessCmdArgs
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionSignWitnessCmdArgs -> TransactionCmds era
forall era. TransactionSignWitnessCmdArgs -> TransactionCmds era
TransactionSignWitnessCmd (Parser TransactionSignWitnessCmdArgs
 -> Parser (TransactionCmds era))
-> Parser TransactionSignWitnessCmdArgs
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    TxBodyFile 'In
-> [WitnessFile] -> File () 'Out -> TransactionSignWitnessCmdArgs
TransactionSignWitnessCmdArgs
      (TxBodyFile 'In
 -> [WitnessFile] -> File () 'Out -> TransactionSignWitnessCmdArgs)
-> Parser (TxBodyFile 'In)
-> Parser
     ([WitnessFile] -> File () 'Out -> TransactionSignWitnessCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (TxBodyFile 'In)
pTxBodyFileIn
      Parser
  ([WitnessFile] -> File () 'Out -> TransactionSignWitnessCmdArgs)
-> Parser [WitnessFile]
-> Parser (File () 'Out -> TransactionSignWitnessCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser WitnessFile -> Parser [WitnessFile]
forall a. Parser a -> Parser [a]
forall (f :: * -> *) a. Alternative f => f a -> f [a]
many Parser WitnessFile
pWitnessFile
      Parser (File () 'Out -> TransactionSignWitnessCmdArgs)
-> Parser (File () 'Out) -> Parser TransactionSignWitnessCmdArgs
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

pTransactionSubmit :: EnvCli -> Parser (TransactionCmds era)
pTransactionSubmit :: forall era. EnvCli -> Parser (TransactionCmds era)
pTransactionSubmit EnvCli
envCli =
  (TransactionSubmitCmdArgs -> TransactionCmds era)
-> Parser TransactionSubmitCmdArgs -> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionSubmitCmdArgs -> TransactionCmds era
forall era. TransactionSubmitCmdArgs -> TransactionCmds era
TransactionSubmitCmd (Parser TransactionSubmitCmdArgs -> Parser (TransactionCmds era))
-> Parser TransactionSubmitCmdArgs -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    SocketPath
-> ConsensusModeParams
-> NetworkId
-> String
-> TransactionSubmitCmdArgs
TransactionSubmitCmdArgs
      (SocketPath
 -> ConsensusModeParams
 -> NetworkId
 -> String
 -> TransactionSubmitCmdArgs)
-> Parser SocketPath
-> Parser
     (ConsensusModeParams
      -> NetworkId -> String -> TransactionSubmitCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> EnvCli -> Parser SocketPath
pSocketPath EnvCli
envCli
      Parser
  (ConsensusModeParams
   -> NetworkId -> String -> TransactionSubmitCmdArgs)
-> Parser ConsensusModeParams
-> Parser (NetworkId -> String -> TransactionSubmitCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser ConsensusModeParams
pConsensusModeParams
      Parser (NetworkId -> String -> TransactionSubmitCmdArgs)
-> Parser NetworkId -> Parser (String -> TransactionSubmitCmdArgs)
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 -> TransactionSubmitCmdArgs)
-> Parser String -> Parser TransactionSubmitCmdArgs
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
pTxSubmitFile

pTransactionPolicyId :: Parser (TransactionCmds era)
pTransactionPolicyId :: forall era. Parser (TransactionCmds era)
pTransactionPolicyId =
  (TransactionPolicyIdCmdArgs -> TransactionCmds era)
-> Parser TransactionPolicyIdCmdArgs
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionPolicyIdCmdArgs -> TransactionCmds era
forall era. TransactionPolicyIdCmdArgs -> TransactionCmds era
TransactionPolicyIdCmd (Parser TransactionPolicyIdCmdArgs -> Parser (TransactionCmds era))
-> Parser TransactionPolicyIdCmdArgs
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    ScriptFile -> TransactionPolicyIdCmdArgs
TransactionPolicyIdCmdArgs
      (ScriptFile -> TransactionPolicyIdCmdArgs)
-> Parser ScriptFile -> Parser TransactionPolicyIdCmdArgs
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser ScriptFile
pScript

pTransactionCalculateMinFee :: Parser (TransactionCmds era)
pTransactionCalculateMinFee :: forall era. Parser (TransactionCmds era)
pTransactionCalculateMinFee =
  (TransactionCalculateMinFeeCmdArgs -> TransactionCmds era)
-> Parser TransactionCalculateMinFeeCmdArgs
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionCalculateMinFeeCmdArgs -> TransactionCmds era
forall era.
TransactionCalculateMinFeeCmdArgs -> TransactionCmds era
TransactionCalculateMinFeeCmd (Parser TransactionCalculateMinFeeCmdArgs
 -> Parser (TransactionCmds era))
-> Parser TransactionCalculateMinFeeCmdArgs
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    TxBodyFile 'In
-> ProtocolParamsFile
-> TxShelleyWitnessCount
-> TxByronWitnessCount
-> ReferenceScriptSize
-> Maybe OutputFormatJsonOrText
-> Maybe (File () 'Out)
-> TransactionCalculateMinFeeCmdArgs
TransactionCalculateMinFeeCmdArgs
      (TxBodyFile 'In
 -> ProtocolParamsFile
 -> TxShelleyWitnessCount
 -> TxByronWitnessCount
 -> ReferenceScriptSize
 -> Maybe OutputFormatJsonOrText
 -> Maybe (File () 'Out)
 -> TransactionCalculateMinFeeCmdArgs)
-> Parser (TxBodyFile 'In)
-> Parser
     (ProtocolParamsFile
      -> TxShelleyWitnessCount
      -> TxByronWitnessCount
      -> ReferenceScriptSize
      -> Maybe OutputFormatJsonOrText
      -> Maybe (File () 'Out)
      -> TransactionCalculateMinFeeCmdArgs)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser (TxBodyFile 'In)
pTxBodyFileIn
      Parser
  (ProtocolParamsFile
   -> TxShelleyWitnessCount
   -> TxByronWitnessCount
   -> ReferenceScriptSize
   -> Maybe OutputFormatJsonOrText
   -> Maybe (File () 'Out)
   -> TransactionCalculateMinFeeCmdArgs)
-> Parser ProtocolParamsFile
-> Parser
     (TxShelleyWitnessCount
      -> TxByronWitnessCount
      -> ReferenceScriptSize
      -> Maybe OutputFormatJsonOrText
      -> Maybe (File () 'Out)
      -> TransactionCalculateMinFeeCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser ProtocolParamsFile
pProtocolParamsFile
      Parser
  (TxShelleyWitnessCount
   -> TxByronWitnessCount
   -> ReferenceScriptSize
   -> Maybe OutputFormatJsonOrText
   -> Maybe (File () 'Out)
   -> TransactionCalculateMinFeeCmdArgs)
-> Parser TxShelleyWitnessCount
-> Parser
     (TxByronWitnessCount
      -> ReferenceScriptSize
      -> Maybe OutputFormatJsonOrText
      -> Maybe (File () 'Out)
      -> TransactionCalculateMinFeeCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser TxShelleyWitnessCount
pTxShelleyWitnessCount
      Parser
  (TxByronWitnessCount
   -> ReferenceScriptSize
   -> Maybe OutputFormatJsonOrText
   -> Maybe (File () 'Out)
   -> TransactionCalculateMinFeeCmdArgs)
-> Parser TxByronWitnessCount
-> Parser
     (ReferenceScriptSize
      -> Maybe OutputFormatJsonOrText
      -> Maybe (File () 'Out)
      -> TransactionCalculateMinFeeCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser TxByronWitnessCount
pTxByronWitnessCount
      Parser
  (ReferenceScriptSize
   -> Maybe OutputFormatJsonOrText
   -> Maybe (File () 'Out)
   -> TransactionCalculateMinFeeCmdArgs)
-> Parser ReferenceScriptSize
-> Parser
     (Maybe OutputFormatJsonOrText
      -> Maybe (File () 'Out) -> TransactionCalculateMinFeeCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Parser ReferenceScriptSize
pReferenceScriptSize
      Parser
  (Maybe OutputFormatJsonOrText
   -> Maybe (File () 'Out) -> TransactionCalculateMinFeeCmdArgs)
-> Parser (Maybe OutputFormatJsonOrText)
-> Parser
     (Maybe (File () 'Out) -> TransactionCalculateMinFeeCmdArgs)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Parser OutputFormatJsonOrText
-> Parser (Maybe OutputFormatJsonOrText)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional (Parser OutputFormatJsonOrText
 -> Parser (Maybe OutputFormatJsonOrText))
-> Parser OutputFormatJsonOrText
-> Parser (Maybe OutputFormatJsonOrText)
forall a b. (a -> b) -> a -> b
$ String -> Parser OutputFormatJsonOrText
pOutputFormatJsonOrText String
"calculate-min-fee")
      Parser (Maybe (File () 'Out) -> TransactionCalculateMinFeeCmdArgs)
-> Parser (Maybe (File () 'Out))
-> Parser TransactionCalculateMinFeeCmdArgs
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) -> Parser (Maybe (File () 'Out))
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser (File () 'Out)
forall content. Parser (File content 'Out)
pOutputFile
      -- Deprecated options:
      Parser TransactionCalculateMinFeeCmdArgs
-> Parser (Maybe NetworkId)
-> Parser TransactionCalculateMinFeeCmdArgs
forall a b. Parser a -> Parser b -> Parser a
forall (f :: * -> *) a b. Applicative f => f a -> f b -> f a
<* Parser NetworkId -> Parser (Maybe NetworkId)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser NetworkId
pNetworkIdDeprecated
      Parser TransactionCalculateMinFeeCmdArgs
-> Parser (Maybe TxInCount)
-> Parser TransactionCalculateMinFeeCmdArgs
forall a b. Parser a -> Parser b -> Parser a
forall (f :: * -> *) a b. Applicative f => f a -> f b -> f a
<* Parser TxInCount -> Parser (Maybe TxInCount)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser TxInCount
pTxInCountDeprecated
      Parser TransactionCalculateMinFeeCmdArgs
-> Parser (Maybe TxOutCount)
-> Parser TransactionCalculateMinFeeCmdArgs
forall a b. Parser a -> Parser b -> Parser a
forall (f :: * -> *) a b. Applicative f => f a -> f b -> f a
<* Parser TxOutCount -> Parser (Maybe TxOutCount)
forall (f :: * -> *) a. Alternative f => f a -> f (Maybe a)
optional Parser TxOutCount
pTxOutCountDeprecated

pTransactionCalculateMinReqUTxO :: ShelleyBasedEra era -> Parser (TransactionCmds era)
pTransactionCalculateMinReqUTxO :: forall era. ShelleyBasedEra era -> Parser (TransactionCmds era)
pTransactionCalculateMinReqUTxO ShelleyBasedEra era
era' =
  (TransactionCalculateMinValueCmdArgs era -> TransactionCmds era)
-> Parser (TransactionCalculateMinValueCmdArgs era)
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionCalculateMinValueCmdArgs era -> TransactionCmds era
forall era.
TransactionCalculateMinValueCmdArgs era -> TransactionCmds era
TransactionCalculateMinValueCmd (Parser (TransactionCalculateMinValueCmdArgs era)
 -> Parser (TransactionCmds era))
-> Parser (TransactionCalculateMinValueCmdArgs era)
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    ShelleyBasedEra era
-> ProtocolParamsFile
-> TxOutShelleyBasedEra
-> TransactionCalculateMinValueCmdArgs era
forall era.
ShelleyBasedEra era
-> ProtocolParamsFile
-> TxOutShelleyBasedEra
-> TransactionCalculateMinValueCmdArgs era
TransactionCalculateMinValueCmdArgs ShelleyBasedEra era
era'
      (ProtocolParamsFile
 -> TxOutShelleyBasedEra -> TransactionCalculateMinValueCmdArgs era)
-> Parser ProtocolParamsFile
-> Parser
     (TxOutShelleyBasedEra -> TransactionCalculateMinValueCmdArgs era)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser ProtocolParamsFile
pProtocolParamsFile
      Parser
  (TxOutShelleyBasedEra -> TransactionCalculateMinValueCmdArgs era)
-> Parser TxOutShelleyBasedEra
-> Parser (TransactionCalculateMinValueCmdArgs 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 TxOutShelleyBasedEra
pTxOutShelleyBased

pTxHashScriptData :: Parser (TransactionCmds era)
pTxHashScriptData :: forall era. Parser (TransactionCmds era)
pTxHashScriptData =
  (TransactionHashScriptDataCmdArgs -> TransactionCmds era)
-> Parser TransactionHashScriptDataCmdArgs
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionHashScriptDataCmdArgs -> TransactionCmds era
forall era. TransactionHashScriptDataCmdArgs -> TransactionCmds era
TransactionHashScriptDataCmd (Parser TransactionHashScriptDataCmdArgs
 -> Parser (TransactionCmds era))
-> Parser TransactionHashScriptDataCmdArgs
-> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    ScriptDataOrFile -> TransactionHashScriptDataCmdArgs
TransactionHashScriptDataCmdArgs
      (ScriptDataOrFile -> TransactionHashScriptDataCmdArgs)
-> Parser ScriptDataOrFile
-> Parser TransactionHashScriptDataCmdArgs
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> String -> String -> Parser ScriptDataOrFile
pScriptDataOrFile
        String
"script-data"
        String
"The script data."
        String
"The script data file."

pTransactionId :: Parser (TransactionCmds era)
pTransactionId :: forall era. Parser (TransactionCmds era)
pTransactionId =
  (TransactionTxIdCmdArgs -> TransactionCmds era)
-> Parser TransactionTxIdCmdArgs -> Parser (TransactionCmds era)
forall a b. (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap TransactionTxIdCmdArgs -> TransactionCmds era
forall era. TransactionTxIdCmdArgs -> TransactionCmds era
TransactionTxIdCmd (Parser TransactionTxIdCmdArgs -> Parser (TransactionCmds era))
-> Parser TransactionTxIdCmdArgs -> Parser (TransactionCmds era)
forall a b. (a -> b) -> a -> b
$
    InputTxBodyOrTxFile -> TransactionTxIdCmdArgs
TransactionTxIdCmdArgs
      (InputTxBodyOrTxFile -> TransactionTxIdCmdArgs)
-> Parser InputTxBodyOrTxFile -> Parser TransactionTxIdCmdArgs
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Parser InputTxBodyOrTxFile
pInputTxOrTxBodyFile