Help us shape the future of Go! Take the 2026 Go Developer Survey

genesis

package
v1.36.26 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Block

func Block(genesis *Genesis) (*block.Stateless, error)

Types

type Allocation

type Allocation struct {
	Address ids.ShortID `json:"address"`
	Balance uint64      `json:"balance"`
}

type Genesis

type Genesis struct {
	Timestamp   int64        `json:"timestamp"`
	Allocations []Allocation `json:"allocations"`
}

func Parse

func Parse(bytes []byte) (*Genesis, error)

func (*Genesis) Marshal added in v1.36.3

func (g *Genesis) Marshal() ([]byte, error)

Marshal encodes the genesis as one native ZAP object.

Jump to

Keyboard shortcuts

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