diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Key.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Key.hs index 96659a89a7..9f5831b1e1 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Key.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Key.hs @@ -258,7 +258,19 @@ pKeyConvertCardanoAddressKeyCmd = pCardanoAddressKeyType :: Parser CardanoAddressKeyType pCardanoAddressKeyType = asum - [ Opt.flag' CardanoAddressShelleyPaymentKey $ mconcat + [ Opt.flag' CardanoAddressCommitteeColdKey $ mconcat + [ Opt.long "cc-cold-key" + , Opt.help "Use a committee cold key." + ] + , Opt.flag' CardanoAddressCommitteeHotKey $ mconcat + [ Opt.long "cc-hot-key" + , Opt.help "Use a committee hot key." + ] + , Opt.flag' CardanoAddressDRepKey $ mconcat + [ Opt.long "drep-key" + , Opt.help "Use a DRep key." + ] + , Opt.flag' CardanoAddressShelleyPaymentKey $ mconcat [ Opt.long "shelley-payment-key" , Opt.help "Use a Shelley-era extended payment key." ] diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Committee.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Committee.hs index 276c09999f..35d7f0ebef 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Committee.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Committee.hs @@ -13,6 +13,7 @@ import Cardano.Api.Shelley import Cardano.CLI.EraBased.Commands.Governance.Committee import qualified Cardano.CLI.EraBased.Commands.Governance.Committee as Cmd +import qualified Cardano.CLI.EraBased.Run.Key as Key import Cardano.CLI.Read (readVerificationKeyOrHashOrFileOrScript) import Cardano.CLI.Types.Errors.GovernanceCommitteeError import Cardano.CLI.Types.Key @@ -49,19 +50,12 @@ runGovernanceCommitteeKeyGenCold let vkey = getVerificationKey skey - writeLazyByteStringFile skeyPath (textEnvelopeToJSON (Just skeyDesc) skey) + writeLazyByteStringFile skeyPath (textEnvelopeToJSON (Just Key.ccColdSkeyDesc) skey) & onLeft (left . GovernanceCommitteeCmdWriteFileError) - writeLazyByteStringFile vkeyPath (textEnvelopeToJSON (Just vkeyDesc) vkey) + writeLazyByteStringFile vkeyPath (textEnvelopeToJSON (Just Key.ccColdVkeyDesc) vkey) & onLeft (left . GovernanceCommitteeCmdWriteFileError) - where - skeyDesc :: TextEnvelopeDescr - skeyDesc = "Constitutional Committee Cold Signing Key" - - vkeyDesc :: TextEnvelopeDescr - vkeyDesc = "Constitutional Committee Cold Verification Key" - runGovernanceCommitteeKeyGenHot :: () => Cmd.GovernanceCommitteeKeyGenHotCmdArgs era -> ExceptT GovernanceCommitteeError IO () @@ -78,19 +72,12 @@ runGovernanceCommitteeKeyGenHot firstExceptT GovernanceCommitteeCmdWriteFileError . newExceptT $ writeLazyByteStringFile skeyPath - $ textEnvelopeToJSON (Just skeyDesc) skey + $ textEnvelopeToJSON (Just Key.ccHotSkeyDesc) skey firstExceptT GovernanceCommitteeCmdWriteFileError . newExceptT $ writeLazyByteStringFile vkeyPath - $ textEnvelopeToJSON (Just vkeyDesc) vkey - - where - skeyDesc :: TextEnvelopeDescr - skeyDesc = "Constitutional Committee Hot Signing Key" - - vkeyDesc :: TextEnvelopeDescr - vkeyDesc = "Constitutional Committee Hot Verification Key" + $ textEnvelopeToJSON (Just Key.ccHotVkeyDesc) vkey data SomeCommitteeKey f = ACommitteeHotKey (f CommitteeHotKey) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs index 0cca0e6ab9..743d1c8561 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/DRep.hs @@ -67,12 +67,9 @@ runGovernanceDRepKeyGenCmd , skeyFile } = do (vkey, skey) <- liftIO $ generateKeyPair AsDRepKey - newExceptT $ writeLazyByteStringFile skeyFile (textEnvelopeToJSON (Just skeyDesc) skey) + newExceptT $ writeLazyByteStringFile skeyFile (textEnvelopeToJSON (Just Key.drepSkeyDesc) skey) newExceptT $ writeLazyByteStringFile vkeyFile (textEnvelopeToJSON (Just Key.drepVkeyDesc) vkey) return (vkey, skey) - where - skeyDesc :: TextEnvelopeDescr - skeyDesc = "Delegate Representative Signing Key" runGovernanceDRepIdCmd :: () => Cmd.GovernanceDRepIdCmdArgs era diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Key.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Key.hs index ae180f7bdd..4f087576df 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Key.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Key.hs @@ -18,6 +18,11 @@ module Cardano.CLI.EraBased.Run.Key , runNonExtendedKeyCmd , runVerificationKeyCmd + , ccColdSkeyDesc + , ccColdVkeyDesc + , ccHotSkeyDesc + , ccHotVkeyDesc + , drepSkeyDesc , drepVkeyDesc , genesisVkeyDesc , genesisVkeyDelegateDesc @@ -58,7 +63,31 @@ import qualified Data.Text.Encoding as Text import System.Exit (exitFailure) -- Note on these constants: --- https://github.com/input-output-hk/cardano-cli/pull/416#discussion_r1378789737 +-- https://github.com/IntersectMBO/cardano-cli/pull/416#discussion_r1378789737 + +ccColdSkeyDesc :: TextEnvelopeDescr +ccColdSkeyDesc = "Constitutional Committee Cold Signing Key" + +ccColdExtendedSkeyDesc :: TextEnvelopeDescr +ccColdExtendedSkeyDesc = "Constitutional Committee Cold Extended Signing Key" + +ccColdVkeyDesc :: TextEnvelopeDescr +ccColdVkeyDesc = "Constitutional Committee Cold Verification Key" + +ccHotExtendedSkeyDesc :: TextEnvelopeDescr +ccHotExtendedSkeyDesc = "Constitutional Committee Hot Extended Signing Key" + +ccHotSkeyDesc :: TextEnvelopeDescr +ccHotSkeyDesc = "Constitutional Committee Hot Signing Key" + +ccHotVkeyDesc :: TextEnvelopeDescr +ccHotVkeyDesc = "Constitutional Committee Hot Verification Key" + +drepSkeyDesc :: TextEnvelopeDescr +drepSkeyDesc = "Delegate Representative Signing Key" + +drepExtendedSkeyDesc :: TextEnvelopeDescr +drepExtendedSkeyDesc = "Delegate Representative Extended Signing Key" drepVkeyDesc :: TextEnvelopeDescr drepVkeyDesc = "Delegate Representative Verification Key" @@ -450,8 +479,11 @@ runConvertCardanoAddressKeyCmd -- signing key. data SomeCardanoAddressSigningKey = ACardanoAddrShelleyPaymentSigningKey !(SigningKey PaymentExtendedKey) - | ACardanoAddrShelleyStakeSigningKey !(SigningKey StakeExtendedKey) - | ACardanoAddrByronSigningKey !(SigningKey ByronKey) + | ACardanoAddrShelleyStakeSigningKey !(SigningKey StakeExtendedKey) + | ACardanoAddrByronSigningKey !(SigningKey ByronKey) + | ACardanoAddrCommitteeColdKey !(SigningKey CommitteeColdExtendedKey) + | ACardanoAddrCommitteeHotKey !(SigningKey CommitteeHotExtendedKey) + | ACardanoAddrDRepKey !(SigningKey DRepExtendedKey) -- | Decode a Bech32-encoded string. decodeBech32 @@ -509,17 +541,13 @@ readSomeCardanoAddressSigningKeyFile keyType skFile = do toSomeCardanoAddressSigningKey :: Crypto.XPrv -> SomeCardanoAddressSigningKey toSomeCardanoAddressSigningKey xPrv = case keyType of - CardanoAddressShelleyPaymentKey -> - ACardanoAddrShelleyPaymentSigningKey - (PaymentExtendedSigningKey xPrv) - CardanoAddressShelleyStakeKey -> - ACardanoAddrShelleyStakeSigningKey (StakeExtendedSigningKey xPrv) - CardanoAddressIcarusPaymentKey -> - ACardanoAddrByronSigningKey $ - ByronSigningKey (Byron.SigningKey xPrv) - CardanoAddressByronPaymentKey -> - ACardanoAddrByronSigningKey $ - ByronSigningKey (Byron.SigningKey xPrv) + CardanoAddressShelleyPaymentKey -> ACardanoAddrShelleyPaymentSigningKey (PaymentExtendedSigningKey xPrv) + CardanoAddressShelleyStakeKey -> ACardanoAddrShelleyStakeSigningKey (StakeExtendedSigningKey xPrv) + CardanoAddressIcarusPaymentKey -> ACardanoAddrByronSigningKey $ ByronSigningKey (Byron.SigningKey xPrv) + CardanoAddressByronPaymentKey -> ACardanoAddrByronSigningKey $ ByronSigningKey (Byron.SigningKey xPrv) + CardanoAddressCommitteeColdKey -> ACardanoAddrCommitteeColdKey (CommitteeColdExtendedSigningKey xPrv) + CardanoAddressCommitteeHotKey -> ACardanoAddrCommitteeHotKey (CommitteeHotExtendedSigningKey xPrv) + CardanoAddressDRepKey -> ACardanoAddrDRepKey (DRepExtendedSigningKey xPrv) -- | Write a text envelope formatted file containing a @cardano-address@ -- extended signing key, but converted to a format supported by @cardano-cli@. @@ -527,11 +555,13 @@ writeSomeCardanoAddressSigningKeyFile :: File direction Out -> SomeCardanoAddressSigningKey -> IO (Either (FileError ()) ()) -writeSomeCardanoAddressSigningKeyFile outFile skey = - case skey of - ACardanoAddrShelleyPaymentSigningKey sk -> - writeLazyByteStringFile outFile $ textEnvelopeToJSON Nothing sk - ACardanoAddrShelleyStakeSigningKey sk -> - writeLazyByteStringFile outFile $ textEnvelopeToJSON Nothing sk - ACardanoAddrByronSigningKey sk -> - writeLazyByteStringFile outFile $ textEnvelopeToJSON Nothing sk +writeSomeCardanoAddressSigningKeyFile outFile = + \case + ACardanoAddrShelleyPaymentSigningKey sk -> go Nothing sk + ACardanoAddrShelleyStakeSigningKey sk -> go Nothing sk + ACardanoAddrByronSigningKey sk -> go Nothing sk + ACardanoAddrCommitteeColdKey sk -> go (Just ccColdExtendedSkeyDesc) sk + ACardanoAddrCommitteeHotKey sk -> go (Just ccHotExtendedSkeyDesc) sk + ACardanoAddrDRepKey sk -> go (Just drepExtendedSkeyDesc) sk + where + go envelope sk = writeLazyByteStringFile outFile $ textEnvelopeToJSON envelope sk diff --git a/cardano-cli/src/Cardano/CLI/Legacy/Options/Key.hs b/cardano-cli/src/Cardano/CLI/Legacy/Options/Key.hs index 7fde88c0da..f460c4bb48 100644 --- a/cardano-cli/src/Cardano/CLI/Legacy/Options/Key.hs +++ b/cardano-cli/src/Cardano/CLI/Legacy/Options/Key.hs @@ -234,7 +234,19 @@ pKeyConvertCardanoAddressKeyCmd = pCardanoAddressKeyType :: Parser CardanoAddressKeyType pCardanoAddressKeyType = asum - [ Opt.flag' CardanoAddressShelleyPaymentKey $ mconcat + [ Opt.flag' CardanoAddressCommitteeColdKey $ mconcat + [ Opt.long "cc-cold-key" + , Opt.help "Use a committee cold key." + ] + , Opt.flag' CardanoAddressCommitteeHotKey $ mconcat + [ Opt.long "cc-hot-key" + , Opt.help "Use a committee hot key." + ] + , Opt.flag' CardanoAddressDRepKey $ mconcat + [ Opt.long "drep-key" + , Opt.help "Use a DRep key." + ] + , Opt.flag' CardanoAddressShelleyPaymentKey $ mconcat [ Opt.long "shelley-payment-key" , Opt.help "Use a Shelley-era extended payment key." ] diff --git a/cardano-cli/src/Cardano/CLI/Types/Common.hs b/cardano-cli/src/Cardano/CLI/Types/Common.hs index fa027864d8..d6af0e22f2 100644 --- a/cardano-cli/src/Cardano/CLI/Types/Common.hs +++ b/cardano-cli/src/Cardano/CLI/Types/Common.hs @@ -557,6 +557,9 @@ data CardanoAddressKeyType | CardanoAddressShelleyStakeKey | CardanoAddressIcarusPaymentKey | CardanoAddressByronPaymentKey + | CardanoAddressCommitteeColdKey + | CardanoAddressCommitteeHotKey + | CardanoAddressDRepKey deriving Show type OpCertCounterFile = File OpCertCounter diff --git a/cardano-cli/test/cardano-cli-golden/Test/Golden/Shelley/Key/ConvertCardanoAddressKey.hs b/cardano-cli/test/cardano-cli-golden/Test/Golden/Shelley/Key/ConvertCardanoAddressKey.hs index b36682fed3..72f03beb8c 100644 --- a/cardano-cli/test/cardano-cli-golden/Test/Golden/Shelley/Key/ConvertCardanoAddressKey.hs +++ b/cardano-cli/test/cardano-cli-golden/Test/Golden/Shelley/Key/ConvertCardanoAddressKey.hs @@ -3,12 +3,16 @@ module Test.Golden.Shelley.Key.ConvertCardanoAddressKey where import Control.Monad (void) +import Control.Monad.Extra (forM_) import Data.Text (Text) +import System.FilePath.Posix (()) +import qualified Test.Cardano.CLI.Aeson as Aeson +import qualified Test.Cardano.CLI.Util as H import Test.Cardano.CLI.Util import Hedgehog (Property) -import qualified Hedgehog.Extras.Test.Base as H +import qualified Hedgehog.Extras.Test.Base as H hiding (noteTempFile) import qualified Hedgehog.Extras.Test.File as H import qualified Hedgehog.Extras.Test.Golden as H @@ -171,3 +175,35 @@ hprop_golden_convertCardanoAddressShelleyStakeSigningKey = -- the golden file. H.diffFileVsGoldenFile convertedSigningKeyFp "test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/shelley_stake_signing_key" + +-- | Test that converting a @cardano-address@ CC/DRep signing key +-- yields the expected result. +-- Execute me with: +-- @cabal test cardano-cli-golden --test-options '-p "/convert cardano address cc drep/"'@ +hprop_golden_convert_cardano_address_cc_drep :: Property +hprop_golden_convert_cardano_address_cc_drep = do + let supplyValues = + [ ("cc_cold.key", "--cc-cold-key", "Constitutional Committee Cold") + , ("cc_hot.key", "--cc-hot-key", "Constitutional Committee Hot") + , ("drep.key", "--drep-key", "Delegate Representative") + ] + + propertyOnce $ forM_ supplyValues $ \(filename, flag, descPrefix) -> H.moduleWorkspace "tmp" $ \tempDir -> do + + let outFile = tempDir "out.json" + + -- `cardano-address` signing key filepath + signingKeyFp <- H.noteInputFile $ "test/cardano-cli-golden/files/input/shelley/convert-cardano-address/" <> filename + + -- Convert the `cardano-address` signing key + H.noteShowM_ $ execCardanoCLI + [ "key", "convert-cardano-address-key" + , flag + , "--signing-key-file", signingKeyFp + , "--out-file", outFile + ] + + H.diffFileVsGoldenFile outFile + ("test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/" <> filename) + + Aeson.assertHasMappings [("description", descPrefix <> " Extended Signing Key")] outFile diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli index e82627fa4f..29917aa9de 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli @@ -138,7 +138,10 @@ Usage: cardano-cli shelley key convert-itn-bip32-key --itn-signing-key-file FILE corresponding Shelley stake signing key Usage: cardano-cli shelley key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -1311,7 +1314,10 @@ Usage: cardano-cli allegra key convert-itn-bip32-key --itn-signing-key-file FILE corresponding Shelley stake signing key Usage: cardano-cli allegra key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -2484,7 +2490,10 @@ Usage: cardano-cli mary key convert-itn-bip32-key --itn-signing-key-file FILE corresponding Shelley stake signing key Usage: cardano-cli mary key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -3640,7 +3649,10 @@ Usage: cardano-cli alonzo key convert-itn-bip32-key --itn-signing-key-file FILE corresponding Shelley stake signing key Usage: cardano-cli alonzo key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -4817,7 +4829,10 @@ Usage: cardano-cli babbage key convert-itn-bip32-key --itn-signing-key-file FILE corresponding Shelley stake signing key Usage: cardano-cli babbage key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -6016,7 +6031,10 @@ Usage: cardano-cli conway key convert-itn-bip32-key --itn-signing-key-file FILE corresponding Shelley stake signing key Usage: cardano-cli conway key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -7661,7 +7679,10 @@ Usage: cardano-cli latest key convert-itn-bip32-key --itn-signing-key-file FILE corresponding Shelley stake signing key Usage: cardano-cli latest key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -9853,7 +9874,10 @@ Usage: cardano-cli legacy key convert-itn-bip32-key --itn-signing-key-file FILE corresponding Shelley stake signing key Usage: cardano-cli legacy key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -11065,7 +11089,10 @@ Usage: cardano-cli key convert-itn-bip32-key --itn-signing-key-file FILE corresponding Shelley stake signing key Usage: cardano-cli key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_key_convert-cardano-address-key.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_key_convert-cardano-address-key.cli index fb75c37842..d8a0200639 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_key_convert-cardano-address-key.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_key_convert-cardano-address-key.cli @@ -1,5 +1,8 @@ Usage: cardano-cli allegra key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -11,6 +14,9 @@ Usage: cardano-cli allegra key convert-cardano-address-key Shelley-format key. Available options: + --cc-cold-key Use a committee cold key. + --cc-hot-key Use a committee hot key. + --drep-key Use a DRep key. --shelley-payment-key Use a Shelley-era extended payment key. --shelley-stake-key Use a Shelley-era extended stake key. --icarus-payment-key Use a Byron-era extended payment key formatted in the diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_key_convert-cardano-address-key.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_key_convert-cardano-address-key.cli index 04fe0ef299..9c59ede91b 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_key_convert-cardano-address-key.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_key_convert-cardano-address-key.cli @@ -1,5 +1,8 @@ Usage: cardano-cli alonzo key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -11,6 +14,9 @@ Usage: cardano-cli alonzo key convert-cardano-address-key Shelley-format key. Available options: + --cc-cold-key Use a committee cold key. + --cc-hot-key Use a committee hot key. + --drep-key Use a DRep key. --shelley-payment-key Use a Shelley-era extended payment key. --shelley-stake-key Use a Shelley-era extended stake key. --icarus-payment-key Use a Byron-era extended payment key formatted in the diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_key_convert-cardano-address-key.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_key_convert-cardano-address-key.cli index 7079de5011..b4e7ff63bb 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_key_convert-cardano-address-key.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_key_convert-cardano-address-key.cli @@ -1,5 +1,8 @@ Usage: cardano-cli babbage key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -11,6 +14,9 @@ Usage: cardano-cli babbage key convert-cardano-address-key Shelley-format key. Available options: + --cc-cold-key Use a committee cold key. + --cc-hot-key Use a committee hot key. + --drep-key Use a DRep key. --shelley-payment-key Use a Shelley-era extended payment key. --shelley-stake-key Use a Shelley-era extended stake key. --icarus-payment-key Use a Byron-era extended payment key formatted in the diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_key_convert-cardano-address-key.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_key_convert-cardano-address-key.cli index 153931a417..c28a98fe54 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_key_convert-cardano-address-key.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_key_convert-cardano-address-key.cli @@ -1,5 +1,8 @@ Usage: cardano-cli conway key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -11,6 +14,9 @@ Usage: cardano-cli conway key convert-cardano-address-key Shelley-format key. Available options: + --cc-cold-key Use a committee cold key. + --cc-hot-key Use a committee hot key. + --drep-key Use a DRep key. --shelley-payment-key Use a Shelley-era extended payment key. --shelley-stake-key Use a Shelley-era extended stake key. --icarus-payment-key Use a Byron-era extended payment key formatted in the diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/key_convert-cardano-address-key.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/key_convert-cardano-address-key.cli index e04842f507..08abfdde61 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/key_convert-cardano-address-key.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/key_convert-cardano-address-key.cli @@ -1,5 +1,8 @@ Usage: cardano-cli key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -11,6 +14,9 @@ Usage: cardano-cli key convert-cardano-address-key Shelley-format key. Available options: + --cc-cold-key Use a committee cold key. + --cc-hot-key Use a committee hot key. + --drep-key Use a DRep key. --shelley-payment-key Use a Shelley-era extended payment key. --shelley-stake-key Use a Shelley-era extended stake key. --icarus-payment-key Use a Byron-era extended payment key formatted in the diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_key_convert-cardano-address-key.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_key_convert-cardano-address-key.cli index 67aa74b04f..45864bf318 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_key_convert-cardano-address-key.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_key_convert-cardano-address-key.cli @@ -1,5 +1,8 @@ Usage: cardano-cli latest key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -11,6 +14,9 @@ Usage: cardano-cli latest key convert-cardano-address-key Shelley-format key. Available options: + --cc-cold-key Use a committee cold key. + --cc-hot-key Use a committee hot key. + --drep-key Use a DRep key. --shelley-payment-key Use a Shelley-era extended payment key. --shelley-stake-key Use a Shelley-era extended stake key. --icarus-payment-key Use a Byron-era extended payment key formatted in the diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_key_convert-cardano-address-key.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_key_convert-cardano-address-key.cli index 12f6fe42b4..d4bb9cabc5 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_key_convert-cardano-address-key.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/legacy_key_convert-cardano-address-key.cli @@ -1,5 +1,8 @@ Usage: cardano-cli legacy key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -11,6 +14,9 @@ Usage: cardano-cli legacy key convert-cardano-address-key Shelley-format key. Available options: + --cc-cold-key Use a committee cold key. + --cc-hot-key Use a committee hot key. + --drep-key Use a DRep key. --shelley-payment-key Use a Shelley-era extended payment key. --shelley-stake-key Use a Shelley-era extended stake key. --icarus-payment-key Use a Byron-era extended payment key formatted in the diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_key_convert-cardano-address-key.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_key_convert-cardano-address-key.cli index 492f60cb63..784e8c5863 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_key_convert-cardano-address-key.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_key_convert-cardano-address-key.cli @@ -1,5 +1,8 @@ Usage: cardano-cli mary key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -11,6 +14,9 @@ Usage: cardano-cli mary key convert-cardano-address-key Shelley-format key. Available options: + --cc-cold-key Use a committee cold key. + --cc-hot-key Use a committee hot key. + --drep-key Use a DRep key. --shelley-payment-key Use a Shelley-era extended payment key. --shelley-stake-key Use a Shelley-era extended stake key. --icarus-payment-key Use a Byron-era extended payment key formatted in the diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_key_convert-cardano-address-key.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_key_convert-cardano-address-key.cli index b2fb706487..8e42f85cab 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_key_convert-cardano-address-key.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_key_convert-cardano-address-key.cli @@ -1,5 +1,8 @@ Usage: cardano-cli shelley key convert-cardano-address-key - ( --shelley-payment-key + ( --cc-cold-key + | --cc-hot-key + | --drep-key + | --shelley-payment-key | --shelley-stake-key | --icarus-payment-key | --byron-payment-key @@ -11,6 +14,9 @@ Usage: cardano-cli shelley key convert-cardano-address-key Shelley-format key. Available options: + --cc-cold-key Use a committee cold key. + --cc-hot-key Use a committee hot key. + --drep-key Use a DRep key. --shelley-payment-key Use a Shelley-era extended payment key. --shelley-stake-key Use a Shelley-era extended stake key. --icarus-payment-key Use a Byron-era extended payment key formatted in the diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/cc_cold.key b/cardano-cli/test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/cc_cold.key new file mode 100644 index 0000000000..02aad6e262 --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/cc_cold.key @@ -0,0 +1,5 @@ +{ + "type": "ConstitutionalCommitteeColdExtendedSigningKey_ed25519_bip32", + "description": "Constitutional Committee Cold Extended Signing Key", + "cborHex": "588048ce1750684ba5f58638f91068bd9ce7bb583565fcfeb98444a12e72fbe79248bd9be06113473d73e9feb0a422f37da5548651d27676b5283c927bd9c63c0df148b9be59236f49de9f8ff0fae08bdb61223a418732a03a9171baaa5ae66aa60d0e0ff26026cc2079044f58f22a22b68a572b02b3349a7dc7b441a7fd08eddaeb" +} diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/cc_hot.key b/cardano-cli/test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/cc_hot.key new file mode 100644 index 0000000000..303b13ef5c --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/cc_hot.key @@ -0,0 +1,5 @@ +{ + "type": "ConstitutionalCommitteeHotExtendedSigningKey_ed25519_bip32", + "description": "Constitutional Committee Hot Extended Signing Key", + "cborHex": "5880b874016119dc93f6906dc52faf5f62e09c21bbe08adaacfa0d0f8b7379b4c75c29944047a8b52c89e63f74fa37e098de133486a31c427250606b118cfd39c3194b6178e9c5e4842215e39a886d28e572dff049234964c1af89bcbddfe2174f2ff5104e5e64b37d9d24988143383460fcb231b9d11cf961820099833635d34b6b" +} diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/drep.key b/cardano-cli/test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/drep.key new file mode 100644 index 0000000000..ca96f4850a --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/shelley/keys/converted_cardano-address_keys/drep.key @@ -0,0 +1,5 @@ +{ + "type": "DRepExtendedSigningKey_ed25519_bip32", + "description": "Delegate Representative Extended Signing Key", + "cborHex": "5880f0c207748a008785c9d5e1139a13fda9edcb3362bed0450a6b2bcb6e4bdb0541644532d1fd46e80f301ff813f0280045826dc225220aed69d28a351bdba4b1a16ff1dc22208e36cfbaca6b8d34bcbecd7d8d18dd2ca3404bba05d4f45d3060f945f8f08388e5c49e8a83e8e3b410dcc7d628e38b7b184453893d5b93521cd051" +} diff --git a/cardano-cli/test/cardano-cli-golden/files/input/shelley/convert-cardano-address/cc_cold.key b/cardano-cli/test/cardano-cli-golden/files/input/shelley/convert-cardano-address/cc_cold.key new file mode 100644 index 0000000000..12f2baf1f8 --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/input/shelley/convert-cardano-address/cc_cold.key @@ -0,0 +1 @@ +addr_xsk1fr8pw5rgfwjltp3clygx30vuu7a4sdt9lnltnpzy5yh897l8jfytmxlqvyf5w0tna8ltpfpz7d7624yx28f8va449q7fy77ecc7qmugwplexqfkvypusgn6c7g4z9d522u4s9ve5nf7u0dzp5l7s3mw6avgc0rwx \ No newline at end of file diff --git a/cardano-cli/test/cardano-cli-golden/files/input/shelley/convert-cardano-address/cc_hot.key b/cardano-cli/test/cardano-cli-golden/files/input/shelley/convert-cardano-address/cc_hot.key new file mode 100644 index 0000000000..35df419b09 --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/input/shelley/convert-cardano-address/cc_hot.key @@ -0,0 +1 @@ +addr_xsk1hp6qzcgemjfldyrdc5h67hmzuzwzrwlq3td2e7sdp79hx7d5cawzn9zqg75t2tyfuclhf73huzvduye5s633csnj2psxkyvvl5uuxx04zp89ue9n0kwjfxypgvurgc8ukgcmn5gul9scyqyesvmrt56tdvwvf8an \ No newline at end of file diff --git a/cardano-cli/test/cardano-cli-golden/files/input/shelley/convert-cardano-address/drep.key b/cardano-cli/test/cardano-cli-golden/files/input/shelley/convert-cardano-address/drep.key new file mode 100644 index 0000000000..49ad7c81ac --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/input/shelley/convert-cardano-address/drep.key @@ -0,0 +1 @@ +addr_xsk17rpqway2qzrctjw4uyfe5yla48kukvmzhmgy2znt909kuj7mq4qkg3fj6875d6q0xq0lsyls9qqytqndcgjjyzhdd8fg5dgmmwjtrg29lrcg8z89cj0g4qlguw6pphx86c5w8zmmrpz98zfatwf4y8xs2yv9hdpn \ No newline at end of file