shared

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: GPL-3.0 Imports: 27 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttesterSlashingsToConsensus added in v4.1.0

func AttesterSlashingsToConsensus(src []*AttesterSlashing) ([]*eth.AttesterSlashing, error)

func AttsToConsensus added in v4.1.0

func AttsToConsensus(src []*Attestation) ([]*eth.Attestation, error)

func DepositsToConsensus added in v4.1.0

func DepositsToConsensus(src []*Deposit) ([]*eth.Deposit, error)

func HexFromQuery added in v4.2.0

func HexFromQuery(w http.ResponseWriter, r *http.Request, name string, length int, required bool) (string, []byte, bool)

func HexFromRoute added in v4.2.0

func HexFromRoute(w http.ResponseWriter, r *http.Request, name string, length int) (string, []byte, bool)

func IsOptimistic added in v4.1.0

func IsOptimistic(
	ctx context.Context,
	w http.ResponseWriter,
	optimisticModeFetcher blockchain.OptimisticModeFetcher,
) (bool, error)

IsOptimistic checks whether the beacon node is currently optimistic and writes it to the response.

func IsSyncing added in v4.1.0

func IsSyncing(
	ctx context.Context,
	w http.ResponseWriter,
	syncChecker sync.Checker,
	headFetcher blockchain.HeadFetcher,
	timeFetcher blockchain.TimeFetcher,
	optimisticModeFetcher blockchain.OptimisticModeFetcher,
) bool

IsSyncing checks whether the beacon node is currently syncing and writes out the sync status.

func ProposerSlashingsToConsensus added in v4.1.0

func ProposerSlashingsToConsensus(src []*ProposerSlashing) ([]*eth.ProposerSlashing, error)

func SignedBLSChangesToConsensus added in v4.2.0

func SignedBLSChangesToConsensus(src []*SignedBLSToExecutionChange) ([]*eth.SignedBLSToExecutionChange, error)

func SignedExitsToConsensus added in v4.2.0

func SignedExitsToConsensus(src []*SignedVoluntaryExit) ([]*eth.SignedVoluntaryExit, error)

func UintFromQuery added in v4.1.0

func UintFromQuery(w http.ResponseWriter, r *http.Request, name string, required bool) (string, uint64, bool)

func UintFromRoute added in v4.2.0

func UintFromRoute(w http.ResponseWriter, r *http.Request, name string) (string, uint64, bool)

func ValidateHex

func ValidateHex(w http.ResponseWriter, name, s string, length int) ([]byte, bool)

func ValidateUint

func ValidateUint(w http.ResponseWriter, name, s string) (uint64, bool)

func WriteBlockFetchError added in v4.1.0

func WriteBlockFetchError(w http.ResponseWriter, blk interfaces.ReadOnlySignedBeaconBlock, err error) bool

WriteBlockFetchError writes an appropriate error based on the supplied argument. The argument error should be a result of fetching block.

func WriteStateFetchError added in v4.1.0

func WriteStateFetchError(w http.ResponseWriter, err error)

WriteStateFetchError writes an appropriate error based on the supplied argument. The argument error should be a result of fetching state.

Types

type AggregateAttestationAndProof

type AggregateAttestationAndProof struct {
	AggregatorIndex string       `json:"aggregator_index"`
	Aggregate       *Attestation `json:"aggregate"`
	SelectionProof  string       `json:"selection_proof"`
}

func (*AggregateAttestationAndProof) ToConsensus

type Attestation

type Attestation struct {
	AggregationBits string           `json:"aggregation_bits"`
	Data            *AttestationData `json:"data"`
	Signature       string           `json:"signature"`
}

func AttFromConsensus added in v4.2.0

func AttFromConsensus(a *eth.Attestation) *Attestation

func AttsFromConsensus added in v4.1.0

func AttsFromConsensus(src []*eth.Attestation) []*Attestation

func (*Attestation) ToConsensus

func (a *Attestation) ToConsensus() (*eth.Attestation, error)

type AttestationData

type AttestationData struct {
	Slot            string      `json:"slot"`
	CommitteeIndex  string      `json:"index"`
	BeaconBlockRoot string      `json:"beacon_block_root"`
	Source          *Checkpoint `json:"source"`
	Target          *Checkpoint `json:"target"`
}

func AttDataFromConsensus added in v4.2.0

func AttDataFromConsensus(a *eth.AttestationData) *AttestationData

func (*AttestationData) ToConsensus

func (a *AttestationData) ToConsensus() (*eth.AttestationData, error)

type AttesterSlashing added in v4.1.0

type AttesterSlashing struct {
	Attestation1 *IndexedAttestation `json:"attestation_1"`
	Attestation2 *IndexedAttestation `json:"attestation_2"`
}

func AttesterSlashingFromConsensus added in v4.2.0

func AttesterSlashingFromConsensus(src *eth.AttesterSlashing) *AttesterSlashing

func AttesterSlashingsFromConsensus added in v4.1.0

func AttesterSlashingsFromConsensus(src []*eth.AttesterSlashing) []*AttesterSlashing

func (*AttesterSlashing) ToConsensus added in v4.2.0

func (s *AttesterSlashing) ToConsensus() (*eth.AttesterSlashing, error)

type BLSToExecutionChange added in v4.2.0

type BLSToExecutionChange struct {
	ValidatorIndex     string `json:"validator_index"`
	FromBLSPubkey      string `json:"from_bls_pubkey"`
	ToExecutionAddress string `json:"to_execution_address"`
}

func BLSChangeFromConsensus added in v4.2.0

func BLSChangeFromConsensus(ch *eth.BLSToExecutionChange) *BLSToExecutionChange

func (*BLSToExecutionChange) ToConsensus added in v4.2.0

func (b *BLSToExecutionChange) ToConsensus() (*eth.BLSToExecutionChange, error)

type BeaconBlock added in v4.1.0

type BeaconBlock struct {
	Slot          string           `json:"slot"`
	ProposerIndex string           `json:"proposer_index"`
	ParentRoot    string           `json:"parent_root"`
	StateRoot     string           `json:"state_root"`
	Body          *BeaconBlockBody `json:"body"`
}

func BeaconBlockFromConsensus added in v4.1.0

func BeaconBlockFromConsensus(b *eth.BeaconBlock) *BeaconBlock

func (*BeaconBlock) ToConsensus added in v4.1.0

func (b *BeaconBlock) ToConsensus() (*eth.BeaconBlock, error)

func (*BeaconBlock) ToGeneric added in v4.1.0

func (b *BeaconBlock) ToGeneric() (*eth.GenericBeaconBlock, error)

type BeaconBlockAltair added in v4.1.0

type BeaconBlockAltair struct {
	Slot          string                 `json:"slot"`
	ProposerIndex string                 `json:"proposer_index"`
	ParentRoot    string                 `json:"parent_root"`
	StateRoot     string                 `json:"state_root"`
	Body          *BeaconBlockBodyAltair `json:"body"`
}

func BeaconBlockAltairFromConsensus added in v4.1.0

