atlas-cardano-0.5.0: 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.TxBuilder.Node

Description

 
Synopsis

Documentation

data GYTxMonadNode a #

GYTxMonad interpretation run against real node.

Instances

Instances details
MonadRandom GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

Methods

getRandomRRandom a ⇒ (a, a) → GYTxMonadNode a Source #

getRandomRandom a ⇒ GYTxMonadNode a Source #

getRandomRsRandom a ⇒ (a, a) → GYTxMonadNode [a] Source #

getRandomsRandom a ⇒ GYTxMonadNode [a] Source #

GYTxMonad GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

GYTxQueryMonad GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

MonadIO GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

Methods

liftIOIO a → GYTxMonadNode a Source #

Applicative GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

Functor GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

Methods

fmap ∷ (a → b) → GYTxMonadNode a → GYTxMonadNode b Source #

(<$) ∷ a → GYTxMonadNode b → GYTxMonadNode a Source #

Monad GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

MonadError GYTxMonadException GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

data GYTxBuildResult f #

Result of building GYTxBodys with the option of recovery from error.

Consider the act of building five GYTxSkeletons into GYTxBodys. If three out of the five succeed, but the next one fails due to insufficient funds - this type facilitates recovering the three rather than failing outright and discarding the results.

Constructors

GYTxBuildSuccess !(NonEmpty (f GYTxBody))

All given GYTxSkeletons were successfully built.

GYTxBuildPartialSuccess !BalancingError !(NonEmpty (f GYTxBody))

Some of the given GYTxSkeletons were successfully built, but the rest failed due to _insufficient funds_.

GYTxBuildFailure !BalancingError

None of the given GYTxSkeletons could be built due to _insufficient funds_.

GYTxBuildNoInputs

Input did not contain any GYTxSkeletons.

runGYTxMonadNode #

Arguments

GYNetworkId

Network ID.

GYProviders

Provider.

→ [GYAddress]

Addresses belonging to wallet.

GYAddress

Change address.

Maybe (GYTxOutRef, Bool)

If Nothing is provided, framework would pick up a suitable UTxO as collateral and in such case is also free to spend it. If something is given with boolean being False then framework will use the given GYTxOutRef as collateral and would reserve it as well. But if boolean is True, framework would only use it as collateral and reserve it, if value in the given UTxO is exactly 5 ada.

GYTxMonadNode (GYTxSkeleton v)

Skeleton.

IO GYTxBody 

runGYTxMonadNodeWithStrategy #

Arguments

GYCoinSelectionStrategy

Coin selection strategy.

GYNetworkId

Network ID.

GYProviders

Provider.

→ [GYAddress]

Addresses belonging to wallet.

GYAddress

Change address.

Maybe (GYTxOutRef, Bool)

If Nothing is provided, framework would pick up a suitable UTxO as collateral and in such case is also free to spend it. If something is given with boolean being False then framework will use the given GYTxOutRef as collateral and would reserve it as well. But if boolean is True, framework would only use it as collateral and reserve it, if value in the given UTxO is exactly 5 ada.

GYTxMonadNode (GYTxSkeleton v)

Skeleton.

IO GYTxBody 

runGYTxMonadNodeC #

Arguments

∷ ∀ a. GYNetworkId

Network ID.

GYProviders

Provider.

→ [GYAddress]

Addresses belonging to wallet.

GYAddress

Change address.

Maybe (GYTxOutRef, Bool)

If Nothing is provided, framework would pick up a suitable UTxO as collateral and in such case is also free to spend it. If something is given with boolean being False then framework will use the given GYTxOutRef as collateral and would reserve it as well. But if boolean is True, framework would only use it as collateral and reserve it, if value in the given UTxO is exactly 5 ada.

GYTxMonadNode a

When we don't want to build a skeleton.

IO a 

runGYTxMonadNodeF #

Arguments

∷ ∀ f v. Traversable f 
GYCoinSelectionStrategy

Coin selection strategy.

GYNetworkId

Network ID.

GYProviders

Provider.

→ [GYAddress]

Addresses belonging to wallet.

GYAddress

Change address.

Maybe (GYTxOutRef, Bool)

If Nothing is provided, framework would pick up a suitable UTxO as collateral and in such case is also free to spend it. If something is given with boolean being False then framework will use the given GYTxOutRef as collateral and would reserve it as well. But if boolean is True, framework would only use it as collateral and reserve it, if value in the given UTxO is exactly 5 ada.

GYTxMonadNode (f (GYTxSkeleton v))

