genesis

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Version = blocks.Version

Variables

Functions

func SetDepositOfferID

func SetDepositOfferID(offer *deposit.Offer) error

Generate deposit offer id from its bytes hash and set it to offer's ID field

Types

type AddressState

type AddressState struct {
	Address ids.ShortID     `serialize:"true"`
	State   as.AddressState `serialize:"true"`
}

type Block

type Block struct {
	Timestamp        uint64    `serialize:"true"`
	Deposits         []*txs.Tx `serialize:"true"`
	Validators       []*txs.Tx `serialize:"true"`
	UnlockedUTXOsTxs []*txs.Tx `serialize:"true"`
}

func (*Block) Init

func (b *Block) Init() error

func (*Block) Less

func (b *Block) Less(b1 *Block) bool

func (*Block) Time

func (b *Block) Time() time.Time

func (*Block) Txs

func (b *Block) Txs() []*txs.Tx

type Camino

type Camino struct {
	VerifyNodeSignature      bool                     `serialize:"true"`
	LockModeBondDeposit      bool                     `serialize:"true"`
	InitialAdmin             ids.ShortID              `serialize:"true"`
	AddressStates            []AddressState           `serialize:"true"`
	DepositOffers            []*deposit.Offer         `serialize:"true"`
	Blocks                   []*Block                 `serialize:"true"` // arranged in a block order
	ConsortiumMembersNodeIDs []ConsortiumMemberNodeID `serialize:"true"`
	MultisigAliases          []*multisig.Alias        `serialize:"true"`
}

Camino genesis args

func (*Camino) Init

func (c *Camino) Init() error

type ConsortiumMemberNodeID

type ConsortiumMemberNodeID struct {
	ConsortiumMemberAddress ids.ShortID `serialize:"true"`
	NodeID                  ids.NodeID  `serialize:"true"`
}

type Genesis

type Genesis struct {
	UTXOs         []*UTXO   `serialize:"true"`
	Validators    []*txs.Tx `serialize:"true"`
	Chains        []*txs.Tx `serialize:"true"`
	Camino        Camino    `serialize:"true"`
	Timestamp     uint64    `serialize:"true"`
	InitialSupply uint64    `serialize:"true"`
	Message       string    `serialize:"true"`
}

Genesis represents a genesis state of the platform chain

func Parse

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

type State

type State struct {
	UTXOs         []*avax.UTXO
	Validators    []*txs.Tx
	Chains        []*txs.Tx
	Camino        Camino
	Timestamp     uint64
	InitialSupply uint64
}

State represents the genesis state of the platform chain

func ParseState

func ParseState(genesisBytes []byte) (*State, error)

type UTXO

type UTXO struct {
	avax.UTXO `serialize:"true"`
	Message   []byte `serialize:"true" json:"message"`
}

UTXO adds messages to UTXOs

Jump to

Keyboard shortcuts

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