Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | None |
Language | GHC2021 |
GeniusYield.Transaction.Common
Description
Synopsis
- data GYBalancedTx (v :: PlutusVersion) = GYBalancedTx {
- gybtxIns :: ![GYTxInDetailed v]
- gybtxCollaterals :: !GYUTxOs
- gybtxOuts :: ![GYTxOut v]
- gybtxMint :: !(Maybe (GYValue, [(GYBuildScript v, GYRedeemer)]))
- gybtxWdrls :: ![GYTxWdrl v]
- gybtxCerts :: ![GYTxCert' v]
- gybtxInvalidBefore :: !(Maybe GYSlot)
- gybtxInvalidAfter :: !(Maybe GYSlot)
- gybtxSigners :: !(Set GYPubKeyHash)
- gybtxRefIns :: !GYUTxOs
- gybtxMetadata :: !(Maybe GYTxMetadata)
- gybtxVotingProcedures :: !(GYTxVotingProcedures v)
- gybtxProposalProcedures :: ![(GYProposalProcedurePB, GYTxBuildWitness v)]
- gybtxDonation :: !Natural
- data GYTxInDetailed (v :: PlutusVersion) = GYTxInDetailed {
- gyTxInDet :: !(GYTxIn v)
- gyTxInDetAddress :: !GYAddress
- gyTxInDetValue :: !GYValue
- gyTxInDetDatum :: !GYOutDatum
- gyTxInDetScriptRef :: !(Maybe GYAnyScript)
- utxoFromTxInDetailed :: forall (v :: PlutusVersion). GYTxInDetailed v -> GYUTxO
- utxoToTxInDetailed :: forall (v :: PlutusVersion). GYUTxO -> GYTxInWitness v -> GYTxInDetailed v
- data GYTxExtraConfiguration (v :: PlutusVersion) = GYTxExtraConfiguration {}
- data GYBuildTxError
- = GYBuildTxBalancingError !GYBalancingError
- | GYBuildTxBodyErrorAutoBalance !(TxBodyErrorAutoBalance ApiEra)
- | GYBuildTxFeeUtxoAdaInsufficient !(TxBodyErrorAutoBalance ApiEra)
- | GYBuildTxExUnitsTooBig (Natural, Natural) (Natural, Natural)
- | GYBuildTxSizeTooBig !Natural !Natural
- | GYBuildTxCollateralShortFall !Natural !Natural
- | GYBuildTxNoSuitableCollateral
- | GYBuildTxCborSimplificationError !CborSimplificationError
- | GYBuildTxCollapseExtraOutError !TxBodyError
- data GYBalancingError
- minimumUTxO :: forall (v :: PlutusVersion). ApiProtocolParameters -> GYTxOut v -> Natural
- minimumApiUTxO :: ApiProtocolParameters -> TxOut CtxTx ApiEra -> Natural
- adjustTxOut :: forall (v :: PlutusVersion). (GYTxOut v -> Natural) -> GYTxOut v -> GYTxOut v
Documentation
data GYBalancedTx (v :: PlutusVersion) #
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
.
Constructors
GYBalancedTx | |
Fields
|
data GYTxInDetailed (v :: PlutusVersion) #
A further detailed version of GYTxIn
, containing all information about a UTxO.
Constructors
GYTxInDetailed | |
Fields
|
Instances
Show (GYTxInDetailed v) # | |
Defined in GeniusYield.Transaction.Common Methods showsPrec :: Int -> GYTxInDetailed v -> ShowS # show :: GYTxInDetailed v -> String # showList :: [GYTxInDetailed v] -> ShowS # | |
Eq (GYTxInDetailed v) # | |
Defined in GeniusYield.Transaction.Common Methods (==) :: GYTxInDetailed v -> GYTxInDetailed v -> Bool # (/=) :: GYTxInDetailed v -> GYTxInDetailed v -> Bool # |
utxoFromTxInDetailed :: forall (v :: PlutusVersion). GYTxInDetailed v -> GYUTxO #
utxoToTxInDetailed :: forall (v :: PlutusVersion). GYUTxO -> GYTxInWitness v -> GYTxInDetailed v #
data GYTxExtraConfiguration (v :: PlutusVersion) #
Extra configuration for transaction building.
Constructors
GYTxExtraConfiguration | |
Fields
|
Instances
Default (GYTxExtraConfiguration v) # | |
Defined in GeniusYield.Transaction.Common Methods def :: GYTxExtraConfiguration v # |
data GYBuildTxError #
GYBuildTxError
may be raised when building transactions, for non-trivial errors.
Insufficient funds and similar are considered trivial transaction building errors.
Constructors
GYBuildTxBalancingError !GYBalancingError | |
GYBuildTxBodyErrorAutoBalance !(TxBodyErrorAutoBalance ApiEra) | |
GYBuildTxFeeUtxoAdaInsufficient !(TxBodyErrorAutoBalance ApiEra) | If fee UTxO is provided for in extra build configuration, then this error is raised if it's insufficient to cover for fees and ADA of subsequent change output. |
GYBuildTxExUnitsTooBig | Execution units required is higher than the maximum as specified by protocol params. |
GYBuildTxSizeTooBig | Transaction size is higher than the maximum as specified by protocol params. |
GYBuildTxCollateralShortFall | Shortfall (in collateral inputs) for collateral requirement. |
GYBuildTxNoSuitableCollateral | Couldn't find a UTxO to use as collateral. |
GYBuildTxCborSimplificationError !CborSimplificationError | |
GYBuildTxCollapseExtraOutError !TxBodyError |
Instances
Show GYBuildTxError # | |
Defined in GeniusYield.Transaction.Common Methods showsPrec :: Int -> GYBuildTxError -> ShowS # show :: GYBuildTxError -> String # showList :: [GYBuildTxError] -> ShowS # |
data GYBalancingError #
Constructors
GYBalancingErrorInsufficientFunds !GYValue | |
GYBalancingErrorNonPositiveTxOut !(GYTxOut v) | |
GYBalancingErrorChangeShortFall !Natural | Lovelace shortfall in constructing a change output. See: GeniusYield.Transaction.CoinSelection.Balance.UnableToConstructChangeError |
GYBalancingErrorEmptyOwnUTxOs | User wallet has no utxos to select. |
Instances
PrintfArg GYBalancingError # | |
Defined in GeniusYield.Transaction.Common Methods | |
Show GYBalancingError # | |
Defined in GeniusYield.Transaction.Common Methods showsPrec :: Int -> GYBalancingError -> ShowS # show :: GYBalancingError -> String # showList :: [GYBalancingError] -> ShowS # | |
Eq GYBalancingError # | |
Defined in GeniusYield.Transaction.Common Methods (==) :: GYBalancingError -> GYBalancingError -> Bool # (/=) :: GYBalancingError -> GYBalancingError -> Bool # |
minimumUTxO :: forall (v :: PlutusVersion). ApiProtocolParameters -> GYTxOut v -> Natural #
minimumApiUTxO :: ApiProtocolParameters -> TxOut CtxTx ApiEra -> Natural #
adjustTxOut :: forall (v :: PlutusVersion). (GYTxOut v -> Natural) -> GYTxOut v -> GYTxOut v #