Skeleton(s).

IO (f GYTxBody) 

The most basic version of GYTxMonadNode interpreter over a generic Traversable.

NOTE ==

This is not meant to be used with structures containing _multiple_ GYTxSkeletons. As the balancer will end up using the same utxos across the different txs.

Consider using runGYTxMonadNodeParallel or runGYTxMonadNodeChaining instead.

runGYTxMonadNodeParallel #

Arguments

GYNetworkId

Network ID.

GYProviders

Provider.

→ [GYAddress]

Addresses belonging to wallet.

GYAddress

Change address.

Maybe (GYTxOutRef, Bool)

If Nothing is provided, framework would pick up a suitable UTxO as collateral and in such case is also free to spend it. If something is given with boolean being False then framework will use the given GYTxOutRef as collateral and would reserve it as well. But if boolean is True, framework would only use it as collateral and reserve it, if value in the given UTxO is exactly 5 ada.

GYTxMonadNode [GYTxSkeleton v]

Skeleton(s).

IO (GYTxBuildResult Identity) 

runGYTxMonadNodeParallelWithStrategy #

Arguments

GYCoinSelectionStrategy

Coin selection strategy.

GYNetworkId

Network ID.

GYProviders

Provider.

→ [GYAddress]

Addresses belonging to wallet.

GYAddress

Change address.

Maybe (GYTxOutRef, Bool)

If Nothing is provided, framework would pick up a suitable UTxO as collateral and in such case is also free to spend it. If something is given with boolean being False then framework will use the given GYTxOutRef as collateral and would reserve it as well. But if boolean is True, framework would only use it as collateral and reserve it, if value in the given UTxO is exactly 5 ada.

GYTxMonadNode [GYTxSkeleton v]

Skeleton(s).

IO (GYTxBuildResult Identity) 

runGYTxMonadNodeParallelF #

Arguments

Traversable f 
GYCoinSelectionStrategy

Coin selection strategy.

GYNetworkId

Network ID.

GYProviders

Provider.

→ [GYAddress]

Addresses belonging to wallet.

GYAddress

Change address.

Maybe (GYTxOutRef, Bool)

If Nothing is provided, framework would pick up a suitable UTxO as collateral and in such case is also free to spend it. If something is given with boolean being False then framework will use the given GYTxOutRef as collateral and would reserve it as well. But if boolean is True, framework would only use it as collateral and reserve it, if value in the given UTxO is exactly 5 ada.

GYTxMonadNode [f (GYTxSkeleton v)]

Skeleton(s).

IO (GYTxBuildResult f) 

A multi transaction building GYTxMonadNode interpreter.

This does not perform chaining, i.e does not use utxos created by one of the given transactions in the next one. However, it does ensure that the balancer does not end up using the same own utxos when building multiple transactions at once.

This supports failure recovery by utilizing GYTxBuildResult.

runGYTxMonadNodeChaining #

Arguments

GYNetworkId

Network ID.

GYProviders

Provider.

→ [GYAddress]

Addresses belonging to wallet.

GYAddress

Change address.

Maybe (GYTxOutRef, Bool)

If Nothing is provided, framework would pick up a suitable UTxO as collateral and in such case is also free to spend it. If something is given with boolean being False then framework will use the given GYTxOutRef as collateral and would reserve it as well. But if boolean is True, framework would only use it as collateral and reserve it, if value in the given UTxO is exactly 5 ada.

GYTxMonadNode [GYTxSkeleton v]

Skeleton(s).

IO (GYTxBuildResult Identity) 

runGYTxMonadNodeChainingF #

Arguments

Traversable f 
GYCoinSelectionStrategy

Coin selection strategy.

GYNetworkId

Network ID.

GYProviders

Provider.

→ [GYAddress]

Addresses belonging to wallet.

GYAddress

Change address.

Maybe (GYTxOutRef, Bool)

If Nothing is provided, framework would pick up a suitable UTxO as collateral and in such case is also free to spend it. If something is given with boolean being False then framework will use the given GYTxOutRef as collateral and would reserve it as well. But if boolean is True, framework would only use it as collateral and reserve it, if value in the given UTxO is exactly 5 ada.

GYTxMonadNode [f (GYTxSkeleton v)]

Skeleton(s).

IO (GYTxBuildResult f) 

A chaining transaction building GYTxMonadNode interpreter.

This will perform chaining, i.e it will use utxos created by one of the given transactions, when building the next one.

This supports failure recovery by utilizing GYTxBuildResult.

  • *EXPERIMENTAL**