atlas-cardano-0.6.2: 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

Description

 
Synopsis

Documentation

class Monad m ⇒ MonadRandom (m ∷ TypeType) where #

With a source of random number supply in hand, the MonadRandom class allows the programmer to extract random values of a variety of types.

Methods

getRandomRRandom a ⇒ (a, a) → m a #

Takes a range (lo,hi) and a random number generator g, and returns a computation that returns a random value uniformly distributed in the closed interval [lo,hi], together with a new generator. It is unspecified what happens if lo>hi. For continuous types there is no requirement that the values lo and hi are ever produced, but they may be, depending on the implementation and the interval.

See randomR for details.

getRandomRandom a ⇒ m a #

The same as getRandomR, but using a default range determined by the type:

  • For bounded types (instances of Bounded, such as Char), the range is normally the whole type.
  • For fractional types, the range is normally the semi-closed interval [0,1).
  • For Integer, the range is (arbitrarily) the range of Int.

See random for details.

getRandomRsRandom a ⇒ (a, a) → m [a] #

Plural variant of getRandomR, producing an infinite list of random values instead of returning a new generator.

See randomRs for details.

getRandomsRandom a ⇒ m [a] #

Plural variant of getRandom, producing an infinite list of random values instead of returning a new generator.

See randoms for details.

Instances

Instances details
MonadRandom GYTxMonadClb # 
Instance details

Defined in GeniusYield.Test.Clb

Methods

getRandomRRandom a ⇒ (a, a) → GYTxMonadClb a #

getRandomRandom a ⇒ GYTxMonadClb a #

getRandomRsRandom a ⇒ (a, a) → GYTxMonadClb [a] #

getRandomsRandom a ⇒ GYTxMonadClb [a] #

MonadRandom GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

getRandomRRandom a ⇒ (a, a) → GYTxGameMonadIO a #

getRandomRandom a ⇒ GYTxGameMonadIO a #

getRandomRsRandom a ⇒ (a, a) → GYTxGameMonadIO [a] #

getRandomsRandom a ⇒ GYTxGameMonadIO [a] #

MonadRandom GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

getRandomRRandom a ⇒ (a, a) → GYTxMonadIO a #

getRandomRandom a ⇒ GYTxMonadIO a #

getRandomRsRandom a ⇒ (a, a) → GYTxMonadIO [a] #

getRandomsRandom a ⇒ GYTxMonadIO [a] #

MonadRandom GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

MonadRandom GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

Methods

getRandomRRandom a ⇒ (a, a) → GYTxQueryMonadIO a #

getRandomRandom a ⇒ GYTxQueryMonadIO a #

getRandomRsRandom a ⇒ (a, a) → GYTxQueryMonadIO [a] #

getRandomsRandom a ⇒ GYTxQueryMonadIO [a] #

MonadRandom NonRandom 
Instance details

Defined in Control.Monad.Random.NonRandom

Methods

getRandomRRandom a ⇒ (a, a) → NonRandom a #

getRandomRandom a ⇒ NonRandom a #

getRandomRsRandom a ⇒ (a, a) → NonRandom [a] #

getRandomsRandom a ⇒ NonRandom [a] #

MonadRandom IO 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → IO a #

getRandomRandom a ⇒ IO a #

getRandomRsRandom a ⇒ (a, a) → IO [a] #

getRandomsRandom a ⇒ IO [a] #

