hydra-tx-0.19.0: Hydra transaction library
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Ledger.Cardano.Builder

Contents

Description

Utilities to building transactions on top of the cardano-api.

Synopsis

Executing

unsafeBuildTransaction :: HasCallStack => TxBodyContent BuildTx -> Tx Source #

Construct a transction from a builder. It is said unsafe because the underlying implementation will perform some sanity check on a transaction; for example, check that it has at least one input, that no outputs are negatives and whatnot.

We use the builder only internally for on-chain transaction crafted in the context of Hydra.

data InvalidTransactionException Source #

A runtime exception to capture (programmer) failures when building transactions. This should never happened in practice (famous last words...)!

Constructors

InvalidTransactionException 

Fields

addTxInsSpending :: [TxIn] -> TxBodyContent BuildTx -> TxBodyContent BuildTx Source #

Like addInputs but only for vk inputs which requires no additional data.

mintTokens :: ToScriptData redeemer => PlutusScript -> redeemer -> [(AssetName, Quantity)] -> TxBodyContent BuildTx -> TxBodyContent BuildTx Source #

Mint tokens with given plutus minting script and redeemer.

burnTokens :: ToScriptData redeemer => PlutusScript -> redeemer -> [(AssetName, Quantity)] -> TxBodyContent BuildTx -> TxBodyContent BuildTx Source #

Burn tokens with given plutus minting script and redeemer. This is really just mintTokens with negated Quantity.