StakeDistribution

scalus.cardano.ledger.StakeDistribution

Stake distribution computation for an epoch

Implements the SNAP rule from the Cardano ledger specification. Computes stake distribution from the current ledger state.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class StakeDistributionSnapshot(activeStake: Coin, poolStakes: Map[PoolKeyHash, Coin], stakeCredentials: Map[Credential, Coin])

Result of stake distribution computation

Result of stake distribution computation

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def computeDRepVotingStake(stakeByCredential: Map[Credential, Coin], drepDelegations: Map[Credential, DRep]): Map[DRep, Coin]

Compute voting stake for DReps

Compute voting stake for DReps

Attributes

def computeSnapshot(utxos: Utxos, delegations: Map[Credential, PoolKeyHash], drepDelegations: Map[Credential, DRep]): StakeDistributionSnapshot

Compute stake distribution from UTxO and delegation state

Compute stake distribution from UTxO and delegation state

Value parameters

delegations

Stake pool delegations (credential -> pool)

drepDelegations

DRep delegations (credential -> drep)

utxos

Current UTxO set

Attributes

Returns

Snapshot of stake distribution

Build complete stake distribution from cert state and UTxO

Build complete stake distribution from cert state and UTxO

Value parameters

certState

Certificate state with delegations

utxos

Current UTxO set

Attributes

Returns

Complete snapshot result