MonadRandom m ⇒ MonadRandom (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

getRandomRRandom a ⇒ (a, a) → FeeTracker m a #

getRandomRandom a ⇒ FeeTracker m a #

getRandomRsRandom a ⇒ (a, a) → FeeTracker m [a] #

getRandomsRandom a ⇒ FeeTracker m [a] #

MonadRandom m ⇒ MonadRandom (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

getRandomRRandom a ⇒ (a, a) → FeeTrackerGame m a #

getRandomRandom a ⇒ FeeTrackerGame m a #

getRandomRsRandom a ⇒ (a, a) → FeeTrackerGame m [a] #

getRandomsRandom a ⇒ FeeTrackerGame m [a] #

MonadRandom m ⇒ MonadRandom (MaybeT m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → MaybeT m a #

getRandomRandom a ⇒ MaybeT m a #

getRandomRsRandom a ⇒ (a, a) → MaybeT m [a] #

getRandomsRandom a ⇒ MaybeT m [a] #

(RandomGen g, Monad m) ⇒ MonadRandom (RandT g m) 
Instance details

Defined in Control.Monad.Trans.Random.Lazy

Methods

getRandomRRandom a ⇒ (a, a) → RandT g m a #

getRandomRandom a ⇒ RandT g m a #

getRandomRsRandom a ⇒ (a, a) → RandT g m [a] #

getRandomsRandom a ⇒ RandT g m [a] #

(RandomGen g, Monad m) ⇒ MonadRandom (RandT g m) 
Instance details

Defined in Control.Monad.Trans.Random.Strict

Methods

getRandomRRandom a ⇒ (a, a) → RandT g m a #

getRandomRandom a ⇒ RandT g m a #

getRandomRsRandom a ⇒ (a, a) → RandT g m [a] #

getRandomsRandom a ⇒ RandT g m [a] #

MonadRandom m ⇒ MonadRandom (ExceptT e m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → ExceptT e m a #

getRandomRandom a ⇒ ExceptT e m a #

getRandomRsRandom a ⇒ (a, a) → ExceptT e m [a] #

getRandomsRandom a ⇒ ExceptT e m [a] #

MonadRandom m ⇒ MonadRandom (IdentityT m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → IdentityT m a #

getRandomRandom a ⇒ IdentityT m a #

getRandomRsRandom a ⇒ (a, a) → IdentityT m [a] #

getRandomsRandom a ⇒ IdentityT m [a] #

MonadRandom m ⇒ MonadRandom (ReaderT r m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → ReaderT r m a #

getRandomRandom a ⇒ ReaderT r m a #

getRandomRsRandom a ⇒ (a, a) → ReaderT r m [a] #

getRandomsRandom a ⇒ ReaderT r m [a] #

MonadRandom m ⇒ MonadRandom (StateT s m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → StateT s m a #

getRandomRandom a ⇒ StateT s m a #

getRandomRsRandom a ⇒ (a, a) → StateT s m [a] #

getRandomsRandom a ⇒ StateT s m [a] #

MonadRandom m ⇒ MonadRandom (StateT s m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → StateT s m a #

getRandomRandom a ⇒ StateT s m a #

getRandomRsRandom a ⇒ (a, a) → StateT s m [a] #

getRandomsRandom a ⇒ StateT s m [a] #

(MonadRandom m, Monoid w) ⇒ MonadRandom (WriterT w m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → WriterT w m a #

getRandomRandom a ⇒ WriterT w m a #

getRandomRsRandom a ⇒ (a, a) → WriterT w m [a] #

getRandomsRandom a ⇒ WriterT w m [a] #

(MonadRandom m, Monoid w) ⇒ MonadRandom (WriterT w m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → WriterT w m a #

getRandomRandom a ⇒ WriterT w m a #

getRandomRsRandom a ⇒ (a, a) → WriterT w m [a] #

getRandomsRandom a ⇒ WriterT w m [a] #

MonadRandom m ⇒ MonadRandom (ContT r m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → ContT r m a #

getRandomRandom a ⇒ ContT r m a #

getRandomRsRandom a ⇒ (a, a) → ContT r m [a] #

getRandomsRandom a ⇒ ContT r m [a] #

(Monoid w, MonadRandom m) ⇒ MonadRandom (RWST r w s m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → RWST r w s m a #

getRandomRandom a ⇒ RWST r w s m a #

getRandomRsRandom a ⇒ (a, a) → RWST r w s m [a] #

getRandomsRandom a ⇒ RWST r w s m [a] #

(Monoid w, MonadRandom m) ⇒ MonadRandom (RWST r w s m) 
Instance details

Defined in Control.Monad.Random.Class

Methods

getRandomRRandom a ⇒ (a, a) → RWST r w s m a #

getRandomRandom a ⇒ RWST r w s m a #

getRandomRsRandom a ⇒ (a, a) → RWST r w s m [a] #

getRandomsRandom a ⇒ RWST r w s m [a] #

class Monad m ⇒ MonadError e (m ∷ TypeType) | m → e where #

The strategy of combining computations that can throw exceptions by bypassing bound functions from the point an exception is thrown to the point that it is handled.

Is parameterized over the type of error information and the monad type constructor. It is common to use Either String as the monad type constructor for an error monad in which error descriptions take the form of strings. In that case and many other common cases the resulting monad is already defined as an instance of the MonadError class. You can also define your own error type and/or use a monad type constructor other than Either String or Either IOError. In these cases you will have to explicitly define instances of the MonadError class. (If you are using the deprecated Control.Monad.Error or Control.Monad.Trans.Error, you may also have to define an Error instance.)

Methods

throwError ∷ e → m a #

Is used within a monadic computation to begin exception processing.

catchError ∷ m a → (e → m a) → m a #

A handler function to handle previous errors and return to normal execution. A common idiom is:

do { action1; action2; action3 } `catchError` handler

where the action functions can call throwError. Note that handler and the do-block must have the same return type.

Instances

Instances details
MonadError GYTxMonadException GYTxMonadClb # 
Instance details

Defined in GeniusYield.Test.Clb

MonadError GYTxMonadException GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

MonadError GYTxMonadException GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

MonadError GYTxMonadException GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

MonadError GYTxMonadException GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

MonadError IOException IO 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwErrorIOExceptionIO a #

catchErrorIO a → (IOExceptionIO a) → IO a #

MonadError BuiltinError BuiltinResult

throwError puts every operational unlifting error into the BuiltinFailure logs. This is to compensate for the historical lack of error message content in operational errors (structural ones don't have this problem) in our evaluators (the CK and CEK machines). It would be better to fix the underlying issue and allow operational evaluation errors to carry some form of content, but for now we just fix the symptom in order for the end user to see the error message that they are supposed to see. The fix even makes some sense: what we do here is we emulate logging when the thrown unlifting error is an operational one, i.e. this is similar to what some builtins do manually (like when a crypto builtin fails and puts info about the failure into the logs).

Instance details

Defined in PlutusCore.Builtin.Result

MonadError ClientError ClientM 
Instance details

Defined in Servant.Client.Internal.HttpClient

Methods

throwErrorClientErrorClientM a #

catchErrorClientM a → (ClientErrorClientM a) → ClientM a #

MonadError () EvaluationResult 
Instance details

Defined in PlutusCore.Evaluation.Result

MonadError () Maybe

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ () → Maybe a #

catchErrorMaybe a → (() → Maybe a) → Maybe a #

MonadError GYTxMonadException m ⇒ MonadError GYTxMonadException (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

MonadError GYTxMonadException m ⇒ MonadError GYTxMonadException (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Monad m ⇒ MonadError BlockfrostError (BlockfrostClientT m) 
Instance details

Defined in Blockfrost.Client.Types

MonadError e (Either e) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → Either e a #

catchErrorEither e a → (e → Either e a) → Either e a #

MonadError e m ⇒ MonadError e (Free m) 
Instance details

Defined in Control.Monad.Free

Methods

throwError ∷ e → Free m a #

catchErrorFree m a → (e → Free m a) → Free m a #

MonadError e m ⇒ MonadError e (GenT m) 
Instance details

Defined in Hedgehog.Internal.Gen

Methods

throwError ∷ e → GenT m a #

catchErrorGenT m a → (e → GenT m a) → GenT m a #

MonadError e m ⇒ MonadError e (PropertyT m) 
Instance details

Defined in Hedgehog.Internal.Property

Methods

throwError ∷ e → PropertyT m a #

catchErrorPropertyT m a → (e → PropertyT m a) → PropertyT m a #

MonadError e m ⇒ MonadError e (TestT m) 
Instance details

Defined in Hedgehog.Internal.Property

Methods

throwError ∷ e → TestT m a #

catchErrorTestT m a → (e → TestT m a) → TestT m a #

MonadError e m ⇒ MonadError e (TreeT m) 
Instance details

Defined in Hedgehog.Internal.Tree

Methods

throwError ∷ e → TreeT m a #

catchErrorTreeT m a → (e → TreeT m a) → TreeT m a #

MonadError e m ⇒ MonadError e (KatipContextT m) 
Instance details

Defined in Katip.Monadic

Methods

throwError ∷ e → KatipContextT m a #

catchErrorKatipContextT m a → (e → KatipContextT m a) → KatipContextT m a #

MonadError e m ⇒ MonadError e (NoLoggingT m) 
Instance details

Defined in Katip.Monadic

Methods

throwError ∷ e → NoLoggingT m a #

catchErrorNoLoggingT m a → (e → NoLoggingT m a) → NoLoggingT m a #

MonadError e m ⇒ MonadError e (ListT m) 
Instance details

Defined in ListT

Methods

throwError ∷ e → ListT m a #

catchErrorListT m a → (e → ListT m a) → ListT m a #

MonadError e m ⇒ MonadError e (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

throwError ∷ e → ResourceT m a #

catchErrorResourceT m a → (e → ResourceT m a) → ResourceT m a #

MonadError e m ⇒ MonadError e (MaybeT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → MaybeT m a #

catchErrorMaybeT m a → (e → MaybeT m a) → MaybeT m a #

MonadError e m ⇒ MonadError e (RandT g m) 
Instance details

Defined in Control.Monad.Trans.Random.Lazy

Methods

throwError ∷ e → RandT g m a #

catchErrorRandT g m a → (e → RandT g m a) → RandT g m a #

MonadError e m ⇒ MonadError e (RandT g m) 
Instance details

Defined in Control.Monad.Trans.Random.Strict

Methods

throwError ∷ e → RandT g m a #

catchErrorRandT g m a → (e → RandT g m a) → RandT g m a #

(Functor f, MonadError e m) ⇒ MonadError e (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

throwError ∷ e → FreeT f m a #

catchErrorFreeT f m a → (e → FreeT f m a) → FreeT f m a #

(Monoid w, MonadError e m) ⇒ MonadError e (AccumT w m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → AccumT w m a #

catchErrorAccumT w m a → (e → AccumT w m a) → AccumT w m a #

Monad m ⇒ MonadError e (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → ExceptT e m a #

catchErrorExceptT e m a → (e → ExceptT e m a) → ExceptT e m a #

MonadError e m ⇒ MonadError e (IdentityT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → IdentityT m a #

catchErrorIdentityT m a → (e → IdentityT m a) → IdentityT m a #

MonadError e m ⇒ MonadError e (ReaderT r m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → ReaderT r m a #

catchErrorReaderT r m a → (e → ReaderT r m a) → ReaderT r m a #

MonadError e m ⇒ MonadError e (StateT s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → StateT s m a #

catchErrorStateT s m a → (e → StateT s m a) → StateT s m a #

MonadError e m ⇒ MonadError e (StateT s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → StateT s m a #

catchErrorStateT s m a → (e → StateT s m a) → StateT s m a #

(Monoid w, MonadError e m) ⇒ MonadError e (WriterT w m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → WriterT w m a #

catchErrorWriterT w m a → (e → WriterT w m a) → WriterT w m a #

(Monoid w, MonadError e m) ⇒ MonadError e (WriterT w m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → WriterT w m a #

catchErrorWriterT w m a → (e → WriterT w m a) → WriterT w m a #

(Monoid w, MonadError e m) ⇒ MonadError e (WriterT w m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → WriterT w m a #

catchErrorWriterT w m a → (e → WriterT w m a) → WriterT w m a #

MonadError e m ⇒ MonadError e (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

throwError ∷ e → ConduitT i o m a #

catchErrorConduitT i o m a → (e → ConduitT i o m a) → ConduitT i o m a #

(Monoid w, MonadError e m) ⇒ MonadError e (RWST r w s m)

Since: mtl-2.3

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → RWST r w s m a #

catchErrorRWST r w s m a → (e → RWST r w s m a) → RWST r w s m a #

(Monoid w, MonadError e m) ⇒ MonadError e (RWST r w s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → RWST r w s m a #

catchErrorRWST r w s m a → (e → RWST r w s m a) → RWST r w s m a #

(Monoid w, MonadError e m) ⇒ MonadError e (RWST r w s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError ∷ e → RWST r w s m a #

catchErrorRWST r w s m a → (e → RWST r w s m a) → RWST r w s m a #

MonadError e m ⇒ MonadError e (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

throwError ∷ e → Pipe l i o u m a #

catchErrorPipe l i o u m a → (e → Pipe l i o u m a) → Pipe l i o u m a #

ThrowableBuiltins uni fun ⇒ MonadError (CekEvaluationException NamedDeBruijn uni fun) (CekM uni fun s) 
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.Internal

Methods

throwErrorCekEvaluationException NamedDeBruijn uni fun → CekM uni fun s a #

catchErrorCekM uni fun s a → (CekEvaluationException NamedDeBruijn uni fun → CekM uni fun s a) → CekM uni fun s a #

data User #

Note: When signing using ToShelleyWitnessSigningKey instance, it only uses the payment signing key.

Instances

Instances details
ToShelleyWitnessSigningKey User #

This only takes the payment signing key, not the stake key.

Instance details

Defined in GeniusYield.TxBuilder.User

Show User # 
Instance details

Defined in GeniusYield.TxBuilder.User

Methods

showsPrecIntUserShowS #

showUserString #

showList ∷ [User] → ShowS #

Eq User # 
Instance details

Defined in GeniusYield.TxBuilder.User

Methods

(==)UserUserBool #

(/=)UserUserBool #

Ord User # 
Instance details

Defined in GeniusYield.TxBuilder.User

Methods

compareUserUserOrdering #

(<)UserUserBool #

(<=)UserUserBool #

(>)UserUserBool #

(>=)UserUserBool #

maxUserUserUser #

minUserUserUser #

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) 
GYBuildTxExUnitsTooBig

Execution units required is higher than the maximum as specified by protocol params.

Fields

  • (Natural, Natural)

    Tuple of maximum execution steps & memory as given by protocol parameters.

  • (Natural, Natural)

    Tuple of execution steps & memory as taken by built transaction.

GYBuildTxSizeTooBig

Transaction size is higher than the maximum as specified by protocol params.

Fields

  • !Natural

    Maximum size as specified by protocol parameters.

  • !Natural

    Size our built transaction took.

GYBuildTxCollateralShortFall

Shortfall (in collateral inputs) for collateral requirement.

Fields

  • !Natural

    Transaction collateral requirement.

  • !Natural

    Lovelaces in given collateral UTxO.

GYBuildTxNoSuitableCollateral

Couldn't find a UTxO to use as collateral.

GYBuildTxCborSimplificationError !CborSimplificationError 
GYBuildTxCollapseExtraOutError !TxBodyError 

Instances

Instances details
Show GYBuildTxError # 
Instance details

Defined in GeniusYield.Transaction.Common

class (GYTxMonad (TxMonadOf m), GYTxSpecialQueryMonad m) ⇒ GYTxGameMonad m where #

Class of monads that can simulate a "game" between different users interacting with transactions.

Associated Types

type TxMonadOf m = (r ∷ TypeType) | r → m #

Type of the supported GYTxMonad instance that can participate within the "game".

Methods

createUser ∷ m User #

Create a new user within the chain. This does not fund the user. See "GeniusYield.Test.Utils.createUserWithLovelace" or "GeniusYield.Test.Utils.createUserWithAssets".

This _must not_ fund the user. Note: The generated user may be arbitrarily complex. i.e may have zero or more stake keys (and thus one or more addresses).

asUserUserTxMonadOf m a → m a #

Lift the supported GYTxMonad instance into the game, as a participating user wallet.

Instances

Instances details
GYTxGameMonad GYTxMonadClb # 
Instance details

Defined in GeniusYield.Test.Clb

Associated Types

type TxMonadOf GYTxMonadClb = (r ∷ TypeType) #

GYTxGameMonad GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Associated Types

type TxMonadOf GYTxGameMonadIO = (r ∷ TypeType) #

GYTxGameMonad m ⇒ GYTxGameMonad (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Associated Types

type TxMonadOf (FeeTrackerGame m) = (r ∷ TypeType) #

class GYTxBuilderMonad m ⇒ GYTxMonad m where #

Class of monads for interacting with the blockchain using transactions.

Methods

signTxBodyGYTxBody → m GYTx #

Sign a transaction body with the user payment key to produce a transaction with witnesses.

Note: The key is not meant to be exposed to the monad, so it is only held within the closure that signs a given transaction. It is recommended to use signGYTxBody and similar to implement this method.

signTxBodyWithStakeGYTxBody → m GYTx #

Sign a transaction body with the user payment key AND user stake key to produce a transaction with witnesses. If the user wallet does not have a stake key, this function should be equivalent to signTxBody.

See note on signTxBody

submitTxGYTx → m GYTxId #

Submit a fully built transaction to the chain. Use buildTxBody to build a transaction body, and signGYTxBody to sign it before submitting.

Note: Changes made to the chain by the submitted transaction may not be reflected immediately, see awaitTxConfirmed.

Law: someUTxO calls made after a call to submitTx may return previously returned UTxOs if they were not affected by the submitted transaction.

awaitTxConfirmed'GYAwaitTxParametersGYTxId → m () #

Wait for a _recently_ submitted transaction to be confirmed.

Note: If used on a transaction submitted long ago, the behavior is undefined.

Law: Queries made after a call to awaitTxConfirmed' should reflect changes made to the chain by the identified transaction.

Instances

Instances details
GYTxMonad GYTxMonadClb # 
Instance details

Defined in GeniusYield.Test.Clb

GYTxMonad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

GYTxMonad m ⇒ GYTxMonad (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

GYTxMonad m ⇒ GYTxMonad (RandT g m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

GYTxMonad m ⇒ GYTxMonad (ReaderT env m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

GYTxMonad m ⇒ GYTxMonad (StateT s m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

GYTxMonad m ⇒ GYTxMonad (StateT s m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

(GYTxMonad m, Monoid w) ⇒ GYTxMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

(GYTxMonad m, Monoid w) ⇒ GYTxMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

(GYTxMonad m, Monoid w) ⇒ GYTxMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

class (Default (TxBuilderStrategy m), GYTxSpecialQueryMonad m, GYTxUserQueryMonad m) ⇒ GYTxBuilderMonad m where #

Class of monads for building transactions. This can be default derived if the requirements are met. Specifically, set TxBuilderStrategy to GYCoinSelectionStrategy if you wish to use the default in-house transaction building implementation.

Minimal complete definition

Nothing

Methods

buildTxBodyWithStrategy ∷ ∀ v. TxBuilderStrategy m → GYTxSkeleton v → m GYTxBody #

The most basic version of GYTxSkeleton builder.

NOTE ==

This is not meant to be called multiple times with several GYTxSkeletons before submission. Because the balancer will end up using the same utxos across the different txs.

Consider using buildTxBodyParallel or buildTxBodyChaining instead.

buildTxBodyParallelWithStrategy ∷ ∀ v. TxBuilderStrategy m → [GYTxSkeleton v] → m GYTxBuildResult #

A multi GYTxSkeleton builder. The result containing built bodies must be in the same order as the skeletons.

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.

buildTxBodyChainingWithStrategy ∷ ∀ v. TxBuilderStrategy m → [GYTxSkeleton v] → m GYTxBuildResult #

A chaining GYTxSkeleton builder. The result containing built bodies must be in the same order as the skeletons.

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.

Instances

Instances details
GYTxBuilderMonad GYTxMonadClb # 
Instance details

Defined in GeniusYield.Test.Clb

Associated Types

type TxBuilderStrategy GYTxMonadClb #

GYTxBuilderMonad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Associated Types

type TxBuilderStrategy GYTxMonadIO #

GYTxBuilderMonad GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

GYTxBuilderMonad m ⇒ GYTxBuilderMonad (FeeTracker m) #

Override transaction building code of the inner monad to track extra lovelace per transaction.

Instance details

Defined in GeniusYield.Test.FeeTracker

Associated Types

type TxBuilderStrategy (FeeTracker m) #

GYTxBuilderMonad m ⇒ GYTxBuilderMonad (RandT g m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

Associated Types

type TxBuilderStrategy (RandT g m) #

GYTxBuilderMonad m ⇒ GYTxBuilderMonad (ReaderT env m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

Associated Types

type TxBuilderStrategy (ReaderT env m) #

GYTxBuilderMonad m ⇒ GYTxBuilderMonad (StateT s m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

Associated Types

type TxBuilderStrategy (StateT s m) #

GYTxBuilderMonad m ⇒ GYTxBuilderMonad (StateT s m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

Associated Types

type TxBuilderStrategy (StateT s m) #

(GYTxBuilderMonad m, Monoid w) ⇒ GYTxBuilderMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

Associated Types

type TxBuilderStrategy (WriterT w m) #

(GYTxBuilderMonad m, Monoid w) ⇒ GYTxBuilderMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

Associated Types

type TxBuilderStrategy (WriterT w m) #

(GYTxBuilderMonad m, Monoid w) ⇒ GYTxBuilderMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Class

Associated Types

type TxBuilderStrategy (WriterT w m) #

class MonadError GYTxMonadException m ⇒ GYTxQueryMonad m where #

Class of monads for querying chain data.

Methods

networkId ∷ m GYNetworkId #

Get the network id

lookupDatumGYDatumHash → m (Maybe GYDatum) #

Lookup datum by its hash.

utxoAtTxOutRefGYTxOutRef → m (Maybe GYUTxO) #

Lookup GYUTxO at GYTxOutRef.

utxoAtTxOutRefWithDatumGYTxOutRef → m (Maybe (GYUTxO, Maybe GYDatum)) #

Lookup UTxO at GYTxOutRef with an attempt to resolve for datum.

utxosAtTxOutRefs ∷ [GYTxOutRef] → m GYUTxOs #

Lookup GYUTxOs at multiple GYTxOutRefs at once

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → m [(GYUTxO, Maybe GYDatum)] #

Lookup UTxOs at zero or more GYTxOutRef with their datums. This has a default implementation using utxosAtTxOutRefs and lookupDatum but should be overridden for efficiency if provider provides suitable option.

utxosAtAddressGYAddressMaybe GYAssetClass → m GYUTxOs #

Lookup GYUTxOs at GYAddress.

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClass → m [(GYUTxO, Maybe GYDatum)] #

Lookup GYUTxO at given GYAddress with their datums. This has a default implementation using utxosAtAddress and lookupDatum but should be overridden for efficiency if provider provides suitable option.

utxosAtAddresses ∷ [GYAddress] → m GYUTxOs #

Lookup GYUTxOs at zero or more GYAddress.

utxosAtAddressesWithDatums ∷ [GYAddress] → m [(GYUTxO, Maybe GYDatum)] #

Lookup UTxOs at zero or more GYAddress with their datums. This has a default implementation using utxosAtAddresses and lookupDatum but should be overridden for efficiency if provider provides suitable option.

utxoRefsAtAddressGYAddress → m [GYTxOutRef] #

Lookup the `[GYTxOutRef]`s at a GYAddress

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClass → m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClass → m [(GYUTxO, Maybe GYDatum)] #

Lookup UTxOs at given GYPaymentCredential with their datums. This has a default implementation using utxosAtPaymentCredential and lookupDatum but should be overridden for efficiency if provider provides suitable option.

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → m GYUTxOs #

Lookup GYUTxOs at zero or more GYPaymentCredential.

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → m [(GYUTxO, Maybe GYDatum)] #

Lookup UTxOs at zero or more GYPaymentCredential with their datums. This has a default implementation using utxosAtPaymentCredentials and lookupDatum but should be overridden for efficiency if provider provides suitable option.

stakeAddressInfoGYStakeAddress → m (Maybe GYStakeAddressInfo) #

Obtain delegation information for a stake address. Note that in case stake address is not registered, this function should return Nothing.

slotConfig ∷ m GYSlotConfig #

Obtain the slot config for the network.

Implementations using era history to create slot config may raise GYEraSummariesToSlotConfigError.

slotOfCurrentBlock ∷ m GYSlot #

This is expected to give the slot of the latest block. We say "expected" as we cache the result for 5 seconds, that is to say, suppose slot was cached at time T, now if query for current block's slot comes within time duration (T, T + 5), then we'll return the cached slot but if say, query happened at time (T + 5, T + 21) where 21 was taken as an arbitrary number above 5, then we'll query the chain tip and get the slot of the latest block seen by the provider and then store it in our cache, thus new cached value would be served for requests coming within time interval of (T + 21, T + 26).

NOTE: It's behaviour is slightly different, solely for our plutus simple model provider where it actually returns the value of the currentSlot variable maintained inside plutus simple model library.

logMsgHasCallStackGYLogNamespaceGYLogSeverityString → m () #

Log a message with specified namespace and severity.

waitUntilSlotGYSlot → m GYSlot #

Wait until the chain tip is at least the given slot number, returning it's slot.

waitForNextBlock ∷ m GYSlot #

Wait until the chain tip is at the next block, return it's slot.

Instances

Instances details
GYTxQueryMonad GYTxMonadClb # 
Instance details

Defined in GeniusYield.Test.Clb

Methods

networkIdGYTxMonadClb GYNetworkId #

lookupDatumGYDatumHashGYTxMonadClb (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefGYTxMonadClb (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefGYTxMonadClb (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → GYTxMonadClb GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → GYTxMonadClb [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassGYTxMonadClb GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassGYTxMonadClb [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → GYTxMonadClb GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → GYTxMonadClb [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressGYTxMonadClb [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassGYTxMonadClb GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassGYTxMonadClb [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → GYTxMonadClb GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → GYTxMonadClb [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressGYTxMonadClb (Maybe GYStakeAddressInfo) #

slotConfigGYTxMonadClb GYSlotConfig #

slotOfCurrentBlockGYTxMonadClb GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringGYTxMonadClb () #

waitUntilSlotGYSlotGYTxMonadClb GYSlot #

waitForNextBlockGYTxMonadClb GYSlot #

GYTxQueryMonad GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

networkIdGYTxGameMonadIO GYNetworkId #

lookupDatumGYDatumHashGYTxGameMonadIO (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefGYTxGameMonadIO (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefGYTxGameMonadIO (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → GYTxGameMonadIO GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → GYTxGameMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassGYTxGameMonadIO GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassGYTxGameMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → GYTxGameMonadIO GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → GYTxGameMonadIO [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressGYTxGameMonadIO [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassGYTxGameMonadIO GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassGYTxGameMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → GYTxGameMonadIO GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → GYTxGameMonadIO [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressGYTxGameMonadIO (Maybe GYStakeAddressInfo) #

slotConfigGYTxGameMonadIO GYSlotConfig #

slotOfCurrentBlockGYTxGameMonadIO GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringGYTxGameMonadIO () #

waitUntilSlotGYSlotGYTxGameMonadIO GYSlot #

waitForNextBlockGYTxGameMonadIO GYSlot #

GYTxQueryMonad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

networkIdGYTxMonadIO GYNetworkId #

lookupDatumGYDatumHashGYTxMonadIO (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefGYTxMonadIO (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefGYTxMonadIO (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → GYTxMonadIO GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → GYTxMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassGYTxMonadIO GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassGYTxMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → GYTxMonadIO GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → GYTxMonadIO [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressGYTxMonadIO [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassGYTxMonadIO GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassGYTxMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → GYTxMonadIO GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → GYTxMonadIO [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressGYTxMonadIO (Maybe GYStakeAddressInfo) #

slotConfigGYTxMonadIO GYSlotConfig #

slotOfCurrentBlockGYTxMonadIO GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringGYTxMonadIO () #

waitUntilSlotGYSlotGYTxMonadIO GYSlot #

waitForNextBlockGYTxMonadIO GYSlot #

GYTxQueryMonad GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

Methods

networkIdGYTxBuilderMonadIO GYNetworkId #

lookupDatumGYDatumHashGYTxBuilderMonadIO (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefGYTxBuilderMonadIO (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefGYTxBuilderMonadIO (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → GYTxBuilderMonadIO GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → GYTxBuilderMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassGYTxBuilderMonadIO GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassGYTxBuilderMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → GYTxBuilderMonadIO GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → GYTxBuilderMonadIO [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressGYTxBuilderMonadIO [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassGYTxBuilderMonadIO GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassGYTxBuilderMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → GYTxBuilderMonadIO GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → GYTxBuilderMonadIO [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressGYTxBuilderMonadIO (Maybe GYStakeAddressInfo) #

slotConfigGYTxBuilderMonadIO GYSlotConfig #

slotOfCurrentBlockGYTxBuilderMonadIO GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringGYTxBuilderMonadIO () #

waitUntilSlotGYSlotGYTxBuilderMonadIO GYSlot #

waitForNextBlockGYTxBuilderMonadIO GYSlot #

GYTxQueryMonad GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

Methods

networkIdGYTxQueryMonadIO GYNetworkId #

lookupDatumGYDatumHashGYTxQueryMonadIO (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefGYTxQueryMonadIO (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefGYTxQueryMonadIO (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → GYTxQueryMonadIO GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → GYTxQueryMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassGYTxQueryMonadIO GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassGYTxQueryMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → GYTxQueryMonadIO GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → GYTxQueryMonadIO [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressGYTxQueryMonadIO [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassGYTxQueryMonadIO GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassGYTxQueryMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → GYTxQueryMonadIO GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → GYTxQueryMonadIO [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressGYTxQueryMonadIO (Maybe GYStakeAddressInfo) #

slotConfigGYTxQueryMonadIO GYSlotConfig #

slotOfCurrentBlockGYTxQueryMonadIO GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringGYTxQueryMonadIO () #

waitUntilSlotGYSlotGYTxQueryMonadIO GYSlot #

waitForNextBlockGYTxQueryMonadIO GYSlot #

GYTxQueryMonad m ⇒ GYTxQueryMonad (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

networkIdFeeTracker m GYNetworkId #

lookupDatumGYDatumHashFeeTracker m (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefFeeTracker m (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefFeeTracker m (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → FeeTracker m GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → FeeTracker m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassFeeTracker m GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassFeeTracker m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → FeeTracker m GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → FeeTracker m [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressFeeTracker m [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassFeeTracker m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassFeeTracker m [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → FeeTracker m GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → FeeTracker m [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressFeeTracker m (Maybe GYStakeAddressInfo) #

slotConfigFeeTracker m GYSlotConfig #

slotOfCurrentBlockFeeTracker m GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringFeeTracker m () #

waitUntilSlotGYSlotFeeTracker m GYSlot #

waitForNextBlockFeeTracker m GYSlot #

GYTxQueryMonad m ⇒ GYTxQueryMonad (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

Methods

networkIdFeeTrackerGame m GYNetworkId #

lookupDatumGYDatumHashFeeTrackerGame m (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefFeeTrackerGame m (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefFeeTrackerGame m (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → FeeTrackerGame m GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → FeeTrackerGame m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassFeeTrackerGame m GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassFeeTrackerGame m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → FeeTrackerGame m GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → FeeTrackerGame m [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressFeeTrackerGame m [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassFeeTrackerGame m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassFeeTrackerGame m [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → FeeTrackerGame m GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → FeeTrackerGame m [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressFeeTrackerGame m (Maybe GYStakeAddressInfo) #

slotConfigFeeTrackerGame m GYSlotConfig #

slotOfCurrentBlockFeeTrackerGame m GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringFeeTrackerGame m () #

waitUntilSlotGYSlotFeeTrackerGame m GYSlot #

waitForNextBlockFeeTrackerGame m GYSlot #

GYTxQueryMonad m ⇒ GYTxQueryMonad (RandT g m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

GYTxQueryMonad m ⇒ GYTxQueryMonad (ReaderT env m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

Methods

networkIdReaderT env m GYNetworkId #

lookupDatumGYDatumHashReaderT env m (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefReaderT env m (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefReaderT env m (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → ReaderT env m GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → ReaderT env m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassReaderT env m GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassReaderT env m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → ReaderT env m GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → ReaderT env m [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressReaderT env m [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassReaderT env m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassReaderT env m [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → ReaderT env m GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → ReaderT env m [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressReaderT env m (Maybe GYStakeAddressInfo) #

slotConfigReaderT env m GYSlotConfig #

slotOfCurrentBlockReaderT env m GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringReaderT env m () #

waitUntilSlotGYSlotReaderT env m GYSlot #

waitForNextBlockReaderT env m GYSlot #

GYTxQueryMonad m ⇒ GYTxQueryMonad (StateT s m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

Methods

networkIdStateT s m GYNetworkId #

lookupDatumGYDatumHashStateT s m (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefStateT s m (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefStateT s m (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → StateT s m GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → StateT s m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassStateT s m GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassStateT s m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → StateT s m GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → StateT s m [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressStateT s m [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassStateT s m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassStateT s m [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → StateT s m GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → StateT s m [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressStateT s m (Maybe GYStakeAddressInfo) #

slotConfigStateT s m GYSlotConfig #

slotOfCurrentBlockStateT s m GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringStateT s m () #

waitUntilSlotGYSlotStateT s m GYSlot #

waitForNextBlockStateT s m GYSlot #

GYTxQueryMonad m ⇒ GYTxQueryMonad (StateT s m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

Methods

networkIdStateT s m GYNetworkId #

lookupDatumGYDatumHashStateT s m (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefStateT s m (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefStateT s m (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → StateT s m GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → StateT s m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassStateT s m GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassStateT s m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → StateT s m GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → StateT s m [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressStateT s m [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassStateT s m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassStateT s m [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → StateT s m GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → StateT s m [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressStateT s m (Maybe GYStakeAddressInfo) #

slotConfigStateT s m GYSlotConfig #

slotOfCurrentBlockStateT s m GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringStateT s m () #

waitUntilSlotGYSlotStateT s m GYSlot #

waitForNextBlockStateT s m GYSlot #

(GYTxQueryMonad m, Monoid w) ⇒ GYTxQueryMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

Methods

networkIdWriterT w m GYNetworkId #

lookupDatumGYDatumHashWriterT w m (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefWriterT w m (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefWriterT w m (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → WriterT w m GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → WriterT w m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassWriterT w m GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassWriterT w m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → WriterT w m GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → WriterT w m [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressWriterT w m [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassWriterT w m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassWriterT w m [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → WriterT w m GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → WriterT w m [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressWriterT w m (Maybe GYStakeAddressInfo) #

slotConfigWriterT w m GYSlotConfig #

slotOfCurrentBlockWriterT w m GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringWriterT w m () #

waitUntilSlotGYSlotWriterT w m GYSlot #

waitForNextBlockWriterT w m GYSlot #

(GYTxQueryMonad m, Monoid w) ⇒ GYTxQueryMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

Methods

networkIdWriterT w m GYNetworkId #

lookupDatumGYDatumHashWriterT w m (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefWriterT w m (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefWriterT w m (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → WriterT w m GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → WriterT w m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassWriterT w m GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassWriterT w m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → WriterT w m GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → WriterT w m [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressWriterT w m [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassWriterT w m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassWriterT w m [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → WriterT w m GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → WriterT w m [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressWriterT w m (Maybe GYStakeAddressInfo) #

slotConfigWriterT w m GYSlotConfig #

slotOfCurrentBlockWriterT w m GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringWriterT w m () #

waitUntilSlotGYSlotWriterT w m GYSlot #

waitForNextBlockWriterT w m GYSlot #

(GYTxQueryMonad m, Monoid w) ⇒ GYTxQueryMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

Methods

networkIdWriterT w m GYNetworkId #

lookupDatumGYDatumHashWriterT w m (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefWriterT w m (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefWriterT w m (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → WriterT w m GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → WriterT w m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassWriterT w m GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassWriterT w m [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → WriterT w m GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → WriterT w m [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressWriterT w m [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassWriterT w m GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassWriterT w m [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → WriterT w m GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → WriterT w m [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressWriterT w m (Maybe GYStakeAddressInfo) #

slotConfigWriterT w m GYSlotConfig #

slotOfCurrentBlockWriterT w m GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringWriterT w m () #

waitUntilSlotGYSlotWriterT w m GYSlot #

waitForNextBlockWriterT w m GYSlot #

class GYTxQueryMonad m ⇒ GYTxSpecialQueryMonad m where #

Class of monads for querying special chain data.

Instances

Instances details
GYTxSpecialQueryMonad GYTxMonadClb # 
Instance details

Defined in GeniusYield.Test.Clb

GYTxSpecialQueryMonad GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

GYTxSpecialQueryMonad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

GYTxSpecialQueryMonad GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

GYTxSpecialQueryMonad GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

GYTxSpecialQueryMonad m ⇒ GYTxSpecialQueryMonad (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

GYTxSpecialQueryMonad m ⇒ GYTxSpecialQueryMonad (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

GYTxSpecialQueryMonad m ⇒ GYTxSpecialQueryMonad (RandT g m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

GYTxSpecialQueryMonad m ⇒ GYTxSpecialQueryMonad (ReaderT env m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

GYTxSpecialQueryMonad m ⇒ GYTxSpecialQueryMonad (StateT s m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

GYTxSpecialQueryMonad m ⇒ GYTxSpecialQueryMonad (StateT s m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

(GYTxSpecialQueryMonad m, Monoid w) ⇒ GYTxSpecialQueryMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

(GYTxSpecialQueryMonad m, Monoid w) ⇒ GYTxSpecialQueryMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

(GYTxSpecialQueryMonad m, Monoid w) ⇒ GYTxSpecialQueryMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

class GYTxQueryMonad m ⇒ GYTxUserQueryMonad m where #

Class of monads for querying as a user.

Methods

ownAddresses ∷ m [GYAddress] #

Get your own address(es).

ownChangeAddress ∷ m GYAddress #

Get own change address.

ownCollateral ∷ m (Maybe GYUTxO) #

Get own collateral utxo.

availableUTxOs ∷ m GYUTxOs #

Get available own UTxOs that can be operated upon.

someUTxOPlutusVersion → m GYTxOutRef #

Return some unspent transaction output translatable to the given language corresponding to the script in question.

Law: Must return the different values.

Instances

Instances details
GYTxUserQueryMonad GYTxMonadClb # 
Instance details

Defined in GeniusYield.Test.Clb

GYTxUserQueryMonad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

GYTxUserQueryMonad GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

GYTxUserQueryMonad m ⇒ GYTxUserQueryMonad (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

GYTxUserQueryMonad m ⇒ GYTxUserQueryMonad (RandT g m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

GYTxUserQueryMonad m ⇒ GYTxUserQueryMonad (ReaderT env m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

GYTxUserQueryMonad m ⇒ GYTxUserQueryMonad (StateT s m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

GYTxUserQueryMonad m ⇒ GYTxUserQueryMonad (StateT s m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

(GYTxUserQueryMonad m, Monoid w) ⇒ GYTxUserQueryMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

(GYTxUserQueryMonad m, Monoid w) ⇒ GYTxUserQueryMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

(GYTxUserQueryMonad m, Monoid w) ⇒ GYTxUserQueryMonad (WriterT w m) # 
Instance details

Defined in GeniusYield.TxBuilder.Query.Class

data GYTxSkeleton (v ∷ PlutusVersion) #

Transaction skeleton

Note: let's add fields as we need them.

The parameter v indicates the minimum version of scripts allowed as inputs.

Instances

Instances details
Monoid (GYTxSkeleton v) # 
Instance details

Defined in GeniusYield.TxBuilder.Common

Semigroup (GYTxSkeleton v) # 
Instance details

Defined in GeniusYield.TxBuilder.Common

Show (GYTxSkeleton v) # 
Instance details

Defined in GeniusYield.TxBuilder.Common

Methods

showsPrecIntGYTxSkeleton v → ShowS #

showGYTxSkeleton v → String #

showList ∷ [GYTxSkeleton v] → ShowS #

data GYTxBuildResult #

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 GYTxBody)

All given GYTxSkeletons were successfully built.

GYTxBuildPartialSuccess !GYBalancingError !(NonEmpty GYTxBody)

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

GYTxBuildFailure !GYBalancingError

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

GYTxBuildNoInputs

Input did not contain any GYTxSkeletons.

data PlutusToCardanoError #

PlutusToCardanoError is raised when using Plutus to Cardano API type conversion functions from plutus-ledger. It is a focused version of Ledger.Tx.CardanoAPI.ToCardanoError.

Constructors

DeserialiseRawBytesError

Deserialization failed; tag indicates the type being deserialized.

Fields

StakePtrAddressUnsupported Address

Raised when trying to convert a stake ptr plutus address.

UnknownPlutusToCardanoError

Wildcard unhandled constructors; shouldn't happen usually.

Fields

Instances

Instances details
Show PlutusToCardanoError # 
Instance details

Defined in GeniusYield.Types.Ledger

data GYConversionError #

GYConversionErrors may be raised during type conversions.

Constructors

GYNotPubKeyAddress !GYAddress

An address was expected to contain a pub key hash, but it did not.

GYNotScriptAddress !GYAddress

An address was expected to contain a script hash, but it did not.

GYInvalidPlutusValue !GYFromPlutusValueError !Value

Raised during Plutus Value to GYValue conversion.

GYInvalidPlutusAsset !GYFromPlutusValueError

Raised during Plutus asset to GY asset conversion.

GYInvalidAddressText !Text

Raised when trying to parse Text into GYAddress.

GYEraSummariesToSlotConfigError !Text

Raised when trying to convert EraHistory to GYSlotConfig.

GYLedgerToCardanoError !PlutusToCardanoError

Errors raised during plutus-ledger -> cardano api type conversion.

GYInvalidAssetClass !Text

Errors raised by "GeniusYield.Types.Value.parseAssetClassCore" and similar.

GYInvalidSlot !Integer

Errors caused by "GeniusYield.Types.Slot.slotFromInteger" resulting in Nothing.

Instances

Instances details
Show GYConversionError # 
Instance details

Defined in GeniusYield.TxBuilder.Errors

data GYQueryUTxOError #

GYQueryUTxOErrors may be raised during utxo related queries.

Constructors

GYNoUtxosAtAddress ![GYAddress]

An address was queried for one or more UTxOs but none were found.

GYNoUtxoAtRef !GYTxOutRef

No UTxO exists at given ref.

Instances

Instances details
Show GYQueryUTxOError # 
Instance details

Defined in GeniusYield.TxBuilder.Errors

data GYQueryDatumError #

GYQueryDatumError may be raised during fetching and parsing datums.

Constructors

GYNoDatumForHash !GYDatumHash

No datum found for given hash.

GYInvalidDatum !GYDatum

Datum parsing failed.

GYNoDatumHash !GYUTxO

No datum hash at utxo.

Instances

Instances details
Show GYQueryDatumError # 
Instance details

Defined in GeniusYield.TxBuilder.Errors

data GYTxMonadExceptionType where #

Exceptions raised within the GYTxMonad computation.

This includes exceptions raised within the contract itself. It does not include:

  • Exceptions that may be raised by the provider.
  • Exceptions raised during transaction building/balancing.
  • Other wildcard exceptions raised within IO.

Constructors

GYConversionExceptionGYConversionErrorGYTxMonadException

Errors encountered during type conversions.

GYQueryUTxOExceptionGYQueryUTxOErrorGYTxMonadException

Errors encountered during utxo related queries.

GYBuildTxExceptionGYBuildTxErrorGYTxMonadException

Errors encountered during transaction building related functions.

GYNoSuitableCollateralException

Raised when no suitable collateral of at least tmeMinLovelace amount is found at tmeAddress.

Fields

GYSlotOverflowException

Raised if tmeSlot value overflows when advancing it by tmeAdvanceAmount.

Fields

GYTimeUnderflowExceptionSystemStartGYTimeGYTxMonadException

Raised during time -> slot conversion, if given timestamp is before known system start.

GYQueryDatumExceptionGYQueryDatumErrorGYTxMonadException

Raised during fetching/parsing datums.

GYDatumMismatchGYOutDatumGYTxIn v → GYTxMonadException

When actual datum in the UTxO is different than what is mentioned for in witness.

GYApplicationException ∷ (Exception e, IsGYApiError e) ⇒ e → GYTxMonadException

Wildcard user application specific errors. This is the "plug-in" point where an application using the GY framework, can raise its own protocol specific errors within GYTxMonad.

Instances

Instances details
Exception GYTxMonadException # 
Instance details

Defined in GeniusYield.TxBuilder.Errors

Show GYTxMonadException # 
Instance details

Defined in GeniusYield.TxBuilder.Errors

MonadError GYTxMonadException GYTxMonadClb # 
Instance details

Defined in GeniusYield.Test.Clb

MonadError GYTxMonadException GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

MonadError GYTxMonadException GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

MonadError GYTxMonadException GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

MonadError GYTxMonadException GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

MonadError GYTxMonadException m ⇒ MonadError GYTxMonadException (FeeTracker m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

MonadError GYTxMonadException m ⇒ MonadError GYTxMonadException (FeeTrackerGame m) # 
Instance details

Defined in GeniusYield.Test.FeeTracker

data GYTxGameMonadIO a #

GYTxMonad interpretation run under IO.

Instances

Instances details
MonadRandom GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

getRandomRRandom a ⇒ (a, a) → GYTxGameMonadIO a #

getRandomRandom a ⇒ GYTxGameMonadIO a #

getRandomRsRandom a ⇒ (a, a) → GYTxGameMonadIO [a] #

getRandomsRandom a ⇒ GYTxGameMonadIO [a] #

GYTxGameMonad GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Associated Types

type TxMonadOf GYTxGameMonadIO = (r ∷ TypeType) #

GYTxQueryMonad GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

networkIdGYTxGameMonadIO GYNetworkId #

lookupDatumGYDatumHashGYTxGameMonadIO (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefGYTxGameMonadIO (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefGYTxGameMonadIO (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → GYTxGameMonadIO GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → GYTxGameMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassGYTxGameMonadIO GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassGYTxGameMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → GYTxGameMonadIO GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → GYTxGameMonadIO [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressGYTxGameMonadIO [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassGYTxGameMonadIO GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassGYTxGameMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → GYTxGameMonadIO GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → GYTxGameMonadIO [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressGYTxGameMonadIO (Maybe GYStakeAddressInfo) #

slotConfigGYTxGameMonadIO GYSlotConfig #

slotOfCurrentBlockGYTxGameMonadIO GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringGYTxGameMonadIO () #

waitUntilSlotGYSlotGYTxGameMonadIO GYSlot #

waitForNextBlockGYTxGameMonadIO GYSlot #

GYTxSpecialQueryMonad GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Applicative GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Functor GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

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

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

Monad GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

MonadError GYTxMonadException GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

type TxMonadOf GYTxGameMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

data GYTxMonadIO a #

GYTxMonad interpretation run under IO.

Instances

Instances details
MonadRandom GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

getRandomRRandom a ⇒ (a, a) → GYTxMonadIO a #

getRandomRandom a ⇒ GYTxMonadIO a #

getRandomRsRandom a ⇒ (a, a) → GYTxMonadIO [a] #

getRandomsRandom a ⇒ GYTxMonadIO [a] #

GYTxBuilderMonad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Associated Types

type TxBuilderStrategy GYTxMonadIO #

GYTxMonad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

GYTxQueryMonad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

networkIdGYTxMonadIO GYNetworkId #

lookupDatumGYDatumHashGYTxMonadIO (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefGYTxMonadIO (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefGYTxMonadIO (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → GYTxMonadIO GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → GYTxMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassGYTxMonadIO GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassGYTxMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → GYTxMonadIO GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → GYTxMonadIO [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressGYTxMonadIO [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassGYTxMonadIO GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassGYTxMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → GYTxMonadIO GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → GYTxMonadIO [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressGYTxMonadIO (Maybe GYStakeAddressInfo) #

slotConfigGYTxMonadIO GYSlotConfig #

slotOfCurrentBlockGYTxMonadIO GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringGYTxMonadIO () #

waitUntilSlotGYSlotGYTxMonadIO GYSlot #

waitForNextBlockGYTxMonadIO GYSlot #

GYTxSpecialQueryMonad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

GYTxUserQueryMonad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Applicative GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

pure ∷ a → GYTxMonadIO a #

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

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

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

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

Functor GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

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

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

Monad GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

Methods

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

(>>)GYTxMonadIO a → GYTxMonadIO b → GYTxMonadIO b #

return ∷ a → GYTxMonadIO a #

MonadError GYTxMonadException GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

type TxBuilderStrategy GYTxMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO

data GYTxQueryMonadIO a #

GYTxQueryMonad interpretation run under IO.

Instances

Instances details
MonadRandom GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

Methods

getRandomRRandom a ⇒ (a, a) → GYTxQueryMonadIO a #

getRandomRandom a ⇒ GYTxQueryMonadIO a #

getRandomRsRandom a ⇒ (a, a) → GYTxQueryMonadIO [a] #

getRandomsRandom a ⇒ GYTxQueryMonadIO [a] #

GYTxQueryMonad GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

Methods

networkIdGYTxQueryMonadIO GYNetworkId #

lookupDatumGYDatumHashGYTxQueryMonadIO (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefGYTxQueryMonadIO (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefGYTxQueryMonadIO (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → GYTxQueryMonadIO GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → GYTxQueryMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassGYTxQueryMonadIO GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassGYTxQueryMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → GYTxQueryMonadIO GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → GYTxQueryMonadIO [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressGYTxQueryMonadIO [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassGYTxQueryMonadIO GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassGYTxQueryMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → GYTxQueryMonadIO GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → GYTxQueryMonadIO [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressGYTxQueryMonadIO (Maybe GYStakeAddressInfo) #

slotConfigGYTxQueryMonadIO GYSlotConfig #

slotOfCurrentBlockGYTxQueryMonadIO GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringGYTxQueryMonadIO () #

waitUntilSlotGYSlotGYTxQueryMonadIO GYSlot #

waitForNextBlockGYTxQueryMonadIO GYSlot #

GYTxSpecialQueryMonad GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

Applicative GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

Functor GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

Methods

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

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

Monad GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

MonadError GYTxMonadException GYTxQueryMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Query

data GYTxBuilderMonadIO a #

GYTxUserQueryMonad interpretation run under IO.

Instances

Instances details
MonadRandom GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

GYTxBuilderMonad GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

GYTxQueryMonad GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

Methods

networkIdGYTxBuilderMonadIO GYNetworkId #

lookupDatumGYDatumHashGYTxBuilderMonadIO (Maybe GYDatum) #

utxoAtTxOutRefGYTxOutRefGYTxBuilderMonadIO (Maybe GYUTxO) #

utxoAtTxOutRefWithDatumGYTxOutRefGYTxBuilderMonadIO (Maybe (GYUTxO, Maybe GYDatum)) #

utxosAtTxOutRefs ∷ [GYTxOutRef] → GYTxBuilderMonadIO GYUTxOs #

utxosAtTxOutRefsWithDatums ∷ [GYTxOutRef] → GYTxBuilderMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddressGYAddressMaybe GYAssetClassGYTxBuilderMonadIO GYUTxOs #

utxosAtAddressWithDatumsGYAddressMaybe GYAssetClassGYTxBuilderMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtAddresses ∷ [GYAddress] → GYTxBuilderMonadIO GYUTxOs #

utxosAtAddressesWithDatums ∷ [GYAddress] → GYTxBuilderMonadIO [(GYUTxO, Maybe GYDatum)] #

utxoRefsAtAddressGYAddressGYTxBuilderMonadIO [GYTxOutRef] #

utxosAtPaymentCredentialGYPaymentCredentialMaybe GYAssetClassGYTxBuilderMonadIO GYUTxOs #

utxosAtPaymentCredentialWithDatumsGYPaymentCredentialMaybe GYAssetClassGYTxBuilderMonadIO [(GYUTxO, Maybe GYDatum)] #

utxosAtPaymentCredentials ∷ [GYPaymentCredential] → GYTxBuilderMonadIO GYUTxOs #

utxosAtPaymentCredentialsWithDatums ∷ [GYPaymentCredential] → GYTxBuilderMonadIO [(GYUTxO, Maybe GYDatum)] #

stakeAddressInfoGYStakeAddressGYTxBuilderMonadIO (Maybe GYStakeAddressInfo) #

slotConfigGYTxBuilderMonadIO GYSlotConfig #

slotOfCurrentBlockGYTxBuilderMonadIO GYSlot #

logMsgGYLogNamespaceGYLogSeverityStringGYTxBuilderMonadIO () #

waitUntilSlotGYSlotGYTxBuilderMonadIO GYSlot #

waitForNextBlockGYTxBuilderMonadIO GYSlot #

GYTxSpecialQueryMonad GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

GYTxUserQueryMonad GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

Applicative GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

Functor GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

Methods

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

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

Monad GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

MonadError GYTxMonadException GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

type TxBuilderStrategy GYTxBuilderMonadIO # 
Instance details

Defined in GeniusYield.TxBuilder.IO.Builder

data UserCollateral #

Information on a the designated collateral to use.

Constructors

UserCollateral 

Fields

Instances

Instances details
Show UserCollateral # 
Instance details

Defined in GeniusYield.TxBuilder.User

Eq UserCollateral # 
Instance details

Defined in GeniusYield.TxBuilder.User

userVKeyUserGYPaymentVerificationKey #

Deprecated: Use userPaymentVKey.

buildTxBody ∷ ∀ v m. GYTxBuilderMonad m ⇒ GYTxSkeleton v → m GYTxBody #

buildTxBodyWithStrategy with the default coin selection strategy.

buildTxBodyParallel ∷ ∀ v m. GYTxBuilderMonad m ⇒ [GYTxSkeleton v] → m GYTxBuildResult #

buildTxBodyParallelWithStrategy with the default coin selection strategy.

buildTxBodyChaining ∷ ∀ v m. GYTxBuilderMonad m ⇒ [GYTxSkeleton v] → m GYTxBuildResult #

buildTxBodyChainingWithStrategy with the default coin selection strategy.

waitNSlotsGYTxQueryMonad m ⇒ Word64 → m GYSlot #

Wait until the chain tip has progressed by N slots.

waitNSlots_GYTxQueryMonad m ⇒ Word64 → m () #

waitNSlots_ = void . waitNSlots

waitUntilSlot_GYTxQueryMonad m ⇒ GYSlot → m () #

waitUntilSlot_ = void . waitUntilSlot

submitTx_GYTxMonad m ⇒ GYTx → m () #

submitTx_ = void . submitTx

submitTxConfirmedGYTxMonad m ⇒ GYTx → m GYTxId #

submitTxConfirmed' with default tx waiting parameters.

submitTxConfirmed_GYTxMonad m ⇒ GYTx → m () #

submitTxConfirmed_ = void . submitTxConfirmed

submitTxConfirmed'GYTxMonad m ⇒ GYAwaitTxParametersGYTx → m GYTxId #

Equivalent to a call to submitTx and then a call to awaitTxConfirmed' with submitted tx id.

submitTxConfirmed'_GYTxMonad m ⇒ GYAwaitTxParametersGYTx → m () #

submitTxConfirmed'_ p = void . submitTxConfirmed' p

submitTxBody ∷ ∀ a m. (GYTxMonad m, ToShelleyWitnessSigningKey a) ⇒ GYTxBody → [a] → m GYTxId #

Signs a GYTxBody with the given keys and submits the transaction. Equivalent to a call to signGYTxBody, followed by a call to submitTx

submitTxBody_ ∷ ∀ a m. (GYTxMonad m, ToShelleyWitnessSigningKey a) ⇒ GYTxBody → [a] → m () #

submitTxBody_ t = void . submitTxBody t

submitTxBodyConfirmed ∷ ∀ a m. (GYTxMonad m, ToShelleyWitnessSigningKey a) ⇒ GYTxBody → [a] → m GYTxId #

Signs a GYTxBody with the given keys, submits the transaction, and waits for its confirmation. Equivalent to a call to signGYTxBody, followed by a call to submitTxConfirmed.

submitTxBodyConfirmed_ ∷ (GYTxMonad m, ToShelleyWitnessSigningKey a) ⇒ GYTxBody → [a] → m () #

submitTxBodyConfirmed_ t = void . submitTxBodyConfirmed t

awaitTxConfirmedGYTxMonad m ⇒ GYTxId → m () #

Wait for a _recently_ submitted transaction to be confirmed, with default waiting parameters.

lookupDatum'GYTxQueryMonad m ⇒ GYDatumHash → m GYDatum #

A version of lookupDatum that raises GYNoDatumForHash if the datum is not found.

utxoAtTxOutRef'GYTxQueryMonad m ⇒ GYTxOutRef → m GYUTxO #

A version of utxoAtTxOutRef that raises GYNoUtxoAtRef if the utxo is not found.

utxoAtTxOutRefWithDatum'GYTxQueryMonad m ⇒ GYTxOutRef → m (GYUTxO, Maybe GYDatum) #

A version of utxoAtTxOutRefWithDatum that raises GYNoUtxoAtRef if the utxo is not found.

someUTxOWithoutRefScriptGYTxUserQueryMonad m ⇒ m GYTxOutRef #

Returns some UTxO present in wallet which doesn't have reference script.

slotToBeginTimeGYTxQueryMonad f ⇒ GYSlot → f GYTime #

Get the starting GYTime of a GYSlot in GYTxMonad.

slotToEndTimeGYTxQueryMonad f ⇒ GYSlot → f GYTime #

Get the ending GYTime of a GYSlot (inclusive) in GYTxMonad.

enclosingSlotFromTimeGYTxQueryMonad f ⇒ GYTime → f (Maybe GYSlot) #

Get the GYSlot of a GYTime in GYTxMonad.

Returns Nothing if given time is before known system start.

enclosingSlotFromTime'GYTxQueryMonad m ⇒ GYTime → m GYSlot #

Partial version of enclosingSlotFromTime.

Raises GYTimeUnderflowException if given time is before known system start.

scriptAddressGYTxQueryMonad m ⇒ GYScript v → m GYAddress #

Calculate script's address.

scriptAddress'GYTxQueryMonad m ⇒ GYScriptHash → m GYAddress #

Calculate script's address.

addressFromText'MonadError GYTxMonadException m ⇒ Text → m GYAddress #

Parse the bech32 representation of an address into GYAddress in GYTxMonad.

Throw GYConversionException if parsing fails.

addressFromPlutusMGYTxQueryMonad m ⇒ Address → m (Either PlutusToCardanoError GYAddress) #

Convert a Address to GYAddress in GYTxMonad.

Explicitly returns an error rather than throwing it.

addressFromPlutus'GYTxQueryMonad m ⇒ Address → m GYAddress #

Convert a Address to GYAddress in GYTxMonad.

Throw GYConversionException if conversion fails.

valueFromPlutus'MonadError GYTxMonadException m ⇒ Value → m GYValue #

Convert a Value to GYValue in GYTxMonad.

Throw GYConversionException if conversion fails.

valueFromPlutusIOValueIO GYValue #

Convert a Value to GYValue in IO.

Throw GYConversionException if conversion fails.

makeAssetClass'MonadError GYTxMonadException m ⇒ TextText → m GYAssetClass #

Create a GYAssetClass from the textual representation of currency symbol and token name in GYTxMonad.

Throw GYConversionException if conversion fails.

makeAssetClassIOTextTextIO GYAssetClass #

makeAssetClass' in the IO monad.

Throw GYConversionException if conversion fails.

advanceSlot'MonadError GYTxMonadException m ⇒ GYSlotNatural → m GYSlot #

Advance GYSlot forward in GYTxMonad. If slot value overflows, throw GYSlotOverflowException.

utxoDatumPureHushedFromData a ⇒ (GYUTxO, Maybe GYDatum) → Maybe (GYTxOutRef, (GYAddress, GYValue, a)) #

Obtain original datum representation of an UTxO.

utxoDatum' ∷ (GYTxQueryMonad m, FromData a) ⇒ GYUTxO → m (GYAddress, GYValue, a) #

Version of utxoDatum that throws GYTxMonadException.

utxoDatumPureWithOriginalDatum' ∷ (MonadError GYTxMonadException m, FromData a) ⇒ (GYUTxO, Maybe GYDatum) → m (GYAddress, GYValue, a, GYDatum) #

Like utxoDatumPure' but also returns original raw datum.

skeletonToRefScriptsORefsGYTxSkeleton v → [GYTxOutRef] #

Given a skeleton, returns a list of reference to reference script UTxOs which are present as witness.

wrapReqWithTimeLog ∷ (GYTxQueryMonad m, MonadIO m) ⇒ String → m a → m a #

Log the time a particular monad action took.

wt ∷ (GYTxQueryMonad m, MonadIO m) ⇒ String → m a → m a #

Synonym of wrapReqWithTimeLog.

buildTxCore #

Arguments

∷ ∀ m v. (GYTxQueryMonad m, MonadRandom m) 
SystemStart 
EraHistory 
ApiProtocolParameters 
Set PoolId 
GYCoinSelectionStrategy 
→ (GYTxBodyGYUTxOsGYUTxOs) 
→ [GYAddress] 
GYAddress 
Maybe GYUTxO

Is Nothing if there was no 5 ada collateral returned by browser wallet.

→ [GYTxSkeleton v] 
→ m (Either GYBuildTxError GYTxBuildResult) 

The core implementation of GYTxQueryMonad for building GYTxBodys out of one or more GYTxSkeletons.

Peculiarly, this is parameterized on:

  • An "own utxo update" function, this is meant to govern how the set of known "own utxos" is updated after building a transaction skeleton.

If the user chooses not to update this set, based on the newly created GYTxBody, the same own utxos set will be used for the next transaction in the list (if any). Which may lead to the balancer choosing the same utxo inputs again - resulting in a transaction conflict.

The function recovers successfully built tx skeletons, in case the list contains several of them. See: GYTxBuildResult.

maximumRequiredCollateralLovelaceApiProtocolParametersIntInteger #

What is the maximum possible collateral requirement as per current protocol parameters?

throwAppError ∷ (IsGYApiError e, Exception e, MonadError GYTxMonadException m) ⇒ e → m a #

Throw an application specific exception (GYApplicationException) within GYTxMonad.

runGYTxBuilderMonadIO #

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.

GYTxBuilderMonadIO a 
IO a 

runGYTxMonadIO #

Arguments

GYNetworkId

Network ID.

GYProviders

Provider.

GYPaymentSigningKey

Payment signing key of the wallet

Maybe GYStakeSigningKey

Stake signing key of the wallet (optional)

→ [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.

GYTxMonadIO a 
IO a 

runGYTxGameMonadIO #

Arguments

GYNetworkId

Network ID.

GYProviders

Provider.

GYTxGameMonadIO a 
IO a 

queryBalanceGYTxQueryMonad m ⇒ GYAddress → m GYValue #

Query the balance at given address.

queryBalancesGYTxQueryMonad m ⇒ [GYAddress] → m GYValue #

Query the balances at given addresses.

getAdaOnlyUTxOGYTxQueryMonad m ⇒ GYAddress → m [(GYTxOutRef, Natural)] #

Query the txoutrefs at given address with ADA-only values.

Useful for finding a txoutref to be used as collateral.

getCollateral' #

Arguments

GYTxQueryMonad m 
GYAddress

The address where to look.

Natural

The minimal amount of lovelace required as collateral.

→ m (Maybe (GYTxOutRef, Natural))

Returns the smallest ada-only UTxO and the contained amount of lovelace at the specified address with the specified minimal value. If no such UTxO exists, Nothing is returned.

Get a UTxO suitable for use as collateral.

getCollateral #

Arguments

GYTxQueryMonad m 
GYAddress

The address where to look.

Natural

The minimal amount of lovelace required as collateral.

→ m (GYTxOutRef, Natural)

Returns the smallest ada-only UTxO and the contained amount of lovelace at the specified address with the specified minimal value. If no such UTxO exists, an exception is thrown.

Get an UTxO suitable for use as collateral.

getTxBalanceGYTxQueryMonad m ⇒ GYPubKeyHashGYTx → m GYValue #

Calculate how much balance is the given transaction is moving to given pubkeyhash address(es).