chain

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package chain provides blockchain chain ID helpers and validation utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenesisTime

func GenesisTime(chainID string) (uint64, bool)

GenesisTime returns the beacon chain genesis unix timestamp for the given chain. The input is normalized, so "hoodi", "HOODI", and "560048" all work.

Types

type Chain

type Chain string
const (
	ChainMainnet Chain = "mainnet"
	ChainHoodi   Chain = "hoodi"
)

func ChainFromInt

func ChainFromInt(chainID uint64) (Chain, error)

func ChainFromString

func ChainFromString(chainID string) (Chain, error)

func (Chain) ID

func (c Chain) ID() uint64

func (Chain) String

func (c Chain) String() string

Jump to

Keyboard shortcuts

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