| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Ledger.Rewards
Synopsis
- data RewardType
- data Reward = Reward {
- rewardType ∷ !RewardType
- rewardPool ∷ !(KeyHash 'StakePool)
- rewardAmount ∷ !Coin
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
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 | |
Fields
| |
Instances
| ToJSON Reward Source # | |||||
| DecCBOR Reward Source # | |||||
| EncCBOR Reward Source # | |||||
| ToKeyValuePairs Reward Source # | |||||
Defined in Cardano.Ledger.Rewards Methods toKeyValuePairs ∷ KeyValue e kv ⇒ Reward → [kv] Source # | |||||
| NFData Reward Source # | |||||
Defined in Cardano.Ledger.Rewards | |||||
| Generic Reward Source # | |||||
Defined in Cardano.Ledger.Rewards Associated Types
| |||||
| Show Reward Source # | |||||
| Eq Reward Source # | |||||
| Ord Reward Source # | Note that this Ord instance is chosen to align precisely
with the Allegra reward aggregation, as given by the
function | ||||
| NoThunks Reward Source # | |||||
| type Rep Reward Source # | |||||
Defined in Cardano.Ledger.Rewards type Rep Reward = D1 ('MetaData "Reward" "Cardano.Ledger.Rewards" "cardano-ledger-core-1.19.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)))) | |||||