cardano-ledger-conway-1.14.0.0: Cardano ledger with an updated on-chain governance system.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Conway.TxCert

Synopsis

Documentation

data ConwayTxCert era Source #

Instances

Instances details
Era era ⇒ ToJSON (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Generic (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Associated Types

type Rep (ConwayTxCert era) ∷ TypeType Source #

Methods

fromConwayTxCert era → Rep (ConwayTxCert era) x Source #

toRep (ConwayTxCert era) x → ConwayTxCert era Source #

Show (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

(ShelleyEraTxCert era, TxCert era ~ ConwayTxCert era) ⇒ FromCBOR (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

(Era era, Val (Value era)) ⇒ ToCBOR (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

toCBORConwayTxCert era → Encoding Source #

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

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

(ConwayEraTxCert era, TxCert era ~ ConwayTxCert era) ⇒ DecCBOR (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

(Era era, Val (Value era)) ⇒ EncCBOR (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

encCBORConwayTxCert era → Encoding Source #

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

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

Crypto (EraCrypto era) ⇒ NFData (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

rnfConwayTxCert era → () Source #

Eq (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

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

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

Ord (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

NoThunks (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

type Rep (ConwayTxCert era) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

type Rep (ConwayTxCert era) = D1 ('MetaData "ConwayTxCert" "Cardano.Ledger.Conway.TxCert" "cardano-ledger-conway-1.14.0.0-inplace" 'False) (C1 ('MetaCons "ConwayTxCertDeleg" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ConwayDelegCert (EraCrypto era)))) :+: (C1 ('MetaCons "ConwayTxCertPool" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PoolCert (EraCrypto era)))) :+: C1 ('MetaCons "ConwayTxCertGov" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ConwayGovCert (EraCrypto era))))))

data ConwayDelegCert c Source #

Certificates for registration and delegation of stake to Pools and DReps. Comparing to previous eras, there is now ability to:

  • Register and delegate with a single certificate: ConwayRegDelegCert
  • Ability to delegate to DReps with DelegVote and DelegStakeVote
  • Ability to specify the deposit amount. Deposits during registration and unregistration in Conway are optional, which will change in the future era. They are optional only for the smooth transition from Babbage to Conway. Validity of deposits is checked by the CERT rule.

Constructors

ConwayRegCert !(StakeCredential c) !(StrictMaybe Coin)

Register staking credential. Deposit, when present, must match the expected deposit amount specified by ppKeyDepositL in the protocol parameters.

ConwayUnRegCert !(StakeCredential c) !(StrictMaybe Coin)

De-Register the staking credential. Deposit, if present, must match the amount that was left as a deposit upon stake credential registration.

ConwayDelegCert !(StakeCredential c) !(Delegatee c)

Redelegate to another delegatee. Staking credential must already be registered.

ConwayRegDelegCert !(StakeCredential c) !(Delegatee c) !Coin

This is a new type of certificate, which allows to register staking credential and delegate within a single certificate. Deposit is required and must match the expected deposit amount specified by ppKeyDepositL in the protocol parameters.

Instances

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

Defined in Cardano.Ledger.Conway.TxCert

Generic (ConwayDelegCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Associated Types

type Rep (ConwayDelegCert c) ∷ TypeType Source #

Show (ConwayDelegCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

NFData (ConwayDelegCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

rnfConwayDelegCert c → () Source #

Eq (ConwayDelegCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Ord (ConwayDelegCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

NoThunks (ConwayDelegCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

type Rep (ConwayDelegCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

data ConwayGovCert c Source #

Instances

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

Defined in Cardano.Ledger.Conway.TxCert

Generic (ConwayGovCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Associated Types

type Rep (ConwayGovCert c) ∷ TypeType Source #

Show (ConwayGovCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Crypto c ⇒ NFData (ConwayGovCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

rnfConwayGovCert c → () Source #

Eq (ConwayGovCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Ord (ConwayGovCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

NoThunks (ConwayGovCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

type Rep (ConwayGovCert c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

type Rep (ConwayGovCert c) = D1 ('MetaData "ConwayGovCert" "Cardano.Ledger.Conway.TxCert" "cardano-ledger-conway-1.14.0.0-inplace" 'False) ((C1 ('MetaCons "ConwayRegDRep" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Credential 'DRepRole c)) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe (Anchor c))))) :+: C1 ('MetaCons "ConwayUnRegDRep" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Credential 'DRepRole c)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) :+: (C1 ('MetaCons "ConwayUpdateDRep" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Credential 'DRepRole c)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe (Anchor c)))) :+: (C1 ('MetaCons "ConwayAuthCommitteeHotKey" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Credential 'ColdCommitteeRole c)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Credential 'HotCommitteeRole c))) :+: C1 ('MetaCons "ConwayResignCommitteeColdKey" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Credential 'ColdCommitteeRole c)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe (Anchor c)))))))

data Delegatee c Source #

First type argument is the deposit

Instances

Instances details
Crypto c ⇒ FromJSON (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Crypto c ⇒ ToJSON (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Generic (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Associated Types

type Rep (Delegatee c) ∷ TypeType Source #

Methods

fromDelegatee c → Rep (Delegatee c) x Source #

toRep (Delegatee c) x → Delegatee c Source #

Show (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Crypto c ⇒ DecCBOR (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Crypto c ⇒ EncCBOR (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

encCBORDelegatee c → Encoding Source #

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

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

NFData (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

rnfDelegatee c → () Source #

Eq (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

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

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

Ord (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

NoThunks (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

type Rep (Delegatee c) Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

type Rep (Delegatee c) = D1 ('MetaData "Delegatee" "Cardano.Ledger.Conway.TxCert" "cardano-ledger-conway-1.14.0.0-inplace" 'False) (C1 ('MetaCons "DelegStake" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'StakePool c))) :+: (C1 ('MetaCons "DelegVote" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DRep c))) :+: C1 ('MetaCons "DelegStakeVote" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'StakePool c)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DRep c)))))

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) Source # 
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 #

conwayDRepRefundsTxCerts ∷ (Foldable f, ConwayEraTxCert era) ⇒ (Credential 'DRepRole (EraCrypto era) → Maybe Coin) → f (TxCert era) → Coin Source #

Compute the Refunds from a TxBody, given a function that computes a partial Coin for known Credentials.

conwayTotalDepositsTxCerts Source #

Arguments

∷ (ConwayEraPParams era, Foldable f, ConwayEraTxCert era) 
PParams era 
→ (KeyHash 'StakePool (EraCrypto era) → Bool)

Check whether a pool with a supplied PoolStakeId is already registered.

→ f (TxCert era) 
Coin 

Determine the total deposit amount needed from a TxBody. The block may (legitimately) contain multiple registration certificates for the same pool, where the first will be treated as a registration and any subsequent ones as re-registration. As such, we must only take a deposit for the first such registration. It is even possible for a single transaction to have multiple pool registration for the same pool, so as we process pool registrations, we must keep track of those that are already registered, so we do not add a Deposit for the same pool twice.

Note that this is not an issue for key registrations since subsequent registration certificates would be invalid.

conwayTotalRefundsTxCerts Source #

Arguments

∷ (EraPParams era, Foldable f, ConwayEraTxCert era) 
PParams era 
→ (Credential 'Staking (EraCrypto era) → Maybe Coin)

Function that can lookup current deposit, in case when the Staking credential is registered.

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

Function that can lookup current deposit, in case when the DRep credential is registered.

→ f (TxCert era) 
Coin 

Compute the key deregistration refunds in a transaction

Orphan instances

Crypto c ⇒ EraTxCert (ConwayEra c) Source # 
Instance details

Associated Types

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

type TxCertUpgradeError (ConwayEra c) Source #

Crypto c ⇒ ShelleyEraTxCert (ConwayEra c) Source # 
Instance details