phase0

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DomainLength = 32

DomainLength is the number of bytes in a domain.

View Source
const DomainTypeLength = 4

DomainTypeLength is the number of bytes in a domain type.

View Source
const ForkVersionLength = 4

ForkVersionLength is the number of bytes in a fork version.

View Source
const GraffitiLength = 32

GraffitiLength is the number of bytes in a block graffiti.

View Source
const Hash32Length = 32

Hash32Length is the number of bytes in a 32-byte hash.

View Source
const HashLength = 32

HashLength is the number of bytes in a hash.

View Source
const PublicKeyLength = 48

PublicKeyLength is the number of bytes in a public key.

View Source
const RootLength = 32

RootLength is the number of bytes in a root.

View Source
const SignatureLength = 96

SignatureLength is the number of bytes in a signature.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateAndProof

type AggregateAndProof struct {
	AggregatorIndex ValidatorIndex
	Aggregate       *Attestation
	SelectionProof  BLSSignature `ssz-size:"96"`
}

AggregateAndProof is the Ethereum 2 attestation structure.

func (*AggregateAndProof) HashTreeRoot

func (t *AggregateAndProof) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *AggregateAndProof.

func (*AggregateAndProof) HashTreeRootWith

func (t *AggregateAndProof) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *AggregateAndProof using the given hash walker.

func (*AggregateAndProof) MarshalJSON

func (a *AggregateAndProof) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*AggregateAndProof) MarshalSSZ

func (t *AggregateAndProof) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *AggregateAndProof to SSZ-encoded bytes.

func (*AggregateAndProof) MarshalSSZTo

func (t *AggregateAndProof) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *AggregateAndProof to SSZ-encoded bytes, appending to the provided buffer.

func (*AggregateAndProof) MarshalYAML

func (a *AggregateAndProof) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*AggregateAndProof) SizeSSZ

func (t *AggregateAndProof) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *AggregateAndProof.

func (*AggregateAndProof) String

func (a *AggregateAndProof) String() string

String returns a string version of the structure.

func (*AggregateAndProof) UnmarshalJSON

func (a *AggregateAndProof) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*AggregateAndProof) UnmarshalSSZ

func (t *AggregateAndProof) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *AggregateAndProof from SSZ-encoded bytes.

func (*AggregateAndProof) UnmarshalYAML

func (a *AggregateAndProof) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type Attestation

type Attestation struct {
	AggregationBits bitfield.Bitlist `dynssz-max:"MAX_VALIDATORS_PER_COMMITTEE" ssz-max:"2048"`
	Data            *AttestationData
	Signature       BLSSignature `ssz-size:"96"`
}

Attestation is the Ethereum 2 attestation structure.

func (*Attestation) HashTreeRoot

func (t *Attestation) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *Attestation.

func (*Attestation) HashTreeRootWith

func (t *Attestation) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *Attestation using the given hash walker.

func (*Attestation) MarshalJSON

func (a *Attestation) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Attestation) MarshalSSZ

func (t *Attestation) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *Attestation to SSZ-encoded bytes.

func (*Attestation) MarshalSSZTo

func (t *Attestation) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *Attestation to SSZ-encoded bytes, appending to the provided buffer.

func (*Attestation) MarshalYAML

func (a *Attestation) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*Attestation) SizeSSZ

func (t *Attestation) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *Attestation.

func (*Attestation) String

func (a *Attestation) String() string

String returns a string version of the structure.

func (*Attestation) UnmarshalJSON

func (a *Attestation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Attestation) UnmarshalSSZ

func (t *Attestation) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *Attestation from SSZ-encoded bytes.

func (*Attestation) UnmarshalYAML

func (a *Attestation) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type AttestationData

type AttestationData struct {
	Slot            Slot
	Index           CommitteeIndex
	BeaconBlockRoot Root `ssz-size:"32"`
	Source          *Checkpoint
	Target          *Checkpoint
}

AttestationData is the Ethereum 2 specification structure.

func (*AttestationData) HashTreeRoot

func (t *AttestationData) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *AttestationData.

func (*AttestationData) HashTreeRootWith

func (t *AttestationData) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *AttestationData using the given hash walker.

func (*AttestationData) MarshalJSON

func (a *AttestationData) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*AttestationData) MarshalSSZ

func (t *AttestationData) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *AttestationData to SSZ-encoded bytes.

func (*AttestationData) MarshalSSZTo

func (t *AttestationData) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *AttestationData to SSZ-encoded bytes, appending to the provided buffer.

func (*AttestationData) MarshalYAML

func (a *AttestationData) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*AttestationData) SizeSSZ

func (t *AttestationData) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *AttestationData.

func (*AttestationData) String

func (a *AttestationData) String() string

String provides a string representation of the struct.

func (*AttestationData) UnmarshalJSON

func (a *AttestationData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*AttestationData) UnmarshalSSZ

func (t *AttestationData) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *AttestationData from SSZ-encoded bytes.

func (*AttestationData) UnmarshalYAML

func (a *AttestationData) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type AttesterSlashing

type AttesterSlashing struct {
	Attestation1 *IndexedAttestation
	Attestation2 *IndexedAttestation
}

AttesterSlashing provides information about an attester slashing.

func (*AttesterSlashing) HashTreeRoot

func (t *AttesterSlashing) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *AttesterSlashing.

func (*AttesterSlashing) HashTreeRootWith

func (t *AttesterSlashing) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *AttesterSlashing using the given hash walker.

func (*AttesterSlashing) MarshalJSON

func (a *AttesterSlashing) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*AttesterSlashing) MarshalSSZ

