{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} module Cardano.CLI.Commands.Address ( AddressCmds (..) , renderAddressCmds ) where import Cardano.Api.Shelley hiding (QueryInShelleyBasedEra (..)) import Cardano.CLI.Types.Common import Cardano.CLI.Types.Key import Prelude import Data.Text (Text) data AddressCmds = AddressKeyGen KeyOutputFormat AddressKeyType (VerificationKeyFile Out) (SigningKeyFile Out) | AddressKeyHash VerificationKeyTextOrFile (Maybe (File () Out)) | AddressBuild PaymentVerifier (Maybe StakeIdentifier) NetworkId (Maybe (File () Out)) | AddressInfo Text (Maybe (File () Out)) deriving Int -> AddressCmds -> ShowS [AddressCmds] -> ShowS AddressCmds -> String (Int -> AddressCmds -> ShowS) -> (AddressCmds -> String) -> ([AddressCmds] -> ShowS) -> Show AddressCmds forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> AddressCmds -> ShowS showsPrec :: Int -> AddressCmds -> ShowS $cshow :: AddressCmds -> String show :: AddressCmds -> String $cshowList :: [AddressCmds] -> ShowS showList :: [AddressCmds] -> ShowS Show renderAddressCmds :: AddressCmds -> Text renderAddressCmds :: AddressCmds -> Text renderAddressCmds = \case AddressKeyGen{} -> Text "address key-gen" AddressKeyHash{} -> Text "address key-hash" AddressBuild{} -> Text "address build" AddressInfo{} -> Text "address info"