cooked-validators
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.MockChain.GenerateTx.Witness

Description

This module exposes the generation of witnesses and reward account

Synopsis

Documentation

toRewardAccount :: MonadBlockChainBalancing m => Credential -> m RewardAccount Source #

Translates a given credential to a reward account.

toScriptWitness :: (MonadBlockChainBalancing m, ToVersioned Script a) => a -> TxSkelRedeemer -> ScriptDatum b -> m (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 -> Wallet -> KeyWitness ConwayEra Source #

Generates a list of witnesses for a given wallet and body