func (t *AttesterSlashing) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *AttesterSlashing to SSZ-encoded bytes.

func (*AttesterSlashing) MarshalSSZTo

func (t *AttesterSlashing) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *AttesterSlashing to SSZ-encoded bytes, appending to the provided buffer.

func (*AttesterSlashing) MarshalYAML

func (a *AttesterSlashing) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*AttesterSlashing) SizeSSZ

func (t *AttesterSlashing) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *AttesterSlashing.

func (*AttesterSlashing) String

func (a *AttesterSlashing) String() string

func (*AttesterSlashing) UnmarshalJSON

func (a *AttesterSlashing) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*AttesterSlashing) UnmarshalSSZ

func (t *AttesterSlashing) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *AttesterSlashing from SSZ-encoded bytes.

func (*AttesterSlashing) UnmarshalYAML

func (a *AttesterSlashing) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type BLSPubKey

type BLSPubKey [48]byte

BLSPubKey is a BLS12-381 public key.

func (BLSPubKey) Format

func (p BLSPubKey) Format(state fmt.State, v rune)

Format formats the public key.

func (BLSPubKey) IsInfinity

func (p BLSPubKey) IsInfinity() bool

IsInfinity returns true if the public key is infinity.

func (BLSPubKey) IsZero

func (p BLSPubKey) IsZero() bool

IsZero returns true if the public key is zero.

func (BLSPubKey) MarshalJSON

func (p BLSPubKey) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (BLSPubKey) MarshalYAML

func (p BLSPubKey) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (BLSPubKey) String

func (p BLSPubKey) String() string

String returns a string version of the structure.

func (*BLSPubKey) UnmarshalJSON

func (p *BLSPubKey) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*BLSPubKey) UnmarshalYAML

func (p *BLSPubKey) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type BLSSignature

type BLSSignature [96]byte

BLSSignature is a BLS12-381 signature.

func (BLSSignature) Format

func (s BLSSignature) Format(state fmt.State, v rune)

Format formats the signature.

func (BLSSignature) IsInfinity

func (s BLSSignature) IsInfinity() bool

IsInfinity returns true if the signature is infinity.

func (BLSSignature) IsZero

func (s BLSSignature) IsZero() bool

IsZero returns true if the signature is zero.

func (BLSSignature) MarshalJSON

func (s BLSSignature) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (BLSSignature) MarshalYAML

func (s BLSSignature) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (BLSSignature) String

func (s BLSSignature) String() string

String returns a string version of the structure.

func (*BLSSignature) UnmarshalJSON

func (s *BLSSignature) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*BLSSignature) UnmarshalYAML

func (s *BLSSignature) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type BeaconBlock

type BeaconBlock struct {
	Slot          Slot
	ProposerIndex ValidatorIndex
	ParentRoot    Root `ssz-size:"32"`
	StateRoot     Root `ssz-size:"32"`
	Body          *BeaconBlockBody
}

BeaconBlock represents a beacon block.

func (*BeaconBlock) HashTreeRoot

func (t *BeaconBlock) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *BeaconBlock.

func (*BeaconBlock) HashTreeRootWith

func (t *BeaconBlock) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *BeaconBlock using the given hash walker.

func (*BeaconBlock) MarshalJSON

func (b *BeaconBlock) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*BeaconBlock) MarshalSSZ

func (t *BeaconBlock) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *BeaconBlock to SSZ-encoded bytes.

func (*BeaconBlock) MarshalSSZTo

func (t *BeaconBlock) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *BeaconBlock to SSZ-encoded bytes, appending to the provided buffer.

func (*BeaconBlock) MarshalYAML

func (b *BeaconBlock) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*BeaconBlock) SizeSSZ

func (t *BeaconBlock) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *BeaconBlock.

func (*BeaconBlock) String

func (b *BeaconBlock) String() string

String returns a string version of the structure.

func (*BeaconBlock) UnmarshalJSON

func (b *BeaconBlock) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*BeaconBlock) UnmarshalSSZ

func (t *BeaconBlock) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *BeaconBlock from SSZ-encoded bytes.

func (*BeaconBlock) UnmarshalYAML

func (b *BeaconBlock) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type BeaconBlockBody

type BeaconBlockBody struct {
	RANDAOReveal      BLSSignature `ssz-size:"96"`
	ETH1Data          *ETH1Data
	Graffiti          [32]byte               `ssz-size:"32"`
	ProposerSlashings []*ProposerSlashing    `dynssz-max:"MAX_PROPOSER_SLASHINGS" ssz-max:"16"`
	AttesterSlashings []*AttesterSlashing    `dynssz-max:"MAX_ATTESTER_SLASHINGS" ssz-max:"2"`
	Attestations      []*Attestation         `dynssz-max:"MAX_ATTESTATIONS"       ssz-max:"128"`
	Deposits          []*Deposit             `dynssz-max:"MAX_DEPOSITS"           ssz-max:"16"`
	VoluntaryExits    []*SignedVoluntaryExit `dynssz-max:"MAX_VOLUNTARY_EXITS"    ssz-max:"16"`
}

BeaconBlockBody represents the body of a beacon block.

func (*BeaconBlockBody) HashTreeRoot

func (t *BeaconBlockBody) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *BeaconBlockBody.

func (*BeaconBlockBody) HashTreeRootWith

func (t *BeaconBlockBody) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *BeaconBlockBody using the given hash walker.

func (*BeaconBlockBody) MarshalJSON

func (b *BeaconBlockBody) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*BeaconBlockBody) MarshalSSZ

func (t *BeaconBlockBody) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *BeaconBlockBody to SSZ-encoded bytes.

