Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype UTxO era = UTxO {}
- class EraTx era ⇒ EraUTxO era where
- type ScriptsNeeded era = (r ∷ Type) | r → era
- getConsumedValue ∷ PParams era → (Credential 'Staking (EraCrypto era) → Maybe Coin) → (Credential 'DRepRole (EraCrypto era) → Maybe Coin) → UTxO era → TxBody era → Value era
- getProducedValue ∷ PParams era → (KeyHash 'StakePool (EraCrypto era) → Bool) → TxBody era → Value era
- getScriptsProvided ∷ UTxO era → Tx era → ScriptsProvided era
- getScriptsNeeded ∷ UTxO era → TxBody era → ScriptsNeeded era
- getScriptsHashesNeeded ∷ ScriptsNeeded era → Set (ScriptHash (EraCrypto era))
- getWitsVKeyNeeded ∷ CertState era → UTxO era → TxBody era → Set (KeyHash 'Witness (EraCrypto era))
- getMinFeeTxUtxo ∷ PParams era → Tx era → UTxO era → Coin
Documentation
The unspent transaction outputs.
Instances
class EraTx era ⇒ EraUTxO era where Source #
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.
∷ 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.
∷ PParams era | |
→ (KeyHash 'StakePool (EraCrypto era) → Bool) | Check whether a pool with a supplied PoolStakeId is already registered. |
→ TxBody era | |
→ Value era |
∷ 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.
getScriptsNeeded ∷ UTxO 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
getScriptsHashesNeeded ∷ ScriptsNeeded era → Set (ScriptHash (EraCrypto era)) Source #
Extract the set of all script hashes that are needed for script validation.
getWitsVKeyNeeded ∷ CertState era → UTxO era → TxBody era → Set (KeyHash 'Witness (EraCrypto era)) Source #
Extract all of the KeyHash witnesses that are required for validating the transaction
getMinFeeTxUtxo ∷ PParams era → Tx era → UTxO era → Coin Source #
Minimum fee computation, excluding witnesses and including ref scripts size