func BeaconBlockAltairFromConsensus(b *eth.BeaconBlockAltair) *BeaconBlockAltair

func (*BeaconBlockAltair) ToConsensus added in v4.1.0

func (b *BeaconBlockAltair) ToConsensus() (*eth.BeaconBlockAltair, error)

func (*BeaconBlockAltair) ToGeneric added in v4.1.0

func (b *BeaconBlockAltair) ToGeneric() (*eth.GenericBeaconBlock, error)

type BeaconBlockBellatrix added in v4.1.0

type BeaconBlockBellatrix struct {
	Slot          string                    `json:"slot"`
	ProposerIndex string                    `json:"proposer_index"`
	ParentRoot    string                    `json:"parent_root"`
	StateRoot     string                    `json:"state_root"`
	Body          *BeaconBlockBodyBellatrix `json:"body"`
}

func BeaconBlockBellatrixFromConsensus added in v4.1.0

func BeaconBlockBellatrixFromConsensus(b *eth.BeaconBlockBellatrix) (*BeaconBlockBellatrix, error)

func (*BeaconBlockBellatrix) ToConsensus added in v4.1.0

func (b *BeaconBlockBellatrix) ToConsensus() (*eth.BeaconBlockBellatrix, error)

func (*BeaconBlockBellatrix) ToGeneric added in v4.1.0

func (b *BeaconBlockBellatrix) ToGeneric() (*eth.GenericBeaconBlock, error)

type BeaconBlockBody added in v4.1.0

type BeaconBlockBody struct {
	RandaoReveal      string                 `json:"randao_reveal"`
	Eth1Data          *Eth1Data              `json:"eth1_data"`
	Graffiti          string                 `json:"graffiti"`
	ProposerSlashings []*ProposerSlashing    `json:"proposer_slashings"`
	AttesterSlashings []*AttesterSlashing    `json:"attester_slashings"`
	Attestations      []*Attestation         `json:"attestations"`
	Deposits          []*Deposit             `json:"deposits"`
	VoluntaryExits    []*SignedVoluntaryExit `json:"voluntary_exits"`
}

type BeaconBlockBodyAltair added in v4.1.0

type BeaconBlockBodyAltair struct {
	RandaoReveal      string                 `json:"randao_reveal"`
	Eth1Data          *Eth1Data              `json:"eth1_data"`
	Graffiti          string                 `json:"graffiti"`
	ProposerSlashings []*ProposerSlashing    `json:"proposer_slashings"`
	AttesterSlashings []*AttesterSlashing    `json:"attester_slashings"`
	Attestations      []*Attestation         `json:"attestations"`
	Deposits          []*Deposit             `json:"deposits"`
	VoluntaryExits    []*SignedVoluntaryExit `json:"voluntary_exits"`
	SyncAggregate     *SyncAggregate         `json:"sync_aggregate"`
}

type BeaconBlockBodyBellatrix added in v4.1.0

type BeaconBlockBodyBellatrix struct {
	RandaoReveal      string                 `json:"randao_reveal"`
	Eth1Data          *Eth1Data              `json:"eth1_data"`
	Graffiti          string                 `json:"graffiti"`
	ProposerSlashings []*ProposerSlashing    `json:"proposer_slashings"`
	AttesterSlashings []*AttesterSlashing    `json:"attester_slashings"`
	Attestations      []*Attestation         `json:"attestations"`
	Deposits          []*Deposit             `json:"deposits"`
	VoluntaryExits    []*SignedVoluntaryExit `json:"voluntary_exits"`
	SyncAggregate     *SyncAggregate         `json:"sync_aggregate"`
	ExecutionPayload  *ExecutionPayload      `json:"execution_payload"`
}

type BeaconBlockBodyCapella added in v4.1.0

type BeaconBlockBodyCapella struct {
	RandaoReveal          string                        `json:"randao_reveal"`
	Eth1Data              *Eth1Data                     `json:"eth1_data"`
	Graffiti              string                        `json:"graffiti"`
	ProposerSlashings     []*ProposerSlashing           `json:"proposer_slashings"`
	AttesterSlashings     []*AttesterSlashing           `json:"attester_slashings"`
	Attestations          []*Attestation                `json:"attestations"`
	Deposits              []*Deposit                    `json:"deposits"`
	VoluntaryExits        []*SignedVoluntaryExit        `json:"voluntary_exits"`
	SyncAggregate         *SyncAggregate                `json:"sync_aggregate"`
	ExecutionPayload      *ExecutionPayloadCapella      `json:"execution_payload"`
	BLSToExecutionChanges []*SignedBLSToExecutionChange `json:"bls_to_execution_changes"`
}

type BeaconBlockBodyDeneb added in v4.1.0

type BeaconBlockBodyDeneb struct {
	RandaoReveal          string                        `json:"randao_reveal"`
	Eth1Data              *Eth1Data                     `json:"eth1_data"`
	Graffiti              string                        `json:"graffiti"`
	ProposerSlashings     []*ProposerSlashing           `json:"proposer_slashings"`
	AttesterSlashings     []*AttesterSlashing           `json:"attester_slashings"`
	Attestations          []*Attestation                `json:"attestations"`
	Deposits              []*Deposit                    `json:"deposits"`
	VoluntaryExits        []*SignedVoluntaryExit        `json:"voluntary_exits"`
	SyncAggregate         *SyncAggregate                `json:"sync_aggregate"`
	ExecutionPayload      *ExecutionPayloadDeneb        `json:"execution_payload"`
	BLSToExecutionChanges []*SignedBLSToExecutionChange `json:"bls_to_execution_changes"`
	BlobKzgCommitments    []string                      `json:"blob_kzg_commitments"`
}

type BeaconBlockCapella added in v4.1.0

type BeaconBlockCapella struct {
	Slot          string                  `json:"slot"`
	ProposerIndex string                  `json:"proposer_index"`
	ParentRoot    string                  `json:"parent_root"`
	StateRoot     string                  `json:"state_root"`
	Body          *BeaconBlockBodyCapella `json:"body"`
}

func BeaconBlockCapellaFromConsensus added in v4.1.0

func BeaconBlockCapellaFromConsensus(b *eth.BeaconBlockCapella) (*BeaconBlockCapella, error)

func (*BeaconBlockCapella) ToConsensus added in v4.1.0

func (b *BeaconBlockCapella) ToConsensus() (*eth.BeaconBlockCapella, error)

func (*BeaconBlockCapella) ToGeneric added in v4.1.0

func (b *BeaconBlockCapella) ToGeneric() (*eth.GenericBeaconBlock, error)

type BeaconBlockContentsDeneb added in v4.1.0

type BeaconBlockContentsDeneb struct {
	Block     *BeaconBlockDeneb `json:"block"`
	KzgProofs []string          `json:"kzg_proofs"`
	Blobs     []string          `json:"blobs"`
}

func BeaconBlockContentsDenebFromConsensus added in v4.1.0

func BeaconBlockContentsDenebFromConsensus(b *eth.BeaconBlockContentsDeneb) (*BeaconBlockContentsDeneb, error)

