atlas-cardano-0.3.0: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellNone
LanguageHaskell2010

GeniusYield.Types.UTxO

Description

 
Synopsis

Documentation

data GYUTxO #

An unspent transaction output.

Instances

Instances details
Eq GYUTxO # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

(==)GYUTxOGYUTxOBool #

(/=)GYUTxOGYUTxOBool #

Show GYUTxO # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

showsPrecIntGYUTxOShowS #

showGYUTxOString #

showList ∷ [GYUTxO] → ShowS #

utxoFromApi ∷ TxIn → TxOut CtxTx BabbageEra → GYUTxO #

utxoFromApi' ∷ TxIn → TxOut CtxUTxO era → GYUTxO #

utxoToPlutusGYUTxO → TxOut #

utxoHasInlineDatumGYUTxOBool #

Whether the UTxO has it's datum inlined?

utxoHasReferenceScriptGYUTxOBool #

Whether the UTxO has script to refer?

utxoTranslatableToV1GYUTxOBool #

Is a UTxO translatable to language PlutusV1 output?

data GYUTxOs #

A set of unspent transaction outputs.

Actually a map from unspent transaction outputs to address, value and datum hash.

Instances

Instances details
Eq GYUTxOs # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

(==)GYUTxOsGYUTxOsBool #

(/=)GYUTxOsGYUTxOsBool #

Show GYUTxOs # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

showsPrecIntGYUTxOsShowS #

showGYUTxOsString #

showList ∷ [GYUTxOs] → ShowS #

Semigroup GYUTxOs # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

(<>)GYUTxOsGYUTxOsGYUTxOs #

sconcatNonEmpty GYUTxOsGYUTxOs #

stimesIntegral b ⇒ b → GYUTxOsGYUTxOs #

Monoid GYUTxOs # 
Instance details

Defined in GeniusYield.Types.UTxO

PrintfArg GYUTxOs # 
Instance details

Defined in GeniusYield.Types.UTxO

utxosSizeGYUTxOsInt #

Number of UTxOs within given GYUTxOs.

utxosFromApi ∷ UTxO era → GYUTxOs #

utxosToApiGYUTxOs → UTxO BabbageEra #

utxosRemoveTxOutRefGYTxOutRefGYUTxOsGYUTxOs #

Remove particular GYTxOutRef from GYUTxOs.

Used to remove collateral, so we don't use it in transactions.

utxosRemoveRefScriptsGYUTxOsGYUTxOs #

Remove UTxOs containing reference scripts inside them from GYUTxOs.

utxosLookupGYTxOutRefGYUTxOsMaybe GYUTxO #

Lookup a UTxO given a ref.

someTxOutRefGYUTxOsMaybe (GYTxOutRef, GYUTxOs) #

Get some output reference from GYUTxOs.

Used to pick an input for minting, or selecting collateral (in tests).

randomTxOutRefMonadRandom m ⇒ GYUTxOs → m (Maybe (GYTxOutRef, GYUTxOs)) #

Get a random output reference from GYUTxOs.

UTxO datums

data GYOutDatum #

The datum contained within a transaction output.

Constructors

GYOutDatumNone

The output has no datum.

GYOutDatumHash !GYDatumHash

The output contains a datum hash, the associated datum may or may not be included in the tx.

GYOutDatumInline !GYDatum

The output contains an inline datum (i.e datum within the output itself).

Instances

Instances details
Eq GYOutDatum # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

(==)GYOutDatumGYOutDatumBool #

(/=)GYOutDatumGYOutDatumBool #

Show GYOutDatum # 
Instance details

Defined in GeniusYield.Types.UTxO

outDatumToPlutusGYOutDatum → OutputDatum #

Filter and map

filterUTxOs ∷ (GYUTxOBool) → GYUTxOsGYUTxOs #

Filter GYUTxOs with a predicate on GYUTxO.

mapMaybeUTxOs ∷ (GYUTxOMaybe a) → GYUTxOsMap GYTxOutRef a #

Map & filter GYUTxOs contents.

mapUTxOs ∷ (GYUTxO → a) → GYUTxOsMap GYTxOutRef a #

Map GYUTxOs contents.

witherUTxOsApplicative f ⇒ (GYUTxO → f (Maybe a)) → GYUTxOs → f (Map GYTxOutRef a) #

Applicative version of mapMaybeUTxOs.

List conversions

utxosFromList ∷ [GYUTxO] → GYUTxOs #

Returns a GYUTxOs from a given list of GYUTxOs.

utxosFromUTxOGYUTxOGYUTxOs #

Returns a GYUTxOs from a single GYUTxO.

utxosToListGYUTxOs → [GYUTxO] #

Returns a list of GYUTxOs from a given GYUTxOs.

Folds

foldlUTxOs' ∷ ∀ a. (a → GYUTxO → a) → a → GYUTxOs → a #

Fold operation over a GYUTxOs.

foldMapUTxOsMonoid m ⇒ (GYUTxO → m) → GYUTxOs → m #

FoldMap operation over a GYUTxOs.

forUTxOs_ ∷ ∀ f a. Applicative f ⇒ GYUTxOs → (GYUTxO → f a) → f () #

foldMUTxOs ∷ ∀ m a. Monad m ⇒ (a → GYUTxO → m a) → a → GYUTxOs → m a #

Extract refs

utxosRefsGYUTxOs → [GYTxOutRef] #

Returns a list of all GYTxOutRefs inside a given GYUTxOs.