UNPKG

@meshsdk/mesh-csl

Version:

Cardano Off-chain Code APIs built on cardano-serialization-lib

12 lines (11 loc) 487 B
export type Slot = number; export type Network = 'Mainnet' | 'Preview' | 'Preprod' | 'Custom'; export type UnixTime = number; export type SlotConfig = { zeroTime: UnixTime; zeroSlot: Slot; slotLength: number; }; export declare const SLOT_CONFIG_NETWORK: Record<Network, SlotConfig>; export declare const slotToBeginUnixTime: (slot: Slot, slotConfig: SlotConfig) => UnixTime; export declare const unixTimeToEnclosingSlot: (unixTime: UnixTime, slotConfig: SlotConfig) => Slot;