v1

package
v0.16.6 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation ¶

Overview ¶

Code generated by fastssz. DO NOT EDIT. Hash: 3097923ada74064650686815bf747adbd92e200d44c0eb8452925f7e8b6dafce

Index ¶

Constants ¶

This section is empty.

Variables ¶

View Source
var SupportedEventTopics = map[string]bool{
	"attestation":            true,
	"block":                  true,
	"chain_reorg":            true,
	"finalized_checkpoint":   true,
	"head":                   true,
	"voluntary_exit":         true,
	"contribution_and_proof": true,
	"payload_attributes":     true,
}

SupportedEventTopics is a map of supported event topics.

Functions ¶

This section is empty.

Types ¶

type AttesterDuty ¶

type AttesterDuty struct {
	// PubKey is the public key of the validator that should attest.
	PubKey phase0.BLSPubKey
	// Slot is the slot in which the validator should attest.
	Slot phase0.Slot
	// ValidatorIndex is the index of the validator that should attest.
	ValidatorIndex phase0.ValidatorIndex
	// CommitteeIndex is the index of the committee in which the attesting validator has been placed.
	CommitteeIndex phase0.CommitteeIndex
	// CommitteeLength is the length of the committee in which the attesting validator has been placed.
	CommitteeLength uint64
	// CommitteesAtSlot is the number of committees in the slot.
	CommitteesAtSlot uint64
	// ValidatorCommitteeIndex is the index of the validator in the list of validators in the committee.
	ValidatorCommitteeIndex uint64
}

AttesterDuty is the data regarding which validators have the duty to attest in a slot.

func (*AttesterDuty) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*AttesterDuty) String ¶

func (a *AttesterDuty) String() string

String returns a string version of the structure.

func (*AttesterDuty) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type BeaconBlockHeader ¶

type BeaconBlockHeader struct {
	// Root is the root of the beacon block.
	Root phase0.Root
	// Canonical is true if the block is considered canonical.
	Canonical bool
	// Header is the beacon block header.
	Header *phase0.SignedBeaconBlockHeader
}

BeaconBlockHeader is the data providing information about beacon blocks.

func (*BeaconBlockHeader) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*BeaconBlockHeader) String ¶

func (b *BeaconBlockHeader) String() string

String returns a string version of the structure.

func (*BeaconBlockHeader) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type BeaconCommittee ¶

type BeaconCommittee struct {
	// Slot is the slot in which the committee attests.
	Slot phase0.Slot
	// Index is the index of the committee.
	Index phase0.CommitteeIndex
	// Validators is the list of validator indices in the committee.
	Validators []phase0.ValidatorIndex
}

BeaconCommittee is the data providing information validator membership of committees.

func (*BeaconCommittee) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*BeaconCommittee) String ¶

func (b *BeaconCommittee) String() string

String returns a string version of the structure.

func (*BeaconCommittee) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type BeaconCommitteeSubscription ¶

type BeaconCommitteeSubscription struct {
	// ValidatorIdex is the index of the validator making the subscription request.
	ValidatorIndex phase0.ValidatorIndex
	// Slot is the slot for which the validator is attesting.
	Slot phase0.Slot
	// CommitteeIndex is the index of the committee of which the validator is a member at the given slot.
	CommitteeIndex phase0.CommitteeIndex
	// CommitteesAtSlot is the number of committees at the given slot.
	CommitteesAtSlot uint64
	// IsAggregator is true if the validator that wishes to subscribe is required to aggregate attestations.
	IsAggregator bool
}

BeaconCommitteeSubscription is the data required for a beacon committee subscription.

func (*BeaconCommitteeSubscription) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*BeaconCommitteeSubscription) String ¶

func (b *BeaconCommitteeSubscription) String() string

String returns a string version of the structure.

func (*BeaconCommitteeSubscription) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type BlockEvent ¶

type BlockEvent struct {
	Slot                phase0.Slot
	Block               phase0.Root
	ExecutionOptimistic bool
}

BlockEvent is the data for the block event.

func (*BlockEvent) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*BlockEvent) String ¶

func (e *BlockEvent) String() string

String returns a string version of the structure.

func (*BlockEvent) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type ChainReorgEvent ¶

type ChainReorgEvent struct {
	Slot         phase0.Slot
	Depth        uint64
	OldHeadBlock phase0.Root
	NewHeadBlock phase0.Root
	OldHeadState phase0.Root
	NewHeadState phase0.Root
	Epoch        phase0.Epoch
}

ChainReorgEvent is the data for the head event.

func (*ChainReorgEvent) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*ChainReorgEvent) String ¶

func (e *ChainReorgEvent) String() string

String returns a string version of the structure.

func (*ChainReorgEvent) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type DepositContract ¶

type DepositContract struct {
	ChainID uint64
	Address []byte
}

