cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.MockChain.GenerateTx.Witness

Description

This module exposes the generation of key and script witnesses

Synopsis

Documentation

toScriptWitness :: (Members '[MockChainRead, Error MockChainError, Error ToCardanoError] effs, ToVScript a) => a -> TxSkelRedeemer -> ScriptDatum b -> Sem effs (ScriptWitness b ConwayEra) Source #

Translates a script with its associated redeemer and datum to a script witness. Note on the usage of zeroExecutionUnits: at this stage of the transaction create, we cannot know the execution units used by the script. They will be filled out later on once the full body has been generated. So, for now, we temporarily leave them to 0.

toKeyWitness :: TxBody ConwayEra -> TxSkelSignatory -> Maybe (KeyWitness ConwayEra) Source #

Generates a key witnesses for a given signatory and body, when the signatory contains a private key.