Crate sidechain_slots

Source
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§

ScSlotConfig
Slot and epoch configuration for a Partner Chain
Slot
Unit type wrapper that represents a slot.
SlotDuration
A slot duration defined in milliseconds.
SlotsPerEpoch
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 given slots_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 given slots_per_epoch
slot_number_in_epoch
Returns the number of slot within its epoch given slots_per_epoch