Documentation ¶
Overview ¶
Code generated by fastssz. DO NOT EDIT. Hash: 9e3f2cf28e5e9da2ccef0d72040cce6f40173ec2f43f80fe2c48362287f55dd2
Code generated by fastssz. DO NOT EDIT. Hash: 34361e216b1af7086237b970387dbc062e8ce1d1fe3a0daaa8ee4cbbc4f77cd2
Code generated by fastssz. DO NOT EDIT. Hash: 2f54f042c4aaeedcc92097296f056864c3d4bc85e37eea42eee80f8c5f28a658
Index ¶
- Variables
- type AttesterDuty
- type BeaconBlockHeader
- type BeaconCommittee
- type BeaconCommitteeSubscription
- type BlindedBeaconBlock
- func (b *BlindedBeaconBlock) HashTreeRoot() ([32]byte, error)
- func (b *BlindedBeaconBlock) HashTreeRootWith(hh *ssz.Hasher) (err error)
- func (b *BlindedBeaconBlock) MarshalJSON() ([]byte, error)
- func (b *BlindedBeaconBlock) MarshalSSZ() ([]byte, error)
- func (b *BlindedBeaconBlock) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (b *BlindedBeaconBlock) MarshalYAML() ([]byte, error)
- func (b *BlindedBeaconBlock) SizeSSZ() (size int)
- func (b *BlindedBeaconBlock) String() string
- func (b *BlindedBeaconBlock) UnmarshalJSON(input []byte) error
- func (b *BlindedBeaconBlock) UnmarshalSSZ(buf []byte) error
- func (b *BlindedBeaconBlock) UnmarshalYAML(input []byte) error
- type BlindedBeaconBlockBody
- func (b *BlindedBeaconBlockBody) HashTreeRoot() ([32]byte, error)
- func (b *BlindedBeaconBlockBody) HashTreeRootWith(hh *ssz.Hasher) (err error)
- func (b *BlindedBeaconBlockBody) MarshalJSON() ([]byte, error)
- func (b *BlindedBeaconBlockBody) MarshalSSZ() ([]byte, error)
- func (b *BlindedBeaconBlockBody) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (b *BlindedBeaconBlockBody) MarshalYAML() ([]byte, error)
- func (b *BlindedBeaconBlockBody) SizeSSZ() (size int)
- func (b *BlindedBeaconBlockBody) String() string
- func (b *BlindedBeaconBlockBody) UnmarshalJSON(input []byte) error
- func (b *BlindedBeaconBlockBody) UnmarshalSSZ(buf []byte) error
- func (b *BlindedBeaconBlockBody) UnmarshalYAML(input []byte) error
- type BlockEvent
- type ChainReorgEvent
- type DepositContract
- type Event
- type Finality
- type FinalizedCheckpointEvent
- type Genesis
- type HeadEvent
- type ProposalPreparation
- type ProposerDuty
- type SignedBlindedBeaconBlock
- func (s *SignedBlindedBeaconBlock) HashTreeRoot() ([32]byte, error)
- func (s *SignedBlindedBeaconBlock) HashTreeRootWith(hh *ssz.Hasher) (err error)
- func (s *SignedBlindedBeaconBlock) MarshalJSON() ([]byte, error)
- func (s *SignedBlindedBeaconBlock) MarshalSSZ() ([]byte, error)
- func (s *SignedBlindedBeaconBlock) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (s *SignedBlindedBeaconBlock) MarshalYAML() ([]byte, error)
- func (s *SignedBlindedBeaconBlock) SizeSSZ() (size int)
- func (s *SignedBlindedBeaconBlock) String() string
- func (s *SignedBlindedBeaconBlock) UnmarshalJSON(input []byte) error
- func (s *SignedBlindedBeaconBlock) UnmarshalSSZ(buf []byte) error
- func (s *SignedBlindedBeaconBlock) UnmarshalYAML(input []byte) error
- type SyncCommittee
- type SyncCommitteeDuty
- type SyncCommitteeSubscription
- type SyncState
- type Validator
- type ValidatorBalance
- type ValidatorState
- func (v ValidatorState) HasActivated() bool
- func (v ValidatorState) HasBalance() bool
- func (v ValidatorState) HasExited() bool
- func (v ValidatorState) IsActive() bool
- func (v ValidatorState) IsAttesting() bool
- func (v ValidatorState) IsExited() bool
- func (v ValidatorState) IsPending() bool
- func (v *ValidatorState) MarshalJSON() ([]byte, error)
- func (v ValidatorState) String() string
- func (v *ValidatorState) UnmarshalJSON(input []byte) error
Constants ¶
This section is empty.
Variables ¶
var SupportedEventTopics = map[string]bool{ "attestation": true, "block": true, "chain_reorg": true, "finalized_checkpoint": true, "head": true, "voluntary_exit": true, "contribution_and_proof": 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 ¶ added in v0.6.9
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 ¶ added in v0.6.9
func (b *BeaconBlockHeader) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*BeaconBlockHeader) String ¶ added in v0.6.9
func (b *BeaconBlockHeader) String() string
String returns a string version of the structure.
func (*BeaconBlockHeader) UnmarshalJSON ¶ added in v0.6.9
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 BlindedBeaconBlock ¶ added in v0.11.0
type BlindedBeaconBlock struct { Slot phase0.Slot ProposerIndex phase0.ValidatorIndex ParentRoot phase0.Root `ssz-size:"32"` StateRoot phase0.Root `ssz-size:"32"` Body *BlindedBeaconBlockBody }
BlindedBeaconBlock represents a blinded beacon block.
func (*BlindedBeaconBlock) HashTreeRoot ¶ added in v0.11.0
func (b *BlindedBeaconBlock) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the BlindedBeaconBlock object
func (*BlindedBeaconBlock) HashTreeRootWith ¶ added in v0.11.0
func (b *BlindedBeaconBlock) HashTreeRootWith(hh *ssz.Hasher) (err error)
HashTreeRootWith ssz hashes the BlindedBeaconBlock object with a hasher
func (*BlindedBeaconBlock) MarshalJSON ¶ added in v0.11.0
func (b *BlindedBeaconBlock) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*BlindedBeaconBlock) MarshalSSZ ¶ added in v0.11.0
func (b *BlindedBeaconBlock) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the BlindedBeaconBlock object
func (*BlindedBeaconBlock) MarshalSSZTo ¶ added in v0.11.0
func (b *BlindedBeaconBlock) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the BlindedBeaconBlock object to a target array
func (*BlindedBeaconBlock) MarshalYAML ¶ added in v0.11.0
func (b *BlindedBeaconBlock) MarshalYAML() ([]byte, error)
MarshalYAML implements yaml.Marshaler.
func (*BlindedBeaconBlock) SizeSSZ ¶ added in v0.11.0
func (b *BlindedBeaconBlock) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the BlindedBeaconBlock object
func (*BlindedBeaconBlock) String ¶ added in v0.11.0
func (b *BlindedBeaconBlock) String() string
String returns a string version of the structure.
func (*BlindedBeaconBlock) UnmarshalJSON ¶ added in v0.11.0
func (b *BlindedBeaconBlock) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
func (*BlindedBeaconBlock) UnmarshalSSZ ¶ added in v0.11.0
func (b *BlindedBeaconBlock) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the BlindedBeaconBlock object
func (*BlindedBeaconBlock) UnmarshalYAML ¶ added in v0.11.0
func (b *BlindedBeaconBlock) UnmarshalYAML(input []byte) error
UnmarshalYAML implements yaml.Unmarshaler.
type BlindedBeaconBlockBody ¶ added in v0.11.0
type BlindedBeaconBlockBody struct { RANDAOReveal phase0.BLSSignature `ssz-size:"96"` ETH1Data *phase0.ETH1Data Graffiti []byte `ssz-size:"32"` ProposerSlashings []*phase0.ProposerSlashing `ssz-max:"16"` AttesterSlashings []*phase0.AttesterSlashing `ssz-max:"2"` Attestations []*phase0.Attestation `ssz-max:"128"` Deposits []*phase0.Deposit `ssz-max:"16"` VoluntaryExits []*phase0.SignedVoluntaryExit `ssz-max:"16"` SyncAggregate *altair.SyncAggregate ExecutionPayloadHeader *bellatrix.ExecutionPayloadHeader }
BlindedBeaconBlockBody represents the body of a blinded beacon block.
func (*BlindedBeaconBlockBody) HashTreeRoot ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the BlindedBeaconBlockBody object
func (*BlindedBeaconBlockBody) HashTreeRootWith ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) HashTreeRootWith(hh *ssz.Hasher) (err error)
HashTreeRootWith ssz hashes the BlindedBeaconBlockBody object with a hasher
func (*BlindedBeaconBlockBody) MarshalJSON ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*BlindedBeaconBlockBody) MarshalSSZ ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the BlindedBeaconBlockBody object
func (*BlindedBeaconBlockBody) MarshalSSZTo ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the BlindedBeaconBlockBody object to a target array
func (*BlindedBeaconBlockBody) MarshalYAML ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) MarshalYAML() ([]byte, error)
MarshalYAML implements yaml.Marshaler.
func (*BlindedBeaconBlockBody) SizeSSZ ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the BlindedBeaconBlockBody object
func (*BlindedBeaconBlockBody) String ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) String() string
String returns a string version of the structure.
func (*BlindedBeaconBlockBody) UnmarshalJSON ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
func (*BlindedBeaconBlockBody) UnmarshalSSZ ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the BlindedBeaconBlockBody object
func (*BlindedBeaconBlockBody) UnmarshalYAML ¶ added in v0.11.0
func (b *BlindedBeaconBlockBody) UnmarshalYAML(input []byte) error
UnmarshalYAML implements yaml.Unmarshaler.
type BlockEvent ¶ added in v0.6.9
BlockEvent is the data for the block event.
func (*BlockEvent) MarshalJSON ¶ added in v0.6.9
func (e *BlockEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*BlockEvent) String ¶ added in v0.6.9
func (e *BlockEvent) String() string
String returns a string version of the structure.
func (*BlockEvent) UnmarshalJSON ¶ added in v0.6.9
func (e *BlockEvent) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ChainReorgEvent ¶ added in v0.6.9
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 ¶ added in v0.6.9
func (e *ChainReorgEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*ChainReorgEvent) String ¶ added in v0.6.9
func (e *ChainReorgEvent) String() string
String returns a string version of the structure.
func (*ChainReorgEvent) UnmarshalJSON ¶ added in v0.6.9
func (e *ChainReorgEvent) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DepositContract ¶ added in v0.6.2
DepositContract represents the details of the Ethereum 1 deposit contract for a chain.
func (*DepositContract) MarshalJSON ¶ added in v0.6.2
func (d *DepositContract) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*DepositContract) String ¶ added in v0.6.2
func (d *DepositContract) String() string
String returns a string version of the structure.
func (*DepositContract) UnmarshalJSON ¶ added in v0.6.2
func (d *DepositContract) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Event ¶ added in v0.6.9
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 ¶ added in v0.6.20
MarshalJSON implements json.Marshaler.
func (*Event) UnmarshalJSON ¶ added in v0.6.20
UnmarshalJSON implements json.Unmarshaler.
type Finality ¶ added in v0.6.4
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 ¶ added in v0.6.4
MarshalJSON implements json.Marshaler.
func (*Finality) UnmarshalJSON ¶ added in v0.6.4
UnmarshalJSON implements json.Unmarshaler.
type FinalizedCheckpointEvent ¶ added in v0.6.9
FinalizedCheckpointEvent is the data for the finalized checkpoint event.
func (*FinalizedCheckpointEvent) MarshalJSON ¶ added in v0.6.9
func (e *FinalizedCheckpointEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*FinalizedCheckpointEvent) String ¶ added in v0.6.9
func (e *FinalizedCheckpointEvent) String() string
String returns a string version of the structure.
func (*FinalizedCheckpointEvent) UnmarshalJSON ¶ added in v0.6.9
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 ¶ added in v0.6.2
MarshalJSON implements json.Marshaler.
func (*Genesis) UnmarshalJSON ¶ added in v0.6.2
UnmarshalJSON implements json.Unmarshaler.
type HeadEvent ¶ added in v0.6.9
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 ¶ added in v0.6.9
MarshalJSON implements json.Marshaler.
func (*HeadEvent) UnmarshalJSON ¶ added in v0.6.9
UnmarshalJSON implements json.Unmarshaler.
type ProposalPreparation ¶ added in v0.11.0
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 }
ProposalPreparation is the data required for proposal preparation.
func (*ProposalPreparation) MarshalJSON ¶ added in v0.11.0
func (p *ProposalPreparation) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*ProposalPreparation) String ¶ added in v0.11.0
func (p *ProposalPreparation) String() string
String returns a string version of the structure.
func (*ProposalPreparation) UnmarshalJSON ¶ added in v0.11.0
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 SignedBlindedBeaconBlock ¶ added in v0.11.0
type SignedBlindedBeaconBlock struct { Message *BlindedBeaconBlock Signature phase0.BLSSignature `ssz-size:"96"` }
SignedBlindedBeaconBlock is a signed beacon block.
func (*SignedBlindedBeaconBlock) HashTreeRoot ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the SignedBlindedBeaconBlock object
func (*SignedBlindedBeaconBlock) HashTreeRootWith ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) HashTreeRootWith(hh *ssz.Hasher) (err error)
HashTreeRootWith ssz hashes the SignedBlindedBeaconBlock object with a hasher
func (*SignedBlindedBeaconBlock) MarshalJSON ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*SignedBlindedBeaconBlock) MarshalSSZ ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the SignedBlindedBeaconBlock object
func (*SignedBlindedBeaconBlock) MarshalSSZTo ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the SignedBlindedBeaconBlock object to a target array
func (*SignedBlindedBeaconBlock) MarshalYAML ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) MarshalYAML() ([]byte, error)
MarshalYAML implements yaml.Marshaler.
func (*SignedBlindedBeaconBlock) SizeSSZ ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the SignedBlindedBeaconBlock object
func (*SignedBlindedBeaconBlock) String ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) String() string
String returns a string version of the structure.
func (*SignedBlindedBeaconBlock) UnmarshalJSON ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
func (*SignedBlindedBeaconBlock) UnmarshalSSZ ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the SignedBlindedBeaconBlock object
func (*SignedBlindedBeaconBlock) UnmarshalYAML ¶ added in v0.11.0
func (s *SignedBlindedBeaconBlock) UnmarshalYAML(input []byte) error
UnmarshalYAML implements yaml.Unmarshaler.
type SyncCommittee ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (s *SyncCommittee) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*SyncCommittee) String ¶ added in v0.7.0
func (s *SyncCommittee) String() string
String returns a string version of the structure.
func (*SyncCommittee) UnmarshalJSON ¶ added in v0.7.0
func (s *SyncCommittee) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type SyncCommitteeDuty ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (s *SyncCommitteeDuty) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*SyncCommitteeDuty) String ¶ added in v0.7.0
func (s *SyncCommitteeDuty) String() string
String returns a string version of the structure.
func (*SyncCommitteeDuty) UnmarshalJSON ¶ added in v0.7.0
func (s *SyncCommitteeDuty) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type SyncCommitteeSubscription ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (s *SyncCommitteeSubscription) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*SyncCommitteeSubscription) String ¶ added in v0.7.0
func (s *SyncCommitteeSubscription) String() string
String returns a string version of the structure.
func (*SyncCommitteeSubscription) UnmarshalJSON ¶ added in v0.7.0
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 // 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 ¶
MarshalJSON implements json.Marshaler.
func (*SyncState) UnmarshalJSON ¶
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 ¶
MarshalJSON implements json.Marshaler.
func (*Validator) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type ValidatorBalance ¶ added in v0.6.9
type ValidatorBalance struct { Index phase0.ValidatorIndex Balance phase0.Gwei }
ValidatorBalance contains the balance of a validator.
func (*ValidatorBalance) MarshalJSON ¶ added in v0.6.9
func (v *ValidatorBalance) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (*ValidatorBalance) String ¶ added in v0.6.9
func (v *ValidatorBalance) String() string
String returns a string version of the structure.
func (*ValidatorBalance) UnmarshalJSON ¶ added in v0.6.9
func (v *ValidatorBalance) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.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 ¶ added in v0.6.7
func (v ValidatorState) HasActivated() bool
HasActivated returns true if the validator has activated.
func (ValidatorState) HasBalance ¶ added in v0.6.1
func (v ValidatorState) HasBalance() bool
HasBalance returns true if the validator has a balance.
func (ValidatorState) HasExited ¶ added in v0.6.7
func (v ValidatorState) HasExited() bool
HasExited returns true if the validator has exited.
func (ValidatorState) IsActive ¶ added in v0.6.7
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 ¶ added in v0.6.7
func (v ValidatorState) IsExited() bool
IsExited returns true if the validator is exited.
func (ValidatorState) IsPending ¶ added in v0.6.7
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.
Source Files ¶
- attesterduty.go
- beaconblockheader.go
- beaconcommittee.go
- beaconcommitteesubscription.go
- blindedbeaconblock.go
- blindedbeaconblock_encoding.go
- blindedbeaconblockbody.go
- blindedbeaconblockbody_encoding.go
- blockevent.go
- chainreorgevent.go
- consts.go
- depositcontract.go
- event.go
- finality.go
- finalizedcheckpointevent.go
- genesis.go
- headevent.go
- proposalpreparation.go
- proposerduty.go
- signedblindedbeaconblock.go
- signedblindedbeaconblock_encoding.go
- synccommittee.go
- synccommitteeduty.go
- synccommitteesubscription.go
- syncstate.go
- validator.go
- validatorbalance.go
- validatorstate.go