func (*BeaconBlockContentsDeneb) ToConsensus added in v4.1.0

func (*BeaconBlockContentsDeneb) ToGeneric added in v4.1.0

type BeaconBlockDeneb added in v4.1.0

type BeaconBlockDeneb struct {
	Slot          string                `json:"slot"`
	ProposerIndex string                `json:"proposer_index"`
	ParentRoot    string                `json:"parent_root"`
	StateRoot     string                `json:"state_root"`
	Body          *BeaconBlockBodyDeneb `json:"body"`
}

func BeaconBlockDenebFromConsensus added in v4.1.0

func BeaconBlockDenebFromConsensus(b *eth.BeaconBlockDeneb) (*BeaconBlockDeneb, error)

func (*BeaconBlockDeneb) ToConsensus added in v4.1.0

func (b *BeaconBlockDeneb) ToConsensus() (*eth.BeaconBlockDeneb, error)

type BeaconBlockHeader added in v4.1.0

type BeaconBlockHeader struct {
	Slot          string `json:"slot"`
	ProposerIndex string `json:"proposer_index"`
	ParentRoot    string `json:"parent_root"`
	StateRoot     string `json:"state_root"`
	BodyRoot      string `json:"body_root"`
}

func BeaconBlockHeaderFromConsensus added in v4.1.0

func BeaconBlockHeaderFromConsensus(h *eth.BeaconBlockHeader) *BeaconBlockHeader

func (*BeaconBlockHeader) ToConsensus added in v4.2.0

func (h *BeaconBlockHeader) ToConsensus() (*eth.BeaconBlockHeader, error)

type BeaconCommitteeSubscription added in v4.1.0

type BeaconCommitteeSubscription struct {
	ValidatorIndex   string `json:"validator_index"`
	CommitteeIndex   string `json:"committee_index"`
	CommitteesAtSlot string `json:"committees_at_slot"`
	Slot             string `json:"slot"`
	IsAggregator     bool   `json:"is_aggregator"`
}

func (*BeaconCommitteeSubscription) ToConsensus added in v4.1.0

type BeaconState added in v4.2.0

type BeaconState struct {
	GenesisTime                 string                `json:"genesis_time"`
	GenesisValidatorsRoot       string                `json:"genesis_validators_root"`
	Slot                        string                `json:"slot"`
	Fork                        *Fork                 `json:"fork"`
	LatestBlockHeader           *BeaconBlockHeader    `json:"latest_block_header"`
	BlockRoots                  []string              `json:"block_roots"`
	StateRoots                  []string              `json:"state_roots"`
	HistoricalRoots             []string              `json:"historical_roots"`
	Eth1Data                    *Eth1Data             `json:"eth1_data"`
	Eth1DataVotes               []*Eth1Data           `json:"eth1_data_votes"`
	Eth1DepositIndex            string                `json:"eth1_deposit_index"`
	Validators                  []*Validator          `json:"validators"`
	Balances                    []string              `json:"balances"`
	RandaoMixes                 []string              `json:"randao_mixes"`
	Slashings                   []string              `json:"slashings"`
	PreviousEpochAttestations   []*PendingAttestation `json:"previous_epoch_attestations"`
	CurrentEpochAttestations    []*PendingAttestation `json:"current_epoch_attestations"`
	JustificationBits           string                `json:"justification_bits"`
	PreviousJustifiedCheckpoint *Checkpoint           `json:"previous_justified_checkpoint"`
	CurrentJustifiedCheckpoint  *Checkpoint           `json:"current_justified_checkpoint"`
	FinalizedCheckpoint         *Checkpoint           `json:"finalized_checkpoint"`
}

func BeaconStateFromConsensus added in v4.2.0

func BeaconStateFromConsensus(st beaconState.BeaconState) (*BeaconState, error)

type BeaconStateAltair added in v4.2.0

type BeaconStateAltair struct {
	GenesisTime                 string             `json:"genesis_time"`
	GenesisValidatorsRoot       string             `json:"genesis_validators_root"`
	Slot                        string             `json:"slot"`
	Fork                        *Fork              `json:"fork"`
	LatestBlockHeader           *BeaconBlockHeader `json:"latest_block_header"`
	BlockRoots                  []string           `json:"block_roots"`
	StateRoots                  []string           `json:"state_roots"`
	HistoricalRoots             []string           `json:"historical_roots"`
	Eth1Data                    *Eth1Data          `json:"eth1_data"`
	Eth1DataVotes               []*Eth1Data        `json:"eth1_data_votes"`
	Eth1DepositIndex            string             `json:"eth1_deposit_index"`
	Validators                  []*Validator       `json:"validators"`
	Balances                    []string           `json:"balances"`
	RandaoMixes                 []string           `json:"randao_mixes"`
	Slashings                   []string           `json:"slashings"`
	PreviousEpochParticipation  []string           `json:"previous_epoch_participation"`
	CurrentEpochParticipation   []string           `json:"current_epoch_participation"`
	JustificationBits           string             `json:"justification_bits"`
	PreviousJustifiedCheckpoint *Checkpoint        `json:"previous_justified_checkpoint"`
	CurrentJustifiedCheckpoint  *Checkpoint        `json:"current_justified_checkpoint"`
	FinalizedCheckpoint         *Checkpoint        `json:"finalized_checkpoint"`
	InactivityScores            []string           `json:"inactivity_scores"`
	CurrentSyncCommittee        *SyncCommittee     `json:"current_sync_committee"`
	NextSyncCommittee           *SyncCommittee     `json:"next_sync_committee"`
}

func BeaconStateAltairFromConsensus added in v4.2.0

func BeaconStateAltairFromConsensus(st beaconState.BeaconState) (*BeaconStateAltair, error)

type BeaconStateBellatrix added in v4.2.0

type BeaconStateBellatrix struct {
	GenesisTime                  string                  `json:"genesis_time"`
	GenesisValidatorsRoot        string                  `json:"genesis_validators_root"`
	Slot                         string                  `json:"slot"`
	Fork                         *Fork                   `json:"fork"`
	LatestBlockHeader            *BeaconBlockHeader      `json:"latest_block_header"`
	BlockRoots                   []string                `json:"block_roots"`
	StateRoots                   []string                `json:"state_roots"`
	HistoricalRoots              []string                `json:"historical_roots"`
	Eth1Data                     *Eth1Data               `json:"eth1_data"`
	Eth1DataVotes                []*Eth1Data             `json:"eth1_data_votes"`
	Eth1DepositIndex             string                  `json:"eth1_deposit_index"`
	Validators                   []*Validator            `json:"validators"`
	Balances                     []string                `json:"balances"`
	RandaoMixes                  []string                `json:"randao_mixes"`
	Slashings                    []string                `json:"slashings"`
	PreviousEpochParticipation   []string                `json:"previous_epoch_participation"`
	CurrentEpochParticipation    []string                `json:"current_epoch_participation"`
	JustificationBits            string                  `json:"justification_bits"`
	PreviousJustifiedCheckpoint  *Checkpoint             `json:"previous_justified_checkpoint"`
	CurrentJustifiedCheckpoint   *Checkpoint             `json:"current_justified_checkpoint"`
	FinalizedCheckpoint          *Checkpoint             `json:"finalized_checkpoint"`
	InactivityScores             []string                `json:"inactivity_scores"`
	CurrentSyncCommittee         *SyncCommittee          `json:"current_sync_committee"`
	NextSyncCommittee            *SyncCommittee          `json:"next_sync_committee"`
	LatestExecutionPayloadHeader *ExecutionPayloadHeader `json:"latest_execution_payload_header"`
}

