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 (EraCrypto era)) !(CompactForm (Value era))
- TxOutCompactDH' !(CompactAddr (EraCrypto era)) !(CompactForm (Value era)) !(DataHash (EraCrypto era))
- TxOut_AddrHash28_AdaOnly !(Credential 'Staking (EraCrypto era)) !Addr28Extra !(CompactForm Coin)
- TxOut_AddrHash28_AdaOnly_DataHash32 !(Credential 'Staking (EraCrypto era)) !Addr28Extra !(CompactForm Coin) !DataHash32
- pattern TxOutCompact ∷ (Era era, Val (Value era), HasCallStack) ⇒ CompactAddr (EraCrypto era) → CompactForm (Value era) → AlonzoTxOut era
- pattern AlonzoTxOut ∷ ∀ era. (Era era, Val (Value era), HasCallStack) ⇒ Addr (EraCrypto era) → Value era → StrictMaybe (DataHash (EraCrypto era)) → AlonzoTxOut era
- pattern TxOutCompactDH ∷ (Era era, Val (Value era), HasCallStack) ⇒ CompactAddr (EraCrypto era) → CompactForm (Value era) → DataHash (EraCrypto era) → AlonzoTxOut era
- class (AlonzoEraPParams era, EraTxOut era) ⇒ AlonzoEraTxOut era where
- dataHashTxOutL ∷ Lens' (TxOut era) (StrictMaybe (DataHash (EraCrypto era)))
- 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 (EraCrypto era)) → Set (TxIn (EraCrypto era)) → StrictSeq (TxOut era) → StrictSeq (TxCert era) → Withdrawals (EraCrypto era) → Coin → ValidityInterval → StrictMaybe (Update era) → Set (KeyHash 'Witness (EraCrypto era)) → MultiAsset (EraCrypto era) → StrictMaybe (ScriptIntegrityHash (EraCrypto era)) → StrictMaybe (AuxiliaryDataHash (EraCrypto era)) → StrictMaybe Network → AlonzoTxBody era
- data AlonzoTxBodyRaw era = AlonzoTxBodyRaw {
- atbrInputs ∷ !(Set (TxIn (EraCrypto era)))
- atbrCollateral ∷ !(Set (TxIn (EraCrypto era)))
- atbrOutputs ∷ !(StrictSeq (TxOut era))
- atbrCerts ∷ !(StrictSeq (TxCert era))
- atbrWithdrawals ∷ !(Withdrawals (EraCrypto era))
- atbrTxFee ∷ !Coin
- atbrValidityInterval ∷ !ValidityInterval
- atbrUpdate ∷ !(StrictMaybe (Update era))
- atbrReqSignerHashes ∷ Set (KeyHash 'Witness (EraCrypto era))
- atbrMint ∷ !(MultiAsset (EraCrypto era))
- atbrScriptIntegrityHash ∷ !(StrictMaybe (ScriptIntegrityHash (EraCrypto era)))
- atbrAuxDataHash ∷ !(StrictMaybe (AuxiliaryDataHash (EraCrypto era)))
- atbrTxNetworkId ∷ !(StrictMaybe Network)
- data AlonzoTxBodyUpgradeError = ATBUEMinUTxOUpdated
- class (MaryEraTxBody era, AlonzoEraTxOut era) ⇒ AlonzoEraTxBody era where
- collateralInputsTxBodyL ∷ Lens' (TxBody era) (Set (TxIn (EraCrypto era)))
- reqSignerHashesTxBodyL ∷ Lens' (TxBody era) (Set (KeyHash 'Witness (EraCrypto era)))
- scriptIntegrityHashTxBodyL ∷ Lens' (TxBody era) (StrictMaybe (ScriptIntegrityHash (EraCrypto era)))
- 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 (EraCrypto era))
- mintValueTxBodyF ∷ SimpleGetter (TxBody era) (Value era)
- mintedTxBodyF ∷ SimpleGetter (TxBody era) (Set (PolicyID (EraCrypto era)))
- class Indexable elem container where
- inputs' ∷ AlonzoTxBody era → Set (TxIn (EraCrypto era))
- collateral' ∷ AlonzoTxBody era → Set (TxIn (EraCrypto era))
- outputs' ∷ AlonzoTxBody era → StrictSeq (TxOut era)
- certs' ∷ AlonzoTxBody era → StrictSeq (TxCert era)
- withdrawals' ∷ AlonzoTxBody era → Withdrawals (EraCrypto era)
- txfee' ∷ AlonzoTxBody era → Coin
- vldt' ∷ AlonzoTxBody era → ValidityInterval
- update' ∷ AlonzoTxBody era → StrictMaybe (Update era)
- reqSignerHashes' ∷ AlonzoTxBody era → Set (KeyHash 'Witness (EraCrypto era))
- mint' ∷ AlonzoTxBody era → MultiAsset (EraCrypto era)
- scriptIntegrityHash' ∷ AlonzoTxBody era → StrictMaybe (ScriptIntegrityHash (EraCrypto era))
- adHash' ∷ AlonzoTxBody era → StrictMaybe (AuxiliaryDataHash (EraCrypto era))
- txnetworkid' ∷ AlonzoTxBody era → StrictMaybe Network
- getAdaOnly ∷ ∀ era. Val (Value era) ⇒ Proxy era → Value era → Maybe (CompactForm Coin)
- decodeDataHash32 ∷ ∀ c. HashAlgorithm (HASH c) ⇒ DataHash32 → Maybe (DataHash c)
- encodeDataHash32 ∷ ∀ c. HashAlgorithm (HASH c) ⇒ DataHash c → Maybe (SizeHash (HASH c) :~: 32, DataHash32)
- encodeAddress28 ∷ ∀ c. HashAlgorithm (ADDRHASH c) ⇒ Network → PaymentCredential c → Maybe (SizeHash (ADDRHASH c) :~: 28, Addr28Extra)
- decodeAddress28 ∷ ∀ c. HashAlgorithm (ADDRHASH c) ⇒ Credential 'Staking c → Addr28Extra → Maybe (Addr c)
- viewCompactTxOut ∷ (Era era, Val (Value era)) ⇒ AlonzoTxOut era → (CompactAddr (EraCrypto era), CompactForm (Value era), StrictMaybe (DataHash (EraCrypto era)))
- viewTxOut ∷ (Era era, Val (Value era)) ⇒ AlonzoTxOut era → (Addr (EraCrypto era), Value era, StrictMaybe (DataHash (EraCrypto era)))
- data EraIndependentScriptIntegrity
- type ScriptIntegrityHash c = SafeHash c EraIndependentScriptIntegrity
- getAlonzoTxOutEitherAddr ∷ HashAlgorithm (ADDRHASH (EraCrypto era)) ⇒ AlonzoTxOut era → Either (Addr (EraCrypto era)) (CompactAddr (EraCrypto era))
- 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 #
TxOutCompact' !(CompactAddr (EraCrypto era)) !(CompactForm (Value era)) | |
TxOutCompactDH' !(CompactAddr (EraCrypto era)) !(CompactForm (Value era)) !(DataHash (EraCrypto era)) | |
TxOut_AddrHash28_AdaOnly !(Credential 'Staking (EraCrypto era)) !Addr28Extra !(CompactForm Coin) | |
TxOut_AddrHash28_AdaOnly_DataHash32 !(Credential 'Staking (EraCrypto era)) !Addr28Extra !(CompactForm Coin) !DataHash32 |
pattern TxOutCompact ∷ (Era era, Val (Value era), HasCallStack) ⇒ CompactAddr (EraCrypto era) → CompactForm (Value era) → AlonzoTxOut era | |
pattern AlonzoTxOut ∷ ∀ era. (Era era, Val (Value era), HasCallStack) ⇒ Addr (EraCrypto era) → Value era → StrictMaybe (DataHash (EraCrypto era)) → AlonzoTxOut era | |
pattern TxOutCompactDH ∷ (Era era, Val (Value era), HasCallStack) ⇒ CompactAddr (EraCrypto era) → CompactForm (Value era) → DataHash (EraCrypto era) → AlonzoTxOut era |
Instances
class (AlonzoEraPParams era, EraTxOut era) ⇒ AlonzoEraTxOut era where Source #
dataHashTxOutL ∷ Lens' (TxOut era) (StrictMaybe (DataHash (EraCrypto era))) Source #
datumTxOutF ∷ SimpleGetter (TxOut era) (Datum era) Source #
Instances
Crypto c ⇒ AlonzoEraTxOut (AlonzoEra c) Source # | |
Defined in Cardano.Ledger.Alonzo.TxOut dataHashTxOutL ∷ Lens' (TxOut (AlonzoEra c)) (StrictMaybe (DataHash (EraCrypto (AlonzoEra c)))) Source # datumTxOutF ∷ SimpleGetter (TxOut (AlonzoEra c)) (Datum (AlonzoEra c)) Source # |
data Addr28Extra Source #
Instances
data DataHash32 Source #
Instances
newtype AlonzoTxBody era Source #
pattern AlonzoTxBody ∷ (EraTxOut era, EraTxCert era) ⇒ Set (TxIn (EraCrypto era)) → Set (TxIn (EraCrypto era)) → StrictSeq (TxOut era) → StrictSeq (TxCert era) → Withdrawals (EraCrypto era) → Coin → ValidityInterval → StrictMaybe (Update era) → Set (KeyHash 'Witness (EraCrypto era)) → MultiAsset (EraCrypto era) → StrictMaybe (ScriptIntegrityHash (EraCrypto era)) → StrictMaybe (AuxiliaryDataHash (EraCrypto era)) → 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 (EraCrypto era))) Source #
reqSignerHashesTxBodyL ∷ Lens' (TxBody era) (Set (KeyHash 'Witness (EraCrypto era))) Source #
scriptIntegrityHashTxBodyL ∷ Lens' (TxBody era) (StrictMaybe (ScriptIntegrityHash (EraCrypto era))) 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
Crypto c ⇒ AlonzoEraTxBody (AlonzoEra c) Source # | |
Defined in Cardano.Ledger.Alonzo.TxBody.Internal collateralInputsTxBodyL ∷ Lens' (TxBody (AlonzoEra c)) (Set (TxIn (EraCrypto (AlonzoEra c)))) Source # reqSignerHashesTxBodyL ∷ Lens' (TxBody (AlonzoEra c)) (Set (KeyHash 'Witness (EraCrypto (AlonzoEra c)))) Source # scriptIntegrityHashTxBodyL ∷ Lens' (TxBody (AlonzoEra c)) (StrictMaybe (ScriptIntegrityHash (EraCrypto (AlonzoEra c)))) Source # networkIdTxBodyL ∷ Lens' (TxBody (AlonzoEra c)) (StrictMaybe Network) Source # redeemerPointer ∷ TxBody (AlonzoEra c) → PlutusPurpose AsItem (AlonzoEra c) → StrictMaybe (PlutusPurpose AsIx (AlonzoEra c)) Source # redeemerPointerInverse ∷ TxBody (AlonzoEra c) → PlutusPurpose AsIx (AlonzoEra c) → StrictMaybe (PlutusPurpose AsIxItem (AlonzoEra c)) Source # |
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
Crypto c ⇒ ShelleyEraTxBody (AlonzoEra c) Source # | |
Defined in Cardano.Ledger.Alonzo.TxBody.Internal | |
Crypto c ⇒ ShelleyEraTxBody (ShelleyEra c) | |
Defined in Cardano.Ledger.Shelley.TxBody ttlTxBodyL ∷ Lens' (TxBody (ShelleyEra c)) SlotNo Source # updateTxBodyL ∷ Lens' (TxBody (ShelleyEra c)) (StrictMaybe (Update (ShelleyEra c))) Source # |
class EraTxBody era ⇒ AllegraEraTxBody era where Source #
vldtTxBodyL ∷ Lens' (TxBody era) ValidityInterval Source #
Instances
Crypto c ⇒ AllegraEraTxBody (AllegraEra c) | |
Defined in Cardano.Ledger.Allegra.TxBody.Internal vldtTxBodyL ∷ Lens' (TxBody (AllegraEra c)) ValidityInterval Source # | |
Crypto c ⇒ AllegraEraTxBody (AlonzoEra c) Source # | |
Defined in Cardano.Ledger.Alonzo.TxBody.Internal vldtTxBodyL ∷ Lens' (TxBody (AlonzoEra c)) ValidityInterval Source # |
class AllegraEraTxBody era ⇒ MaryEraTxBody era where Source #
mintTxBodyL ∷ Lens' (TxBody era) (MultiAsset (EraCrypto era)) Source #
mintValueTxBodyF ∷ SimpleGetter (TxBody era) (Value era) Source #
mintedTxBodyF ∷ SimpleGetter (TxBody era) (Set (PolicyID (EraCrypto era))) Source #
Instances
Crypto c ⇒ MaryEraTxBody (AlonzoEra c) Source # | |
Defined in Cardano.Ledger.Alonzo.TxBody.Internal mintTxBodyL ∷ Lens' (TxBody (AlonzoEra c)) (MultiAsset (EraCrypto (AlonzoEra c))) Source # mintValueTxBodyF ∷ SimpleGetter (TxBody (AlonzoEra c)) (Value (AlonzoEra c)) Source # mintedTxBodyF ∷ SimpleGetter (TxBody (AlonzoEra c)) (Set (PolicyID (EraCrypto (AlonzoEra c)))) Source # | |
Crypto c ⇒ MaryEraTxBody (MaryEra c) | |
Defined in Cardano.Ledger.Mary.TxBody.Internal mintTxBodyL ∷ Lens' (TxBody (MaryEra c)) (MultiAsset (EraCrypto (MaryEra c))) Source # mintValueTxBodyF ∷ SimpleGetter (TxBody (MaryEra c)) (Value (MaryEra c)) Source # mintedTxBodyF ∷ SimpleGetter (TxBody (MaryEra c)) (Set (PolicyID (EraCrypto (MaryEra c)))) Source # |
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 (EraCrypto era)) Source #
withdrawals' ∷ AlonzoTxBody era → Withdrawals (EraCrypto era) Source #
txfee' ∷ AlonzoTxBody era → Coin Source #
vldt' ∷ AlonzoTxBody era → ValidityInterval Source #
update' ∷ AlonzoTxBody era → StrictMaybe (Update era) Source #
reqSignerHashes' ∷ AlonzoTxBody era → Set (KeyHash 'Witness (EraCrypto era)) Source #
mint' ∷ AlonzoTxBody era → MultiAsset (EraCrypto era) Source #
scriptIntegrityHash' ∷ AlonzoTxBody era → StrictMaybe (ScriptIntegrityHash (EraCrypto era)) Source #
adHash' ∷ AlonzoTxBody era → StrictMaybe (AuxiliaryDataHash (EraCrypto era)) Source #
txnetworkid' ∷ AlonzoTxBody era → StrictMaybe Network Source #
getAdaOnly ∷ ∀ era. Val (Value era) ⇒ Proxy era → Value era → Maybe (CompactForm Coin) Source #
decodeDataHash32 ∷ ∀ c. HashAlgorithm (HASH c) ⇒ DataHash32 → Maybe (DataHash c) Source #
encodeDataHash32 ∷ ∀ c. HashAlgorithm (HASH c) ⇒ DataHash c → Maybe (SizeHash (HASH c) :~: 32, DataHash32) Source #
encodeAddress28 ∷ ∀ c. HashAlgorithm (ADDRHASH c) ⇒ Network → PaymentCredential c → Maybe (SizeHash (ADDRHASH c) :~: 28, Addr28Extra) Source #
decodeAddress28 ∷ ∀ c. HashAlgorithm (ADDRHASH c) ⇒ Credential 'Staking c → Addr28Extra → Maybe (Addr c) Source #
viewCompactTxOut ∷ (Era era, Val (Value era)) ⇒ AlonzoTxOut era → (CompactAddr (EraCrypto era), CompactForm (Value era), StrictMaybe (DataHash (EraCrypto era))) Source #
viewTxOut ∷ (Era era, Val (Value era)) ⇒ AlonzoTxOut era → (Addr (EraCrypto era), Value era, StrictMaybe (DataHash (EraCrypto era))) Source #
data EraIndependentScriptIntegrity Source #
Instances
(Era era, c ~ EraCrypto era) ⇒ HashAnnotated (ScriptIntegrity era) EraIndependentScriptIntegrity c Source # | |
getAlonzoTxOutEitherAddr ∷ HashAlgorithm (ADDRHASH (EraCrypto era)) ⇒ AlonzoTxOut era → Either (Addr (EraCrypto era)) (CompactAddr (EraCrypto era)) Source #
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 #