Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- runHashCmds :: HashCmds -> ExceptT HashCmdError IO ()
- getByteStringFromURL :: SupportedSchemes -> Text -> ExceptT FetchURLError IO ByteString
- carryHashChecks :: PotentiallyCheckedAnchor anchorType (Anchor StandardCrypto) -> ExceptT HashCheckError IO ()
- allSchemes :: SupportedSchemes
- httpsAndIpfsSchemes :: SupportedSchemes
Documentation
runHashCmds :: HashCmds -> ExceptT HashCmdError IO () Source #
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.
:: PotentiallyCheckedAnchor anchorType (Anchor StandardCrypto) | The information about anchor data and whether to check the hash (see |
-> 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.