func BeaconStateBellatrixFromConsensus added in v4.2.0

func BeaconStateBellatrixFromConsensus(st beaconState.BeaconState) (*BeaconStateBellatrix, error)

type BeaconStateCapella added in v4.2.0

type BeaconStateCapella struct {
	GenesisTime                  string                         `json:"genesis_time"`
	GenesisValidatorsRoot        string                         `json:"genesis_validators_root"`
	Slot                         string                         `json:"slot"`
	Fork                         *Fork                          `json:"fork"`
	LatestBlockHeader            *BeaconBlockHeader             `json:"latest_block_header"`
	BlockRoots                   []string                       `json:"block_roots"`
	StateRoots                   []string                       `json:"state_roots"`
	HistoricalRoots              []string                       `json:"historical_roots"`
	Eth1Data                     *Eth1Data                      `json:"eth1_data"`
	Eth1DataVotes                []*Eth1Data                    `json:"eth1_data_votes"`
	Eth1DepositIndex             string                         `json:"eth1_deposit_index"`
	Validators                   []*Validator                   `json:"validators"`
	Balances                     []string                       `json:"balances"`
	RandaoMixes                  []string                       `json:"randao_mixes"`
	Slashings                    []string                       `json:"slashings"`
	PreviousEpochParticipation   []string                       `json:"previous_epoch_participation"`
	CurrentEpochParticipation    []string                       `json:"current_epoch_participation"`
	JustificationBits            string                         `json:"justification_bits"`
	PreviousJustifiedCheckpoint  *Checkpoint                    `json:"previous_justified_checkpoint"`
	CurrentJustifiedCheckpoint   *Checkpoint                    `json:"current_justified_checkpoint"`
	FinalizedCheckpoint          *Checkpoint                    `json:"finalized_checkpoint"`
	InactivityScores             []string                       `json:"inactivity_scores"`
	CurrentSyncCommittee         *SyncCommittee                 `json:"current_sync_committee"`
	NextSyncCommittee            *SyncCommittee                 `json:"next_sync_committee"`
	LatestExecutionPayloadHeader *ExecutionPayloadHeaderCapella `json:"latest_execution_payload_header"`
	NextWithdrawalIndex          string                         `json:"next_withdrawal_index"`
	NextWithdrawalValidatorIndex string                         `json:"next_withdrawal_validator_index"`
	HistoricalSummaries          []*HistoricalSummary           `json:"historical_summaries"`
}

func BeaconStateCapellaFromConsensus added in v4.2.0

func BeaconStateCapellaFromConsensus(st beaconState.BeaconState) (*BeaconStateCapella, error)

type BeaconStateDeneb added in v4.2.0

type BeaconStateDeneb struct {
	GenesisTime                  string                       `json:"genesis_time"`
	GenesisValidatorsRoot        string                       `json:"genesis_validators_root"`
	Slot                         string                       `json:"slot"`
	Fork                         *Fork                        `json:"fork"`
	LatestBlockHeader            *BeaconBlockHeader           `json:"latest_block_header"`
	BlockRoots                   []string                     `json:"block_roots"`
	StateRoots                   []string                     `json:"state_roots"`
	HistoricalRoots              []string                     `json:"historical_roots"`
	Eth1Data                     *Eth1Data                    `json:"eth1_data"`
	Eth1DataVotes                []*Eth1Data                  `json:"eth1_data_votes"`
	Eth1DepositIndex             string                       `json:"eth1_deposit_index"`
	Validators                   []*Validator                 `json:"validators"`
	Balances                     []string                     `json:"balances"`
	RandaoMixes                  []string                     `json:"randao_mixes"`
	Slashings                    []string                     `json:"slashings"`
	PreviousEpochParticipation   []string                     `json:"previous_epoch_participation"`
	CurrentEpochParticipation    []string                     `json:"current_epoch_participation"`
	JustificationBits            string                       `json:"justification_bits"`
	PreviousJustifiedCheckpoint  *Checkpoint                  `json:"previous_justified_checkpoint"`
	CurrentJustifiedCheckpoint   *Checkpoint                  `json:"current_justified_checkpoint"`
	FinalizedCheckpoint          *Checkpoint                  `json:"finalized_checkpoint"`
	InactivityScores             []string                     `json:"inactivity_scores"`
	CurrentSyncCommittee         *SyncCommittee               `json:"current_sync_committee"`
	NextSyncCommittee            *SyncCommittee               `json:"next_sync_committee"`
	LatestExecutionPayloadHeader *ExecutionPayloadHeaderDeneb `json:"latest_execution_payload_header"`
	NextWithdrawalIndex          string                       `json:"next_withdrawal_index"`
	NextWithdrawalValidatorIndex string                       `json:"next_withdrawal_validator_index"`
	HistoricalSummaries          []*HistoricalSummary         `json:"historical_summaries"`
}

func BeaconStateDenebFromConsensus added in v4.2.0

func BeaconStateDenebFromConsensus(st beaconState.BeaconState) (*BeaconStateDeneb, error)

type BlindedBeaconBlockBellatrix added in v4.1.0

type BlindedBeaconBlockBellatrix struct {
	Slot          string                           `json:"slot"`
	ProposerIndex string                           `json:"proposer_index"`
	ParentRoot    string                           `json:"parent_root"`
	StateRoot     string                           `json:"state_root"`
	Body          *BlindedBeaconBlockBodyBellatrix `json:"body"`
}

func BlindedBeaconBlockBellatrixFromConsensus added in v4.1.0

func BlindedBeaconBlockBellatrixFromConsensus(b *eth.BlindedBeaconBlockBellatrix) (*BlindedBeaconBlockBellatrix, error)

func (*BlindedBeaconBlockBellatrix) ToConsensus added in v4.1.0

func (*BlindedBeaconBlockBellatrix) ToGeneric added in v4.1.0

type BlindedBeaconBlockBodyBellatrix added in v4.1.0

type BlindedBeaconBlockBodyBellatrix struct {
	RandaoReveal           string                  `json:"randao_reveal"`
	Eth1Data               *Eth1Data               `json:"eth1_data"`
	Graffiti               string                  `json:"graffiti"`
	ProposerSlashings      []*ProposerSlashing     `json:"proposer_slashings"`
	AttesterSlashings      []*AttesterSlashing     `json:"attester_slashings"`
	Attestations           []*Attestation          `json:"attestations"`
	Deposits               []*Deposit              `json:"deposits"`
	VoluntaryExits         []*SignedVoluntaryExit  `json:"voluntary_exits"`
	SyncAggregate          *SyncAggregate          `json:"sync_aggregate"`
	ExecutionPayloadHeader *ExecutionPayloadHeader `json:"execution_payload_header"`
}

