cardano-ledger-shelley-1.12.2.1: Shelley Ledger Executable Model
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Shelley.UTxO

Synopsis

Documentation

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

scriptsNeeded ∷ ∀ era. EraTx era ⇒ UTxO era → Tx era → Set (ScriptHash (EraCrypto era)) Source #

Deprecated: In favor of getScriptsNeeded

Computes the set of script hashes required to unlock the transaction inputs and the withdrawals.

scriptCredCredential kr c → Maybe (ScriptHash c) Source #

Deprecated: In favor of credScriptHash

getConsumedCoinEraTxBody era ⇒ PParams era → (Credential 'Staking (EraCrypto era) → Maybe Coin) → UTxO era → TxBody era → Coin Source #

Compute the lovelace which are destroyed by the transaction. This implementation is suitable for Shelley and Allegra only.

shelleyProducedValue Source #

Arguments

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

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

TxBody era 
Value era 

consumedEraUTxO era ⇒ PParams era → CertState era → UTxO era → TxBody era → Value era Source #

For eras before Conway, VState is expected to have an empty Map for vsDReps, and so deposit summed up is zero.

producedEraUTxO era ⇒ PParams era → CertState era → TxBody era → Value era Source #

Compute the lovelace which are created by the transaction For eras before Conway, VState is expected to have an empty Map for vsDReps, and so deposit summed up is zero.

txup ∷ (EraTx era, ShelleyEraTxBody era) ⇒ Tx era → Maybe (Update era) Source #

Deprecated: In favor of updateTxBodyL

getShelleyMinFeeTxUtxoEraTx era ⇒ PParams era → Tx era → Coin Source #

getShelleyWitsVKeyNeeded ∷ ∀ era. (EraTx era, ShelleyEraTxBody era) ⇒ CertState era → UTxO era → TxBody era → Set (KeyHash 'Witness (EraCrypto era)) Source #

getShelleyWitsVKeyNeededNoGov ∷ ∀ era. EraTx era ⇒ UTxO era → TxBody era → Set (KeyHash 'Witness (EraCrypto era)) Source #

Extract witnesses from UTxO and TxBody. Does not enforce witnesses for governance related Keys, i.e. GenDelegs

Orphan instances