cardano-ledger-test-9.9.9.9: Testing harness, tests and benchmarks for Shelley style cardano ledgers
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.EraClass

Description

Everything you need to build Era polymorphic transactions, all in one place

Synopsis

Documentation

class (Crypto (EraCrypto era), Typeable era, KnownNat (ProtVerLow era), KnownNat (ProtVerHigh era), ProtVerLow era <= ProtVerHigh era, MinVersion <= ProtVerLow era, MinVersion <= ProtVerHigh era, CmpNat (ProtVerLow era) MaxVersion ~ 'LT, CmpNat (ProtVerHigh era) MaxVersion ~ 'LT, ProtVerLow era <= MaxVersion, ProtVerHigh era <= MaxVersion) ⇒ Era era Source #

Minimal complete definition

eraName

Associated Types

type EraCrypto era Source #

Instances

Instances details
Crypto c ⇒ Era (AllegraEra c) 
Instance details

Defined in Cardano.Ledger.Allegra.Era

Associated Types

type EraCrypto (AllegraEra c) Source #

type PreviousEra (AllegraEra c) = (r ∷ Type) Source #

type ProtVerLow (AllegraEra c) ∷ Nat Source #

type ProtVerHigh (AllegraEra c) ∷ Nat Source #

Methods

eraNameString Source #

Crypto c ⇒ Era (AlonzoEra c) 
Instance details

Defined in Cardano.Ledger.Alonzo.Era

Associated Types

type EraCrypto (AlonzoEra c) Source #

type PreviousEra (AlonzoEra c) = (r ∷ Type) Source #

type ProtVerLow (AlonzoEra c) ∷ Nat Source #

type ProtVerHigh (AlonzoEra c) ∷ Nat Source #

Methods

eraNameString Source #

Crypto c ⇒ Era (BabbageEra c) 
Instance details

Defined in Cardano.Ledger.Babbage.Era

Associated Types

type EraCrypto (BabbageEra c) Source #

type PreviousEra (BabbageEra c) = (r ∷ Type) Source #

type ProtVerLow (BabbageEra c) ∷ Nat Source #

type ProtVerHigh (BabbageEra c) ∷ Nat Source #

Methods

eraNameString Source #

Crypto c ⇒ Era (ConwayEra c) 
Instance details

Defined in Cardano.Ledger.Conway.Era

Associated Types

type EraCrypto (ConwayEra c) Source #

type PreviousEra (ConwayEra c) = (r ∷ Type) Source #

type ProtVerLow (ConwayEra c) ∷ Nat Source #

type ProtVerHigh (ConwayEra c) ∷ Nat Source #

Methods

eraNameString Source #

Crypto c ⇒ Era (ByronEra c) 
Instance details

Defined in Cardano.Ledger.Core.Era

Associated Types

type EraCrypto (ByronEra c) Source #

type PreviousEra (ByronEra c) = (r ∷ Type) Source #

type ProtVerLow (ByronEra c) ∷ Nat Source #

type ProtVerHigh (ByronEra c) ∷ Nat Source #

Methods

eraNameString Source #

Crypto c ⇒ Era (MaryEra c) 
Instance details

Defined in Cardano.Ledger.Mary.Era

Associated Types

type EraCrypto (MaryEra c) Source #

type PreviousEra (MaryEra c) = (r ∷ Type) Source #

type ProtVerLow (MaryEra c) ∷ Nat Source #

type ProtVerHigh (MaryEra c) ∷ Nat Source #

Methods

eraNameString Source #

Crypto c ⇒ Era (ShelleyEra c) 
Instance details

Defined in Cardano.Ledger.Shelley.Era

Associated Types

type EraCrypto (ShelleyEra c) Source #

type PreviousEra (ShelleyEra c) = (r ∷ Type) Source #

type ProtVerLow (ShelleyEra c) ∷ Nat Source #

type ProtVerHigh (ShelleyEra c) ∷ Nat Source #

Methods

eraNameString Source #

class (EraTxBody era, EraTxWits era, EraTxAuxData era, EraPParams era, NoThunks (Tx era), DecCBOR (Annotator (Tx era)), EncCBOR (Tx era), ToCBOR (Tx era), Show (Tx era), Eq (Tx era), EqRaw (Tx era)) ⇒ EraTx era where Source #

A transaction.

Associated Types

type Tx era = (r ∷ Type) | r → era Source #

Methods

mkBasicTxTxBody era → Tx era Source #

