Expand description
A crate which contains primitives that are useful for implementation that uses staking approaches in general. Definitions related to sessions, slashing, etc go here.
Modules§
- currency_
to_ vote - offence
- Common traits and types that are useful for describing offences for usage in environments that use staking.
Macros§
- _runtime_
benchmarks_ enabled - runtime_
benchmarks_ enabled - Enable/disable the given code depending on
feature = "runtime-benchmarks"
being enabled for the crate or not.
Structs§
- Agent
- A type that belongs only in the context of an
Agent
. - Delegator
- A type that belongs only in the context of a
Delegator
. - Exposure
- A snapshot of the stake backing a single validator in the system.
- Exposure
Page - A snapshot of the stake backing a single validator in the system.
- Individual
Exposure - The amount of exposure for an era that an individual nominator has (susceptible to slashing).
- Paged
Exposure Metadata - Metadata for Paged Exposure of a validator such as total stake across pages and page count.
- Stake
- A struct that reflects stake that an account has in the staking system. Provides a set of
methods to operate on it’s properties. Aimed at making
StakingInterface
more concise.
Enums§
- Staker
Status - Representation of the status of a staker.
- Staking
Account - Representation of a staking account, which may be a stash or controller account.
Traits§
- Delegation
Interface - Trait to provide delegation functionality for stakers.
- Delegation
Migrator - Trait to provide functionality for direct stakers to migrate to delegation agents.
See
DelegationInterface
for more details on delegation. - OnStaking
Update - A generic staking event listener.
- Staking
Interface - A generic representation of a staking implementation.
- Staking
Unchecked - Set of low level apis to manipulate staking ledger.
Type Aliases§
- EraIndex
- Counter for the number of eras that have passed.
- Page
- Type for identifying a page.
- Session
Index - Simple index type with which we can count sessions.