cardano-ledger-api-1.9.2.2: Public API for the cardano ledger codebase
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Api.UTxO

Synopsis

Documentation

newtype UTxO era Source #

The unspent transaction outputs.

Constructors

UTxO 

Fields

Instances

Instances details
(Era era, ToJSON (TxOut era)) ⇒ ToJSON (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

toJSONUTxO era → Value Source #

toEncodingUTxO era → Encoding Source #

toJSONList ∷ [UTxO era] → Value Source #

toEncodingList ∷ [UTxO era] → Encoding Source #

omitFieldUTxO era → Bool Source #

Era era ⇒ Monoid (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

memptyUTxO era Source #

mappendUTxO era → UTxO era → UTxO era Source #

mconcat ∷ [UTxO era] → UTxO era Source #

Semigroup (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

(<>)UTxO era → UTxO era → UTxO era Source #

sconcatNonEmpty (UTxO era) → UTxO era Source #

stimesIntegral b ⇒ b → UTxO era → UTxO era Source #

Generic (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Associated Types

type Rep (UTxO era) ∷ TypeType Source #

Methods

fromUTxO era → Rep (UTxO era) x Source #

toRep (UTxO era) x → UTxO era Source #

(Show (TxOut era), Crypto (EraCrypto era)) ⇒ Show (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

showsPrecIntUTxO era → ShowS Source #

showUTxO era → String Source #

showList ∷ [UTxO era] → ShowS Source #

(DecCBOR (TxOut era), Era era) ⇒ FromCBOR (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

fromCBORDecoder s (UTxO era) Source #

labelProxy (UTxO era) → Text Source #

(EncCBOR (TxOut era), Era era) ⇒ ToCBOR (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

toCBORUTxO era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (UTxO era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [UTxO era] → Size Source #

(Era era, DecCBOR (TxOut era)) ⇒ DecCBOR (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

decCBORDecoder s (UTxO era) Source #

dropCBORProxy (UTxO era) → Decoder s () Source #

labelProxy (UTxO era) → Text Source #

(Crypto (EraCrypto era), DecShareCBOR (TxOut era), Share (TxOut era) ~ Interns (Credential 'Staking (EraCrypto era))) ⇒ DecShareCBOR (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Associated Types

type Share (UTxO era) Source #

Methods

getShareUTxO era → Share (UTxO era) Source #

decShareCBORShare (UTxO era) → Decoder s (UTxO era) Source #

decSharePlusCBORStateT (Share (UTxO era)) (Decoder s) (UTxO era) Source #

(Era era, EncCBOR (TxOut era)) ⇒ EncCBOR (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

encCBORUTxO era → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (UTxO era) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [UTxO era] → Size Source #

Default (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

defUTxO era Source #

(Era era, NFData (TxOut era)) ⇒ NFData (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

rnfUTxO era → () Source #

(Era era, Eq (TxOut era)) ⇒ Eq (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

Methods

(==)UTxO era → UTxO era → Bool Source #

(/=)UTxO era → UTxO era → Bool Source #

NoThunks (TxOut era) ⇒ NoThunks (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

type Rep (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

type Rep (UTxO era) = D1 ('MetaData "UTxO" "Cardano.Ledger.UTxO" "cardano-ledger-core-1.14.0.0-inplace" 'True) (C1 ('MetaCons "UTxO" 'PrefixI 'True) (S1 ('MetaSel ('Just "unUTxO") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (TxIn (EraCrypto era)) (TxOut era)))))
type Share (UTxO era) 
Instance details

Defined in Cardano.Ledger.UTxO

type TranslationError (AllegraEra c) UTxO 
Instance details

Defined in Cardano.Ledger.Allegra.Translation

type TranslationError (AlonzoEra c) UTxO 
Instance details

Defined in Cardano.Ledger.Alonzo.Translation

type TranslationError (BabbageEra c) UTxO 
Instance details

Defined in Cardano.Ledger.Babbage.Translation

type TranslationError (ConwayEra c) UTxO 
Instance details

Defined in Cardano.Ledger.Conway.Translation

type TranslationError (MaryEra c) UTxO 
Instance details

Defined in Cardano.Ledger.Mary.Translation

class EraTx era ⇒ EraUTxO era where Source #

Associated Types

type ScriptsNeeded era = (r ∷ Type) | r → era Source #

A customizable type on per era basis for the information required to find all scripts needed for the transaction.

Methods

getConsumedValue Source #

Arguments

PParams era 
→ (Credential 'Staking (EraCrypto era) → Maybe Coin)

Function that can lookup current delegation deposits

→ (Credential 'DRepRole (EraCrypto era) → Maybe Coin)

Function that can lookup current drep deposits

UTxO era 
TxBody era 
Value era 

Calculate all the value that is being consumed by the transaction.

getProducedValue Source #

Arguments

PParams era 
→ (KeyHash 'StakePool (EraCrypto era) → Bool)

Check whether a pool with a supplied PoolStakeId is already registered.

TxBody era 
Value era 

getScriptsProvided Source #

Arguments

UTxO era

For some era it is necessary to look into the UTxO to find all of the available scripts for the transaction

Tx era 
ScriptsProvided era 

Initial eras will look into witness set to find all of the available scripts, but starting with Babbage we can look for available scripts in the UTxO using reference inputs.

getScriptsNeededUTxO era → TxBody era → ScriptsNeeded era Source #

Produce all the information required for figuring out which scripts are required for the transaction to be valid, once those scripts are evaluated

getScriptsHashesNeededScriptsNeeded era → Set (ScriptHash (EraCrypto era)) Source #

Extract the set of all script hashes that are needed for script validation.

getWitsVKeyNeededCertState era → UTxO era → TxBody era → Set (KeyHash 'Witness (EraCrypto era)) Source #

Extract all of the KeyHash witnesses that are required for validating the transaction

getMinFeeTxUtxoPParams era → Tx era → UTxO era → Coin Source #

Minimum fee computation, excluding witnesses and including ref scripts size