cardano-ledger-alonzo-1.13.0.0: Cardano ledger introducing Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Alonzo.Core

Documentation

class (EraTx era, AlonzoEraTxBody era, AlonzoEraTxWits era, AlonzoEraScript era) ⇒ AlonzoEraTx era where Source #

Methods

isValidTxLLens' (Tx era) IsValid Source #

Instances

Instances details
AlonzoEraTx AlonzoEra Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

class (EraScript era, Eq (PlutusScript era), Ord (PlutusScript era), Show (PlutusScript era), NoThunks (PlutusScript era), NFData (PlutusScript era), SafeToHash (PlutusScript era), Eq (PlutusPurpose AsItem era), Show (PlutusPurpose AsItem era), EncCBOR (PlutusPurpose AsItem era), DecCBOR (PlutusPurpose AsItem era), NoThunks (PlutusPurpose AsItem era), NFData (PlutusPurpose AsItem era), Eq (PlutusPurpose AsIx era), Ord (PlutusPurpose AsIx era), Show (PlutusPurpose AsIx era), EncCBOR (PlutusPurpose AsIx era), DecCBOR (PlutusPurpose AsIx era), EncCBORGroup (PlutusPurpose AsIx era), DecCBORGroup (PlutusPurpose AsIx era), NoThunks (PlutusPurpose AsIx era), NFData (PlutusPurpose AsIx era), Eq (PlutusPurpose AsIxItem era), Show (PlutusPurpose AsIxItem era), NoThunks (PlutusPurpose AsIxItem era), NFData (PlutusPurpose AsIxItem era), AllegraEraScript era) ⇒ AlonzoEraScript era where Source #

Associated Types

data PlutusScript era ∷ Type Source #

type PlutusPurpose (f ∷ TypeTypeType) era = (r ∷ Type) | r → era Source #

Methods

eraMaxLanguageLanguage Source #

Highest supported Plutus language version for this era.

toPlutusScriptScript era → Maybe (PlutusScript era) Source #

Attempt to extract a AlonzoEraScript from a wrapper type family Script. Whenevr Script is a native script Nothing will be returned

default toPlutusScriptScript era ~ AlonzoScript era ⇒ Script era → Maybe (PlutusScript era) Source #

fromPlutusScriptPlutusScript era → Script era Source #

Convert a AlonzoEraScript to a wrapper type family Script

default fromPlutusScriptScript era ~ AlonzoScript era ⇒ PlutusScript era → Script era Source #

mkPlutusScriptPlutusLanguage l ⇒ Plutus l → Maybe (PlutusScript era) Source #

Returns Nothing, whenver plutus language is not supported for this era.

withPlutusScriptPlutusScript era → (∀ l. PlutusLanguage l ⇒ Plutus l → a) → a Source #

Give a AlonzoEraScript apply a function that can handle Plutus scripts of all known versions.

hoistPlutusPurpose ∷ (∀ ix it. g ix it → f ix it) → PlutusPurpose g era → PlutusPurpose f era Source #

mkSpendingPurpose ∷ f Word32 TxInPlutusPurpose f era Source #

toSpendingPurposePlutusPurpose f era → Maybe (f Word32 TxIn) Source #

mkMintingPurpose ∷ f Word32 PolicyIDPlutusPurpose f era Source #

toMintingPurposePlutusPurpose f era → Maybe (f Word32 PolicyID) Source #

mkCertifyingPurpose ∷ f Word32 (TxCert era) → PlutusPurpose f era Source #

toCertifyingPurposePlutusPurpose f era → Maybe (f Word32 (TxCert era)) Source #

mkRewardingPurpose ∷ f Word32 RewardAccountPlutusPurpose f era Source #

toRewardingPurposePlutusPurpose f era → Maybe (f Word32 RewardAccount) Source #

upgradePlutusPurposeAsIxAlonzoEraScript (PreviousEra era) ⇒ PlutusPurpose AsIx (PreviousEra era) → PlutusPurpose AsIx era Source #

Instances

Instances details
AlonzoEraScript AlonzoEra Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Associated Types

data PlutusScript AlonzoEra Source #

type PlutusPurpose f AlonzoEra = (r ∷ Type) Source #

newtype AsIx ix it Source #

Constructors

AsIx 

Fields

Instances

