atlas-cardano-0.6.3: 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.Types.UTxO

Description

 
Synopsis

Documentation

data GYUTxO #

An unspent transaction output.

Instances

Instances details
Show GYUTxO # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

showsPrecIntGYUTxOShowS #

showGYUTxOString #

showList ∷ [GYUTxO] → ShowS #

Eq GYUTxO # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

(==)GYUTxOGYUTxOBool #

(/=)GYUTxOGYUTxOBool #

Ord GYUTxO # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

compareGYUTxOGYUTxOOrdering #

(<)GYUTxOGYUTxOBool #

(<=)GYUTxOGYUTxOBool #

(>)GYUTxOGYUTxOBool #

(>=)GYUTxOGYUTxOBool #

maxGYUTxOGYUTxOGYUTxO #

minGYUTxOGYUTxOGYUTxO #

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
Monoid GYUTxOs # 
Instance details

Defined in GeniusYield.Types.UTxO

Semigroup GYUTxOs # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

(<>)GYUTxOsGYUTxOsGYUTxOs #

sconcatNonEmpty GYUTxOsGYUTxOs #

stimesIntegral b ⇒ b → GYUTxOsGYUTxOs #

Show GYUTxOs # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

showsPrecIntGYUTxOsShowS #

showGYUTxOsString #

showList ∷ [GYUTxOs] → ShowS #

PrintfArg GYUTxOs # 
Instance details

Defined in GeniusYield.Types.UTxO

Eq GYUTxOs # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

(==)GYUTxOsGYUTxOsBool #

(/=)GYUTxOsGYUTxOsBool #

utxosSizeGYUTxOsInt #

Number of UTxOs within given GYUTxOs.

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.

utxosRemoveUTxOGYUTxOGYUTxOsGYUTxOs #

Remove particular GYUTxO from GYUTxOs.

utxosRemoveUTxOsGYUTxOsGYUTxOsGYUTxOs #

Given two GYUTxOs, returns elements from the first one, not present in the second one.

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
Show GYOutDatum # 
Instance details

Defined in GeniusYield.Types.UTxO

Eq GYOutDatum # 
Instance details

Defined in GeniusYield.Types.UTxO

Methods

(==)GYOutDatumGYOutDatumBool #

(/=)GYOutDatumGYOutDatumBool #

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.