| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Ledger.Alonzo.TxWits
Contents
Synopsis
- newtype Redeemers era where
- MkRedeemers (MemoBytes (RedeemersRaw era))
- pattern Redeemers ∷ AlonzoEraScript era ⇒ Map (PlutusPurpose AsIx era) (Data era, ExUnits) → Redeemers era
- newtype RedeemersRaw era = RedeemersRaw {
- unRedeemersRaw ∷ Map (PlutusPurpose AsIx era) (Data era, ExUnits)
- unRedeemersL ∷ AlonzoEraScript era ⇒ Lens' (Redeemers era) (Map (PlutusPurpose AsIx era) (Data era, ExUnits))
- unRedeemers ∷ Redeemers era → Map (PlutusPurpose AsIx era) (Data era, ExUnits)
- newtype TxDats era where
- newtype TxDatsRaw era = TxDatsRaw {
- unTxDatsRaw ∷ Map DataHash (Data era)
- newtype AlonzoTxWits era where
- MkAlonzoTxWits (MemoBytes (AlonzoTxWitsRaw era))
- pattern AlonzoTxWits ∷ AlonzoEraScript era ⇒ Set (WitVKey 'Witness) → Set BootstrapWitness → Map ScriptHash (Script era) → TxDats era → Redeemers era → AlonzoTxWits era
- data AlonzoTxWitsRaw era = AlonzoTxWitsRaw {
- atwrAddrTxWits ∷ !(Set (WitVKey 'Witness))
- atwrBootAddrTxWits ∷ !(Set BootstrapWitness)
- atwrScriptTxWits ∷ !(Map ScriptHash (Script era))
- atwrDatsTxWits ∷ !(TxDats era)
- atwrRdmrsTxWits ∷ !(Redeemers era)
- addrAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Set (WitVKey 'Witness))
- bootAddrAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Set BootstrapWitness)
- scriptAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Map ScriptHash (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 (Data era)
- unTxDatsL ∷ Era era ⇒ Lens' (TxDats era) (Map DataHash (Data era))
- alonzoEqTxWitsRaw ∷ AlonzoEraTxWits era ⇒ TxWits era → TxWits era → Bool
- emptyTxWitsRaw ∷ AlonzoEraScript era ⇒ AlonzoTxWitsRaw era
- addScriptsTxWitsRaw ∷ Map ScriptHash (Script era) → AlonzoTxWitsRaw era → AlonzoTxWitsRaw era
- decodeAlonzoPlutusScript ∷ ∀ era (l ∷ Language). (AlonzoEraScript era, PlutusLanguage l) ⇒ SLanguage l → Decode ('Closed 'Dense) (Map ScriptHash (Script era))
- asHashedScriptPair ∷ EraScript era ⇒ Script era → (ScriptHash, Script era)
Documentation
newtype Redeemers era 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.
Constructors
| MkRedeemers (MemoBytes (RedeemersRaw era)) |
Bundled Patterns
| pattern Redeemers ∷ AlonzoEraScript era ⇒ Map (PlutusPurpose AsIx era) (Data era, ExUnits) → Redeemers era |
Instances
newtype RedeemersRaw era Source #
Constructors
| RedeemersRaw | |
Fields
| |
Instances
| AlonzoEraScript era ⇒ DecCBOR (Annotator (RedeemersRaw era)) Source # | |||||
| AlonzoEraScript era ⇒ EncCBOR (RedeemersRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods encCBOR ∷ RedeemersRaw era → Encoding Source # | |||||
| AlonzoEraScript era ⇒ NFData (RedeemersRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods rnf ∷ RedeemersRaw era → () # | |||||
| Generic (RedeemersRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Associated Types
Methods from ∷ RedeemersRaw era → Rep (RedeemersRaw era) x # to ∷ Rep (RedeemersRaw era) x → RedeemersRaw era # | |||||
| AlonzoEraScript era ⇒ Show (RedeemersRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods showsPrec ∷ Int → RedeemersRaw era → ShowS # show ∷ RedeemersRaw era → String # showList ∷ [RedeemersRaw era] → ShowS # | |||||
| AlonzoEraScript era ⇒ Eq (RedeemersRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods (==) ∷ RedeemersRaw era → RedeemersRaw era → Bool # (/=) ∷ RedeemersRaw era → RedeemersRaw era → Bool # | |||||
| AlonzoEraScript era ⇒ NoThunks (RedeemersRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits | |||||
| type Rep (RedeemersRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits type Rep (RedeemersRaw era) = D1 ('MetaData "RedeemersRaw" "Cardano.Ledger.Alonzo.TxWits" "cardano-ledger-alonzo-1.15.0.0-inplace" 'True) (C1 ('MetaCons "RedeemersRaw" 'PrefixI 'True) (S1 ('MetaSel ('Just "unRedeemersRaw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (PlutusPurpose AsIx era) (Data era, ExUnits))))) | |||||
unRedeemersL ∷ AlonzoEraScript era ⇒ Lens' (Redeemers era) (Map (PlutusPurpose AsIx era) (Data era, ExUnits)) Source #
unRedeemers ∷ Redeemers era → Map (PlutusPurpose AsIx era) (Data era, ExUnits) 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.
Instances
| Typeable era ⇒ ToCBOR (TxDats era) Source # | |||||
| Era era ⇒ DecCBOR (Annotator (TxDats era)) Source # | |||||
| Era era ⇒ EncCBOR (TxDats era) Source # | Encodes memoized bytes created upon construction. | ||||
| SafeToHash (TxDats era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods originalBytes ∷ TxDats era → ByteString Source # originalBytesSize ∷ TxDats era → Int Source # makeHashWithExplicitProxys ∷ Proxy i → TxDats era → SafeHash i Source # | |||||
| Memoized (TxDats era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Associated Types
Methods getMemoBytes ∷ TxDats era → MemoBytes (RawType (TxDats era)) wrapMemoBytes ∷ MemoBytes (RawType (TxDats era)) → TxDats era | |||||
| NFData (TxDats era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits | |||||
| Era era ⇒ Monoid (TxDats era) Source # | |||||
| Era era ⇒ Semigroup (TxDats era) Source # | |||||
| Generic (TxDats era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Associated Types
| |||||
| Show (TxDats era) Source # | |||||
| Eq (TxDats era) Source # | |||||
| Typeable era ⇒ NoThunks (TxDats era) Source # | |||||
| type RawType (TxDats era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits | |||||
| type Rep (TxDats era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits type Rep (TxDats era) = D1 ('MetaData "TxDats" "Cardano.Ledger.Alonzo.TxWits" "cardano-ledger-alonzo-1.15.0.0-inplace" 'True) (C1 ('MetaCons "MkTxDats" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes (TxDatsRaw era))))) | |||||
newtype TxDatsRaw era Source #
Constructors
| TxDatsRaw | |
Fields
| |
Instances
| Era era ⇒ DecCBOR (Annotator (TxDatsRaw era)) Source # | |||||
| EncCBOR (Data era) ⇒ EncCBOR (TxDatsRaw era) Source # | |||||
| NFData (TxDatsRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits | |||||
| Generic (TxDatsRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Associated Types
| |||||
| Show (TxDatsRaw era) Source # | |||||
| 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.15.0.0-inplace" 'True) (C1 ('MetaCons "TxDatsRaw" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTxDatsRaw") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map DataHash (Data era))))) | |||||
newtype AlonzoTxWits era Source #
Constructors
| MkAlonzoTxWits (MemoBytes (AlonzoTxWitsRaw era)) |
Bundled Patterns
| pattern AlonzoTxWits ∷ AlonzoEraScript era ⇒ Set (WitVKey 'Witness) → Set BootstrapWitness → Map ScriptHash (Script era) → TxDats era → Redeemers era → AlonzoTxWits era |
Instances
| Typeable era ⇒ ToCBOR (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods toCBOR ∷ AlonzoTxWits era → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (AlonzoTxWits era) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [AlonzoTxWits era] → Size Source # | |||||
| (AlonzoEraScript era, DecCBOR (Annotator (NativeScript era))) ⇒ DecCBOR (Annotator (AlonzoTxWits era)) Source # | |||||
| Era era ⇒ EncCBOR (AlonzoTxWits era) Source # | Encodes memoized bytes created upon construction. | ||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods encCBOR ∷ AlonzoTxWits era → Encoding Source # | |||||
| SafeToHash (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods originalBytes ∷ AlonzoTxWits era → ByteString Source # originalBytesSize ∷ AlonzoTxWits era → Int Source # makeHashWithExplicitProxys ∷ Proxy i → AlonzoTxWits era → SafeHash i Source # | |||||
| (TxWits era ~ AlonzoTxWits era, AlonzoEraTxWits era) ⇒ EqRaw (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods eqRaw ∷ AlonzoTxWits era → AlonzoTxWits era → Bool Source # | |||||
| Memoized (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Associated Types
Methods getMemoBytes ∷ AlonzoTxWits era → MemoBytes (RawType (AlonzoTxWits era)) wrapMemoBytes ∷ MemoBytes (RawType (AlonzoTxWits era)) → AlonzoTxWits era | |||||
| (Era era, NFData (Script era), NFData (TxDats era), NFData (Redeemers era)) ⇒ NFData (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods rnf ∷ AlonzoTxWits era → () # | |||||
| AlonzoEraScript era ⇒ Monoid (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods mempty ∷ AlonzoTxWits era # mappend ∷ AlonzoTxWits era → AlonzoTxWits era → AlonzoTxWits era # mconcat ∷ [AlonzoTxWits era] → AlonzoTxWits era # | |||||
| AlonzoEraScript era ⇒ Semigroup (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods (<>) ∷ AlonzoTxWits era → AlonzoTxWits era → AlonzoTxWits era # sconcat ∷ NonEmpty (AlonzoTxWits era) → AlonzoTxWits era # stimes ∷ Integral b ⇒ b → AlonzoTxWits era → AlonzoTxWits era # | |||||
| Generic (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Associated Types
Methods from ∷ AlonzoTxWits era → Rep (AlonzoTxWits era) x # to ∷ Rep (AlonzoTxWits era) x → AlonzoTxWits era # | |||||
| AlonzoEraScript era ⇒ Show (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods showsPrec ∷ Int → AlonzoTxWits era → ShowS # show ∷ AlonzoTxWits era → String # showList ∷ [AlonzoTxWits era] → ShowS # | |||||
| AlonzoEraScript era ⇒ Eq (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods (==) ∷ AlonzoTxWits era → AlonzoTxWits era → Bool # (/=) ∷ AlonzoTxWits era → AlonzoTxWits era → Bool # | |||||
| AlonzoEraScript era ⇒ NoThunks (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits | |||||
| type RawType (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits | |||||
| type Rep (AlonzoTxWits era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits type Rep (AlonzoTxWits era) = D1 ('MetaData "AlonzoTxWits" "Cardano.Ledger.Alonzo.TxWits" "cardano-ledger-alonzo-1.15.0.0-inplace" 'True) (C1 ('MetaCons "MkAlonzoTxWits" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes (AlonzoTxWitsRaw era))))) | |||||
data AlonzoTxWitsRaw era Source #
Internal AlonzoTxWits type, lacking serialised bytes.
Constructors
| AlonzoTxWitsRaw | |
Fields
| |
Instances
| (AlonzoEraScript era, DecCBOR (Annotator (NativeScript era))) ⇒ DecCBOR (Annotator (AlonzoTxWitsRaw era)) Source # | |||||
| AlonzoEraScript era ⇒ EncCBOR (AlonzoTxWitsRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods encCBOR ∷ AlonzoTxWitsRaw era → Encoding Source # | |||||
| (Era era, NFData (Script era), NFData (TxDats era), NFData (Redeemers era)) ⇒ NFData (AlonzoTxWitsRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods rnf ∷ AlonzoTxWitsRaw era → () # | |||||
| Generic (AlonzoTxWitsRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Associated Types
Methods from ∷ AlonzoTxWitsRaw era → Rep (AlonzoTxWitsRaw era) x # to ∷ Rep (AlonzoTxWitsRaw era) x → AlonzoTxWitsRaw era # | |||||
| AlonzoEraScript era ⇒ Show (AlonzoTxWitsRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods showsPrec ∷ Int → AlonzoTxWitsRaw era → ShowS # show ∷ AlonzoTxWitsRaw era → String # showList ∷ [AlonzoTxWitsRaw era] → ShowS # | |||||
| AlonzoEraScript era ⇒ Eq (AlonzoTxWitsRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits Methods (==) ∷ AlonzoTxWitsRaw era → AlonzoTxWitsRaw era → Bool # (/=) ∷ AlonzoTxWitsRaw era → AlonzoTxWitsRaw era → Bool # | |||||
| AlonzoEraScript era ⇒ NoThunks (AlonzoTxWitsRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits | |||||
| type Rep (AlonzoTxWitsRaw era) Source # | |||||
Defined in Cardano.Ledger.Alonzo.TxWits type Rep (AlonzoTxWitsRaw era) = D1 ('MetaData "AlonzoTxWitsRaw" "Cardano.Ledger.Alonzo.TxWits" "cardano-ledger-alonzo-1.15.0.0-inplace" 'False) (C1 ('MetaCons "AlonzoTxWitsRaw" 'PrefixI 'True) ((S1 ('MetaSel ('Just "atwrAddrTxWits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set (WitVKey 'Witness))) :*: S1 ('MetaSel ('Just "atwrBootAddrTxWits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set BootstrapWitness))) :*: (S1 ('MetaSel ('Just "atwrScriptTxWits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map ScriptHash (Script era))) :*: (S1 ('MetaSel ('Just "atwrDatsTxWits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (TxDats era)) :*: S1 ('MetaSel ('Just "atwrRdmrsTxWits") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Redeemers era)))))) | |||||
addrAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Set (WitVKey 'Witness)) Source #
bootAddrAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Set BootstrapWitness) Source #
scriptAlonzoTxWitsL ∷ AlonzoEraScript era ⇒ Lens' (AlonzoTxWits era) (Map ScriptHash (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 #
emptyTxWitsRaw ∷ AlonzoEraScript era ⇒ AlonzoTxWitsRaw era Source #
addScriptsTxWitsRaw ∷ Map ScriptHash (Script era) → AlonzoTxWitsRaw era → AlonzoTxWitsRaw era Source #
decodeAlonzoPlutusScript ∷ ∀ era (l ∷ Language). (AlonzoEraScript era, PlutusLanguage l) ⇒ SLanguage l → Decode ('Closed 'Dense) (Map ScriptHash (Script era)) Source #
asHashedScriptPair ∷ EraScript era ⇒ Script era → (ScriptHash, Script era) Source #