cooked-validators-4.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.MockChain.GenerateTx

Description

This module provides primitives to translate elements from our skeleton to actual transaction elements, including the transaction itself. Ideally, this module should only export generateTx but we need to make visible a few other primitives that will be used in balancing.

Synopsis

Documentation

generateBodyContent Source #

Arguments

:: Integer

fee to apply to body generation

-> Params

parameters of the emulator

-> Map DatumHash Datum

datums present in our environment

-> Map TxOutRef TxOut

txouts present in our environment

-> Map ValidatorHash (Versioned Validator)

validators present in our environment

-> Maybe (Set TxOutRef, Wallet)

Possible collaterals to use

-> TxSkel

The skeleton to translate

-> Either GenerateTxError (TxBodyContent BuildTx ConwayEra) 

Generates a transaction body for a skeleton

generateTxOut Source #

Arguments

:: NetworkId

The network Id

-> TxSkelOut

The output to translate

-> Either GenerateTxError (TxOut CtxTx ConwayEra) 

Generates a Cardano TxOut from a TxSkelOut

generateTx Source #

Arguments

:: Integer

fee to apply to body generation

-> Params

parameters of the emulator

-> Map DatumHash Datum

datums present in our environment

-> Map TxOutRef TxOut

txouts present in our environment

-> Map ValidatorHash (Versioned Validator)

validators present in our environment

-> Maybe (Set TxOutRef, Wallet)

The collateral inputs and associated collateral wallet

-> TxSkel

The skeleton to translate

-> Either GenerateTxError (Tx ConwayEra) 

Generates a transaction from a skeleton. Shares the same parameters as generateTxOut. It consists of generating the body and then signing it.