cardano-ledger-conway-1.19.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 #

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.19.0.0-inplace" 'False) (C1 ('MetaCons "ConwayTxCertDeleg" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ConwayDelegCert)) :+: (C1 ('MetaCons "ConwayTxCertPool" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PoolCert)) :+: C1 ('MetaCons "ConwayTxCertGov" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ConwayGovCert))))

data ConwayDelegCert 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 !(StrictMaybe Coin)

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

ConwayUnRegCert !StakeCredential !(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 !Delegatee

Delegate staking credentials to a delegatee. Staking credential must already be registered.

ConwayRegDelegCert !StakeCredential !Delegatee !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
ToJSON ConwayDelegCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Generic ConwayDelegCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Associated Types

type Rep ConwayDelegCertTypeType Source #

Show ConwayDelegCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

EncCBOR ConwayDelegCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

NFData ConwayDelegCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

rnfConwayDelegCert → () Source #

Eq ConwayDelegCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Ord ConwayDelegCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

NoThunks ConwayDelegCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

type Rep ConwayDelegCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

data ConwayGovCert Source #

Instances

Instances details
ToJSON ConwayGovCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Generic ConwayGovCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Associated Types

type Rep ConwayGovCertTypeType Source #

Show ConwayGovCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

EncCBOR ConwayGovCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

NFData ConwayGovCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

rnfConwayGovCert → () Source #

Eq ConwayGovCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Ord ConwayGovCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

NoThunks ConwayGovCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

type Rep ConwayGovCert Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

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

data Delegatee Source #

First type argument is the deposit

Instances

Instances details
FromJSON Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

ToJSON Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Generic Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Associated Types

type Rep DelegateeTypeType Source #

Show Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

DecCBOR Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

EncCBOR Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

encCBORDelegateeEncoding Source #

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

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

NFData Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

rnfDelegatee → () Source #

Eq Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Ord Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

NoThunks Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

type Rep Delegatee Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

class ShelleyEraTxCert era ⇒ ConwayEraTxCert era where Source #

Methods

mkRegDepositTxCertStakeCredentialCoinTxCert era Source #

getRegDepositTxCertTxCert era → Maybe (StakeCredential, Coin) Source #

mkUnRegDepositTxCertStakeCredentialCoinTxCert era Source #

getUnRegDepositTxCertTxCert era → Maybe (StakeCredential, Coin) Source #

mkDelegTxCertStakeCredentialDelegateeTxCert era Source #

getDelegTxCertTxCert era → Maybe (StakeCredential, Delegatee) Source #

mkRegDepositDelegTxCertStakeCredentialDelegateeCoinTxCert era Source #

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

mkAuthCommitteeHotKeyTxCertCredential 'ColdCommitteeRoleCredential 'HotCommitteeRoleTxCert era Source #

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

mkResignCommitteeColdTxCertCredential 'ColdCommitteeRoleStrictMaybe AnchorTxCert era Source #

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

mkRegDRepTxCertCredential 'DRepRoleCoinStrictMaybe AnchorTxCert era Source #

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

mkUnRegDRepTxCertCredential 'DRepRoleCoinTxCert era Source #

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

mkUpdateDRepTxCertCredential 'DRepRoleStrictMaybe AnchorTxCert era Source #

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

Instances

Instances details
ConwayEraTxCert ConwayEra Source # 
Instance details

Defined in Cardano.Ledger.Conway.TxCert

Methods

mkRegDepositTxCertStakeCredentialCoinTxCert ConwayEra Source #

getRegDepositTxCertTxCert ConwayEraMaybe (StakeCredential, Coin) Source #

mkUnRegDepositTxCertStakeCredentialCoinTxCert ConwayEra Source #

getUnRegDepositTxCertTxCert ConwayEraMaybe (StakeCredential, Coin) Source #

mkDelegTxCertStakeCredentialDelegateeTxCert ConwayEra Source #

getDelegTxCertTxCert ConwayEraMaybe (StakeCredential, Delegatee) Source #

mkRegDepositDelegTxCertStakeCredentialDelegateeCoinTxCert ConwayEra Source #

getRegDepositDelegTxCertTxCert ConwayEraMaybe (StakeCredential, Delegatee, Coin) Source #

mkAuthCommitteeHotKeyTxCertCredential 'ColdCommitteeRoleCredential 'HotCommitteeRoleTxCert ConwayEra Source #

getAuthCommitteeHotKeyTxCertTxCert ConwayEraMaybe (Credential 'ColdCommitteeRole, Credential 'HotCommitteeRole) Source #

mkResignCommitteeColdTxCertCredential 'ColdCommitteeRoleStrictMaybe AnchorTxCert ConwayEra Source #

getResignCommitteeColdTxCertTxCert ConwayEraMaybe (Credential 'ColdCommitteeRole, StrictMaybe Anchor) Source #

mkRegDRepTxCertCredential 'DRepRoleCoinStrictMaybe AnchorTxCert ConwayEra Source #

getRegDRepTxCertTxCert ConwayEraMaybe (Credential 'DRepRole, Coin, StrictMaybe Anchor) Source #

mkUnRegDRepTxCertCredential 'DRepRoleCoinTxCert ConwayEra Source #

getUnRegDRepTxCertTxCert ConwayEraMaybe (Credential 'DRepRole, Coin) Source #

mkUpdateDRepTxCertCredential 'DRepRoleStrictMaybe AnchorTxCert ConwayEra Source #

getUpdateDRepTxCertTxCert ConwayEraMaybe (Credential 'DRepRole, StrictMaybe Anchor) Source #

conwayDRepRefundsTxCerts ∷ (Foldable f, ConwayEraTxCert era) ⇒ (Credential 'DRepRoleMaybe 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 'StakePoolBool)

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 'StakingMaybe Coin)

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

→ (Credential 'DRepRoleMaybe 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

EraTxCert ConwayEra Source # 
Instance details

Associated Types

type TxCert ConwayEra = (r ∷ Type) Source #

type TxCertUpgradeError ConwayEra Source #

ShelleyEraTxCert ConwayEra Source # 
Instance details