type BlindedBeaconBlockBodyCapella added in v4.1.0

type BlindedBeaconBlockBodyCapella struct {
	RandaoReveal           string                         `json:"randao_reveal"`
	Eth1Data               *Eth1Data                      `json:"eth1_data"`
	Graffiti               string                         `json:"graffiti"`
	ProposerSlashings      []*ProposerSlashing            `json:"proposer_slashings"`
	AttesterSlashings      []*AttesterSlashing            `json:"attester_slashings"`
	Attestations           []*Attestation                 `json:"attestations"`
	Deposits               []*Deposit                     `json:"deposits"`
	VoluntaryExits         []*SignedVoluntaryExit         `json:"voluntary_exits"`
	SyncAggregate          *SyncAggregate                 `json:"sync_aggregate"`
	ExecutionPayloadHeader *ExecutionPayloadHeaderCapella `json:"execution_payload_header"`
	BLSToExecutionChanges  []*SignedBLSToExecutionChange  `json:"bls_to_execution_changes"`
}

type BlindedBeaconBlockBodyDeneb added in v4.1.0

type BlindedBeaconBlockBodyDeneb struct {
	RandaoReveal           string                        `json:"randao_reveal"`
	Eth1Data               *Eth1Data                     `json:"eth1_data"`
	Graffiti               string                        `json:"graffiti"`
	ProposerSlashings      []*ProposerSlashing           `json:"proposer_slashings"`
	AttesterSlashings      []*AttesterSlashing           `json:"attester_slashings"`
	Attestations           []*Attestation                `json:"attestations"`
	Deposits               []*Deposit                    `json:"deposits"`
	VoluntaryExits         []*SignedVoluntaryExit        `json:"voluntary_exits"`
	SyncAggregate          *SyncAggregate                `json:"sync_aggregate"`
	ExecutionPayloadHeader *ExecutionPayloadHeaderDeneb  `json:"execution_payload_header"`
	BLSToExecutionChanges  []*SignedBLSToExecutionChange `json:"bls_to_execution_changes"`
	BlobKzgCommitments     []string                      `json:"blob_kzg_commitments"`
}

type BlindedBeaconBlockCapella added in v4.1.0

type BlindedBeaconBlockCapella struct {
	Slot          string                         `json:"slot"`
	ProposerIndex string                         `json:"proposer_index"`
	ParentRoot    string                         `json:"parent_root"`
	StateRoot     string                         `json:"state_root"`
	Body          *BlindedBeaconBlockBodyCapella `json:"body"`
}

func BlindedBeaconBlockCapellaFromConsensus added in v4.1.0

func BlindedBeaconBlockCapellaFromConsensus(b *eth.BlindedBeaconBlockCapella) (*BlindedBeaconBlockCapella, error)

func (*BlindedBeaconBlockCapella) ToConsensus added in v4.1.0

func (*BlindedBeaconBlockCapella) ToGeneric added in v4.1.0

type BlindedBeaconBlockDeneb added in v4.1.0

type BlindedBeaconBlockDeneb struct {
	Slot          string                       `json:"slot"`
	ProposerIndex string                       `json:"proposer_index"`
	ParentRoot    string                       `json:"parent_root"`
	StateRoot     string                       `json:"state_root"`
	Body          *BlindedBeaconBlockBodyDeneb `json:"body"`
}

func BlindedBeaconBlockDenebFromConsensus added in v4.1.0

func BlindedBeaconBlockDenebFromConsensus(b *eth.BlindedBeaconBlockDeneb) (*BlindedBeaconBlockDeneb, error)

func (*BlindedBeaconBlockDeneb) ToConsensus added in v4.1.0

func (*BlindedBeaconBlockDeneb) ToGeneric added in v4.2.0

type Checkpoint

type Checkpoint struct {
	Epoch string `json:"epoch"`
	Root  string `json:"root"`
}

func CheckpointFromConsensus added in v4.1.0

func CheckpointFromConsensus(c *eth.Checkpoint) *Checkpoint

func (*Checkpoint) ToConsensus

func (c *Checkpoint) ToConsensus() (*eth.Checkpoint, error)

type Committee added in v4.1.0

type Committee struct {
	Index      string   `json:"index"`
	Slot       string   `json:"slot"`
	Validators []string `json:"validators"`
}

type ContributionAndProof

type ContributionAndProof struct {
	AggregatorIndex string                     `json:"aggregator_index"`
	Contribution    *SyncCommitteeContribution `json:"contribution"`
	SelectionProof  string                     `json:"selection_proof"`
}

func ContributionAndProofFromConsensus added in v4.2.0

func ContributionAndProofFromConsensus(c *eth.ContributionAndProof) *ContributionAndProof

func (*ContributionAndProof) ToConsensus

func (c *ContributionAndProof) ToConsensus() (*eth.ContributionAndProof, error)

type Deposit added in v4.1.0

type Deposit struct {
	Proof []string     `json:"proof"`
	Data  *DepositData `json:"data"`
}

func DepositsFromConsensus added in v4.1.0

func DepositsFromConsensus(src []*eth.Deposit) []*Deposit

type DepositData added in v4.1.0

type DepositData struct {
	Pubkey                string `json:"pubkey"`
	WithdrawalCredentials string `json:"withdrawal_credentials"`
	Amount                string `json:"amount"`
	Signature             string `json:"signature"`
}

type Eth1Data added in v4.1.0

type Eth1Data struct {
	DepositRoot  string `json:"deposit_root"`
	DepositCount string `json:"deposit_count"`
	BlockHash    string `json:"block_hash"`
}

func Eth1DataFromConsensus added in v4.2.0

func Eth1DataFromConsensus(e1d *eth.Eth1Data) *Eth1Data

type ExecutionPayload added in v4.1.0

type ExecutionPayload struct {
	ParentHash    string   `json:"parent_hash"`
	FeeRecipient  string   `json:"fee_recipient"`
	StateRoot     string   `json:"state_root"`
	ReceiptsRoot  string   `json:"receipts_root"`
	LogsBloom     string   `json:"logs_bloom"`
	PrevRandao    string   `json:"prev_randao"`
	BlockNumber   string   `json:"block_number"`
	GasLimit      string   `json:"gas_limit"`
	GasUsed       string   `json:"gas_used"`
	Timestamp     string   `json:"timestamp"`
	ExtraData     string   `json:"extra_data"`
	BaseFeePerGas string   `json:"base_fee_per_gas"`
	BlockHash     string   `json:"block_hash"`
	Transactions  []string `json:"transactions"`
}

type ExecutionPayloadCapella added in v4.1.0

