Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | support@geniusyield.co |
Stability | develop |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data GYBalancedTx v = GYBalancedTx {
- gybtxIns ∷ ![GYTxInDetailed v]
- gybtxCollaterals ∷ !GYUTxOs
- gybtxOuts ∷ ![GYTxOut v]
- gybtxMint ∷ !(Maybe (GYValue, [(Some GYMintingPolicy, GYRedeemer)]))
- gybtxInvalidBefore ∷ !(Maybe GYSlot)
- gybtxInvalidAfter ∷ !(Maybe GYSlot)
- gybtxSigners ∷ !(Set GYPubKeyHash)
- gybtxRefIns ∷ !GYUTxOs
- data GYTxInDetailed v = GYTxInDetailed {}
- data GYCoinSelectionEnv v = GYCoinSelectionEnv {
- existingInputs ∷ ![GYTxInDetailed v]
- requiredOutputs ∷ ![(GYAddress, GYValue)]
- mintValue ∷ !GYValue
- changeAddr ∷ GYAddress
- ownUtxos ∷ !GYUTxOs
- extraLovelace ∷ !Natural
- minimumUTxOF ∷ GYTxOut v → Natural
- maxValueSize ∷ Natural
- data GYCoinSelectionStrategy
- selectInputs ∷ ∀ m v. MonadRandom m ⇒ GYCoinSelectionEnv v → GYCoinSelectionStrategy → ExceptT BalancingError m ([GYTxInDetailed v], [GYTxOut v])
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
.
GYBalancedTx | |
|
data GYTxInDetailed v #
A further detailed version of GYTxIn
, containing all information about a UTxO.
GYTxInDetailed | |
|
Instances
Eq (GYTxInDetailed v) # | |
Defined in GeniusYield.Transaction.Common (==) ∷ GYTxInDetailed v → GYTxInDetailed v → Bool # (/=) ∷ GYTxInDetailed v → GYTxInDetailed v → Bool # | |
Show (GYTxInDetailed v) # | |
Defined in GeniusYield.Transaction.Common showsPrec ∷ Int → GYTxInDetailed v → ShowS # show ∷ GYTxInDetailed v → String # showList ∷ [GYTxInDetailed v] → ShowS # |
data GYCoinSelectionEnv v #
GYCoinSelectionEnv | |
|
data GYCoinSelectionStrategy #
Instances
selectInputs ∷ ∀ m v. MonadRandom m ⇒ GYCoinSelectionEnv v → GYCoinSelectionStrategy → ExceptT BalancingError 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.
NOTE: This function doesn't necessarily take care of all ada change. Indeed, if any extra ada
is still in the inputs and doesn't appear in the change outputs selected - it will simply
be taken care of by makeTransactionBodyAutoBalance
called higher in the call hierarchy.
Invariant ==
The ownUtxos
and requiredOutputs
arguments passed must contain non negative GYValue
s, with each one containing
a positive amount of ada.