cardano-cli
Safe HaskellNone
LanguageHaskell2010

Cardano.CLI.Run.Hash

Synopsis

Documentation

getByteStringFromURL :: SupportedSchemes -> Text -> ExceptT FetchURLError IO ByteString Source #

Fetches the content of a URL as a ByteString. The URL must be an absolute URL. The supported schemes are specified in the SupportedSchemes argument. If the scheme is not supported, an error is thrown.

carryHashChecks Source #

Arguments

:: PotentiallyCheckedAnchor anchorType (Anchor StandardCrypto)

The information about anchor data and whether to check the hash (see PotentiallyCheckedAnchor)

-> ExceptT HashCheckError IO () 

Check the hash of the anchor data against the hash in the anchor if checkHash is set to CheckHash.

allSchemes :: SupportedSchemes Source #

All the supported schemes are allowed.

httpsAndIpfsSchemes :: SupportedSchemes Source #

Only HTTPS and IPFS schemes are allowed. We also allow HTTP for testing purposes but it is discouraged, because it can lead to security vulnerabilities. For example: If a user checks the anchor-data through a web browser and through the `cardano-cli` independently, one of them could easily get spoofed, and the user would not notice that the anchor-data being verified in the browser is not the same.