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
- queryScriptRegistry :: (MonadIO m, MonadThrow m) => NetworkId -> SocketPath -> TxId -> m ScriptRegistry
- publishHydraScripts :: NetworkId -> SocketPath -> SigningKey PaymentKey -> IO TxId
Documentation
:: (MonadIO m, MonadThrow m) | |
=> NetworkId | cardano-node's network identifier. A combination of network discriminant + magic number. |
-> SocketPath | Filepath to the cardano-node's domain socket |
-> TxId | |
-> m ScriptRegistry |
Query for TxIn
s in the search for outputs containing all the reference
scripts of the ScriptRegistry
.
This is implemented by repeated querying until we have all necessary reference scripts as we do only know the transaction id, not the indices.
NOTE: This is limited to an upper bound of 10 to not query too much before providing an error.
NOTE: If this should change, make sure to update the command line help.
Can throw at least NewScriptRegistryException
on failure.
:: NetworkId | Expected network discriminant. |
-> SocketPath | Path to the cardano-node's domain socket |
-> SigningKey PaymentKey | Keys assumed to hold funds to pay for the publishing transaction. |
-> IO TxId |