DepositContract represents the details of the Ethereum 1 deposit contract for a chain.

func (*DepositContract) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*DepositContract) String ¶

func (d *DepositContract) String() string

String returns a string version of the structure.

func (*DepositContract) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type Event ¶

type Event struct {
	// Topic is the topic of the event.
	Topic string
	// Data is the data of the event.
	Data interface{}
}

Event is the container for events sent from the API.

func (*Event) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*Event) String ¶

func (e *Event) String() string

String returns a string version of the structure.

func (*Event) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type Finality ¶

type Finality struct {
	// Finalized is the finalized checkpoint.
	Finalized *phase0.Checkpoint
	// Justified is the justified checkpoint.
	Justified *phase0.Checkpoint
	// PreviousJustified is the previous justified checkpoint.
	PreviousJustified *phase0.Checkpoint
}

Finality is the data regarding finality checkpoints at a given state.

func (*Finality) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*Finality) String ¶

func (f *Finality) String() string

String returns a string version of the structure.

func (*Finality) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type FinalizedCheckpointEvent ¶

type FinalizedCheckpointEvent struct {
	Block phase0.Root
	State phase0.Root
	Epoch phase0.Epoch
}

FinalizedCheckpointEvent is the data for the finalized checkpoint event.

func (*FinalizedCheckpointEvent) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*FinalizedCheckpointEvent) String ¶

func (e *FinalizedCheckpointEvent) String() string

String returns a string version of the structure.

func (*FinalizedCheckpointEvent) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type Genesis ¶

type Genesis struct {
	GenesisTime           time.Time
	GenesisValidatorsRoot phase0.Root
	GenesisForkVersion    phase0.Version
}

Genesis provides information about the genesis of a chain.

func (*Genesis) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*Genesis) String ¶

func (g *Genesis) String() string

String returns a string version of the structure.

func (*Genesis) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type HeadEvent ¶

type HeadEvent struct {
	Slot                      phase0.Slot
	Block                     phase0.Root
	State                     phase0.Root
	EpochTransition           bool
	CurrentDutyDependentRoot  phase0.Root
	PreviousDutyDependentRoot phase0.Root
}

HeadEvent is the data for the head event.

func (*HeadEvent) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*HeadEvent) String ¶

func (e *HeadEvent) String() string

String returns a string version of the structure.

func (*HeadEvent) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type PayloadAttributesData ¶

type PayloadAttributesData struct {
	// ProposerIndex is the index of the proposer.
	ProposerIndex phase0.ValidatorIndex
	// ProposalSlot is the slot of the proposal.
	ProposalSlot phase0.Slot
	// ParentBlockNumber is the number of the parent block.
	ParentBlockNumber uint64
	// ParentBlockRoot is the root of the parent block.
	ParentBlockRoot phase0.Root
	// ParentBlockHash is the hash of the parent block.
	ParentBlockHash phase0.Hash32
	// V1 is the v1 payload attributes.
	V1 *PayloadAttributesV1
	// V2 is the v2 payload attributes.
	V2 *PayloadAttributesV2
}

PayloadAttributesData represents the data of a payload_attributes event.

type PayloadAttributesEvent ¶

type PayloadAttributesEvent struct {
	// Version is the fork version of the beacon chain.
	Version spec.DataVersion
	// Data is the data of the event.
	Data *PayloadAttributesData
}

PayloadAttributesEvent represents the data of a payload_attributes event.

func (*PayloadAttributesEvent) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*PayloadAttributesEvent) String ¶

func (e *PayloadAttributesEvent) String() string

String returns a string version of the structure.

func (*PayloadAttributesEvent) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type PayloadAttributesV1 ¶

type PayloadAttributesV1 struct {
	// Timestamp is the timestamp of the payload.
	Timestamp uint64
	// PrevRandao is the previous randao.
	PrevRandao [32]byte
	// SuggestedFeeRecipient is the suggested fee recipient.
	SuggestedFeeRecipient bellatrix.ExecutionAddress
}

PayloadAttributes represents the payload attributes.

func (*PayloadAttributesV1) UnmarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

type PayloadAttributesV2 ¶

type PayloadAttributesV2 struct {
	// Timestamp is the timestamp of the payload.
	Timestamp uint64
	// PrevRandao is the previous randao.
	PrevRandao [32]byte
	// SuggestedFeeRecipient is the suggested fee recipient.
	SuggestedFeeRecipient bellatrix.ExecutionAddress
	// Withdrawals is the list of withdrawals.
	Withdrawals []*capella.Withdrawal
}

PayloadAttributesV2 represents the payload attributes v2.

func (*PayloadAttributesV2) UnmarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

type ProposalPreparation ¶

type ProposalPreparation struct {
	// ValidatorIdex is the index of the validator making the proposal request.
	ValidatorIndex phase0.ValidatorIndex
	// FeeRecipient is the execution address to be used with preparing blocks.
	FeeRecipient bellatrix.ExecutionAddress `ssz-size:"20"`
}

