convex-coin-selection-0.2.0.0: Coin selection algorithm for Cardano transactions
Safe HaskellSafe-Inferred
LanguageHaskell2010

Convex.Query

Description

Custom class to encapsulate the general purpose queries that we need for building transactions

Synopsis

Documentation

class Monad m ⇒ MonadUtxoQuery m where Source #

Instances

Instances details
MonadUtxoQuery m ⇒ MonadUtxoQuery (MonadLogIgnoreT m) Source # 
Instance details

Defined in Convex.Query

MonadIO m ⇒ MonadUtxoQuery (WalletAPIQueryT m) Source # 
Instance details

Defined in Convex.Query

Monad m ⇒ MonadUtxoQuery (MockchainT m) Source # 
Instance details

Defined in Convex.Query

MonadUtxoQuery m ⇒ MonadUtxoQuery (MonadBlockchainWaitingT m) Source # 
Instance details

Defined in Convex.Query

MonadUtxoQuery m ⇒ MonadUtxoQuery (ResultT m) Source # 
Instance details

Defined in Convex.Query

MonadUtxoQuery m ⇒ MonadUtxoQuery (MonadBlockchainCardanoNodeT e m) Source # 
Instance details

Defined in Convex.Query

MonadUtxoQuery m ⇒ MonadUtxoQuery (ExceptT e m) Source # 
Instance details

Defined in Convex.Query

MonadUtxoQuery m ⇒ MonadUtxoQuery (ReaderT e m) Source # 
Instance details

Defined in Convex.Query

MonadUtxoQuery m ⇒ MonadUtxoQuery (StateT s m) Source # 
Instance details

Defined in Convex.Query

MonadUtxoQuery m ⇒ MonadUtxoQuery (StateT s m) Source # 
Instance details

Defined in Convex.Query

balanceTx ∷ (MonadBlockchain m, MonadUtxoQuery m) ⇒ PaymentCredentialTxOut CtxTx BabbageEraTxBodyContent BuildTx BabbageEra → m (Either BalancingError (BalancedTxBody BabbageEra, BalanceChanges)) Source #

Balance the transaction body using the UTxOs locked by the payment credential, and returning any unused funds to the given payment credential and stake credential |

Tx balancing for operator

balanceAndSubmitOperator ∷ (MonadBlockchain m, MonadUtxoQuery m, MonadError BalanceAndSubmitError m) ⇒ Operator SigningMaybe (TxOut CtxTx BabbageEra) → TxBodyContent BuildTx BabbageEra → m (Tx BabbageEra) Source #

Balance a transaction body, sign it with the operator's key, and submit it to the network.

balanceOperator ∷ (MonadBlockchain m, MonadUtxoQuery m, MonadError BalanceAndSubmitError m) ⇒ PaymentCredentialMaybe (TxOut CtxTx BabbageEra) → TxBodyContent BuildTx BabbageEra → m (Tx BabbageEra) Source #

Balance a transaction body using the funds locked by the payment credential

signTxOperatorOperator SigningTx BabbageEraTx BabbageEra Source #

Add a signature to the transaction

signAndSubmitOperator ∷ (MonadBlockchain m, MonadError BalanceAndSubmitError m) ⇒ Operator SigningTx BabbageEra → m (Tx BabbageEra) Source #

Add the operator's signature to the transaction and send it to the blockchain

operatorUtxosMonadUtxoQuery m ⇒ Operator k → m (UTxO BabbageEra) Source #

UTxOs that are locked by the operator's payment credential |

selectOperatorUTxOMonadUtxoQuery m ⇒ Operator k → m (Maybe (TxIn, TxOut CtxUTxO BabbageEra)) Source #

Select a single UTxO that is controlled by the operator. |

data BalanceAndSubmitError Source #

Failures during txn balancing and submission

Wallet API queries

newtype WalletAPIQueryT m a Source #

Instances

Instances details
MonadError e m ⇒ MonadError e (WalletAPIQueryT m) Source # 
Instance details

Defined in Convex.Query

MonadIO m ⇒ MonadIO (WalletAPIQueryT m) Source # 
Instance details

Defined in Convex.Query

Methods

liftIOIO a → WalletAPIQueryT m a Source #

Applicative m ⇒ Applicative (WalletAPIQueryT m) Source # 
Instance details

Defined in Convex.Query

Functor m ⇒ Functor (WalletAPIQueryT m) Source # 
Instance details

Defined in Convex.Query

Methods

fmap ∷ (a → b) → WalletAPIQueryT m a → WalletAPIQueryT m b Source #

(<$) ∷ a → WalletAPIQueryT m b → WalletAPIQueryT m a Source #

Monad m ⇒ Monad (WalletAPIQueryT m) Source # 
Instance details

Defined in Convex.Query

MonadBlockchain m ⇒ MonadBlockchain (WalletAPIQueryT m) Source # 
Instance details

Defined in Convex.Query

MonadLog m ⇒ MonadLog (WalletAPIQueryT m) Source # 
Instance details

Defined in Convex.Query

MonadIO m ⇒ MonadUtxoQuery (WalletAPIQueryT m) Source # 
Instance details

Defined in Convex.Query