module Hydra.Cardano.Api.ScriptDatum where
import Hydra.Cardano.Api.Prelude
import Hydra.Cardano.Api.ScriptData (ToScriptData, toScriptData)
mkScriptDatum :: ToScriptData a => a -> ScriptDatum WitCtxTxIn
mkScriptDatum :: forall a. ToScriptData a => a -> ScriptDatum WitCtxTxIn
mkScriptDatum =
Maybe HashableScriptData -> ScriptDatum WitCtxTxIn
ScriptDatumForTxIn (Maybe HashableScriptData -> ScriptDatum WitCtxTxIn)
-> (a -> Maybe HashableScriptData) -> a -> ScriptDatum WitCtxTxIn
forall b c a. (b -> c) -> (a -> b) -> a -> c
. HashableScriptData -> Maybe HashableScriptData
forall a. a -> Maybe a
Just (HashableScriptData -> Maybe HashableScriptData)
-> (a -> HashableScriptData) -> a -> Maybe HashableScriptData
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> HashableScriptData
forall a. ToScriptData a => a -> HashableScriptData
toScriptData