Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
A data-type to keep track of reference Hydra scripts published on-chain, and needed to construct transactions leveraging reference inputs.
Synopsis
- data ScriptRegistry = ScriptRegistry {
- initialReference :: (TxIn, TxOut CtxUTxO)
- commitReference :: (TxIn, TxOut CtxUTxO)
- headReference :: (TxIn, TxOut CtxUTxO)
- data NewScriptRegistryException = MissingScript {
- scriptName :: Text
- scriptHash :: ScriptHash
- discoveredScripts :: Set ScriptHash
- newScriptRegistry :: UTxO -> Either NewScriptRegistryException ScriptRegistry
- registryUTxO :: ScriptRegistry -> UTxO
Documentation
data ScriptRegistry Source #
Hydra scripts published as reference scripts at these UTxO.
ScriptRegistry | |
|
Instances
data NewScriptRegistryException Source #
MissingScript | |
|
Instances
newScriptRegistry :: UTxO -> Either NewScriptRegistryException ScriptRegistry Source #
Create a script registry from a UTxO containing outputs with reference
scripts. This will return Nothing
if one or all of the references could not
be found.
registryUTxO :: ScriptRegistry -> UTxO Source #
Get the UTxO that corresponds to a script registry.
*Property**:
newScriptRegistry (registryUTxO r) === Just r