SlotConfig

scalus.cardano.ledger.SlotConfig
See theSlotConfig companion object
case class SlotConfig(zeroTime: Long, zeroSlot: Long, slotLength: Long, epochLength: Long = ..., zeroEpoch: Long = ...)

Slot and epoch configuration for a Cardano network.

Encodes the linear (post-Byron) era as an anchor point: slot zeroSlot starts at zeroTime (POSIX milliseconds) and falls at the beginning of epoch zeroEpoch; slots are slotLength milliseconds long and epochs are epochLength slots long.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Constructors

def this(zeroTime: Long, zeroSlot: Long, slotLength: Long)

Concrete methods

def epochOf(slot: Long): Long

Epoch containing the given slot. Slots before zeroSlot are clamped to zeroEpoch.

Epoch containing the given slot. Slots before zeroSlot are clamped to zeroEpoch.

Attributes

def firstSlotOfEpoch(epoch: Long): Long

First slot of the given epoch (for epochs >= zeroEpoch).

First slot of the given epoch (for epochs >= zeroEpoch).

Attributes

def instantToSlot(instant: Instant): Long
def slotToInstant(slot: Long): Instant
def slotToTime(slot: Long): Long
def timeToSlot(time: Long): Long

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product