cardano-ledger-core-1.14.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Core.TxCert

Synopsis

Documentation

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 #

type TxCertUpgradeError era ∷ Type Source #

Methods

upgradeTxCertEraTxCert (PreviousEra era) ⇒ TxCert (PreviousEra era) → Either (TxCertUpgradeError era) (TxCert era) Source #

Every era, except Shelley, must be able to upgrade a TxCert from a previous era. However, not all certificates can be upgraded, because some eras lose some of the certificates, thus return type is an Either. Eg. from Babbage to Conway: MIR and Genesis certificates were removed.

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.

pattern RegPoolTxCertEraTxCert era ⇒ PoolParams (EraCrypto era) → TxCert era Source #

pattern RetirePoolTxCertEraTxCert era ⇒ KeyHash 'StakePool (EraCrypto era) → EpochNoTxCert era Source #

data Delegation c Source #

Deprecated: No longer used

The delegation of one stake key to another.

Constructors

Delegation

Deprecated: No longer used

Instances

Instances details
Generic (Delegation c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

Associated Types

type Rep (Delegation c) ∷ TypeType Source #

Methods

fromDelegation c → Rep (Delegation c) x Source #

toRep (Delegation c) x → Delegation c Source #

Show (Delegation c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

NFData (Delegation c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

Methods

rnfDelegation c → () Source #

Eq (Delegation c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

Methods

(==)Delegation c → Delegation c → Bool Source #

(/=)Delegation c → Delegation c → Bool Source #

NoThunks (Delegation c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

type Rep (Delegation c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

type Rep (Delegation c) = D1 ('MetaData "Delegation" "Cardano.Ledger.Core.TxCert" "cardano-ledger-core-1.14.0.0-inplace" 'False) (C1 ('MetaCons "Delegation" 'PrefixI 'True) (S1 ('MetaSel ('Just "dDelegator") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StakeCredential c)) :*: S1 ('MetaSel ('Just "dDelegatee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'StakePool c))))

data PoolCert c Source #

Constructors

RegPool !(PoolParams c)

A stake pool registration certificate.

RetirePool !(KeyHash 'StakePool c) !EpochNo

A stake pool retirement certificate.

Instances

Instances details
Crypto c ⇒ ToJSON (PoolCert c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

Generic (PoolCert c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

Associated Types

type Rep (PoolCert c) ∷ TypeType Source #

Methods

fromPoolCert c → Rep (PoolCert c) x Source #

toRep (PoolCert c) x → PoolCert c Source #

Show (PoolCert c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

NFData (PoolCert c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

Methods

rnfPoolCert c → () Source #

Eq (PoolCert c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

Methods

(==)PoolCert c → PoolCert c → Bool Source #

(/=)PoolCert c → PoolCert c → Bool Source #

Ord (PoolCert c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

Methods

comparePoolCert c → PoolCert c → Ordering Source #

(<)PoolCert c → PoolCert c → Bool Source #

(<=)PoolCert c → PoolCert c → Bool Source #

(>)PoolCert c → PoolCert c → Bool Source #

(>=)PoolCert c → PoolCert c → Bool Source #

maxPoolCert c → PoolCert c → PoolCert c Source #

minPoolCert c → PoolCert c → PoolCert c Source #

NoThunks (PoolCert c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

type Rep (PoolCert c) Source # 
Instance details

Defined in Cardano.Ledger.Core.TxCert

type Rep (PoolCert c) = D1 ('MetaData "PoolCert" "Cardano.Ledger.Core.TxCert" "cardano-ledger-core-1.14.0.0-inplace" 'False) (C1 ('MetaCons "RegPool" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PoolParams c))) :+: C1 ('MetaCons "RetirePool" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'StakePool c)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo)))

poolCWitnessPoolCert c → Credential 'StakePool c Source #

Deprecated: As useless. PoolIds have nothing to do with credentials

isRegStakeTxCertEraTxCert era ⇒ TxCert era → Bool Source #

Check if supplied TxCert is a stake registering certificate

isUnRegStakeTxCertEraTxCert era ⇒ TxCert era → Bool Source #

Check if supplied TxCert is a stake un-registering certificate