diff --git a/cardano-cli/src/Cardano/CLI/Options.hs b/cardano-cli/src/Cardano/CLI/Options.hs index 48b901ceac..ca4c109bbb 100644 --- a/cardano-cli/src/Cardano/CLI/Options.hs +++ b/cardano-cli/src/Cardano/CLI/Options.hs @@ -68,6 +68,17 @@ parseByron mNetworkId = , command' "byron" "Byron specific commands" $ parseByronCommands mNetworkId ] +{- +We don't care about the era here because this is simply a backwards compatible +command that is expected to work over all eras. + +We need to be able to parse: Inputs, outputs, update proposals, stake registration, stake delegation and +pool registration is all that we need in previous eras. +-} +parseShelleyToBeforeMainnet :: EnvCli -> Parser ClientCommand +parseShelleyToBeforeMainnet _ = PreMainnetCommand <$> error "TODO" + + parsePing :: Parser ClientCommand parsePing = CliPingCommand <$> parsePingCmd diff --git a/cardano-cli/src/Cardano/CLI/Run.hs b/cardano-cli/src/Cardano/CLI/Run.hs index cf963e1049..b1a2485e42 100644 --- a/cardano-cli/src/Cardano/CLI/Run.hs +++ b/cardano-cli/src/Cardano/CLI/Run.hs @@ -9,6 +9,8 @@ module Cardano.CLI.Run , runClientCommand ) where +import Cardano.Api + import Cardano.CLI.Byron.Commands (ByronCommand) import Cardano.CLI.Byron.Run (ByronClientCmdError, renderByronClientCmdError, runByronClientCommand) @@ -45,6 +47,7 @@ data ClientCommand = -- | Byron Related Commands | ByronCommand ByronCommand + | PreMainnetCommand PreMainnetCommand -- | Legacy shelley-based Commands | LegacyCmds LegacyCmds @@ -54,6 +57,19 @@ data ClientCommand = | forall a. Help ParserPrefs (ParserInfo a) | DisplayVersion + +data PreMainnetCommand + = PreMainnetTxBuild PreMainnetTransactionBuildCmdArgs + + +-- E.g something like this that offers the minimum required functionality. +-- We also need key generation commands to work to run SPOs etc +data PreMainnetTransactionBuildCmdArgs = TransactionBuildCmdArgs + { nodeSocketPath :: !SocketPath + , networkId :: !NetworkId + , txins :: ![TxIn] + } + data ClientCommandErrors = ByronClientError ByronClientCmdError | CmdError Text CmdError