Module

Ctl.Internal.BalanceTx.Constraints

#BalanceTxConstraints

newtype BalanceTxConstraints

Constructors

Instances

#mustGenChangeOutsWithMaxTokenQuantity

mustGenChangeOutsWithMaxTokenQuantity :: BigInt -> BalanceTxConstraintsBuilder

Tells the balancer to split change outputs and equipartition change Value between them if the total change Value contains token quantities exceeding the specified upper bound. (See Cardano.Types.Value.equipartitionValueWithTokenQuantityUpperBound)

#mustNotSpendUtxosWithOutRefs

mustNotSpendUtxosWithOutRefs :: Set TransactionInput -> BalanceTxConstraintsBuilder

Tells the balancer not to spend UTxO's with the specified output references.

#mustNotSpendUtxoWithOutRef

mustNotSpendUtxoWithOutRef :: TransactionInput -> BalanceTxConstraintsBuilder

Tells the balancer not to spend a UTxO with the specified output reference.

#mustSendChangeToAddress

mustSendChangeToAddress :: Address -> BalanceTxConstraintsBuilder

Tells the balancer to send all generated change to a given address. If this constraint is not set, then the default change address owned by the wallet is used.

NOTE: Setting mustUseUtxosAtAddresses or mustUseUtxosAtAddress does NOT have any effect on which address will be used as a change address.

#mustSendChangeWithDatum

mustSendChangeWithDatum :: OutputDatum -> BalanceTxConstraintsBuilder

Tells the balancer to include the datum in each change UTxO. Useful when balancing a transactions for script owned UTxOs.

#mustUseAdditionalUtxos

mustUseAdditionalUtxos :: UtxoMap -> BalanceTxConstraintsBuilder

Tells the balancer to use the provided UTxO set when evaluating script execution units (sets additionalUtxoSet of Ogmios EvaluateTx). Note that you need to use unspentOutputs lookup to make these UTxO's spendable by the transaction (see Examples.TxChaining for reference).

#mustUseCoinSelectionStrategy

mustUseCoinSelectionStrategy :: SelectionStrategy -> BalanceTxConstraintsBuilder

Tells the balancer to use the given strategy for coin selection.

#mustUseCollateralUtxos

mustUseCollateralUtxos :: UtxoMap -> BalanceTxConstraintsBuilder

Tells the balancer to select from the provided UTxO set when choosing collateral UTxOs, instead of UTxOs provided by the browser wallet.

#mustUseUtxosAtAddress

mustUseUtxosAtAddress :: Address -> BalanceTxConstraintsBuilder

Tells the balancer to use UTxO's at a given address. If this constraint is not set, then the default addresses owned by the wallet are used.

NOTE: Setting mustUseUtxosAtAddresses or mustUseUtxosAtAddress does NOT have any effect on which address will be used as a change address.

#mustUseUtxosAtAddresses

mustUseUtxosAtAddresses :: Array Address -> BalanceTxConstraintsBuilder

Tells the balancer to use UTxO's at given addresses. If this constraint is not set, then the default addresses owned by the wallet are used.

NOTE: Setting mustUseUtxosAtAddresses or mustUseUtxosAtAddress does NOT have any effect on which address will be used as a change address.

Modules