Instances details
ToJSON ix ⇒ ToJSON (AsIx ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

toJSONAsIx ix it → Value Source #

toEncodingAsIx ix it → Encoding Source #

toJSONList ∷ [AsIx ix it] → Value Source #

toEncodingList ∷ [AsIx ix it] → Encoding Source #

omitFieldAsIx ix it → Bool Source #

Generic ix ⇒ Generic (AsIx ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Associated Types

type Rep (AsIx ix it) ∷ TypeType Source #

Methods

fromAsIx ix it → Rep (AsIx ix it) x Source #

toRep (AsIx ix it) x → AsIx ix it Source #

Show (AlonzoPlutusPurpose AsIx era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Show ix ⇒ Show (AsIx ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

showsPrecIntAsIx ix it → ShowS Source #

showAsIx ix it → String Source #

showList ∷ [AsIx ix it] → ShowS Source #

Era era ⇒ DecCBOR (AlonzoPlutusPurpose AsIx era) Source #

Incorrect CBOR implementation. Missing length encoding. Must keep it for backwards compatibility

Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

(Typeable it, DecCBOR ix) ⇒ DecCBOR (AsIx ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

decCBORDecoder s (AsIx ix it) Source #

dropCBORProxy (AsIx ix it) → Decoder s () Source #

labelProxy (AsIx ix it) → Text Source #

Era era ⇒ EncCBOR (AlonzoPlutusPurpose AsIx era) Source #

Incorrect CBOR implementation. Missing length encoding. Must keep it for backwards compatibility

Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

(Typeable it, EncCBOR ix) ⇒ EncCBOR (AsIx ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

encCBORAsIx ix it → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (AsIx ix it) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [AsIx ix it] → Size Source #

Era era ⇒ DecCBORGroup (AlonzoPlutusPurpose AsIx era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Era era ⇒ EncCBORGroup (AlonzoPlutusPurpose AsIx era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

NFData ix ⇒ NFData (AsIx ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

rnfAsIx ix it → () Source #

Eq (AlonzoPlutusPurpose AsIx era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Eq ix ⇒ Eq (AsIx ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

(==)AsIx ix it → AsIx ix it → Bool Source #

(/=)AsIx ix it → AsIx ix it → Bool Source #

Ord (AlonzoPlutusPurpose AsIx era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Ord ix ⇒ Ord (AsIx ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

compareAsIx ix it → AsIx ix it → Ordering Source #

(<)AsIx ix it → AsIx ix it → Bool Source #

(<=)AsIx ix it → AsIx ix it → Bool Source #

(>)AsIx ix it → AsIx ix it → Bool Source #

(>=)AsIx ix it → AsIx ix it → Bool Source #

maxAsIx ix it → AsIx ix it → AsIx ix it Source #

minAsIx ix it → AsIx ix it → AsIx ix it Source #

NoThunks (AlonzoPlutusPurpose AsIx era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

NoThunks ix ⇒ NoThunks (AsIx ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

noThunksContextAsIx ix it → IO (Maybe ThunkInfo) Source #

wNoThunksContextAsIx ix it → IO (Maybe ThunkInfo) Source #

showTypeOfProxy (AsIx ix it) → String Source #

type Rep (AsIx ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

type Rep (AsIx ix it) = Rep ix

newtype AsItem ix it Source #

Constructors

AsItem 

Fields

Instances

Instances details
ToJSON it ⇒ ToJSON (AsItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

toJSONAsItem ix it → Value Source #

toEncodingAsItem ix it → Encoding Source #

toJSONList ∷ [AsItem ix it] → Value Source #

toEncodingList ∷ [AsItem ix it] → Encoding Source #

omitFieldAsItem ix it → Bool Source #

Generic it ⇒ Generic (AsItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Associated Types

type Rep (AsItem ix it) ∷ TypeType Source #

Methods

fromAsItem ix it → Rep (AsItem ix it) x Source #

toRep (AsItem ix it) x → AsItem ix it Source #

Show (TxCert era) ⇒ Show (AlonzoPlutusPurpose AsItem era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Show it ⇒ Show (AsItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

showsPrecIntAsItem ix it → ShowS Source #

showAsItem ix it → String Source #

showList ∷ [AsItem ix it] → ShowS Source #

(Era era, DecCBOR (TxCert era)) ⇒ DecCBOR (AlonzoPlutusPurpose AsItem era) Source #

See note on the EncCBOR instace.

Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

(Typeable ix, DecCBOR it) ⇒ DecCBOR (AsItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

decCBORDecoder s (AsItem ix it) Source #

dropCBORProxy (AsItem ix it) → Decoder s () Source #

labelProxy (AsItem ix it) → Text Source #

(Era era, EncCBOR (TxCert era)) ⇒ EncCBOR (AlonzoPlutusPurpose AsItem era) Source #

Note - serialization of AlonzoPlutusPurpose AsItem

Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

(Typeable ix, EncCBOR it) ⇒ EncCBOR (AsItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

encCBORAsItem ix it → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (AsItem ix it) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [AsItem ix it] → Size Source #

NFData it ⇒ NFData (AsItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

rnfAsItem ix it → () Source #

Eq (TxCert era) ⇒ Eq (AlonzoPlutusPurpose AsItem era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Eq it ⇒ Eq (AsItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

(==)AsItem ix it → AsItem ix it → Bool Source #

(/=)AsItem ix it → AsItem ix it → Bool Source #

Ord it ⇒ Ord (AsItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

compareAsItem ix it → AsItem ix it → Ordering Source #

(<)AsItem ix it → AsItem ix it → Bool Source #

(<=)AsItem ix it → AsItem ix it → Bool Source #

(>)AsItem ix it → AsItem ix it → Bool Source #

(>=)AsItem ix it → AsItem ix it → Bool Source #

maxAsItem ix it → AsItem ix it → AsItem ix it Source #

minAsItem ix it → AsItem ix it → AsItem ix it Source #

NoThunks (TxCert era) ⇒ NoThunks (AlonzoPlutusPurpose AsItem era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

NoThunks it ⇒ NoThunks (AsItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

noThunksContextAsItem ix it → IO (Maybe ThunkInfo) Source #

wNoThunksContextAsItem ix it → IO (Maybe ThunkInfo) Source #

showTypeOfProxy (AsItem ix it) → String Source #

type Rep (AsItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

type Rep (AsItem ix it) = Rep it

data AsIxItem ix it Source #

Constructors

AsIxItem 

Fields

Instances

Instances details
(ToJSON ix, ToJSON it) ⇒ ToJSON (AsIxItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Generic (AsIxItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Associated Types

type Rep (AsIxItem ix it) ∷ TypeType Source #

Methods

fromAsIxItem ix it → Rep (AsIxItem ix it) x Source #

toRep (AsIxItem ix it) x → AsIxItem ix it Source #

Show (TxCert era) ⇒ Show (AlonzoPlutusPurpose AsIxItem era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

(Show ix, Show it) ⇒ Show (AsIxItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

showsPrecIntAsIxItem ix it → ShowS Source #

showAsIxItem ix it → String Source #

showList ∷ [AsIxItem ix it] → ShowS Source #

(NFData ix, NFData it) ⇒ NFData (AsIxItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

rnfAsIxItem ix it → () Source #

Eq (TxCert era) ⇒ Eq (AlonzoPlutusPurpose AsIxItem era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

(Eq ix, Eq it) ⇒ Eq (AsIxItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

(==)AsIxItem ix it → AsIxItem ix it → Bool Source #

(/=)AsIxItem ix it → AsIxItem ix it → Bool Source #

(Ord ix, Ord it) ⇒ Ord (AsIxItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Methods

compareAsIxItem ix it → AsIxItem ix it → Ordering Source #

(<)AsIxItem ix it → AsIxItem ix it → Bool Source #

(<=)AsIxItem ix it → AsIxItem ix it → Bool Source #

(>)AsIxItem ix it → AsIxItem ix it → Bool Source #

(>=)AsIxItem ix it → AsIxItem ix it → Bool Source #

maxAsIxItem ix it → AsIxItem ix it → AsIxItem ix it Source #

minAsIxItem ix it → AsIxItem ix it → AsIxItem ix it Source #

NoThunks (TxCert era) ⇒ NoThunks (AlonzoPlutusPurpose AsIxItem era) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

(NoThunks ix, NoThunks it) ⇒ NoThunks (AsIxItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

type Rep (AsIxItem ix it) Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

type Rep (AsIxItem ix it) = D1 ('MetaData "AsIxItem" "Cardano.Ledger.Alonzo.Scripts" "cardano-ledger-alonzo-1.13.0.0-inplace" 'False) (C1 ('MetaCons "AsIxItem" 'PrefixI 'True) (S1 ('MetaSel ('Just "asIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ix) :*: S1 ('MetaSel ('Just "asItem") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 it)))

pattern CertifyingPurposeAlonzoEraScript era ⇒ f Word32 (TxCert era) → PlutusPurpose f era Source #

class (MaryEraTxBody era, AlonzoEraTxOut era) ⇒ AlonzoEraTxBody era where Source #

Methods

collateralInputsTxBodyLLens' (TxBody era) (Set TxIn) Source #

reqSignerHashesTxBodyLLens' (TxBody era) (Set (KeyHash 'Witness)) Source #

scriptIntegrityHashTxBodyLLens' (TxBody era) (StrictMaybe ScriptIntegrityHash) Source #

networkIdTxBodyLLens' (TxBody era) (StrictMaybe Network) Source #

redeemerPointerTxBody 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

redeemerPointerInverseTxBody 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.

newtype CoinPerWord Source #

Constructors

CoinPerWord 

Fields

Instances

Instances details
FromJSON CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

ToJSON CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Show CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

DecCBOR CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

EncCBOR CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Methods

encCBORCoinPerWordEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy CoinPerWordSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [CoinPerWord] → Size Source #

NFData CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Methods

rnfCoinPerWord → () Source #

Eq CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Ord CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

NoThunks CoinPerWord Source # 
Instance details

Defined in Cardano.Ledger.Alonzo.PParams