atlas-0.1.0.0: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainersupport@geniusyield.co
Stabilitydevelop
Safe HaskellNone
LanguageHaskell2010

GeniusYield.TxBuilder.Node

Description

 
Synopsis

Documentation

data GYTxMonadNode a #

GYTxMonad interpretation run against real node.

Instances

Instances details
Monad GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

Methods

(>>=)GYTxMonadNode a → (a → GYTxMonadNode b) → GYTxMonadNode b #

(>>)GYTxMonadNode a → GYTxMonadNode b → GYTxMonadNode b #

return ∷ a → GYTxMonadNode a #

Functor GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

Methods

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

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

Applicative GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

Methods

pure ∷ a → GYTxMonadNode a #

(<*>)GYTxMonadNode (a → b) → GYTxMonadNode a → GYTxMonadNode b #

liftA2 ∷ (a → b → c) → GYTxMonadNode a → GYTxMonadNode b → GYTxMonadNode c #

(*>)GYTxMonadNode a → GYTxMonadNode b → GYTxMonadNode b #

(<*)GYTxMonadNode a → GYTxMonadNode b → GYTxMonadNode a #

MonadIO GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

Methods

liftIOIO a → GYTxMonadNode a #

MonadRandom GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

Methods

getRandomR ∷ Random a ⇒ (a, a) → GYTxMonadNode a #

getRandom ∷ Random a ⇒ GYTxMonadNode a #

getRandomRs ∷ Random a ⇒ (a, a) → GYTxMonadNode [a] #

getRandoms ∷ Random a ⇒ GYTxMonadNode [a] #

GYTxMonad GYTxMonadNode # 
Instance details

Defined in GeniusYield.TxBuilder.Node

GYTxQueryMonad 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 !GYValue !(NonEmpty (f GYTxBody))

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

GYTxBuildFailure !GYValue

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

GYTxBuildNoInputs

Input did not contain any GYTxSkeletons.

runGYTxMonadNode #

Arguments

GYNetworkId 
GYProviders 
→ [GYAddress]

our addresses

GYAddress

change address

GYTxOutRef

collateral

GYTxMonadNode (GYTxSkeleton v) 
IO GYTxBody 

runGYTxMonadNodeC #

Arguments

∷ ∀ a. GYNetworkId 
GYProviders 
→ [GYAddress]

our addresses

GYAddress

change address

GYTxOutRef

collateral

GYTxMonadNode a 
IO a 

runGYTxMonadNodeF #

Arguments

∷ ∀ f v. Traversable f 
GYCoinSelectionStrategy 
GYNetworkId 
GYProviders 
→ [GYAddress]

our addresses

GYAddress

change address

GYTxOutRef

collateral

GYTxMonadNode (f (GYTxSkeleton v)) 
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.

runGYTxMonadNodeParallelFTraversable f ⇒ GYCoinSelectionStrategyGYNetworkIdGYProviders → [GYAddress] → GYAddressGYTxOutRefGYTxMonadNode [f (GYTxSkeleton v)] → 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.

runGYTxMonadNodeChainingFTraversable f ⇒ GYCoinSelectionStrategyGYNetworkIdGYProviders → [GYAddress] → GYAddressGYTxOutRefGYTxMonadNode [f (GYTxSkeleton v)] → 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**