func (*BeaconBlockBody) MarshalSSZTo

func (t *BeaconBlockBody) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *BeaconBlockBody to SSZ-encoded bytes, appending to the provided buffer.

func (*BeaconBlockBody) MarshalYAML

func (b *BeaconBlockBody) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*BeaconBlockBody) SizeSSZ

func (t *BeaconBlockBody) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *BeaconBlockBody.

func (*BeaconBlockBody) String

func (b *BeaconBlockBody) String() string

String returns a string version of the structure.

func (*BeaconBlockBody) UnmarshalJSON

func (b *BeaconBlockBody) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*BeaconBlockBody) UnmarshalSSZ

func (t *BeaconBlockBody) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *BeaconBlockBody from SSZ-encoded bytes.

func (*BeaconBlockBody) UnmarshalYAML

func (b *BeaconBlockBody) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type BeaconBlockHeader

type BeaconBlockHeader struct {
	Slot          Slot
	ProposerIndex ValidatorIndex
	ParentRoot    Root `ssz-size:"32"`
	StateRoot     Root `ssz-size:"32"`
	BodyRoot      Root `ssz-size:"32"`
}

BeaconBlockHeader represents the header of a beacon block without its content.

func (*BeaconBlockHeader) HashTreeRoot

func (t *BeaconBlockHeader) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *BeaconBlockHeader.

func (*BeaconBlockHeader) HashTreeRootWith

func (t *BeaconBlockHeader) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *BeaconBlockHeader using the given hash walker.

func (*BeaconBlockHeader) MarshalJSON

func (b *BeaconBlockHeader) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*BeaconBlockHeader) MarshalSSZ

func (t *BeaconBlockHeader) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *BeaconBlockHeader to SSZ-encoded bytes.

func (*BeaconBlockHeader) MarshalSSZTo

func (t *BeaconBlockHeader) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *BeaconBlockHeader to SSZ-encoded bytes, appending to the provided buffer.

func (*BeaconBlockHeader) MarshalYAML

func (b *BeaconBlockHeader) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*BeaconBlockHeader) SizeSSZ

func (t *BeaconBlockHeader) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *BeaconBlockHeader.

func (*BeaconBlockHeader) String

func (b *BeaconBlockHeader) String() string

String returns a string representation of the struct.

func (*BeaconBlockHeader) UnmarshalJSON

func (b *BeaconBlockHeader) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*BeaconBlockHeader) UnmarshalSSZ

func (t *BeaconBlockHeader) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *BeaconBlockHeader from SSZ-encoded bytes.

func (*BeaconBlockHeader) UnmarshalYAML

func (b *BeaconBlockHeader) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type BeaconState

type BeaconState struct {
	GenesisTime                 uint64
	GenesisValidatorsRoot       Root `ssz-size:"32"`
	Slot                        Slot
	Fork                        *Fork
	LatestBlockHeader           *BeaconBlockHeader
	BlockRoots                  []Root `dynssz-size:"SLOTS_PER_HISTORICAL_ROOT,32" ssz-size:"8192,32"`
	StateRoots                  []Root `dynssz-size:"SLOTS_PER_HISTORICAL_ROOT,32" ssz-size:"8192,32"`
	HistoricalRoots             []Root `dynssz-max:"HISTORICAL_ROOTS_LIMIT"        ssz-max:"16777216" ssz-size:"?,32"`
	ETH1Data                    *ETH1Data
	ETH1DataVotes               []*ETH1Data `dynssz-max:"EPOCHS_PER_ETH1_VOTING_PERIOD*SLOTS_PER_EPOCH" ssz-max:"2048"`
	ETH1DepositIndex            uint64
	Validators                  []*Validator          `dynssz-max:"VALIDATOR_REGISTRY_LIMIT"         ssz-max:"1099511627776"`
	Balances                    []Gwei                `dynssz-max:"VALIDATOR_REGISTRY_LIMIT"         ssz-max:"1099511627776"`
	RANDAOMixes                 []Root                `dynssz-size:"EPOCHS_PER_HISTORICAL_VECTOR,32" ssz-size:"65536,32"`
	Slashings                   []Gwei                `dynssz-size:"EPOCHS_PER_SLASHINGS_VECTOR"     ssz-size:"8192"`
	PreviousEpochAttestations   []*PendingAttestation `dynssz-max:"MAX_ATTESTATIONS*SLOTS_PER_EPOCH" ssz-max:"4096"`
	CurrentEpochAttestations    []*PendingAttestation `dynssz-max:"MAX_ATTESTATIONS*SLOTS_PER_EPOCH" ssz-max:"4096"`
	JustificationBits           bitfield.Bitvector4   `ssz-size:"1"`
	PreviousJustifiedCheckpoint *Checkpoint
	CurrentJustifiedCheckpoint  *Checkpoint
	FinalizedCheckpoint         *Checkpoint
}

BeaconState represents a beacon state.

func (*BeaconState) HashTreeRoot

func (t *BeaconState) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *BeaconState.

func (*BeaconState) HashTreeRootWith

func (t *BeaconState) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *BeaconState using the given hash walker.

func (*BeaconState) MarshalJSON

func (s *BeaconState) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*BeaconState) MarshalSSZ

func (t *BeaconState) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *BeaconState to SSZ-encoded bytes.

func (*BeaconState) MarshalSSZTo

func (t *BeaconState) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *BeaconState to SSZ-encoded bytes, appending to the provided buffer.

func (*BeaconState) MarshalYAML

func (s *BeaconState) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*BeaconState) SizeSSZ

func (t *BeaconState) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *BeaconState.

func (*BeaconState) String

