Expand description
This crate provides types and logic for handling Partner Chain slots.
Partner Chain slots are grouped into epochs of equal length.
Modules§
- runtime_
api_ client - Module providing helper functions for interacting with SlotApi
Structs§
- ScSlot
Config - Slot and epoch configuration for a Partner Chain
- Slot
- Unit type wrapper that represents a slot.
- Slot
Duration - A slot duration defined in milliseconds.
- Slots
PerEpoch - Number of slots in each Partner Chain epoch
Enums§
- Error
- Error type returnes by epoch and slot handling functions in this crate
Traits§
- SlotApi
- Runtime API serving slot configuration
Functions§
- default_
slots_ per_ epoch - Default number of slots per epoch.
- epoch_
number - Returns the epoch number for
slot
givenslots_per_epoch
- first_
slot_ number - Get the first slot number of the epoch
epoch
- is_
last_ slot_ of_ an_ epoch - Checks whether
slot
is the last slot of its epoch givenslots_per_epoch
- slot_
number_ in_ epoch - Returns the number of
slot
within its epoch givenslots_per_epoch