hydra-node-0.19.0: The Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Chain.ScriptRegistry

Description

A data-type to keep track of reference Hydra scripts published on-chain, and needed to construct transactions leveraging reference inputs.

Synopsis

Documentation

queryScriptRegistry Source #

Arguments

:: (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 TxIns 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.

publishHydraScripts Source #

Arguments

:: 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