Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- data GenerateTxError
- generateBodyContent :: Integer -> Params -> Map DatumHash Datum -> Map TxOutRef TxOut -> Map ValidatorHash (Versioned Validator) -> Maybe (Set TxOutRef, Wallet) -> TxSkel -> Either GenerateTxError (TxBodyContent BuildTx ConwayEra)
- generateTxOut :: NetworkId -> TxSkelOut -> Either GenerateTxError (TxOut CtxTx ConwayEra)
- generateTx :: Integer -> Params -> Map DatumHash Datum -> Map TxOutRef TxOut -> Map ValidatorHash (Versioned Validator) -> Maybe (Set TxOutRef, Wallet) -> TxSkel -> Either GenerateTxError (Tx ConwayEra)
Documentation
data GenerateTxError Source #
Errors that can arise during transaction generation
Instances
Show GenerateTxError Source # | |
Defined in Cooked.MockChain.GenerateTx.Common showsPrec :: Int -> GenerateTxError -> ShowS # show :: GenerateTxError -> String # showList :: [GenerateTxError] -> ShowS # | |
Eq GenerateTxError Source # | |
Defined in Cooked.MockChain.GenerateTx.Common (==) :: GenerateTxError -> GenerateTxError -> Bool # (/=) :: GenerateTxError -> GenerateTxError -> Bool # |
:: 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
:: NetworkId | The network Id |
-> TxSkelOut | The output to translate |
-> Either GenerateTxError (TxOut CtxTx ConwayEra) |
Generates a Cardano TxOut
from a TxSkelOut
:: 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.