shelley-spec-ledger-0.1.0.0
Safe HaskellNone
LanguageHaskell98

Shelley.Spec.Ledger.API.Wallet

Synopsis

Documentation

getNonMyopicMemberRewardsShelleyBased era ⇒ GlobalsNewEpochState era → Set (Either Coin (Credential 'Staking era)) → Map (Either Coin (Credential 'Staking era)) (Map (KeyHash 'StakePool (Crypto era)) Coin) Source #

Calculate the Non-Myopic Pool Member Rewards for a set of credentials. For each given credential, this function returns a map from each stake pool (identified by the key hash of the pool operator) to the non-myopic pool member reward for that stake pool.

This is not based on any snapshot, but uses the current ledger state.

getUTxONewEpochState era → UTxO era Source #

Get the full UTxO.

getFilteredUTxONewEpochState era → Set (Addr era) → UTxO era Source #

Get the UTxO filtered by address.

getLeaderSchedule ∷ (Era era, Signable (VRF (Crypto era)) Seed) ⇒ GlobalsNewEpochState era → ChainDepState (Crypto era) → KeyHash 'StakePool (Crypto era) → SignKeyVRF (Crypto era) → PParams era → Set SlotNo Source #

Get the (private) leader schedule for this epoch.

Given a private VRF key, returns the set of slots in which this node is eligible to lead.

getTotalStakeGlobalsNewEpochState era → Coin Source #

Calculate the current total stake.

poolsByTotalStakeFraction ∷ ∀ era. ShelleyBased era ⇒ GlobalsNewEpochState era → PoolDistr (Crypto era) Source #

Get pool sizes, but in terms of total stake

The stake distribution uses active stake (so that the leader schedule is not affected by undelegated stake), but the wallet wants to display pool saturation for rewards purposes. For that, it needs the fraction of total stake.

This is not based on any snapshot, but uses the current ledger state.