forks

package
v0.1.1-experimental.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Code generated by fastssz. DO NOT EDIT. Hash: aceeda111e50ef46bbebff0a1fa89f113f8dbab3eaa536f8e242ff6f53503eca Version: 0.1.3

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForkData

type ForkData struct {
	// CurrentVersion is the current version of the fork.
	CurrentVersion primitives.Version `ssz-size:"4"`
	// GenesisValidatorsRoot is the root of the genesis validators.
	GenesisValidatorsRoot primitives.Root `ssz-size:"32"`
}

ForkData as defined in the Ethereum 2.0 specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#forkdata

func NewForkData

func NewForkData(
	currentVersion primitives.Version, genesisValidatorsRoot primitives.Root,
) *ForkData

NewForkData creates a new ForkData struct.

func (ForkData) ComputeDomain

func (fv ForkData) ComputeDomain(
	domainType primitives.DomainType,
) (primitives.Domain, error)

ComputeDomain as defined in the Ethereum 2.0 specification. https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#compute_domain

func (*ForkData) GetTree

func (f *ForkData) GetTree() (*ssz.Node, error)

GetTree ssz hashes the ForkData object

func (*ForkData) HashTreeRoot

func (f *ForkData) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the ForkData object

func (*ForkData) HashTreeRootWith

func (f *ForkData) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the ForkData object with a hasher

func (*ForkData) MarshalSSZ

func (f *ForkData) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the ForkData object

func (*ForkData) MarshalSSZTo

func (f *ForkData) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the ForkData object to a target array

func (*ForkData) SizeSSZ

func (f *ForkData) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the ForkData object

func (*ForkData) UnmarshalSSZ

func (f *ForkData) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the ForkData object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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