func (s *BeaconState) String() string

String returns a string version of the structure.

func (*BeaconState) UnmarshalJSON

func (s *BeaconState) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*BeaconState) UnmarshalSSZ

func (t *BeaconState) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *BeaconState from SSZ-encoded bytes.

func (*BeaconState) UnmarshalYAML

func (s *BeaconState) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type Checkpoint

type Checkpoint struct {
	Epoch Epoch
	Root  Root `ssz-size:"32"`
}

Checkpoint provides information about a checkpoint.

func (*Checkpoint) HashTreeRoot

func (t *Checkpoint) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *Checkpoint.

func (*Checkpoint) HashTreeRootWith

func (t *Checkpoint) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *Checkpoint using the given hash walker.

func (*Checkpoint) MarshalJSON

func (c *Checkpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Checkpoint) MarshalSSZ

func (t *Checkpoint) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *Checkpoint to SSZ-encoded bytes.

func (*Checkpoint) MarshalSSZTo

func (t *Checkpoint) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *Checkpoint to SSZ-encoded bytes, appending to the provided buffer.

func (*Checkpoint) MarshalYAML

func (c *Checkpoint) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*Checkpoint) SizeSSZ

func (t *Checkpoint) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *Checkpoint.

func (*Checkpoint) String

func (c *Checkpoint) String() string

String returns a string version of the structure.

func (*Checkpoint) UnmarshalJSON

func (c *Checkpoint) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Checkpoint) UnmarshalSSZ

func (t *Checkpoint) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *Checkpoint from SSZ-encoded bytes.

func (*Checkpoint) UnmarshalYAML

func (c *Checkpoint) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type CommitteeIndex

type CommitteeIndex uint64

CommitteeIndex is a committee index at a slot.

type Deposit

type Deposit struct {
	Proof [][]byte `dynssz-size:"DEPOSIT_CONTRACT_TREE_DEPTH+1,32" ssz-size:"33,32"`
	Data  *DepositData
}

Deposit provides information about a deposit.

func (*Deposit) HashTreeRoot

func (t *Deposit) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *Deposit.

func (*Deposit) HashTreeRootWith

func (t *Deposit) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *Deposit using the given hash walker.

func (*Deposit) MarshalJSON

func (d *Deposit) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Deposit) MarshalSSZ

func (t *Deposit) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *Deposit to SSZ-encoded bytes.

func (*Deposit) MarshalSSZTo

func (t *Deposit) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *Deposit to SSZ-encoded bytes, appending to the provided buffer.

func (*Deposit) MarshalYAML

func (d *Deposit) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*Deposit) SizeSSZ

func (t *Deposit) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *Deposit.

func (*Deposit) String

func (d *Deposit) String() string

String returns a string version of the structure.

func (*Deposit) UnmarshalJSON

func (d *Deposit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Deposit) UnmarshalSSZ

func (t *Deposit) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *Deposit from SSZ-encoded bytes.

func (*Deposit) UnmarshalYAML

func (d *Deposit) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type DepositData

type DepositData struct {
	PublicKey             BLSPubKey `ssz-size:"48"`
	WithdrawalCredentials []byte    `ssz-size:"32"`
	Amount                Gwei
	Signature             BLSSignature `ssz-size:"96"`
}

DepositData provides information about a deposit made on Ethereum 1.

func (*DepositData) HashTreeRoot

func (t *DepositData) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *DepositData.

func (*DepositData) HashTreeRootWith

func (t *DepositData) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *DepositData using the given hash walker.

func (*DepositData) MarshalJSON

func (d *DepositData) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*DepositData) MarshalSSZ

func (t *DepositData) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *DepositData to SSZ-encoded bytes.

func (*DepositData) MarshalSSZTo

func (t *DepositData) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *DepositData to SSZ-encoded bytes, appending to the provided buffer.

func (*DepositData) MarshalYAML

func (d *DepositData) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*DepositData) SizeSSZ

func (t *DepositData) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *DepositData.

func (*DepositData) String

func (d *DepositData) String() string

String returns a string version of the structure.

func (*DepositData) UnmarshalJSON

func (d *DepositData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*DepositData) UnmarshalSSZ

func (t *DepositData) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *DepositData from SSZ-encoded bytes.

func (*DepositData) UnmarshalYAML

func (d *DepositData) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type DepositMessage

type DepositMessage struct {
	PublicKey             BLSPubKey `ssz-size:"48"`
	WithdrawalCredentials []byte    `ssz-size:"32"`
	Amount                Gwei
}

DepositMessage provides information about a deposit made on Ethereum 1.

func (*DepositMessage) HashTreeRoot

func (t *DepositMessage) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *DepositMessage.

func (*DepositMessage) HashTreeRootWith

func (t *DepositMessage) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *DepositMessage using the given hash walker.

func (*DepositMessage) MarshalJSON

func (d *DepositMessage) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*DepositMessage) MarshalSSZ

func (t *DepositMessage) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *DepositMessage to SSZ-encoded bytes.

func (*DepositMessage) MarshalSSZTo

func (t *DepositMessage) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *DepositMessage to SSZ-encoded bytes, appending to the provided buffer.

func (*DepositMessage) MarshalYAML

func (d *DepositMessage) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*DepositMessage) SizeSSZ

func (t *DepositMessage) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *DepositMessage.

func (*DepositMessage) String

func (d *DepositMessage) String() string

String returns a string version of the structure.

func (*DepositMessage) UnmarshalJSON

func (d *DepositMessage) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*DepositMessage) UnmarshalSSZ

func (t *DepositMessage) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *DepositMessage from SSZ-encoded bytes.

