Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Redeemers era where
- pattern Redeemers ∷ ∀ era. AlonzoEraScript era ⇒ Map (PlutusPurpose AsIx era) (Data era, ExUnits) → Redeemers era
- data RedeemersRaw era
- unRedeemers ∷ Redeemers era → Map (PlutusPurpose AsIx era) (Data era, ExUnits)
- nullRedeemers ∷ Redeemers era → Bool
- lookupRedeemer ∷ Ord (PlutusPurpose AsIx era) ⇒ PlutusPurpose AsIx era → Redeemers era → Maybe (Data era, ExUnits)
- upgradeRedeemers ∷ ∀ era. (AlonzoEraScript (PreviousEra era), AlonzoEraScript era) ⇒ Redeemers (PreviousEra era) → Redeemers era
- data TxDats era where
- data TxDatsRaw era
- upgradeTxDats ∷ (Era era1, Era era2, EraCrypto era1 ~ EraCrypto era2) ⇒ TxDats era1 → TxDats era2
- data AlonzoTxWits era where
- pattern AlonzoTxWits ∷ AlonzoEraScript era ⇒ Set (WitVKey 'Witness (EraCrypto era)) → Set (BootstrapWitness (EraCrypto era)) → Map (ScriptHash (EraCrypto era)) (Script era) → TxDats era → Redeemers era → AlonzoTxWits era
- pattern AlonzoTxWits' ∷ Era era ⇒ Set (WitVKey 'Witness (EraCrypto era)) → Set (BootstrapWitness (EraCrypto era)) → Map (ScriptHash (EraCrypto era)) (Script era) → TxDats era → Redeemers era → AlonzoTxWits era
- data AlonzoTxWitsRaw era
- addrAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Set (WitVKey 'Witness (EraCrypto era)))
- bootAddrAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Set (BootstrapWitness (EraCrypto era)))
- scriptAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Map (ScriptHash (EraCrypto era)) (Script era))
- datsAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (TxDats era)
- rdmrsAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Redeemers era)
- class (EraTxWits era, AlonzoEraScript era) ⇒ AlonzoEraTxWits era where
- datsTxWitsL ∷ Lens' (TxWits era) (TxDats era)
- rdmrsTxWitsL ∷ Lens' (TxWits era) (Redeemers era)
- hashDataTxWitsL ∷ AlonzoEraTxWits era ⇒ Lens (TxWits era) (TxWits era) (TxDats era) [Data era]
- unTxDats ∷ TxDats era → Map (DataHash (EraCrypto era)) (Data era)
- nullDats ∷ TxDats era → Bool
- alonzoEqTxWitsRaw ∷ AlonzoEraTxWits era ⇒ TxWits era → TxWits era → Bool
Documentation
data Redeemers era where Source #
Note that Redeemers
are based on MemoBytes
since we must preserve
the original bytes for the ScriptIntegrity
.
Since the Redeemers
exist outside of the transaction body,
this is how we ensure that they are not manipulated.
pattern Redeemers ∷ ∀ era. AlonzoEraScript era ⇒ Map (PlutusPurpose AsIx era) (Data era, ExUnits) → Redeemers era |
Instances
data RedeemersRaw era Source #
Instances
unRedeemers ∷ Redeemers era → Map (PlutusPurpose AsIx era) (Data era, ExUnits) Source #
nullRedeemers ∷ Redeemers era → Bool Source #
lookupRedeemer ∷ Ord (PlutusPurpose AsIx era) ⇒ PlutusPurpose AsIx era → Redeemers era → Maybe (Data era, ExUnits) Source #
upgradeRedeemers ∷ ∀ era. (AlonzoEraScript (PreviousEra era), AlonzoEraScript era) ⇒ Redeemers (PreviousEra era) → Redeemers era Source #
Upgrade redeemers from one era to another. The underlying data structure will remain identical, but the memoised serialisation may change to reflect the versioned serialisation of the new era.
data TxDats era where Source #
Note that TxDats
are based on MemoBytes
since we must preserve
the original bytes for the ScriptIntegrity
.
Since the TxDats
exist outside of the transaction body,
this is how we ensure that they are not manipulated.
pattern TxDats ∷ Era era ⇒ Map (DataHash (EraCrypto era)) (Data era) → TxDats era | |
pattern TxDats' ∷ Map (DataHash (EraCrypto era)) (Data era) → TxDats era |
Instances
Instances
Generic (TxDatsRaw era) Source # | |
HashAlgorithm (HASH (EraCrypto era)) ⇒ Show (TxDatsRaw era) Source # | |
Era era ⇒ DecCBOR (Annotator (TxDatsRaw era)) Source # | |
(Typeable era, EncCBOR (Data era)) ⇒ EncCBOR (TxDatsRaw era) Source # | |
NFData (TxDatsRaw era) Source # | |
Defined in Cardano.Ledger.Alonzo.TxWits | |
Eq (TxDatsRaw era) Source # | |
Typeable era ⇒ NoThunks (TxDatsRaw era) Source # | |
type Rep (TxDatsRaw era) Source # | |
Defined in Cardano.Ledger.Alonzo.TxWits type Rep (TxDatsRaw era) = D1 ('MetaData "TxDatsRaw" "Cardano.Ledger.Alonzo.TxWits" "cardano-ledger-alonzo-1.12.0.0-inplace" 'True) (C1 ('MetaCons "TxDatsRaw" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTxDatsRaw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (DataHash (EraCrypto era)) (Data era))))) |
upgradeTxDats ∷ (Era era1, Era era2, EraCrypto era1 ~ EraCrypto era2) ⇒ TxDats era1 → TxDats era2 Source #
Upgrade TxDats
from one era to another. The underlying data structure
will remain identical, but the memoised serialisation may change to reflect
the versioned serialisation of the new era.
data AlonzoTxWits era where Source #
pattern AlonzoTxWits ∷ AlonzoEraScript era ⇒ Set (WitVKey 'Witness (EraCrypto era)) → Set (BootstrapWitness (EraCrypto era)) → Map (ScriptHash (EraCrypto era)) (Script era) → TxDats era → Redeemers era → AlonzoTxWits era | |
pattern AlonzoTxWits' ∷ Era era ⇒ Set (WitVKey 'Witness (EraCrypto era)) → Set (BootstrapWitness (EraCrypto era)) → Map (ScriptHash (EraCrypto era)) (Script era) → TxDats era → Redeemers era → AlonzoTxWits era |
Instances
data AlonzoTxWitsRaw era Source #
Internal AlonzoTxWits
type, lacking serialised bytes.
Instances
addrAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Set (WitVKey 'Witness (EraCrypto era))) Source #
bootAddrAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Set (BootstrapWitness (EraCrypto era))) Source #
scriptAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Map (ScriptHash (EraCrypto era)) (Script era)) Source #
datsAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (TxDats era) Source #
rdmrsAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Redeemers era) Source #
class (EraTxWits era, AlonzoEraScript era) ⇒ AlonzoEraTxWits era where Source #
hashDataTxWitsL ∷ AlonzoEraTxWits era ⇒ Lens (TxWits era) (TxWits era) (TxDats era) [Data era] Source #
This is a convenience Lens that will hash the Data
when it is being added to the
TxWits
. See datsTxWitsL
for a version that aloows setting TxDats
instead.
alonzoEqTxWitsRaw ∷ AlonzoEraTxWits era ⇒ TxWits era → TxWits era → Bool Source #
Orphan instances
(EraScript (AlonzoEra c), Crypto c) ⇒ EraTxWits (AlonzoEra c) Source # | |
mkBasicTxWits ∷ TxWits (AlonzoEra c) Source # addrTxWitsL ∷ Lens' (TxWits (AlonzoEra c)) (Set (WitVKey 'Witness (EraCrypto (AlonzoEra c)))) Source # bootAddrTxWitsL ∷ Lens' (TxWits (AlonzoEra c)) (Set (BootstrapWitness (EraCrypto (AlonzoEra c)))) Source # scriptTxWitsL ∷ Lens' (TxWits (AlonzoEra c)) (Map (ScriptHash (EraCrypto (AlonzoEra c))) (Script (AlonzoEra c))) Source # upgradeTxWits ∷ TxWits (PreviousEra (AlonzoEra c)) → TxWits (AlonzoEra c) Source # |