Documentation ¶
Index ¶
- type Parameter
- type Service
- func (s *Service) AltairInitialEpoch() phase0.Epoch
- func (s *Service) AltairInitialSyncCommitteePeriod() uint64
- func (s *Service) BellatrixInitialEpoch() phase0.Epoch
- func (s *Service) CapellaInitialEpoch() phase0.Epoch
- func (s *Service) CurrentEpoch() phase0.Epoch
- func (s *Service) CurrentSlot() phase0.Slot
- func (s *Service) CurrentSyncCommitteePeriod() uint64
- func (s *Service) DenebInitialEpoch() phase0.Epoch
- func (s *Service) EpochToSyncCommitteePeriod(epoch phase0.Epoch) uint64
- func (s *Service) FirstEpochOfSyncPeriod(period uint64) phase0.Epoch
- func (s *Service) FirstSlotOfEpoch(epoch phase0.Epoch) phase0.Slot
- func (s *Service) GenesisTime() time.Time
- func (s *Service) LastSlotOfEpoch(epoch phase0.Epoch) phase0.Slot
- func (s *Service) SlotDuration() time.Duration
- func (s *Service) SlotToEpoch(slot phase0.Slot) phase0.Epoch
- func (s *Service) SlotToSyncCommitteePeriod(slot phase0.Slot) uint64
- func (s *Service) SlotsPerEpoch() uint64
- func (s *Service) StartOfEpoch(epoch phase0.Epoch) time.Time
- func (s *Service) StartOfSlot(slot phase0.Slot) time.Time
- func (s *Service) TimestampToEpoch(timestamp time.Time) phase0.Epoch
- func (s *Service) TimestampToSlot(timestamp time.Time) phase0.Slot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parameter ¶
type Parameter interface {
// contains filtered or unexported methods
}
Parameter is the interface for service parameters.
func WithForkScheduleProvider ¶ added in v0.4.0
func WithForkScheduleProvider(provider eth2client.ForkScheduleProvider) Parameter
WithForkScheduleProvider sets the fork schedule provider.
func WithGenesisProvider ¶ added in v0.7.7
func WithGenesisProvider(provider eth2client.GenesisProvider) Parameter
WithGenesisProvider sets the genesis provider.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithSpecProvider ¶ added in v0.4.0
func WithSpecProvider(provider eth2client.SpecProvider) Parameter
WithSpecProvider sets the spec provider.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides chain time services.
func (*Service) AltairInitialEpoch ¶ added in v0.4.0
AltairInitialEpoch provides the epoch at which the Altair hard fork takes place.
func (*Service) AltairInitialSyncCommitteePeriod ¶ added in v0.4.0
AltairInitialSyncCommitteePeriod provides the sync committee period in which the Altair hard fork takes place.
func (*Service) BellatrixInitialEpoch ¶ added in v0.7.0
BellatrixInitialEpoch provides the epoch at which the Bellatrix hard fork takes place.
func (*Service) CapellaInitialEpoch ¶ added in v0.7.0
CapellaInitialEpoch provides the epoch at which the Capella hard fork takes place.
func (*Service) CurrentEpoch ¶
CurrentEpoch provides the current epoch.
func (*Service) CurrentSlot ¶
CurrentSlot provides the current slot.
func (*Service) CurrentSyncCommitteePeriod ¶ added in v0.4.0
CurrentSyncCommitteePeriod provides the current sync committee period.
func (*Service) DenebInitialEpoch ¶ added in v0.7.7
DenebInitialEpoch provides the epoch at which the Deneb hard fork takes place.
func (*Service) EpochToSyncCommitteePeriod ¶ added in v0.5.1
EpochToSyncCommitteePeriod provides the sync committee period of the given epoch.
func (*Service) FirstEpochOfSyncPeriod ¶ added in v0.4.0
FirstEpochOfSyncPeriod provides the first epoch of the given sync period. Note that epochs before the sync committee period will provide the Altair hard fork epoch.
func (*Service) FirstSlotOfEpoch ¶
FirstSlotOfEpoch provides the first slot of the given epoch.
func (*Service) GenesisTime ¶
GenesisTime provides the time of the chain's genesis.
func (*Service) LastSlotOfEpoch ¶ added in v0.7.0
LastSlotOfEpoch provides the last slot of the given epoch.
func (*Service) SlotDuration ¶ added in v0.7.0
SlotDuration provides the duration of a single slot.
func (*Service) SlotToEpoch ¶
SlotToEpoch provides the epoch of a given slot.
func (*Service) SlotToSyncCommitteePeriod ¶ added in v0.4.0
SlotToSyncCommitteePeriod provides the sync committee period of the given slot.
func (*Service) SlotsPerEpoch ¶ added in v0.7.0
SlotsPerEpoch provides the number of slots in an epoch.
func (*Service) StartOfEpoch ¶
StartOfEpoch provides the time at which a given epoch starts.
func (*Service) StartOfSlot ¶
StartOfSlot provides the time at which a given slot starts.
func (*Service) TimestampToEpoch ¶ added in v0.1.5
TimestampToEpoch provides the epoch of the given timestamp.