func (*DepositMessage) UnmarshalYAML

func (d *DepositMessage) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type Domain

type Domain [32]byte

Domain is a signature domain.

type DomainType

type DomainType [4]byte

DomainType is a domain type.

type ETH1Data

type ETH1Data struct {
	DepositRoot  Root `ssz-size:"32"`
	DepositCount uint64
	BlockHash    []byte `ssz-size:"32"`
}

ETH1Data provides information about the state of Ethereum 1 as viewed by the Ethereum 2 chain.

func (*ETH1Data) HashTreeRoot

func (t *ETH1Data) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *ETH1Data.

func (*ETH1Data) HashTreeRootWith

func (t *ETH1Data) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *ETH1Data using the given hash walker.

func (*ETH1Data) MarshalJSON

func (e *ETH1Data) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*ETH1Data) MarshalSSZ

func (t *ETH1Data) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *ETH1Data to SSZ-encoded bytes.

func (*ETH1Data) MarshalSSZTo

func (t *ETH1Data) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *ETH1Data to SSZ-encoded bytes, appending to the provided buffer.

func (*ETH1Data) MarshalYAML

func (e *ETH1Data) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*ETH1Data) SizeSSZ

func (t *ETH1Data) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *ETH1Data.

func (*ETH1Data) String

func (e *ETH1Data) String() string

String returns a string version of the structure.

func (*ETH1Data) UnmarshalJSON

func (e *ETH1Data) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*ETH1Data) UnmarshalSSZ

func (t *ETH1Data) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *ETH1Data from SSZ-encoded bytes.

func (*ETH1Data) UnmarshalYAML

func (e *ETH1Data) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type Epoch

type Epoch uint64

Epoch is an epoch number.

func (Epoch) MarshalJSON

func (e Epoch) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Epoch) UnmarshalJSON

func (e *Epoch) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Fork

type Fork struct {
	// Previous version is the previous fork version.
	PreviousVersion Version `ssz-size:"4"`
	// Current version is the current fork version.
	CurrentVersion Version `ssz-size:"4"`
	// Epoch is the epoch at which the current fork version took effect.
	Epoch Epoch
}

Fork provides information about a fork.

func (*Fork) HashTreeRoot

func (t *Fork) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *Fork.

func (*Fork) HashTreeRootWith

func (t *Fork) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *Fork using the given hash walker.

func (*Fork) MarshalJSON

func (f *Fork) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Fork) MarshalSSZ

func (t *Fork) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *Fork to SSZ-encoded bytes.

func (*Fork) MarshalSSZTo

func (t *Fork) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *Fork to SSZ-encoded bytes, appending to the provided buffer.

func (*Fork) MarshalYAML

func (f *Fork) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*Fork) SizeSSZ

func (t *Fork) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *Fork.

func (*Fork) String

func (f *Fork) String() string

String returns a string version of the structure.

func (*Fork) UnmarshalJSON

func (f *Fork) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Fork) UnmarshalSSZ

func (t *Fork) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *Fork from SSZ-encoded bytes.

func (*Fork) UnmarshalYAML

func (f *Fork) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type ForkData

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

ForkData provides data about a fork.

func (*ForkData) HashTreeRoot

func (t *ForkData) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *ForkData.

func (*ForkData) HashTreeRootWith

func (t *ForkData) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *ForkData using the given hash walker.

func (*ForkData) MarshalJSON

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

MarshalJSON implements json.Marshaler.

func (*ForkData) MarshalSSZ

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

MarshalSSZ marshals the *ForkData to SSZ-encoded bytes.

func (*ForkData) MarshalSSZTo

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

MarshalSSZTo marshals the *ForkData to SSZ-encoded bytes, appending to the provided buffer.

func (*ForkData) MarshalYAML

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

MarshalYAML implements yaml.Marshaler.

func (*ForkData) SizeSSZ

func (t *ForkData) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *ForkData.

func (*ForkData) String

func (f *ForkData) String() string

String returns a string version of the structure.

func (*ForkData) UnmarshalJSON

func (f *ForkData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*ForkData) UnmarshalSSZ

func (t *ForkData) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *ForkData from SSZ-encoded bytes.

func (*ForkData) UnmarshalYAML

func (f *ForkData) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type ForkDigest

type ForkDigest [4]byte

ForkDigest is a digest of fork data.

type Gwei

type Gwei uint64

Gwei is an amount in Gwei.

func (Gwei) MarshalJSON

func (g Gwei) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (Gwei) MarshalYAML

func (g Gwei) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*Gwei) UnmarshalJSON

func (g *Gwei) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Gwei) UnmarshalYAML

func (g *Gwei) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type Hash32

type Hash32 [32]byte

Hash32 is a 32-byte hash.

func (Hash32) Format

func (h Hash32) Format(state fmt.State, v rune)

Format formats the hash.

func (Hash32) MarshalJSON

func (h Hash32) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (Hash32) MarshalYAML

func (h Hash32) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (Hash32) String

func (h Hash32) String() string

String returns a string version of the structure.

func (*Hash32) UnmarshalJSON

func (h *Hash32) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Hash32) UnmarshalYAML

func (h *Hash32) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type IndexedAttestation

type IndexedAttestation struct {
	// Currently using primitives as sszgen does not handle []ValidatorIndex
	AttestingIndices []uint64 `ssz-max:"2048"`
	Data             *AttestationData
	Signature        BLSSignature `ssz-size:"96"`
}

IndexedAttestation provides a signed attestation with a list of attesting indices.

func (*IndexedAttestation) HashTreeRoot

func (t *IndexedAttestation) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *IndexedAttestation.

