Interface SlotConfig

Configuration structure for slot timing on the Cardano network.

The SlotConfig interface encapsulates configuration parameters for converting between Unix time and slots in the Cardano network. This structure provides essential timing information to correctly interpret and compute slot numbers based on network-specific parameters.

interface SlotConfig {
    slotLength: bigint;
    zeroSlot: bigint;
    zeroTime: bigint;
}

Properties

slotLength: bigint

The duration of each slot in milliseconds. This value is crucial for time-to-slot conversions, providing the length of time between consecutive slots.

zeroSlot: bigint

The initial slot number corresponding to zeroTime. It is the reference slot number that maps directly to zeroTime, allowing accurate calculation of other slot numbers relative to this baseline.

zeroTime: bigint

The start time in milliseconds since the Unix epoch. This time aligns with zeroSlot and acts as a baseline for slot and epoch calculations.