ProposalPreparation is the data required for proposal preparation.

func (*ProposalPreparation) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*ProposalPreparation) String ¶

func (p *ProposalPreparation) String() string

String returns a string version of the structure.

func (*ProposalPreparation) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type ProposerDuty ¶

type ProposerDuty struct {
	PubKey         phase0.BLSPubKey
	Slot           phase0.Slot
	ValidatorIndex phase0.ValidatorIndex
}

ProposerDuty represents a duty of a validator to propose a slot.

func (*ProposerDuty) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*ProposerDuty) String ¶

func (p *ProposerDuty) String() string

String returns a string version of the structure.

func (*ProposerDuty) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type SignedValidatorRegistration ¶

type SignedValidatorRegistration struct {
	Message   *ValidatorRegistration
	Signature phase0.BLSSignature `ssz-size:"96"`
}

SignedValidatorRegistration is a signed ValidatorRegistrationV1.

func (*SignedValidatorRegistration) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*SignedValidatorRegistration) MarshalYAML ¶

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

MarshalYAML implements yaml.Marshaler.

func (*SignedValidatorRegistration) String ¶

func (s *SignedValidatorRegistration) String() string

String returns a string version of the structure.

func (*SignedValidatorRegistration) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

func (*SignedValidatorRegistration) UnmarshalYAML ¶

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

UnmarshalYAML implements yaml.Unmarshaler.

type SyncCommittee ¶

type SyncCommittee struct {
	// Validators is the list of validator indices in the committee.
	Validators []phase0.ValidatorIndex
	// ValidatorAggregates are the lists of validators in each aggregate.
	ValidatorAggregates [][]phase0.ValidatorIndex
}

SyncCommittee is the data providing validator membership of sync committees.

func (*SyncCommittee) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*SyncCommittee) String ¶

func (s *SyncCommittee) String() string

String returns a string version of the structure.

func (*SyncCommittee) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type SyncCommitteeDuty ¶

type SyncCommitteeDuty struct {
	// PubKey is the public key of the validator that should contribute.
	PubKey phase0.BLSPubKey
	// ValidatorIndex is the index of the validator that should contribute.
	ValidatorIndex phase0.ValidatorIndex
	// ValidatorSyncCommitteeIndices is the index of the validator in the list of validators in the committee.
	ValidatorSyncCommitteeIndices []phase0.CommitteeIndex
}

SyncCommitteeDuty is the data regarding which validators have the duty to contribute to sync committees in a slot.

func (*SyncCommitteeDuty) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*SyncCommitteeDuty) String ¶

func (s *SyncCommitteeDuty) String() string

String returns a string version of the structure.

func (*SyncCommitteeDuty) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type SyncCommitteeSubscription ¶

type SyncCommitteeSubscription struct {
	// ValidatorIdex is the index of the validator making the subscription request.
	ValidatorIndex phase0.ValidatorIndex
	// SyncCommitteeIndices are the indices of the sync committees of which the validator is a member.
	SyncCommitteeIndices []phase0.CommitteeIndex
	// UntilEpoch is the epoch at which the subscription no longer applies.
	UntilEpoch phase0.Epoch
}

SyncCommitteeSubscription is the data required for a sync committee subscription.

func (*SyncCommitteeSubscription) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*SyncCommitteeSubscription) String ¶

func (s *SyncCommitteeSubscription) String() string

String returns a string version of the structure.

func (*SyncCommitteeSubscription) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type SyncState ¶

type SyncState struct {
	// HeadSlot is the head slot of the chain as understood by the node.
	HeadSlot phase0.Slot
	// SyncDistance is the distance between the node's highest synced slot and the head slot.
	SyncDistance phase0.Slot
	// IsOptimistic is true if the node is optimistic.
	IsOptimistic bool
	// IsSyncing is true if the node is syncing.
	IsSyncing bool
}

SyncState is the data regarding the node's synchronization state to the chain.

func (*SyncState) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*SyncState) String ¶

func (s *SyncState) String() string

String returns a string version of the structure.

func (*SyncState) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type Validator ¶

type Validator struct {
	Index     phase0.ValidatorIndex
	Balance   phase0.Gwei
	Status    ValidatorState
	Validator *phase0.Validator
}

Validator contains the spec validator plus additional fields.

func (*Validator) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*Validator) PubKey ¶

func (v *Validator) PubKey(_ context.Context) (phase0.BLSPubKey, error)

PubKey implements ValidatorPubKeyProvider.

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.

type ValidatorBalance ¶

type ValidatorBalance struct {
	Index   phase0.ValidatorIndex
	Balance phase0.Gwei
}

ValidatorBalance contains the balance of a validator.

func (*ValidatorBalance) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*ValidatorBalance) String ¶