func (*IndexedAttestation) HashTreeRootWith

func (t *IndexedAttestation) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *IndexedAttestation using the given hash walker.

func (*IndexedAttestation) MarshalJSON

func (i *IndexedAttestation) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*IndexedAttestation) MarshalSSZ

func (t *IndexedAttestation) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *IndexedAttestation to SSZ-encoded bytes.

func (*IndexedAttestation) MarshalSSZTo

func (t *IndexedAttestation) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *IndexedAttestation to SSZ-encoded bytes, appending to the provided buffer.

func (*IndexedAttestation) MarshalYAML

func (i *IndexedAttestation) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*IndexedAttestation) SizeSSZ

func (t *IndexedAttestation) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *IndexedAttestation.

func (*IndexedAttestation) String

func (i *IndexedAttestation) String() string

String returns a string version of the structure.

func (*IndexedAttestation) UnmarshalJSON

func (i *IndexedAttestation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*IndexedAttestation) UnmarshalSSZ

func (t *IndexedAttestation) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *IndexedAttestation from SSZ-encoded bytes.

func (*IndexedAttestation) UnmarshalYAML

func (i *IndexedAttestation) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type PendingAttestation

type PendingAttestation struct {
	AggregationBits bitfield.Bitlist `ssz-max:"2048"`
	Data            *AttestationData
	InclusionDelay  Slot
	ProposerIndex   ValidatorIndex
}

PendingAttestation is the Ethereum 2 pending attestation structure.

func (*PendingAttestation) HashTreeRoot

func (t *PendingAttestation) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *PendingAttestation.

func (*PendingAttestation) HashTreeRootWith

func (t *PendingAttestation) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *PendingAttestation using the given hash walker.

func (*PendingAttestation) MarshalJSON

func (p *PendingAttestation) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*PendingAttestation) MarshalSSZ

func (t *PendingAttestation) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *PendingAttestation to SSZ-encoded bytes.

func (*PendingAttestation) MarshalSSZTo

func (t *PendingAttestation) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *PendingAttestation to SSZ-encoded bytes, appending to the provided buffer.

func (*PendingAttestation) MarshalYAML

func (p *PendingAttestation) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*PendingAttestation) SizeSSZ

func (t *PendingAttestation) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *PendingAttestation.

func (*PendingAttestation) String

func (p *PendingAttestation) String() string

String returns a string version of the structure.

func (*PendingAttestation) UnmarshalJSON

func (p *PendingAttestation) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*PendingAttestation) UnmarshalSSZ

func (t *PendingAttestation) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *PendingAttestation from SSZ-encoded bytes.

func (*PendingAttestation) UnmarshalYAML

func (p *PendingAttestation) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type ProposerSlashing

type ProposerSlashing struct {
	SignedHeader1 *SignedBeaconBlockHeader
	SignedHeader2 *SignedBeaconBlockHeader
}

ProposerSlashing provides information about a proposer slashing.

func (*ProposerSlashing) HashTreeRoot

func (t *ProposerSlashing) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *ProposerSlashing.

func (*ProposerSlashing) HashTreeRootWith

func (t *ProposerSlashing) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *ProposerSlashing using the given hash walker.

func (*ProposerSlashing) MarshalJSON

func (p *ProposerSlashing) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*ProposerSlashing) MarshalSSZ

func (t *ProposerSlashing) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *ProposerSlashing to SSZ-encoded bytes.

func (*ProposerSlashing) MarshalSSZTo

func (t *ProposerSlashing) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *ProposerSlashing to SSZ-encoded bytes, appending to the provided buffer.

func (*ProposerSlashing) MarshalYAML

func (p *ProposerSlashing) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*ProposerSlashing) SizeSSZ

func (t *ProposerSlashing) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *ProposerSlashing.

func (*ProposerSlashing) String

func (p *ProposerSlashing) String() string

String returns a string version of the structure.

func (*ProposerSlashing) UnmarshalJSON

func (p *ProposerSlashing) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*ProposerSlashing) UnmarshalSSZ

func (t *ProposerSlashing) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *ProposerSlashing from SSZ-encoded bytes.

func (*ProposerSlashing) UnmarshalYAML

func (p *ProposerSlashing) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type Root

type Root [32]byte

Root is a merkle root.

func (Root) Format

func (r Root) Format(state fmt.State, v rune)

Format formats the root.

func (Root) IsZero

func (r Root) IsZero() bool

IsZero returns true if the root is zero.

func (Root) MarshalJSON

func (r Root) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (Root) MarshalYAML

func (r Root) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (Root) String

func (r Root) String() string

String returns a string version of the structure.

func (*Root) UnmarshalJSON

func (r *Root) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Root) UnmarshalYAML

func (r *Root) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type SignedAggregateAndProof

type SignedAggregateAndProof struct {
	Message   *AggregateAndProof
	Signature BLSSignature `ssz-size:"96"`
}

SignedAggregateAndProof provides information about a signed aggregate and proof.

func (*SignedAggregateAndProof) HashTreeRoot

func (t *SignedAggregateAndProof) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *SignedAggregateAndProof.

func (*SignedAggregateAndProof) HashTreeRootWith

func (t *SignedAggregateAndProof) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *SignedAggregateAndProof using the given hash walker.

func (*SignedAggregateAndProof) MarshalJSON

func (s *SignedAggregateAndProof) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*SignedAggregateAndProof) MarshalSSZ

func (t *SignedAggregateAndProof) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *SignedAggregateAndProof to SSZ-encoded bytes.

func (*SignedAggregateAndProof) MarshalSSZTo

