diff --git a/.changes/20260718_044307_cardano-cli_pablo.lamela_fix_anchor_url_help_messages.yml b/.changes/20260718_044307_cardano-cli_pablo.lamela_fix_anchor_url_help_messages.yml new file mode 100644 index 0000000000..bd1785c35c --- /dev/null +++ b/.changes/20260718_044307_cardano-cli_pablo.lamela_fix_anchor_url_help_messages.yml @@ -0,0 +1,6 @@ +description: Fix help messages in anchor hashing functions to display the right protocols + supported +kind: +- bugfix +pr: 1396 +project: cardano-cli diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Governance/DRep/Option.hs b/cardano-cli/src/Cardano/CLI/EraBased/Governance/DRep/Option.hs index 0f3a76207f..c4bebe18e4 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Governance/DRep/Option.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Governance/DRep/Option.hs @@ -186,5 +186,8 @@ pDRepMetadataSource :: Parser DRepMetadataSource pDRepMetadataSource = asum [ DrepMetadataFileIn <$> pFileInDirection "drep-metadata-file" "JSON Metadata file to hash." - , DrepMetadataURL <$> pUrl "drep-metadata-url" "URL pointing to the JSON Metadata file to hash." + , DrepMetadataURL + <$> pUrl + "drep-metadata-url" + "URL pointing to the JSON Metadata file to hash. Supported schemes are: file, http, https, ipfs." ] diff --git a/cardano-cli/src/Cardano/CLI/EraBased/StakePool/Option.hs b/cardano-cli/src/Cardano/CLI/EraBased/StakePool/Option.hs index e4408d67a6..577913b819 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/StakePool/Option.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/StakePool/Option.hs @@ -77,7 +77,9 @@ pPoolMetadataSource = F.asum [ Cmd.StakePoolMetadataFileIn <$> pPoolMetadataFile , Cmd.StakePoolMetadataURL - <$> pUrl "pool-metadata-url" "URL pointing to the JSON Metadata file to hash." + <$> pUrl + "pool-metadata-url" + "URL pointing to the JSON Metadata file to hash. Supported schemes are: file, http, https, ipfs." ] pPoolMetadataHashGoal :: Parser (Cmd.HashGoal (Hash StakePoolMetadata)) diff --git a/cardano-cli/src/Cardano/CLI/EraIndependent/Hash/Option.hs b/cardano-cli/src/Cardano/CLI/EraIndependent/Hash/Option.hs index d55b7de32a..e73c2c5be4 100644 --- a/cardano-cli/src/Cardano/CLI/EraIndependent/Hash/Option.hs +++ b/cardano-cli/src/Cardano/CLI/EraIndependent/Hash/Option.hs @@ -64,7 +64,7 @@ pAnchorDataHashSource = , Cmd.AnchorDataHashSourceTextFile <$> pFileInDirection "file-text" "Text file to hash" , Cmd.AnchorDataHashSourceURL - <$> pUrl "url" "A URL to the file to hash (HTTP(S) and IPFS only)" + <$> pUrl "url" "A URL to the file to hash. Supported schemes are: file, http, https, ipfs." ] pHashScriptCmd :: Parser Cmd.HashCmds diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/compatible_conway_governance_drep_metadata-hash.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/compatible_conway_governance_drep_metadata-hash.cli index 4cd25d62d4..e20af4ab47 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/compatible_conway_governance_drep_metadata-hash.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/compatible_conway_governance_drep_metadata-hash.cli @@ -13,6 +13,7 @@ Available options: --drep-metadata-file FILEPATH JSON Metadata file to hash. --drep-metadata-url TEXT URL pointing to the JSON Metadata file to hash. + Supported schemes are: file, http, https, ipfs. --expected-hash HASH Expected hash for the DRep metadata, for verification purposes. If provided, the hash of the DRep metadata will be compared to this value. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_drep_metadata-hash.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_drep_metadata-hash.cli index 94f1a7fc4e..ff29f01b7a 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_drep_metadata-hash.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_drep_metadata-hash.cli @@ -13,6 +13,7 @@ Available options: --drep-metadata-file FILEPATH JSON Metadata file to hash. --drep-metadata-url TEXT URL pointing to the JSON Metadata file to hash. + Supported schemes are: file, http, https, ipfs. --expected-hash HASH Expected hash for the DRep metadata, for verification purposes. If provided, the hash of the DRep metadata will be compared to this value. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_stake-pool_metadata-hash.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_stake-pool_metadata-hash.cli index f9429ceffe..1e75cb21c1 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_stake-pool_metadata-hash.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_stake-pool_metadata-hash.cli @@ -13,6 +13,7 @@ Available options: --pool-metadata-file FILEPATH Filepath of the pool metadata. --pool-metadata-url TEXT URL pointing to the JSON Metadata file to hash. + Supported schemes are: file, http, https, ipfs. --expected-hash HASH Expected hash for the stake pool metadata, for verification purposes. If provided, the hash of the stake pool metadata will be compared to this value. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/hash_anchor-data.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/hash_anchor-data.cli index 11f6723217..3909baf757 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/hash_anchor-data.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/hash_anchor-data.cli @@ -14,7 +14,8 @@ Available options: --text TEXT Text to hash as UTF-8 --file-binary FILEPATH Binary file to hash --file-text FILEPATH Text file to hash - --url TEXT A URL to the file to hash (HTTP(S) and IPFS only) + --url TEXT A URL to the file to hash. Supported schemes are: + file, http, https, ipfs. --expected-hash HASH Expected hash for the anchor data, for verification purposes. If provided, the hash of the anchor data will be compared to this value. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_drep_metadata-hash.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_drep_metadata-hash.cli index 641ff2ffcb..b31d982fe1 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_drep_metadata-hash.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_drep_metadata-hash.cli @@ -13,6 +13,7 @@ Available options: --drep-metadata-file FILEPATH JSON Metadata file to hash. --drep-metadata-url TEXT URL pointing to the JSON Metadata file to hash. + Supported schemes are: file, http, https, ipfs. --expected-hash HASH Expected hash for the DRep metadata, for verification purposes. If provided, the hash of the DRep metadata will be compared to this value. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_stake-pool_metadata-hash.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_stake-pool_metadata-hash.cli index 2b5df9cde7..1dd51444bb 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_stake-pool_metadata-hash.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_stake-pool_metadata-hash.cli @@ -13,6 +13,7 @@ Available options: --pool-metadata-file FILEPATH Filepath of the pool metadata. --pool-metadata-url TEXT URL pointing to the JSON Metadata file to hash. + Supported schemes are: file, http, https, ipfs. --expected-hash HASH Expected hash for the stake pool metadata, for verification purposes. If provided, the hash of the stake pool metadata will be compared to this value.