type ExecutionPayloadCapella struct {
	ParentHash    string        `json:"parent_hash"`
	FeeRecipient  string        `json:"fee_recipient"`
	StateRoot     string        `json:"state_root"`
	ReceiptsRoot  string        `json:"receipts_root"`
	LogsBloom     string        `json:"logs_bloom"`
	PrevRandao    string        `json:"prev_randao"`
	BlockNumber   string        `json:"block_number"`
	GasLimit      string        `json:"gas_limit"`
	GasUsed       string        `json:"gas_used"`
	Timestamp     string        `json:"timestamp"`
	ExtraData     string        `json:"extra_data"`
	BaseFeePerGas string        `json:"base_fee_per_gas"`
	BlockHash     string        `json:"block_hash"`
	Transactions  []string      `json:"transactions"`
	Withdrawals   []*Withdrawal `json:"withdrawals"`
}

type ExecutionPayloadDeneb added in v4.1.0

type ExecutionPayloadDeneb struct {
	ParentHash    string        `json:"parent_hash"`
	FeeRecipient  string        `json:"fee_recipient"`
	StateRoot     string        `json:"state_root"`
	ReceiptsRoot  string        `json:"receipts_root"`
	LogsBloom     string        `json:"logs_bloom"`
	PrevRandao    string        `json:"prev_randao"`
	BlockNumber   string        `json:"block_number"`
	GasLimit      string        `json:"gas_limit"`
	GasUsed       string        `json:"gas_used"`
	Timestamp     string        `json:"timestamp"`
	ExtraData     string        `json:"extra_data"`
	BaseFeePerGas string        `json:"base_fee_per_gas"`
	BlockHash     string        `json:"block_hash"`
	Transactions  []string      `json:"transactions"`
	Withdrawals   []*Withdrawal `json:"withdrawals"`
	BlobGasUsed   string        `json:"blob_gas_used"`
	ExcessBlobGas string        `json:"excess_blob_gas"`
}

type ExecutionPayloadHeader added in v4.1.0

type ExecutionPayloadHeader struct {
	ParentHash       string `json:"parent_hash"`
	FeeRecipient     string `json:"fee_recipient"`
	StateRoot        string `json:"state_root"`
	ReceiptsRoot     string `json:"receipts_root"`
	LogsBloom        string `json:"logs_bloom"`
	PrevRandao       string `json:"prev_randao"`
	BlockNumber      string `json:"block_number"`
	GasLimit         string `json:"gas_limit"`
	GasUsed          string `json:"gas_used"`
	Timestamp        string `json:"timestamp"`
	ExtraData        string `json:"extra_data"`
	BaseFeePerGas    string `json:"base_fee_per_gas"`
	BlockHash        string `json:"block_hash"`
	TransactionsRoot string `json:"transactions_root"`
}

func ExecutionPayloadHeaderFromConsensus added in v4.2.0

func ExecutionPayloadHeaderFromConsensus(payload *enginev1.ExecutionPayloadHeader) (*ExecutionPayloadHeader, error)

type ExecutionPayloadHeaderCapella added in v4.1.0

type ExecutionPayloadHeaderCapella struct {
	ParentHash       string `json:"parent_hash"`
	FeeRecipient     string `json:"fee_recipient"`
	StateRoot        string `json:"state_root"`
	ReceiptsRoot     string `json:"receipts_root"`
	LogsBloom        string `json:"logs_bloom"`
	PrevRandao       string `json:"prev_randao"`
	BlockNumber      string `json:"block_number"`
	GasLimit         string `json:"gas_limit"`
	GasUsed          string `json:"gas_used"`
	Timestamp        string `json:"timestamp"`
	ExtraData        string `json:"extra_data"`
	BaseFeePerGas    string `json:"base_fee_per_gas"`
	BlockHash        string `json:"block_hash"`
	TransactionsRoot string `json:"transactions_root"`
	WithdrawalsRoot  string `json:"withdrawals_root"`
}

func ExecutionPayloadHeaderCapellaFromConsensus added in v4.2.0

func ExecutionPayloadHeaderCapellaFromConsensus(payload *enginev1.ExecutionPayloadHeaderCapella) (*ExecutionPayloadHeaderCapella, error)

type ExecutionPayloadHeaderDeneb added in v4.1.0

type ExecutionPayloadHeaderDeneb struct {
	ParentHash       string `json:"parent_hash"`
	FeeRecipient     string `json:"fee_recipient"`
	StateRoot        string `json:"state_root"`
	ReceiptsRoot     string `json:"receipts_root"`
	LogsBloom        string `json:"logs_bloom"`
	PrevRandao       string `json:"prev_randao"`
	BlockNumber      string `json:"block_number"`
	GasLimit         string `json:"gas_limit"`
	GasUsed          string `json:"gas_used"`
	Timestamp        string `json:"timestamp"`
	ExtraData        string `json:"extra_data"`
	BaseFeePerGas    string `json:"base_fee_per_gas"`
	BlockHash        string `json:"block_hash"`
	TransactionsRoot string `json:"transactions_root"`
	WithdrawalsRoot  string `json:"withdrawals_root"`
	BlobGasUsed      string `json:"blob_gas_used"`
	ExcessBlobGas    string `json:"excess_blob_gas"`
}

func ExecutionPayloadHeaderDenebFromConsensus added in v4.2.0

func ExecutionPayloadHeaderDenebFromConsensus(payload *enginev1.ExecutionPayloadHeaderDeneb) (*ExecutionPayloadHeaderDeneb, error)

type FeeRecipient added in v4.1.0

type FeeRecipient struct {
	ValidatorIndex string `json:"validator_index"`
	FeeRecipient   string `json:"fee_recipient"`
}

type Fork added in v4.1.0

type Fork struct {
	PreviousVersion string `json:"previous_version"`
	CurrentVersion  string `json:"current_version"`
	Epoch           string `json:"epoch"`
}

func ForkFromConsensus added in v4.2.0

func ForkFromConsensus(f *eth.Fork) *Fork

func (*Fork) ToConsensus added in v4.1.0

func (s *Fork) ToConsensus() (*eth.Fork, error)

type HistoricalSummary added in v4.2.0

type HistoricalSummary struct {
	BlockSummaryRoot string `json:"block_summary_root"`
	StateSummaryRoot string `json:"state_summary_root"`
}

func HistoricalSummaryFromConsensus added in v4.2.0

func HistoricalSummaryFromConsensus(s *eth.HistoricalSummary) *HistoricalSummary

type IndexedAttestation added in v4.1.0

type IndexedAttestation struct {
	AttestingIndices []string         `json:"attesting_indices"`
	Data             *AttestationData `json:"data"`
	Signature        string           `json:"signature"`
}

func (*IndexedAttestation) ToConsensus added in v4.2.0

func (a *IndexedAttestation) ToConsensus() (*eth.IndexedAttestation, error)

type PendingAttestation added in v4.2.0

type PendingAttestation struct {
	AggregationBits string           `json:"aggregation_bits"`
	Data            *AttestationData `json:"data"`
	InclusionDelay  string           `json:"inclusion_delay"`
	ProposerIndex   string           `json:"proposer_index"`
}

func PendingAttestationFromConsensus added in v4.2.0

func PendingAttestationFromConsensus(a *eth.PendingAttestation) *PendingAttestation

type ProposerSlashing added in v4.1.0

