cardano-ledger-shelley-0.1.0.0
Safe Haskell None
Language Haskell2010

Cardano.Ledger.Shelley.EpochBoundary

Description

This modules implements the necessary functions for the changes that can happen at epoch boundaries.

Synopsis

Documentation

newtype Stake crypto Source #

Type of stake as map from hash key to coins associated.

Instances

Instances details
Eq ( Stake crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Show ( Stake crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Generic ( Stake crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Associated Types

type Rep ( Stake crypto) :: Type -> Type Source #

Methods

from :: Stake crypto -> Rep ( Stake crypto) x Source #

to :: Rep ( Stake crypto) x -> Stake crypto Source #

NFData ( Stake crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Methods

rnf :: Stake crypto -> () Source #

Crypto crypto => ToCBOR ( Stake crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Crypto crypto => FromSharedCBOR ( Stake crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Associated Types

type Share ( Stake crypto) Source #

Typeable crypto => NoThunks ( Stake crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

type Rep ( Stake crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

type Rep ( Stake crypto) = D1 (' MetaData "Stake" "Cardano.Ledger.Shelley.EpochBoundary" "cardano-ledger-shelley-0.1.0.0-4LNBTpyKcsy6EW18a3tTt2" ' True ) ( C1 (' MetaCons "Stake" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unStake") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( VMap VB VP ( Credential ' Staking crypto) ( CompactForm Coin )))))
type Share ( Stake crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

data SnapShot crypto Source #

Snapshot of the stake distribution.

Instances

Instances details
Eq ( SnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Show ( SnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Generic ( SnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Associated Types

type Rep ( SnapShot crypto) :: Type -> Type Source #

NFData ( SnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Methods

rnf :: SnapShot crypto -> () Source #

Crypto crypto => ToCBOR ( SnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Crypto crypto => FromSharedCBOR ( SnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Associated Types

type Share ( SnapShot crypto) Source #

Typeable crypto => NoThunks ( SnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

type Rep ( SnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

type Share ( SnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

data SnapShots crypto Source #

Snapshots of the stake distribution.

Instances

Instances details
Eq ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Show ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Generic ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Associated Types

type Rep ( SnapShots crypto) :: Type -> Type Source #

NFData ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Methods

rnf :: SnapShots crypto -> () Source #

Crypto crypto => ToCBOR ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Crypto crypto => FromSharedCBOR ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Associated Types

type Share ( SnapShots crypto) Source #

Default ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Typeable crypto => NoThunks ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

type Rep ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

type Share ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

type Share ( SnapShots crypto) = Share ( SnapShot crypto)

obligation :: forall crypto pp anymap. ( HasField "_keyDeposit" pp Coin , HasField "_poolDeposit" pp Coin , Foldable (anymap ( Credential ' Staking crypto))) => pp -> anymap ( Credential ' Staking crypto) Coin -> Map ( KeyHash ' StakePool crypto) ( PoolParams crypto) -> Coin Source #

Calculate total possible refunds.

maxPool :: ( HasField "_a0" pp NonNegativeInterval , HasField "_nOpt" pp Natural ) => pp -> Coin -> Rational -> Rational -> Coin Source #

Version of maxPool' that extracts a0 and nOpt from a PParam with the right HasField instances