bodyTxLLens' (Tx era) (TxBody era) Source #

witsTxLLens' (Tx era) (TxWits era) Source #

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

Methods

isValidTxLLens' (Tx era) IsValid Source #

Instances

Instances details
Crypto c ⇒ AlonzoEraTx (AlonzoEra c) 
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

class EraTxBody era ⇒ AllegraEraTxBody era where Source #

Instances

Instances details
Crypto c ⇒ AllegraEraTxBody (AllegraEra c) 
Instance details

Defined in Cardano.Ledger.Allegra.TxBody.Internal

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

Methods

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

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

scriptIntegrityHashTxBodyLLens' (TxBody era) (StrictMaybe (ScriptIntegrityHash (EraCrypto era))) 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.

class (BabbageEraTxBody era, ConwayEraTxCert era, ConwayEraPParams era, ConwayEraScript era) ⇒ ConwayEraTxBody era where Source #

Methods

currentTreasuryValueTxBodyLLens' (TxBody era) (StrictMaybe Coin) Source #

Lens for getting and setting number of Coin that is expected to be in the Treasury at the current Epoch

votingProceduresTxBodyLLens' (TxBody era) (VotingProcedures era) Source #

Lens for getting and setting VotingProcedures.

proposalProceduresTxBodyLLens' (TxBody era) (OSet (ProposalProcedure era)) Source #

Lens for getting and setting ProposalProcedures.

treasuryDonationTxBodyLLens' (TxBody era) Coin Source #