func (t *SignedAggregateAndProof) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *SignedAggregateAndProof to SSZ-encoded bytes, appending to the provided buffer.

func (*SignedAggregateAndProof) MarshalYAML

func (s *SignedAggregateAndProof) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*SignedAggregateAndProof) SizeSSZ

func (t *SignedAggregateAndProof) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *SignedAggregateAndProof.

func (*SignedAggregateAndProof) String

func (s *SignedAggregateAndProof) String() string

String returns a string version of the structure.

func (*SignedAggregateAndProof) UnmarshalJSON

func (s *SignedAggregateAndProof) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*SignedAggregateAndProof) UnmarshalSSZ

func (t *SignedAggregateAndProof) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *SignedAggregateAndProof from SSZ-encoded bytes.

func (*SignedAggregateAndProof) UnmarshalYAML

func (s *SignedAggregateAndProof) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type SignedBeaconBlock

type SignedBeaconBlock struct {
	Message   *BeaconBlock
	Signature BLSSignature `ssz-size:"96"`
}

SignedBeaconBlock is a signed beacon block.

func (*SignedBeaconBlock) HashTreeRoot

func (t *SignedBeaconBlock) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *SignedBeaconBlock.

func (*SignedBeaconBlock) HashTreeRootWith

func (t *SignedBeaconBlock) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *SignedBeaconBlock using the given hash walker.

func (*SignedBeaconBlock) MarshalJSON

func (s *SignedBeaconBlock) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*SignedBeaconBlock) MarshalSSZ

func (t *SignedBeaconBlock) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *SignedBeaconBlock to SSZ-encoded bytes.

func (*SignedBeaconBlock) MarshalSSZTo

func (t *SignedBeaconBlock) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *SignedBeaconBlock to SSZ-encoded bytes, appending to the provided buffer.

func (*SignedBeaconBlock) MarshalYAML

func (s *SignedBeaconBlock) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*SignedBeaconBlock) SizeSSZ

func (t *SignedBeaconBlock) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *SignedBeaconBlock.

func (*SignedBeaconBlock) String

func (s *SignedBeaconBlock) String() string

String returns a string version of the structure.

func (*SignedBeaconBlock) UnmarshalJSON

func (s *SignedBeaconBlock) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*SignedBeaconBlock) UnmarshalSSZ

func (t *SignedBeaconBlock) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *SignedBeaconBlock from SSZ-encoded bytes.

func (*SignedBeaconBlock) UnmarshalYAML

func (s *SignedBeaconBlock) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type SignedBeaconBlockHeader

type SignedBeaconBlockHeader struct {
	Message   *BeaconBlockHeader
	Signature BLSSignature `ssz-size:"96"`
}

SignedBeaconBlockHeader provides information about a signed beacon block header.

func (*SignedBeaconBlockHeader) HashTreeRoot

func (t *SignedBeaconBlockHeader) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *SignedBeaconBlockHeader.

func (*SignedBeaconBlockHeader) HashTreeRootWith

func (t *SignedBeaconBlockHeader) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *SignedBeaconBlockHeader using the given hash walker.

func (*SignedBeaconBlockHeader) MarshalJSON

func (s *SignedBeaconBlockHeader) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*SignedBeaconBlockHeader) MarshalSSZ

func (t *SignedBeaconBlockHeader) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *SignedBeaconBlockHeader to SSZ-encoded bytes.

func (*SignedBeaconBlockHeader) MarshalSSZTo

func (t *SignedBeaconBlockHeader) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *SignedBeaconBlockHeader to SSZ-encoded bytes, appending to the provided buffer.

func (*SignedBeaconBlockHeader) MarshalYAML

func (s *SignedBeaconBlockHeader) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*SignedBeaconBlockHeader) SizeSSZ

func (t *SignedBeaconBlockHeader) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *SignedBeaconBlockHeader.

func (*SignedBeaconBlockHeader) String

func (s *SignedBeaconBlockHeader) String() string

String returns a string version of the structure.

func (*SignedBeaconBlockHeader) UnmarshalJSON

func (s *SignedBeaconBlockHeader) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*SignedBeaconBlockHeader) UnmarshalSSZ

func (t *SignedBeaconBlockHeader) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *SignedBeaconBlockHeader from SSZ-encoded bytes.

func (*SignedBeaconBlockHeader) UnmarshalYAML

func (s *SignedBeaconBlockHeader) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type SignedVoluntaryExit

type SignedVoluntaryExit struct {
	Message   *VoluntaryExit
	Signature BLSSignature `ssz-size:"96"`
}

SignedVoluntaryExit provides information about a signed voluntary exit.

func (*SignedVoluntaryExit) HashTreeRoot

func (t *SignedVoluntaryExit) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *SignedVoluntaryExit.

func (*SignedVoluntaryExit) HashTreeRootWith

func (t *SignedVoluntaryExit) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *SignedVoluntaryExit using the given hash walker.

func (*SignedVoluntaryExit) MarshalJSON

func (s *SignedVoluntaryExit) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*SignedVoluntaryExit) MarshalSSZ

func (t *SignedVoluntaryExit) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *SignedVoluntaryExit to SSZ-encoded bytes.

func (*SignedVoluntaryExit) MarshalSSZTo

func (t *SignedVoluntaryExit) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *SignedVoluntaryExit to SSZ-encoded bytes, appending to the provided buffer.

func (*SignedVoluntaryExit) MarshalYAML

func (s *SignedVoluntaryExit) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*SignedVoluntaryExit) SizeSSZ

func (t *SignedVoluntaryExit) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *SignedVoluntaryExit.

func (*SignedVoluntaryExit) String