type ProposerSlashing struct {
	SignedHeader1 *SignedBeaconBlockHeader `json:"signed_header_1"`
	SignedHeader2 *SignedBeaconBlockHeader `json:"signed_header_2"`
}

func ProposerSlashingFromConsensus added in v4.2.0

func ProposerSlashingFromConsensus(src *eth.ProposerSlashing) *ProposerSlashing

func ProposerSlashingsFromConsensus added in v4.1.0

func ProposerSlashingsFromConsensus(src []*eth.ProposerSlashing) []*ProposerSlashing

func (*ProposerSlashing) ToConsensus added in v4.2.0

func (s *ProposerSlashing) ToConsensus() (*eth.ProposerSlashing, error)

type SignedAggregateAttestationAndProof

type SignedAggregateAttestationAndProof struct {
	Message   *AggregateAttestationAndProof `json:"message"`
	Signature string                        `json:"signature"`
}

func (*SignedAggregateAttestationAndProof) ToConsensus

type SignedBLSToExecutionChange added in v4.2.0

type SignedBLSToExecutionChange struct {
	Message   *BLSToExecutionChange `json:"message"`
	Signature string                `json:"signature"`
}

func SignedBLSChangeFromConsensus added in v4.2.0

func SignedBLSChangeFromConsensus(ch *eth.SignedBLSToExecutionChange) *SignedBLSToExecutionChange

func SignedBLSChangesFromConsensus added in v4.2.0

func SignedBLSChangesFromConsensus(src []*eth.SignedBLSToExecutionChange) []*SignedBLSToExecutionChange

func (*SignedBLSToExecutionChange) ToConsensus added in v4.2.0

type SignedBeaconBlock added in v4.1.0

type SignedBeaconBlock struct {
	Message   *BeaconBlock `json:"message"`
	Signature string       `json:"signature"`
}

func SignedBeaconBlockFromConsensus added in v4.2.0

func SignedBeaconBlockFromConsensus(b *eth.SignedBeaconBlock) *SignedBeaconBlock

func (*SignedBeaconBlock) ToGeneric added in v4.1.0

type SignedBeaconBlockAltair added in v4.1.0

type SignedBeaconBlockAltair struct {
	Message   *BeaconBlockAltair `json:"message"`
	Signature string             `json:"signature"`
}

func SignedBeaconBlockAltairFromConsensus added in v4.2.0

func SignedBeaconBlockAltairFromConsensus(b *eth.SignedBeaconBlockAltair) *SignedBeaconBlockAltair

func (*SignedBeaconBlockAltair) ToGeneric added in v4.1.0

type SignedBeaconBlockBellatrix added in v4.1.0

type SignedBeaconBlockBellatrix struct {
	Message   *BeaconBlockBellatrix `json:"message"`
	Signature string                `json:"signature"`
}

func SignedBeaconBlockBellatrixFromConsensus added in v4.2.0

func SignedBeaconBlockBellatrixFromConsensus(b *eth.SignedBeaconBlockBellatrix) (*SignedBeaconBlockBellatrix, error)

func (*SignedBeaconBlockBellatrix) ToGeneric added in v4.1.0

type SignedBeaconBlockCapella added in v4.1.0

type SignedBeaconBlockCapella struct {
	Message   *BeaconBlockCapella `json:"message"`
	Signature string              `json:"signature"`
}

func SignedBeaconBlockCapellaFromConsensus added in v4.2.0

func SignedBeaconBlockCapellaFromConsensus(b *eth.SignedBeaconBlockCapella) (*SignedBeaconBlockCapella, error)

func (*SignedBeaconBlockCapella) ToGeneric added in v4.1.0

type SignedBeaconBlockContentsDeneb added in v4.1.0

type SignedBeaconBlockContentsDeneb struct {
	SignedBlock *SignedBeaconBlockDeneb `json:"signed_block"`
	KzgProofs   []string                `json:"kzg_proofs"`
	Blobs       []string                `json:"blobs"`
}

func SignedBeaconBlockContentsDenebFromConsensus added in v4.1.0

func SignedBeaconBlockContentsDenebFromConsensus(b *eth.SignedBeaconBlockContentsDeneb) (*SignedBeaconBlockContentsDeneb, error)

func (*SignedBeaconBlockContentsDeneb) ToGeneric added in v4.1.0

func (*SignedBeaconBlockContentsDeneb) ToUnsigned added in v4.1.0

type SignedBeaconBlockDeneb added in v4.1.0

type SignedBeaconBlockDeneb struct {
	Message   *BeaconBlockDeneb `json:"message"`
	Signature string            `json:"signature"`
}

func SignedBeaconBlockDenebFromConsensus added in v4.1.0

func SignedBeaconBlockDenebFromConsensus(b *eth.SignedBeaconBlockDeneb) (*SignedBeaconBlockDeneb, error)

func (*SignedBeaconBlockDeneb) ToConsensus added in v4.1.0

type SignedBeaconBlockHeader added in v4.1.0

type SignedBeaconBlockHeader struct {
	Message   *BeaconBlockHeader `json:"message"`
	Signature string             `json:"signature"`
}

func SignedBeaconBlockHeaderFromConsensus added in v4.2.0

func SignedBeaconBlockHeaderFromConsensus(src *eth.SignedBeaconBlockHeader) *SignedBeaconBlockHeader

func (*SignedBeaconBlockHeader) ToConsensus added in v4.2.0

type SignedBeaconBlockHeaderContainer added in v4.1.0

type SignedBeaconBlockHeaderContainer struct {
	Header    *SignedBeaconBlockHeader `json:"header"`
	Root      string                   `json:"root"`
	Canonical bool                     `json:"canonical"`
}

type SignedBlindedBeaconBlockBellatrix added in v4.1.0

type SignedBlindedBeaconBlockBellatrix struct {
	Message   *BlindedBeaconBlockBellatrix `json:"message"`
	Signature string                       `json:"signature"`
}

func SignedBlindedBeaconBlockBellatrixFromConsensus added in v4.1.0

func SignedBlindedBeaconBlockBellatrixFromConsensus(b *eth.SignedBlindedBeaconBlockBellatrix) (*SignedBlindedBeaconBlockBellatrix, error)

func (*SignedBlindedBeaconBlockBellatrix) ToGeneric added in v4.1.0

type SignedBlindedBeaconBlockCapella added in v4.1.0

type SignedBlindedBeaconBlockCapella struct {
	Message   *BlindedBeaconBlockCapella `json:"message"`
	Signature string                     `json:"signature"`
}

func SignedBlindedBeaconBlockCapellaFromConsensus added in v4.1.0

func SignedBlindedBeaconBlockCapellaFromConsensus(b *eth.SignedBlindedBeaconBlockCapella) (*SignedBlindedBeaconBlockCapella, error)

func (*SignedBlindedBeaconBlockCapella) ToGeneric added in v4.1.0

type SignedBlindedBeaconBlockDeneb added in v4.1.0

type SignedBlindedBeaconBlockDeneb struct {
	Message   *BlindedBeaconBlockDeneb `json:"message"`
	Signature string                   `json:"signature"`
}

