genesis

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: BSD-3-Clause Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetInitialState

type AssetInitialState struct {
	FixedCap    []GenesisHolder
	VariableCap []GenesisOwners
}

AssetInitialState describes the initial state of an asset

type Genesis

type Genesis struct {
	Txs []*GenesisAsset `serialize:"true"`
}

Genesis represents the genesis state of the XVM

func NewGenesis

func NewGenesis(
	networkID uint32,
	genesisData map[string]GenesisAssetDefinition,
) (*Genesis, error)

NewGenesis creates a new Genesis from genesis data

func (*Genesis) Bytes

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

Bytes serializes the Genesis to bytes using the XVM genesis codec

type GenesisAsset

type GenesisAsset struct {
	Alias             string `serialize:"true"`
	txs.CreateAssetTx `serialize:"true"`
}

GenesisAsset represents an asset in the genesis block

func (*GenesisAsset) Compare

func (g *GenesisAsset) Compare(other *GenesisAsset) int

Compare implements ordering.Sortable for GenesisAsset

type GenesisAssetDefinition

type GenesisAssetDefinition struct {
	Name         string
	Symbol       string
	Denomination byte
	InitialState AssetInitialState
	Memo         []byte
}

GenesisAssetDefinition describes a genesis asset and its initial state

type GenesisHolder

type GenesisHolder struct {
	Amount  uint64
	Address string
}

GenesisHolder describes how much asset is owned by an address

type GenesisOwners

type GenesisOwners struct {
	Threshold uint32
	Minters   []string
}

GenesisOwners describes who can perform an action

Jump to

Keyboard shortcuts

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