Safe Haskell | None |
---|---|
Language | Haskell2010 |
Mantra.Chain.Internal
Contents
Description
Extracting scripts from witnesses.
Synopsis
- interpretAsScript :: Timelock StandardCrypto -> Maybe (SimpleScript SimpleScriptV2, ScriptHash)
- toScript :: SimpleScript SimpleScriptV2 -> (SimpleScript SimpleScriptV2, ScriptHash)
- toSimpleScriptV2 :: String -> Maybe (SimpleScript SimpleScriptV2)
Scripts
Arguments
:: Timelock StandardCrypto | The witness. |
-> Maybe (SimpleScript SimpleScriptV2, ScriptHash) | The script and its hash, if the witness was a script. |
Convert a witness to a script.
Arguments
:: SimpleScript SimpleScriptV2 | The simple script. |
-> (SimpleScript SimpleScriptV2, ScriptHash) | The script and its hash. |
Convert a simple script to a script and its hash.
Arguments
:: String | The string representation. |
-> Maybe (SimpleScript SimpleScriptV2) | The simple script, if the parsing succeeded. |
Parse a string representation of a simple script.