module Hydra.Cardano.Api.TxOutDatum where
import Hydra.Cardano.Api.Prelude
import Hydra.Cardano.Api.ScriptData (ToScriptData, toScriptData)
mkTxOutDatum ::
forall era a.
(ToScriptData a, IsAlonzoBasedEra era) =>
a ->
TxOutDatum CtxTx era
mkTxOutDatum :: forall era a.
(ToScriptData a, IsAlonzoBasedEra era) =>
a -> TxOutDatum CtxTx era
mkTxOutDatum =
AlonzoEraOnwards era -> HashableScriptData -> TxOutDatum CtxTx era
forall era.
AlonzoEraOnwards era -> HashableScriptData -> TxOutDatum CtxTx era
TxOutDatumInTx (forall era. IsAlonzoBasedEra era => AlonzoEraOnwards era
alonzoBasedEra @era) (HashableScriptData -> TxOutDatum CtxTx era)
-> (a -> HashableScriptData) -> a -> TxOutDatum CtxTx era
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> HashableScriptData
forall a. ToScriptData a => a -> HashableScriptData
toScriptData
mkTxOutDatumHash ::
forall era a ctx.
(ToScriptData a, IsAlonzoBasedEra era) =>
a ->
TxOutDatum ctx era
mkTxOutDatumHash :: forall era a ctx.
(ToScriptData a, IsAlonzoBasedEra era) =>
a -> TxOutDatum ctx era
mkTxOutDatumHash =
AlonzoEraOnwards era -> Hash ScriptData -> TxOutDatum ctx era
forall era ctx.
AlonzoEraOnwards era -> Hash ScriptData -> TxOutDatum ctx era
TxOutDatumHash (forall era. IsAlonzoBasedEra era => AlonzoEraOnwards era
alonzoBasedEra @era) (Hash ScriptData -> TxOutDatum ctx era)
-> (a -> Hash ScriptData) -> a -> TxOutDatum ctx era
forall b c a. (b -> c) -> (a -> b) -> a -> c
. HashableScriptData -> Hash ScriptData
hashScriptDataBytes (HashableScriptData -> Hash ScriptData)
-> (a -> HashableScriptData) -> a -> Hash ScriptData
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> HashableScriptData
forall a. ToScriptData a => a -> HashableScriptData
toScriptData
mkTxOutDatumInline ::
forall era a ctx.
(ToScriptData a, IsBabbageBasedEra era) =>
a ->
TxOutDatum ctx era
mkTxOutDatumInline :: forall era a ctx.
(ToScriptData a, IsBabbageBasedEra era) =>
a -> TxOutDatum ctx era
mkTxOutDatumInline =
BabbageEraOnwards era -> HashableScriptData -> TxOutDatum ctx era
forall era ctx.
BabbageEraOnwards era -> HashableScriptData -> TxOutDatum ctx era
TxOutDatumInline (forall era. IsBabbageBasedEra era => BabbageEraOnwards era
babbageBasedEra @era) (HashableScriptData -> TxOutDatum ctx era)
-> (a -> HashableScriptData) -> a -> TxOutDatum ctx era
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> HashableScriptData
forall a. ToScriptData a => a -> HashableScriptData
toScriptData