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

Cardano.Ledger.Rewards

Synopsis

Documentation

data RewardType Source #

The staking rewards in Cardano are all either:

  • member rewards - rewards given to a registered stake credential which has delegated to a stake pool, or
  • leader rewards - rewards given to a registered stake pool (in particular, given to the stake credential in the stake pool registration certificate).

See Figure 47, "Functions used in the Reward Splitting", of the formal specification for more details.

Constructors

MemberReward 
LeaderReward 

Instances

Instances details
ToJSON RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Bounded RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Enum RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Generic RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Associated Types

type Rep RewardTypeTypeType Source #

Show RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

DecCBOR RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

EncCBOR RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Methods

encCBORRewardTypeEncoding Source #

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

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

NFData RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Methods

rnfRewardType → () Source #

Eq RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Ord RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

NoThunks RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

type Rep RewardType Source # 
Instance details

Defined in Cardano.Ledger.Rewards

type Rep RewardType = D1 ('MetaData "RewardType" "Cardano.Ledger.Rewards" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "MemberReward" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "LeaderReward" 'PrefixI 'False) (U1TypeType))

data Reward Source #

The Reward type captures:

  • if the reward is a member or leader reward
  • the stake pool ID associated with the reward
  • the number of Lovelace in the reward

Constructors

Reward 

Instances

Instances details
ToJSON Reward Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Generic Reward Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Associated Types

type Rep RewardTypeType Source #

Methods

fromRewardRep Reward x Source #

toRep Reward x → Reward Source #

Show Reward Source # 
Instance details

Defined in Cardano.Ledger.Rewards

DecCBOR Reward Source # 
Instance details

Defined in Cardano.Ledger.Rewards

EncCBOR Reward Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Methods

encCBORRewardEncoding Source #

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

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

NFData Reward Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Methods

rnfReward → () Source #

Eq Reward Source # 
Instance details

Defined in Cardano.Ledger.Rewards

Methods

(==)RewardRewardBool Source #

(/=)RewardRewardBool Source #

Ord Reward Source #

Note that this Ord instance is chosen to align precisely with the Allegra reward aggregation, as given by the function aggregateRewards so that findMax returns the expected value.

Instance details

Defined in Cardano.Ledger.Rewards

NoThunks Reward Source # 
Instance details

Defined in Cardano.Ledger.Rewards

type Rep Reward Source # 
Instance details

Defined in Cardano.Ledger.Rewards

type Rep Reward = D1 ('MetaData "Reward" "Cardano.Ledger.Rewards" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "Reward" 'PrefixI 'True) (S1 ('MetaSel ('Just "rewardType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RewardType) :*: (S1 ('MetaSel ('Just "rewardPool") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'StakePool)) :*: S1 ('MetaSel ('Just "rewardAmount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))))