atlas-cardano-0.6.2: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellSafe-Inferred
LanguageGHC2021

GeniusYield.Transaction.CoinSelection

Description

 
Synopsis

Documentation

data GYBalancedTx v #

An *almost* finalized Tx.

This is fully balanced _except_ potentially missing an ada change output, and missing the exact fee. Both of these will be set by finalizeGYBalancedTx.

data GYTxInDetailed v #

A further detailed version of GYTxIn, containing all information about a UTxO.

Instances

Instances details
Show (GYTxInDetailed v) # 
Instance details

Defined in GeniusYield.Transaction.Common

Eq (GYTxInDetailed v) # 
Instance details

Defined in GeniusYield.Transaction.Common

data GYCoinSelectionEnv v #

Constructors

GYCoinSelectionEnv 

Fields

data GYCoinSelectionStrategy #

Instances

Instances details
Bounded GYCoinSelectionStrategy # 
Instance details

Defined in GeniusYield.Transaction.CoinSelection

Enum GYCoinSelectionStrategy # 
Instance details

Defined in GeniusYield.Transaction.CoinSelection

Show GYCoinSelectionStrategy # 
Instance details

Defined in GeniusYield.Transaction.CoinSelection

Default GYCoinSelectionStrategy # 
Instance details

Defined in GeniusYield.Transaction.CoinSelection

Eq GYCoinSelectionStrategy # 
Instance details

Defined in GeniusYield.Transaction.CoinSelection

selectInputs ∷ ∀ m v. MonadRandom m ⇒ GYCoinSelectionEnv v → GYCoinSelectionStrategyExceptT GYBalancingError m ([GYTxInDetailed v], [GYTxOut v]) #

Select additional inputs from the set of own utxos given, such that when combined with given existing inputs, they cover for all the given outputs, as well as extraLovelace.

Return the list of additional inputs chosen and the change outputs created.

Invariant ==

The ownUtxos and requiredOutputs arguments passed must contain non negative GYValues, with each one containing a positive amount of ada.