class (Val (Value era), ToJSON (TxOut era), DecCBOR (Value era), DecCBOR (CompactForm (Value era)), EncCBOR (Value era), ToCBOR (TxOut era), EncCBOR (TxOut era), DecCBOR (TxOut era), DecShareCBOR (TxOut era), Share (TxOut era) ~ Interns (Credential 'Staking (EraCrypto era)), NoThunks (TxOut era), NFData (TxOut era), Show (TxOut era), Eq (TxOut era), EraPParams era) ⇒ EraTxOut era where Source #

Abstract interface into specific fields of a TxOut

Associated Types

type TxOut era = (r ∷ Type) | r → era Source #

The output of a UTxO for a particular era

Methods

mkBasicTxOutAddr (EraCrypto era) → Value era → TxOut era Source #

valueTxOutLLens' (TxOut era) (Value era) Source #

compactValueTxOutLLens' (TxOut era) (CompactForm (Value era)) Source #

valueEitherTxOutLLens' (TxOut era) (Either (Value era) (CompactForm (Value era))) Source #

Lens for getting and setting in TxOut either an address or its compact version by doing the least amount of work.

addrTxOutLLens' (TxOut era) (Addr (EraCrypto era)) Source #

compactAddrTxOutLLens' (TxOut era) (CompactAddr (EraCrypto era)) Source #

addrEitherTxOutLLens' (TxOut era) (Either (Addr (EraCrypto era)) (CompactAddr (EraCrypto era))) Source #

Lens for getting and setting in TxOut either an address or its compact version by doing the least amount of work.

The utility of this function comes from the fact that TxOut usually stores the address in either one of two forms: compacted or unpacked. In order to avoid extroneous conversions in getTxOutAddr and getTxOutCompactAddr we can define just this functionality. Also sometimes it is crucial to know at the callsite which form of address we have readily available without any conversions (eg. searching millions of TxOuts for a particular address)

class (EraScript era, Eq (TxWits era), EqRaw (TxWits era), Show (TxWits era), Monoid (TxWits era), NoThunks (TxWits era), ToCBOR (TxWits era), EncCBOR (TxWits era), DecCBOR (Annotator (TxWits era))) ⇒ EraTxWits era where Source #

A collection of witnesses in a Tx

Associated Types

type TxWits era = (r ∷ Type) | r → era Source #

class (EraTxWits era, AlonzoEraScript era) ⇒ AlonzoEraTxWits era where Source #

Instances

Instances details
(EraScript (AlonzoEra c), Crypto c) ⇒ AlonzoEraTxWits (AlonzoEra c) 
Instance details

Defined in Cardano.Ledger.Alonzo.TxWits

class (Era era, Eq (TxAuxData era), EqRaw (TxAuxData era), Show (TxAuxData era), NoThunks (TxAuxData era), ToCBOR (TxAuxData era), EncCBOR (TxAuxData era), DecCBOR (Annotator (TxAuxData era)), HashAnnotated (TxAuxData era) EraIndependentTxAuxData (EraCrypto era)) ⇒ EraTxAuxData era where Source #

TxAuxData which may be attached to a transaction

Associated Types

type TxAuxData era = (r ∷ Type) | r → era Source #

class (Era era, ToJSON (TxCert era), DecCBOR (TxCert era), EncCBOR (TxCert era), ToCBOR (TxCert era), FromCBOR (TxCert era), NoThunks (TxCert era), NFData (TxCert era), Show (TxCert era), Ord (TxCert era), Eq (TxCert era)) ⇒ EraTxCert era where Source #

Associated Types

type TxCert era = (r ∷ Type) | r → era Source #

Methods

getVKeyWitnessTxCertTxCert era → Maybe (KeyHash 'Witness (EraCrypto era)) Source #

Return a witness key whenever a certificate requires one

getScriptWitnessTxCertTxCert era → Maybe (ScriptHash (EraCrypto era)) Source #

Return a ScriptHash for certificate types that require a witness

mkRegPoolTxCertPoolParams (EraCrypto era) → TxCert era Source #

getRegPoolTxCertTxCert era → Maybe (PoolParams (EraCrypto era)) Source #

mkRetirePoolTxCertKeyHash 'StakePool (EraCrypto era) → EpochNoTxCert era Source #

getRetirePoolTxCertTxCert era → Maybe (KeyHash 'StakePool (EraCrypto era), EpochNo) Source #

lookupRegStakeTxCertTxCert era → Maybe (Credential 'Staking (EraCrypto era)) Source #

Extract staking credential from any certificate that can register such credential

lookupUnRegStakeTxCertTxCert era → Maybe (Credential 'Staking (EraCrypto era)) Source #

Extract staking credential from any certificate that can unregister such credential

getTotalDepositsTxCerts Source #

Arguments

Foldable f 
PParams era 
→ (KeyHash 'StakePool (EraCrypto era) → Bool)

Check whether stake pool is registered or not

→ f (TxCert era) 
Coin 

Compute the total deposits from a list of certificates.

getTotalRefundsTxCerts Source #

Arguments

Foldable f 
PParams era 
→ (Credential 'Staking (EraCrypto era) → Maybe Coin)

Lookup current deposit for Staking credential if one is registered

→ (Credential 'DRepRole (EraCrypto era) → Maybe Coin)

Lookup current deposit for DRep credential if one is registered

→ f (TxCert era) 
Coin 

Compute the total refunds from a list of certificates.

class ShelleyEraTxCert era ⇒ ConwayEraTxCert era where Source #

Methods

mkRegDepositTxCertStakeCredential (EraCrypto era) → CoinTxCert era Source #

getRegDepositTxCertTxCert era → Maybe (StakeCredential (EraCrypto era), Coin) Source #

mkUnRegDepositTxCertStakeCredential (EraCrypto era) → CoinTxCert era Source #

getUnRegDepositTxCertTxCert era → Maybe (StakeCredential (EraCrypto era), Coin) Source #

mkDelegTxCertStakeCredential (EraCrypto era) → Delegatee (EraCrypto era) → TxCert era Source #

getDelegTxCertTxCert era → Maybe (StakeCredential (EraCrypto era), Delegatee (EraCrypto era)) Source #

mkRegDepositDelegTxCertStakeCredential (EraCrypto era) → Delegatee (EraCrypto era) → CoinTxCert era Source #

getRegDepositDelegTxCertTxCert era → Maybe (StakeCredential (EraCrypto era), Delegatee (EraCrypto era), Coin) Source #

mkAuthCommitteeHotKeyTxCertCredential 'ColdCommitteeRole (EraCrypto era) → Credential 'HotCommitteeRole (EraCrypto era) → TxCert era Source #

getAuthCommitteeHotKeyTxCertTxCert era → Maybe (Credential 'ColdCommitteeRole (EraCrypto era), Credential 'HotCommitteeRole (EraCrypto era)) Source #

mkResignCommitteeColdTxCertCredential 'ColdCommitteeRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → TxCert era Source #

getResignCommitteeColdTxCertTxCert era → Maybe (Credential 'ColdCommitteeRole (EraCrypto era), StrictMaybe (Anchor (EraCrypto era))) Source #

mkRegDRepTxCertCredential 'DRepRole (EraCrypto era) → CoinStrictMaybe (Anchor (EraCrypto era)) → TxCert era Source #

getRegDRepTxCertTxCert era → Maybe (Credential 'DRepRole (EraCrypto era), Coin, StrictMaybe (Anchor (EraCrypto era))) Source #

mkUnRegDRepTxCertCredential 'DRepRole (EraCrypto era) → CoinTxCert era Source #

getUnRegDRepTxCertTxCert era → Maybe (Credential 'DRepRole (EraCrypto era), Coin) Source #

mkUpdateDRepTxCertCredential 'DRepRole (EraCrypto era) → StrictMaybe (Anchor (EraCrypto era)) → TxCert era Source #

getUpdateDRepTxCertTxCert era → Maybe (Credential 'DRepRole (EraCrypto era), StrictMaybe (Anchor (EraCrypto era))) Source #

Instances

Instances details
Crypto c ⇒ ConwayEraTxCert (ConwayEra c) 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

mkRegDepositTxCertStakeCredential (EraCrypto (ConwayEra c)) → CoinTxCert (ConwayEra c) Source #

getRegDepositTxCertTxCert (ConwayEra c) → Maybe (StakeCredential (EraCrypto (ConwayEra c)), Coin) Source #

mkUnRegDepositTxCertStakeCredential (EraCrypto (ConwayEra c)) → CoinTxCert (ConwayEra c) Source #

getUnRegDepositTxCertTxCert (ConwayEra c) → Maybe (StakeCredential (EraCrypto (ConwayEra c)), Coin) Source #

mkDelegTxCertStakeCredential (EraCrypto (ConwayEra c)) → Delegatee (EraCrypto (ConwayEra c)) → TxCert (ConwayEra c) Source #

getDelegTxCertTxCert (ConwayEra c) → Maybe (StakeCredential (EraCrypto (ConwayEra c)), Delegatee (EraCrypto (ConwayEra c))) Source #

mkRegDepositDelegTxCertStakeCredential (EraCrypto (ConwayEra c)) → Delegatee (EraCrypto (ConwayEra c)) → CoinTxCert (ConwayEra c) Source #

getRegDepositDelegTxCertTxCert (ConwayEra c) → Maybe (StakeCredential (EraCrypto (ConwayEra c)), Delegatee (EraCrypto (ConwayEra c)), Coin) Source #

mkAuthCommitteeHotKeyTxCertCredential 'ColdCommitteeRole (EraCrypto (ConwayEra c)) → Credential 'HotCommitteeRole (EraCrypto (ConwayEra c)) → TxCert (ConwayEra c) Source #

getAuthCommitteeHotKeyTxCertTxCert (ConwayEra c) → Maybe (Credential 'ColdCommitteeRole (EraCrypto (ConwayEra c)), Credential 'HotCommitteeRole (EraCrypto (ConwayEra c))) Source #

mkResignCommitteeColdTxCertCredential 'ColdCommitteeRole (EraCrypto (ConwayEra c)) → StrictMaybe (Anchor (EraCrypto (ConwayEra c))) → TxCert (ConwayEra c) Source #

getResignCommitteeColdTxCertTxCert (ConwayEra c) → Maybe (Credential 'ColdCommitteeRole (EraCrypto (ConwayEra c)), StrictMaybe (Anchor (EraCrypto (ConwayEra c)))) Source #

mkRegDRepTxCertCredential 'DRepRole (EraCrypto (ConwayEra c)) → CoinStrictMaybe (Anchor (EraCrypto (ConwayEra c))) → TxCert (ConwayEra c) Source #

getRegDRepTxCertTxCert (ConwayEra c) → Maybe (Credential 'DRepRole (EraCrypto (ConwayEra c)), Coin, StrictMaybe (Anchor (EraCrypto (ConwayEra c)))) Source #

mkUnRegDRepTxCertCredential 'DRepRole (EraCrypto (ConwayEra c)) → CoinTxCert (ConwayEra c) Source #

getUnRegDRepTxCertTxCert (ConwayEra c) → Maybe (Credential 'DRepRole (EraCrypto (ConwayEra c)), Coin) Source #

mkUpdateDRepTxCertCredential 'DRepRole (EraCrypto (ConwayEra c)) → StrictMaybe (Anchor (EraCrypto (ConwayEra c))) → TxCert (ConwayEra c) Source #

getUpdateDRepTxCertTxCert (ConwayEra c) → Maybe (Credential 'DRepRole (EraCrypto (ConwayEra c)), StrictMaybe (Anchor (EraCrypto (ConwayEra c)))) Source #

data PParams era Source #

Protocol parameters

Instances

Instances details
(BaseUniverse fn, EraSpecPParams era, HasSpec fn Coin) ⇒ HasSpec fn (PParams era) Source #

HasSpec instance for PParams

Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

Associated Types

type TypeSpec fn (PParams era) Source #

type Prerequisites fn (PParams era) Source #

FromJSON (PParamsHKD Identity era) ⇒ FromJSON (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

ToJSON (PParamsHKD Identity era) ⇒ ToJSON (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Generic (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Associated Types

type Rep (PParams era) ∷ TypeType Source #

Methods

fromPParams era → Rep (PParams era) x Source #

toRep (PParams era) x → PParams era Source #

Show (PParamsHKD Identity era) ⇒ Show (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

showsPrecIntPParams era → ShowS Source #

showPParams era → String Source #

showList ∷ [PParams era] → ShowS Source #

(Typeable era, FromCBOR (PParamsHKD Identity era)) ⇒ FromCBOR (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

fromCBORDecoder s (PParams era) Source #

labelProxy (PParams era) → Text Source #

(Typeable era, ToCBOR (PParamsHKD Identity era)) ⇒ ToCBOR (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

toCBORPParams era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (PParams era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PParams era] → Size Source #

(Typeable era, DecCBOR (PParamsHKD Identity era)) ⇒ DecCBOR (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

decCBORDecoder s (PParams era) Source #

dropCBORProxy (PParams era) → Decoder s () Source #

labelProxy (PParams era) → Text Source #

(Typeable era, EncCBOR (PParamsHKD Identity era)) ⇒ EncCBOR (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

encCBORPParams era → Encoding Source #

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

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

Reflect era ⇒ PrettyA (PParams era) Source #

Unike other type families, PParams CAN have a PrettyA instance, as they are a newtype wrapped around a type family.

Instance details

Defined in Test.Cardano.Ledger.Generic.PrettyCore

Methods

prettyAPParams era → PDoc Source #

EraSpecPParams era ⇒ HasSimpleRep (PParams era) Source #

SimpleRep instance for PParams

Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

Associated Types

type SimpleRep (PParams era) Source #

type TheSop (PParams era) ∷ [Type] Source #

EraPParams era ⇒ Default (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

defPParams era Source #

NFData (PParamsHKD Identity era) ⇒ NFData (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

rnfPParams era → () Source #

Eq (PParamsHKD Identity era) ⇒ Eq (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

(==)PParams era → PParams era → Bool Source #

(/=)PParams era → PParams era → Bool Source #

Ord (PParamsHKD Identity era) ⇒ Ord (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

comparePParams era → PParams era → Ordering Source #

(<)PParams era → PParams era → Bool Source #

(<=)PParams era → PParams era → Bool Source #

(>)PParams era → PParams era → Bool Source #

(>=)PParams era → PParams era → Bool Source #

maxPParams era → PParams era → PParams era Source #

minPParams era → PParams era → PParams era Source #

NoThunks (PParamsHKD Identity era) ⇒ NoThunks (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

EraSpecPParams era ⇒ WellFormed (PParams era) era Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.LedgerTypes.WellFormed

Methods

wffWithPPPParams era → Gen (PParams era) Source #

wffGen (PParams era) Source #

type Prerequisites fn (PParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type Prerequisites fn (PParams era) = ()
type TypeSpec fn (PParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type TypeSpec fn (PParams era) = TypeSpec fn (SimpleRep (PParams era))
type Rep (PParams era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

type Rep (PParams era) = D1 ('MetaData "PParams" "Cardano.Ledger.Core.PParams" "cardano-ledger-core-1.16.0.0-inplace" 'True) (C1 ('MetaCons "PParams" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PParamsHKD Identity era))))
type SimpleRep (PParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type TheSop (PParams era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type TheSop (PParams era) = SOPOf (Rep (PParams era))
type TranslationError (AllegraEra c) PParams 
Instance details

Defined in Cardano.Ledger.Allegra.Translation

type TranslationError (AlonzoEra c) PParams 
Instance details

Defined in Cardano.Ledger.Alonzo.Translation

type TranslationError (BabbageEra c) PParams 
Instance details

Defined in Cardano.Ledger.Babbage.Translation

type TranslationError (ConwayEra c) PParams 
Instance details

Defined in Cardano.Ledger.Conway.Translation

type TranslationError (MaryEra c) PParams 
Instance details

Defined in Cardano.Ledger.Mary.Translation

ppMinFeeALEraPParams era ⇒ Lens' (PParams era) Coin Source #

The linear factor for the minimum fee calculation

ppMinFeeBLEraPParams era ⇒ Lens' (PParams era) Coin Source #

The constant factor for the minimum fee calculation

ppMaxBBSizeLEraPParams era ⇒ Lens' (PParams era) Word32 Source #

Maximal block body size

ppMaxTxSizeLEraPParams era ⇒ Lens' (PParams era) Word32 Source #

Maximal transaction size

ppMaxBHSizeLEraPParams era ⇒ Lens' (PParams era) Word16 Source #

Maximal block header size

ppKeyDepositLEraPParams era ⇒ Lens' (PParams era) Coin Source #

The amount of a key registration deposit

ppPoolDepositLEraPParams era ⇒ Lens' (PParams era) Coin Source #

The amount of a pool registration deposit

ppEMaxLEraPParams era ⇒ Lens' (PParams era) EpochInterval Source #

epoch bound on pool retirement

ppNOptLEraPParams era ⇒ Lens' (PParams era) Word16 Source #

Desired number of pools

ppA0LEraPParams era ⇒ Lens' (PParams era) NonNegativeInterval Source #

Pool influence

ppRhoLEraPParams era ⇒ Lens' (PParams era) UnitInterval Source #

Monetary expansion

ppTauLEraPParams era ⇒ Lens' (PParams era) UnitInterval Source #

Treasury expansion

ppDL ∷ (EraPParams era, ProtVerAtMost era 6) ⇒ Lens' (PParams era) UnitInterval Source #

Decentralization parameter

data PParamsUpdate era Source #

The type of updates to Protocol parameters

Instances

Instances details
(BaseUniverse fn, EraSpecPParams era) ⇒ HasSpec fn (PParamsUpdate era) Source #

HasSpec instance for PParams

Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

Associated Types

type TypeSpec fn (PParamsUpdate era) Source #

type Prerequisites fn (PParamsUpdate era) Source #

FromJSON (PParamsHKD StrictMaybe era) ⇒ FromJSON (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

ToJSON (PParamsHKD StrictMaybe era) ⇒ ToJSON (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Generic (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Associated Types

type Rep (PParamsUpdate era) ∷ TypeType Source #

Methods

fromPParamsUpdate era → Rep (PParamsUpdate era) x Source #

toRep (PParamsUpdate era) x → PParamsUpdate era Source #

Show (PParamsHKD StrictMaybe era) ⇒ Show (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

(Typeable era, FromCBOR (PParamsHKD StrictMaybe era)) ⇒ FromCBOR (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

(Typeable era, ToCBOR (PParamsHKD StrictMaybe era)) ⇒ ToCBOR (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

toCBORPParamsUpdate era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (PParamsUpdate era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PParamsUpdate era] → Size Source #

(Typeable era, DecCBOR (PParamsHKD StrictMaybe era)) ⇒ DecCBOR (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

(Typeable era, EncCBOR (PParamsHKD StrictMaybe era)) ⇒ EncCBOR (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

encCBORPParamsUpdate era → Encoding Source #

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

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

Terse (PParamsUpdate (AllegraEra c)) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Same

Terse (PParamsUpdate (AlonzoEra c)) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Same

Terse (PParamsUpdate (BabbageEra c)) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Same

Terse (PParamsUpdate (ConwayEra c)) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Same

Terse (PParamsUpdate (MaryEra c)) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Same

Terse (PParamsUpdate (ShelleyEra c)) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.Same

Reflect era ⇒ PrettyA (PParamsUpdate era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Generic.PrettyCore

Methods

prettyAPParamsUpdate era → PDoc Source #

EraSpecPParams era ⇒ HasSimpleRep (PParamsUpdate era) Source #

SimpleRep instance for PParamsUpdate

Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

Associated Types

type SimpleRep (PParamsUpdate era) Source #

type TheSop (PParamsUpdate era) ∷ [Type] Source #

EraPParams era ⇒ Default (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

defPParamsUpdate era Source #

NFData (PParamsHKD StrictMaybe era) ⇒ NFData (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

rnfPParamsUpdate era → () Source #

Eq (PParamsHKD StrictMaybe era) ⇒ Eq (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

Methods

(==)PParamsUpdate era → PParamsUpdate era → Bool Source #

(/=)PParamsUpdate era → PParamsUpdate era → Bool Source #

Ord (PParamsHKD StrictMaybe era) ⇒ Ord (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

NoThunks (PParamsHKD StrictMaybe era) ⇒ NoThunks (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

type Prerequisites fn (PParamsUpdate era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type Prerequisites fn (PParamsUpdate era) = ()
type TypeSpec fn (PParamsUpdate era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type Rep (PParamsUpdate era) 
Instance details

Defined in Cardano.Ledger.Core.PParams

type Rep (PParamsUpdate era) = D1 ('MetaData "PParamsUpdate" "Cardano.Ledger.Core.PParams" "cardano-ledger-core-1.16.0.0-inplace" 'True) (C1 ('MetaCons "PParamsUpdate" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PParamsHKD StrictMaybe era))))
type SimpleRep (PParamsUpdate era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type TheSop (PParamsUpdate era) Source # 
Instance details

Defined in Test.Cardano.Ledger.Constrained.Conway.Instances.Basic

type TranslationError (AllegraEra c) PParamsUpdate 
Instance details

Defined in Cardano.Ledger.Allegra.Translation

type TranslationError (MaryEra c) PParamsUpdate 
Instance details

Defined in Cardano.Ledger.Mary.Translation

ppuMinFeeALEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Coin) Source #

The linear factor for the minimum fee calculation

ppuMinFeeBLEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Coin) Source #

The constant factor for the minimum fee calculation

ppuMaxBBSizeLEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Word32) Source #

Maximal block body size

ppuMaxTxSizeLEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Word32) Source #

Maximal transaction size

ppuMaxBHSizeLEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Word16) Source #

Maximal block header size

ppuKeyDepositLEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Coin) Source #

The amount of a key registration deposit

ppuPoolDepositLEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Coin) Source #

The amount of a pool registration deposit

ppuEMaxLEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe EpochInterval) Source #

epoch bound on pool retirement

ppuNOptLEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe Word16) Source #

Desired number of pools

ppuRhoLEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe UnitInterval) Source #

Monetary expansion

ppuTauLEraPParams era ⇒ Lens' (PParamsUpdate era) (StrictMaybe UnitInterval) Source #

Treasury expansion

ppuDL ∷ (EraPParams era, ProtVerAtMost era 6) ⇒ Lens' (PParamsUpdate era) (StrictMaybe UnitInterval) Source #

Decentralization parameter

class AlonzoEraPParams era ⇒ BabbageEraPParams era where Source #

Methods

hkdCoinsPerUTxOByteL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f era) (HKD f CoinPerByte) Source #

Instances

Instances details
Crypto c ⇒ BabbageEraPParams (BabbageEra c) 
Instance details

Defined in Cardano.Ledger.Babbage.PParams

Methods

hkdCoinsPerUTxOByteL ∷ ∀ (f ∷ TypeType). HKDFunctor f ⇒ Lens' (PParamsHKD f (BabbageEra c)) (HKD f CoinPerByte) Source #

class BabbageEraPParams era ⇒ ConwayEraPParams era Source #

Instances

Instances details
Crypto c ⇒ ConwayEraPParams (ConwayEra c) 
Instance details

Defined in Cardano.Ledger.Conway.PParams

class (Era era, Show (Script era), Eq (Script era), EqRaw (Script era), ToCBOR (Script era), EncCBOR (Script era), DecCBOR (Annotator (Script era)), NoThunks (Script era), SafeToHash (Script era), Eq (NativeScript era), Show (NativeScript era), NFData (NativeScript era), NoThunks (NativeScript era), EncCBOR (NativeScript era), DecCBOR (Annotator (NativeScript era))) ⇒ EraScript era where Source #

Typeclass for script data types. Allows for script validation and hashing. You must understand the role of SafeToHash and scriptPrefixTag to make new instances. scriptPrefixTag is a magic number representing the tag of the script language. For each new script language defined, a new tag is chosen and the tag is included in the script hash for a script. The safeToHash constraint ensures that Scripts are never reserialised.

Associated Types

type Script era = (r ∷ Type) | r → era Source #

Scripts which may lock transaction outputs in this era

type NativeScript era = (r ∷ Type) | r → era Source #

hashScriptEraScript era ⇒ Script era → ScriptHash (EraCrypto era) Source #

Compute ScriptHash of a Script for a particular era.