func SignedBlindedBeaconBlockDenebFromConsensus added in v4.1.0

func SignedBlindedBeaconBlockDenebFromConsensus(b *eth.SignedBlindedBeaconBlockDeneb) (*SignedBlindedBeaconBlockDeneb, error)

func (*SignedBlindedBeaconBlockDeneb) ToConsensus added in v4.1.0

func (*SignedBlindedBeaconBlockDeneb) ToGeneric added in v4.2.0

type SignedContributionAndProof

type SignedContributionAndProof struct {
	Message   *ContributionAndProof `json:"message"`
	Signature string                `json:"signature"`
}

func SignedContributionAndProofFromConsensus added in v4.2.0

func SignedContributionAndProofFromConsensus(c *eth.SignedContributionAndProof) *SignedContributionAndProof

func (*SignedContributionAndProof) ToConsensus

type SignedValidatorRegistration added in v4.1.0

type SignedValidatorRegistration struct {
	Message   *ValidatorRegistration `json:"message"`
	Signature string                 `json:"signature"`
}

func SignedValidatorRegistrationFromConsensus added in v4.1.0

func SignedValidatorRegistrationFromConsensus(vr *eth.SignedValidatorRegistrationV1) *SignedValidatorRegistration

func (*SignedValidatorRegistration) ToConsensus added in v4.1.0

type SignedVoluntaryExit added in v4.1.0

type SignedVoluntaryExit struct {
	Message   *VoluntaryExit `json:"message"`
	Signature string         `json:"signature"`
}

func SignedExitFromConsensus added in v4.2.0

func SignedExitFromConsensus(e *eth.SignedVoluntaryExit) *SignedVoluntaryExit

func SignedExitsFromConsensus added in v4.2.0

func SignedExitsFromConsensus(src []*eth.SignedVoluntaryExit) []*SignedVoluntaryExit

func (*SignedVoluntaryExit) ToConsensus added in v4.1.0

func (e *SignedVoluntaryExit) ToConsensus() (*eth.SignedVoluntaryExit, error)

type SyncAggregate added in v4.1.0

type SyncAggregate struct {
	SyncCommitteeBits      string `json:"sync_committee_bits"`
	SyncCommitteeSignature string `json:"sync_committee_signature"`
}

type SyncCommittee added in v4.2.0

type SyncCommittee struct {
	Pubkeys         []string `json:"pubkeys"`
	AggregatePubkey string   `json:"aggregate_pubkey"`
}

func SyncCommitteeFromConsensus added in v4.2.0

func SyncCommitteeFromConsensus(sc *eth.SyncCommittee) *SyncCommittee

func (*SyncCommittee) ToConsensus added in v4.2.0

func (sc *SyncCommittee) ToConsensus() (*eth.SyncCommittee, error)

type SyncCommitteeContribution

type SyncCommitteeContribution struct {
	Slot              string `json:"slot"`
	BeaconBlockRoot   string `json:"beacon_block_root"`
	SubcommitteeIndex string `json:"subcommittee_index"`
	AggregationBits   string `json:"aggregation_bits"`
	Signature         string `json:"signature"`
}

func SyncCommitteeContributionFromConsensus added in v4.2.0

func SyncCommitteeContributionFromConsensus(c *eth.SyncCommitteeContribution) *SyncCommitteeContribution

func (*SyncCommitteeContribution) ToConsensus

type SyncCommitteeMessage added in v4.1.0

type SyncCommitteeMessage struct {
	Slot            string `json:"slot"`
	BeaconBlockRoot string `json:"beacon_block_root"`
	ValidatorIndex  string `json:"validator_index"`
	Signature       string `json:"signature"`
}

func (*SyncCommitteeMessage) ToConsensus added in v4.1.0

func (m *SyncCommitteeMessage) ToConsensus() (*eth.SyncCommitteeMessage, error)

type SyncCommitteeSubscription added in v4.1.0

type SyncCommitteeSubscription struct {
	ValidatorIndex       string   `json:"validator_index"`
	SyncCommitteeIndices []string `json:"sync_committee_indices"`
	UntilEpoch           string   `json:"until_epoch"`
}

func (*SyncCommitteeSubscription) ToConsensus added in v4.1.0

type SyncDetails added in v4.1.0

type SyncDetails struct {
	HeadSlot     string `json:"head_slot"`
	SyncDistance string `json:"sync_distance"`
	IsSyncing    bool   `json:"is_syncing"`
	IsOptimistic bool   `json:"is_optimistic"`
	ElOffline    bool   `json:"el_offline"`
}

SyncDetails contains information about node sync status.

type SyncDetailsContainer added in v4.1.0

type SyncDetailsContainer struct {
	Data *SyncDetails `json:"data"`
}

SyncDetailsContainer is a wrapper for Data.

type Validator added in v4.2.0

type Validator struct {
	PublicKey                  string `json:"pubkey"`
	WithdrawalCredentials      string `json:"withdrawal_credentials"`
	EffectiveBalance           string `json:"effective_balance"`
	Slashed                    bool   `json:"slashed"`
	ActivationEligibilityEpoch string `json:"activation_eligibility_epoch"`
	ActivationEpoch            string `json:"activation_epoch"`
	ExitEpoch                  string `json:"exit_epoch"`
	WithdrawableEpoch          string `json:"withdrawable_epoch"`
}

func ValidatorFromConsensus added in v4.2.0

func ValidatorFromConsensus(v *eth.Validator) *Validator

type ValidatorRegistration added in v4.1.0

type ValidatorRegistration struct {
	FeeRecipient string `json:"fee_recipient"`
	GasLimit     string `json:"gas_limit"`
	Timestamp    string `json:"timestamp"`
	Pubkey       string `json:"pubkey"`
}

func ValidatorRegistrationFromConsensus added in v4.1.0

func ValidatorRegistrationFromConsensus(vr *eth.ValidatorRegistrationV1) *ValidatorRegistration

func (*ValidatorRegistration) ToConsensus added in v4.1.0

type VoluntaryExit added in v4.1.0

type VoluntaryExit struct {
	Epoch          string `json:"epoch"`
	ValidatorIndex string `json:"validator_index"`
}

func ExitFromConsensus added in v4.2.0

func ExitFromConsensus(e *eth.VoluntaryExit) *VoluntaryExit

func (*VoluntaryExit) ToConsensus added in v4.1.0

func (e *VoluntaryExit) ToConsensus() (*eth.VoluntaryExit, error)

type Withdrawal added in v4.1.0

type Withdrawal struct {
	WithdrawalIndex  string `json:"index"`
	ValidatorIndex   string `json:"validator_index"`
	ExecutionAddress string `json:"address"`
	Amount           string `json:"amount"`
}

func WithdrawalFromConsensus added in v4.2.0

func WithdrawalFromConsensus(w *enginev1.Withdrawal) *Withdrawal

func WithdrawalsFromConsensus added in v4.2.0

func WithdrawalsFromConsensus(ws []*enginev1.Withdrawal) []*Withdrawal

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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