func (v *ValidatorBalance) String() string

String returns a string version of the structure.

func (*ValidatorBalance) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

type ValidatorRegistration ¶

type ValidatorRegistration struct {
	FeeRecipient bellatrix.ExecutionAddress `ssz-size:"20"`
	GasLimit     uint64
	Timestamp    time.Time
	Pubkey       phase0.BLSPubKey `ssz-size:"48"`
}

ValidatorRegistration represents a ValidatorRegistrationV1.

func (*ValidatorRegistration) GetTree ¶

func (v *ValidatorRegistration) GetTree() (*ssz.Node, error)

GetTree ssz hashes the ValidatorRegistration object

func (*ValidatorRegistration) HashTreeRoot ¶

func (v *ValidatorRegistration) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the ValidatorRegistration object

func (*ValidatorRegistration) HashTreeRootWith ¶

func (v *ValidatorRegistration) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the ValidatorRegistration object with a hasher

func (*ValidatorRegistration) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (*ValidatorRegistration) MarshalSSZ ¶

func (v *ValidatorRegistration) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the ValidatorRegistration object

func (*ValidatorRegistration) MarshalSSZTo ¶

func (v *ValidatorRegistration) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the ValidatorRegistration object to a target array

func (*ValidatorRegistration) MarshalYAML ¶

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

MarshalYAML implements yaml.Marshaler.

func (*ValidatorRegistration) SizeSSZ ¶

func (v *ValidatorRegistration) SizeSSZ() (size int)

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

func (*ValidatorRegistration) String ¶

func (v *ValidatorRegistration) String() string

String returns a string version of the structure.

func (*ValidatorRegistration) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

func (*ValidatorRegistration) UnmarshalSSZ ¶

func (v *ValidatorRegistration) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the ValidatorRegistration object

func (*ValidatorRegistration) UnmarshalYAML ¶

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

UnmarshalYAML implements yaml.Unmarshaler.

type ValidatorState ¶

type ValidatorState int

ValidatorState defines the state of the validator.

const (
	// ValidatorStateUnknown means no information can be found about the validator.
	ValidatorStateUnknown ValidatorState = iota
	// ValidatorStatePendingInitialized means the validator is not yet in the queue to be activated.
	ValidatorStatePendingInitialized
	// ValidatorStatePendingQueued means the validator is in the queue to be activated.
	ValidatorStatePendingQueued
	// ValidatorStateActiveOngoing means the validator is active.
	ValidatorStateActiveOngoing
	// ValidatorStateActiveExiting means the validator is active but exiting.
	ValidatorStateActiveExiting
	// ValidatorStateActiveSlashed means the validator is active but exiting due to being slashed.
	ValidatorStateActiveSlashed
	// ValidatorStateExitedUnslashed means the validator has exited without being slashed.
	ValidatorStateExitedUnslashed
	// ValidatorStateExitedSlashed means the validator has exited due to being slashed.
	ValidatorStateExitedSlashed
	// ValidatorStateWithdrawalPossible means it is possible to withdraw funds from the validator.
	ValidatorStateWithdrawalPossible
	// ValidatorStateWithdrawalDone means funds have been withdrawn from the validator.
	ValidatorStateWithdrawalDone
)

func ValidatorToState ¶

func ValidatorToState(validator *phase0.Validator, currentEpoch phase0.Epoch, farFutureEpoch phase0.Epoch) ValidatorState

ValidatorToState is a helper that calculates the validator status given a validator struct.

func (ValidatorState) HasActivated ¶

func (v ValidatorState) HasActivated() bool

HasActivated returns true if the validator has activated.

func (ValidatorState) HasBalance ¶

func (v ValidatorState) HasBalance() bool

HasBalance returns true if the validator has a balance.

func (ValidatorState) HasExited ¶

func (v ValidatorState) HasExited() bool

HasExited returns true if the validator has exited.

func (ValidatorState) IsActive ¶

func (v ValidatorState) IsActive() bool

IsActive returns true if the validator is active.

func (ValidatorState) IsAttesting ¶

func (v ValidatorState) IsAttesting() bool

IsAttesting returns true if the validator should be attesting.

func (ValidatorState) IsExited ¶

func (v ValidatorState) IsExited() bool

IsExited returns true if the validator is exited.

func (ValidatorState) IsPending ¶

func (v ValidatorState) IsPending() bool

IsPending returns true if the validator is pending.

func (*ValidatorState) MarshalJSON ¶

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

MarshalJSON implements json.Marshaler.

func (ValidatorState) String ¶

func (v ValidatorState) String() string

func (*ValidatorState) UnmarshalJSON ¶

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

UnmarshalJSON implements json.Unmarshaler.

Directories ¶

Path Synopsis
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.
Code generated by fastssz.

Jump to

Keyboard shortcuts

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