Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Provides Alonzo TxBody internals
Warning
This module is considered internal.
The contents of this module may change in any way whatsoever and without any warning between minor versions of this package.
Synopsis
- data AlonzoTxOut era where
- TxOutCompact' !CompactAddr !(CompactForm (Value era))
- TxOutCompactDH' !CompactAddr !(CompactForm (Value era)) !DataHash
- TxOut_AddrHash28_AdaOnly !(Credential 'Staking) !Addr28Extra !(CompactForm Coin)
- TxOut_AddrHash28_AdaOnly_DataHash32 !(Credential 'Staking) !Addr28Extra !(CompactForm Coin) !DataHash32
- pattern TxOutCompact ∷ (Era era, Val (Value era), HasCallStack) ⇒ CompactAddr → CompactForm (Value era) → AlonzoTxOut era
- pattern AlonzoTxOut ∷ ∀ era. (Era era, Val (Value era), HasCallStack) ⇒ Addr → Value era → StrictMaybe DataHash → AlonzoTxOut era
- pattern TxOutCompactDH ∷ (Era era, Val (Value era), HasCallStack) ⇒ CompactAddr → CompactForm (Value era) → DataHash → AlonzoTxOut era
- class (AlonzoEraPParams era, EraTxOut era) ⇒ AlonzoEraTxOut era where
- dataHashTxOutL ∷ Lens' (TxOut era) (StrictMaybe DataHash)
- datumTxOutF ∷ SimpleGetter (TxOut era) (Datum era)
- data Addr28Extra
- data DataHash32
- newtype AlonzoTxBody era where
- TxBodyConstr (MemoBytes AlonzoTxBodyRaw era)
- pattern AlonzoTxBody ∷ (EraTxOut era, EraTxCert era) ⇒ Set TxIn → Set TxIn → StrictSeq (TxOut era) → StrictSeq (TxCert era) → Withdrawals → Coin → ValidityInterval → StrictMaybe (Update era) → Set (KeyHash 'Witness) → MultiAsset → StrictMaybe ScriptIntegrityHash → StrictMaybe TxAuxDataHash → StrictMaybe Network → AlonzoTxBody era
- data AlonzoTxBodyRaw era = AlonzoTxBodyRaw {
- atbrInputs ∷ !(Set TxIn)
- atbrCollateral ∷ !(Set TxIn)
- atbrOutputs ∷ !(StrictSeq (TxOut era))
- atbrCerts ∷ !(StrictSeq (TxCert era))
- atbrWithdrawals ∷ !Withdrawals
- atbrTxFee ∷ !Coin
- atbrValidityInterval ∷ !ValidityInterval
- atbrUpdate ∷ !(StrictMaybe (Update era))
- atbrReqSignerHashes ∷ Set (KeyHash 'Witness)
- atbrMint ∷ !MultiAsset
- atbrScriptIntegrityHash ∷ !(StrictMaybe ScriptIntegrityHash)
- atbrAuxDataHash ∷ !(StrictMaybe TxAuxDataHash)
- atbrTxNetworkId ∷ !(StrictMaybe Network)
- data AlonzoTxBodyUpgradeError = ATBUEMinUTxOUpdated
- class (MaryEraTxBody era, AlonzoEraTxOut era) ⇒ AlonzoEraTxBody era where
- collateralInputsTxBodyL ∷ Lens' (TxBody era) (Set TxIn)
- reqSignerHashesTxBodyL ∷ Lens' (TxBody era) (Set (KeyHash 'Witness))
- scriptIntegrityHashTxBodyL ∷ Lens' (TxBody era) (StrictMaybe ScriptIntegrityHash)
- networkIdTxBodyL ∷ Lens' (TxBody era) (StrictMaybe Network)
- redeemerPointer ∷ TxBody era → PlutusPurpose AsItem era → StrictMaybe (PlutusPurpose AsIx era)
- redeemerPointerInverse ∷ TxBody era → PlutusPurpose AsIx era → StrictMaybe (PlutusPurpose AsIxItem era)
- class (ShelleyEraTxCert era, EraTxBody era, ProtVerAtMost era 8) ⇒ ShelleyEraTxBody era where
- ttlTxBodyL ∷ Lens' (TxBody era) SlotNo
- updateTxBodyL ∷ Lens' (TxBody era) (StrictMaybe (Update era))
- class EraTxBody era ⇒ AllegraEraTxBody era where
- vldtTxBodyL ∷ Lens' (TxBody era) ValidityInterval
- class AllegraEraTxBody era ⇒ MaryEraTxBody era where
- mintTxBodyL ∷ Lens' (TxBody era) MultiAsset
- mintValueTxBodyF ∷ SimpleGetter (TxBody era) (Value era)
- mintedTxBodyF ∷ SimpleGetter (TxBody era) (Set PolicyID)
- class Indexable elem container where
- inputs' ∷ AlonzoTxBody era → Set TxIn
- collateral' ∷ AlonzoTxBody era → Set TxIn
- outputs' ∷ AlonzoTxBody era → StrictSeq (TxOut era)
- certs' ∷ AlonzoTxBody era → StrictSeq (TxCert era)
- withdrawals' ∷ AlonzoTxBody era → Withdrawals
- txfee' ∷ AlonzoTxBody era → Coin
- vldt' ∷ AlonzoTxBody era → ValidityInterval
- update' ∷ AlonzoTxBody era → StrictMaybe (Update era)
- reqSignerHashes' ∷ AlonzoTxBody era → Set (KeyHash 'Witness)
- mint' ∷ AlonzoTxBody era → MultiAsset
- scriptIntegrityHash' ∷ AlonzoTxBody era → StrictMaybe ScriptIntegrityHash
- adHash' ∷ AlonzoTxBody era → StrictMaybe TxAuxDataHash
- txnetworkid' ∷ AlonzoTxBody era → StrictMaybe Network
- getAdaOnly ∷ ∀ era. Val (Value era) ⇒ Proxy era → Value era → Maybe (CompactForm Coin)
- decodeDataHash32 ∷ DataHash32 → Maybe DataHash
- encodeDataHash32 ∷ DataHash → Maybe (SizeHash HASH :~: 32, DataHash32)
- encodeAddress28 ∷ Network → PaymentCredential → Maybe (SizeHash ADDRHASH :~: 28, Addr28Extra)
- decodeAddress28 ∷ Credential 'Staking → Addr28Extra → Maybe Addr
- viewCompactTxOut ∷ Val (Value era) ⇒ AlonzoTxOut era → (CompactAddr, CompactForm (Value era), StrictMaybe DataHash)
- viewTxOut ∷ Val (Value era) ⇒ AlonzoTxOut era → (Addr, Value era, StrictMaybe DataHash)
- data EraIndependentScriptIntegrity
- type ScriptIntegrityHash = SafeHash EraIndependentScriptIntegrity
- getAlonzoTxOutEitherAddr ∷ AlonzoTxOut era → Either Addr CompactAddr
- utxoEntrySize ∷ AlonzoEraTxOut era ⇒ TxOut era → Integer
- alonzoRedeemerPointer ∷ ∀ era. MaryEraTxBody era ⇒ TxBody era → AlonzoPlutusPurpose AsItem era → StrictMaybe (AlonzoPlutusPurpose AsIx era)
- alonzoRedeemerPointerInverse ∷ MaryEraTxBody era ⇒ TxBody era → AlonzoPlutusPurpose AsIx era → StrictMaybe (AlonzoPlutusPurpose AsIxItem era)
Documentation
data AlonzoTxOut era Source #
pattern TxOutCompact ∷ (Era era, Val (Value era), HasCallStack) ⇒ CompactAddr → CompactForm (Value era) → AlonzoTxOut era | |
pattern AlonzoTxOut ∷ ∀ era. (Era era, Val (Value era), HasCallStack) ⇒ Addr → Value era → StrictMaybe DataHash → AlonzoTxOut era | |
pattern TxOutCompactDH ∷ (Era era, Val (Value era), HasCallStack) ⇒ CompactAddr → CompactForm (Value era) → DataHash → AlonzoTxOut era |
Instances
class (AlonzoEraPParams era, EraTxOut era) ⇒ AlonzoEraTxOut era where Source #
dataHashTxOutL ∷ Lens' (TxOut era) (StrictMaybe DataHash) Source #
datumTxOutF ∷ SimpleGetter (TxOut era) (Datum era) Source #
Instances
data Addr28Extra Source #
Instances
data DataHash32 Source #
Instances
newtype AlonzoTxBody era Source #
pattern AlonzoTxBody ∷ (EraTxOut era, EraTxCert era) ⇒ Set TxIn → Set TxIn → StrictSeq (TxOut era) → StrictSeq (TxCert era) → Withdrawals → Coin → ValidityInterval → StrictMaybe (Update era) → Set (KeyHash 'Witness) → MultiAsset → StrictMaybe ScriptIntegrityHash → StrictMaybe TxAuxDataHash → StrictMaybe Network → AlonzoTxBody era |
Instances
data AlonzoTxBodyRaw era Source #
AlonzoTxBodyRaw | |
|
Instances
data AlonzoTxBodyUpgradeError Source #
ATBUEMinUTxOUpdated | The TxBody contains a protocol parameter update that attempts to update the min UTxO. Since this doesn't exist in Alonzo, we fail if an attempt is made to update it. |
Instances
class (MaryEraTxBody era, AlonzoEraTxOut era) ⇒ AlonzoEraTxBody era where Source #
collateralInputsTxBodyL ∷ Lens' (TxBody era) (Set TxIn) Source #
reqSignerHashesTxBodyL ∷ Lens' (TxBody era) (Set (KeyHash 'Witness)) Source #
scriptIntegrityHashTxBodyL ∷ Lens' (TxBody era) (StrictMaybe ScriptIntegrityHash) Source #
networkIdTxBodyL ∷ Lens' (TxBody era) (StrictMaybe Network) Source #
redeemerPointer ∷ TxBody era → PlutusPurpose AsItem era → StrictMaybe (PlutusPurpose AsIx era) Source #
This function is called rdptr
in the spec. Given a TxBody
and a plutus
purpose with an item, we should be able to find the plutus purpose as in index
redeemerPointerInverse ∷ TxBody era → PlutusPurpose AsIx era → StrictMaybe (PlutusPurpose AsIxItem era) Source #
This is an inverse of redeemerPointer
. Given purpose as an index return it as an item.
Instances
class (ShelleyEraTxCert era, EraTxBody era, ProtVerAtMost era 8) ⇒ ShelleyEraTxBody era where Source #
ttlTxBodyL ∷ Lens' (TxBody era) SlotNo Source #
updateTxBodyL ∷ Lens' (TxBody era) (StrictMaybe (Update era)) Source #
Instances
class EraTxBody era ⇒ AllegraEraTxBody era where Source #
vldtTxBodyL ∷ Lens' (TxBody era) ValidityInterval Source #
Instances
class AllegraEraTxBody era ⇒ MaryEraTxBody era where Source #
mintTxBodyL ∷ Lens' (TxBody era) MultiAsset Source #
mintValueTxBodyF ∷ SimpleGetter (TxBody era) (Value era) Source #
mintedTxBodyF ∷ SimpleGetter (TxBody era) (Set PolicyID) Source #
Instances
class Indexable elem container where Source #
indexOf ∷ AsItem Word32 elem → container → StrictMaybe (AsIx Word32 elem) Source #
fromIndex ∷ AsIx Word32 elem → container → StrictMaybe (AsIxItem Word32 elem) Source #
collateral' ∷ AlonzoTxBody era → Set TxIn Source #
withdrawals' ∷ AlonzoTxBody era → Withdrawals Source #
txfee' ∷ AlonzoTxBody era → Coin Source #
vldt' ∷ AlonzoTxBody era → ValidityInterval Source #
update' ∷ AlonzoTxBody era → StrictMaybe (Update era) Source #
reqSignerHashes' ∷ AlonzoTxBody era → Set (KeyHash 'Witness) Source #
mint' ∷ AlonzoTxBody era → MultiAsset Source #
adHash' ∷ AlonzoTxBody era → StrictMaybe TxAuxDataHash Source #
txnetworkid' ∷ AlonzoTxBody era → StrictMaybe Network Source #
getAdaOnly ∷ ∀ era. Val (Value era) ⇒ Proxy era → Value era → Maybe (CompactForm Coin) Source #
encodeDataHash32 ∷ DataHash → Maybe (SizeHash HASH :~: 32, DataHash32) Source #
encodeAddress28 ∷ Network → PaymentCredential → Maybe (SizeHash ADDRHASH :~: 28, Addr28Extra) Source #
viewCompactTxOut ∷ Val (Value era) ⇒ AlonzoTxOut era → (CompactAddr, CompactForm (Value era), StrictMaybe DataHash) Source #
viewTxOut ∷ Val (Value era) ⇒ AlonzoTxOut era → (Addr, Value era, StrictMaybe DataHash) Source #
data EraIndependentScriptIntegrity Source #
Instances
Era era ⇒ HashAnnotated (ScriptIntegrity era) EraIndependentScriptIntegrity Source # | |
Defined in Cardano.Ledger.Alonzo.Tx |
utxoEntrySize ∷ AlonzoEraTxOut era ⇒ TxOut era → Integer Source #
Compute an estimate of the size of storing one UTxO entry. This function implements the UTxO entry size estimate done by scaledMinDeposit in the ShelleyMA era
alonzoRedeemerPointer ∷ ∀ era. MaryEraTxBody era ⇒ TxBody era → AlonzoPlutusPurpose AsItem era → StrictMaybe (AlonzoPlutusPurpose AsIx era) Source #
alonzoRedeemerPointerInverse ∷ MaryEraTxBody era ⇒ TxBody era → AlonzoPlutusPurpose AsIx era → StrictMaybe (AlonzoPlutusPurpose AsIxItem era) Source #