func (s *SignedVoluntaryExit) String() string

String returns a string version of the structure.

func (*SignedVoluntaryExit) UnmarshalJSON

func (s *SignedVoluntaryExit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*SignedVoluntaryExit) UnmarshalSSZ

func (t *SignedVoluntaryExit) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *SignedVoluntaryExit from SSZ-encoded bytes.

func (*SignedVoluntaryExit) UnmarshalYAML

func (s *SignedVoluntaryExit) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type SigningData

type SigningData struct {
	ObjectRoot Root   `ssz-size:"32"`
	Domain     Domain `ssz-size:"32"`
}

SigningData provides information about signing data.

func (*SigningData) HashTreeRoot

func (t *SigningData) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *SigningData.

func (*SigningData) HashTreeRootWith

func (t *SigningData) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *SigningData using the given hash walker.

func (*SigningData) MarshalJSON

func (s *SigningData) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*SigningData) MarshalSSZ

func (t *SigningData) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *SigningData to SSZ-encoded bytes.

func (*SigningData) MarshalSSZTo

func (t *SigningData) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *SigningData to SSZ-encoded bytes, appending to the provided buffer.

func (*SigningData) MarshalYAML

func (s *SigningData) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*SigningData) SizeSSZ

func (t *SigningData) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *SigningData.

func (*SigningData) String

func (s *SigningData) String() string

String returns a string version of the structure.

func (*SigningData) UnmarshalJSON

func (s *SigningData) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*SigningData) UnmarshalSSZ

func (t *SigningData) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *SigningData from SSZ-encoded bytes.

func (*SigningData) UnmarshalYAML

func (s *SigningData) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type Slot

type Slot uint64

Slot is a slot number.

func (Slot) MarshalJSON

func (s Slot) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Slot) UnmarshalJSON

func (s *Slot) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Validator

type Validator struct {
	PublicKey                  BLSPubKey `ssz-size:"48"`
	WithdrawalCredentials      []byte    `ssz-size:"32"`
	EffectiveBalance           Gwei
	Slashed                    bool
	ActivationEligibilityEpoch Epoch
	ActivationEpoch            Epoch
	ExitEpoch                  Epoch
	WithdrawableEpoch          Epoch
}

Validator is the Ethereum 2 validator structure.

func (*Validator) HashTreeRoot

func (t *Validator) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *Validator.

func (*Validator) HashTreeRootWith

func (t *Validator) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *Validator using the given hash walker.

func (*Validator) MarshalJSON

func (v *Validator) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Validator) MarshalSSZ

func (t *Validator) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *Validator to SSZ-encoded bytes.

func (*Validator) MarshalSSZTo

func (t *Validator) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *Validator to SSZ-encoded bytes, appending to the provided buffer.

func (*Validator) MarshalYAML

func (v *Validator) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*Validator) SizeSSZ

func (t *Validator) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *Validator.

func (*Validator) String

func (v *Validator) String() string

String returns a string version of the structure.

func (*Validator) UnmarshalJSON

func (v *Validator) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Validator) UnmarshalSSZ

func (t *Validator) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *Validator from SSZ-encoded bytes.

func (*Validator) UnmarshalYAML

func (v *Validator) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

type ValidatorIndex

type ValidatorIndex uint64

ValidatorIndex is a validator registry index.

func (ValidatorIndex) MarshalJSON

func (v ValidatorIndex) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*ValidatorIndex) UnmarshalJSON

func (v *ValidatorIndex) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Version

type Version [4]byte

Version is a fork version.

type VoluntaryExit

type VoluntaryExit struct {
	Epoch          Epoch
	ValidatorIndex ValidatorIndex
}

VoluntaryExit provides information about a voluntary exit.

func (*VoluntaryExit) HashTreeRoot

func (t *VoluntaryExit) HashTreeRoot() (root [32]byte, err error)

HashTreeRoot computes the SSZ hash tree root of the *VoluntaryExit.

func (*VoluntaryExit) HashTreeRootWith

func (t *VoluntaryExit) HashTreeRootWith(hh sszutils.HashWalker) error

HashTreeRootWith computes the SSZ hash tree root of the *VoluntaryExit using the given hash walker.

func (*VoluntaryExit) MarshalJSON

func (v *VoluntaryExit) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*VoluntaryExit) MarshalSSZ

func (t *VoluntaryExit) MarshalSSZ() ([]byte, error)

MarshalSSZ marshals the *VoluntaryExit to SSZ-encoded bytes.

func (*VoluntaryExit) MarshalSSZTo

func (t *VoluntaryExit) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo marshals the *VoluntaryExit to SSZ-encoded bytes, appending to the provided buffer.

func (*VoluntaryExit) MarshalYAML

func (v *VoluntaryExit) MarshalYAML() ([]byte, error)

MarshalYAML implements yaml.Marshaler.

func (*VoluntaryExit) SizeSSZ

func (t *VoluntaryExit) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *VoluntaryExit.

func (*VoluntaryExit) String

func (v *VoluntaryExit) String() string

String returns a string version of the structure.

func (*VoluntaryExit) UnmarshalJSON

func (v *VoluntaryExit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*VoluntaryExit) UnmarshalSSZ

func (t *VoluntaryExit) UnmarshalSSZ(buf []byte) (err error)

UnmarshalSSZ unmarshals the *VoluntaryExit from SSZ-encoded bytes.

func (*VoluntaryExit) UnmarshalYAML

func (v *VoluntaryExit) UnmarshalYAML(input []byte) error

UnmarshalYAML implements yaml.Unmarshaler.

Jump to

Keyboard shortcuts

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