chaintime

package
v1.5.0-rc10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	// GenesisTime provides the time of the chain's genesis.
	GenesisTime() time.Time
	// StartOfSlot provides the time at which a given slot starts.
	StartOfSlot(slot phase0.Slot) time.Time
	// StartOfEpoch provides the time at which a given epoch starts.
	StartOfEpoch(epoch phase0.Epoch) time.Time
	// CurrentSlot provides the current slot.
	CurrentSlot() phase0.Slot
	// CurrentEpoch provides the current epoch.
	CurrentEpoch() phase0.Epoch
	// SlotToEpoch provides the epoch of the given slot.
	SlotToEpoch(slot phase0.Slot) phase0.Epoch
	// FirstSlotOfEpoch provides the first slot of the given epoch.
	FirstSlotOfEpoch(epoch phase0.Epoch) phase0.Slot
}

Service provides a number of functions for calculating chain-related times.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL