api

package
v0.30.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 26 Imported by: 229

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDataMissing = errors.New("data missing")

ErrDataMissing is returned when the data requested is missing from the versioned struct.

View Source
var ErrUnsupportedVersion = errors.New("unsupported version")

ErrUnsupportedVersion is returned when the data requested is not present for the version of the struct.

Functions

This section is empty.

Types

type AggregateAttestationOpts added in v0.19.0

type AggregateAttestationOpts struct {
	Common CommonOpts

	// Slot is the slot for which the data is obtained.
	Slot phase0.Slot
	// AttestationDataRoot is the root for which the data is obtained.
	AttestationDataRoot phase0.Root
	// CommitteeIndex is the committee index the attestation data belongs to.
	CommitteeIndex phase0.CommitteeIndex
}

AggregateAttestationOpts are the options for obtaining aggregate attestations.

type AttestationDataOpts added in v0.19.0

type AttestationDataOpts struct {
	Common CommonOpts

	// Slot is the slot for which the data is obtained.
	Slot phase0.Slot
	// CommitteeIndex is the committee index for which the data is obtained.
	CommitteeIndex phase0.CommitteeIndex
}

AttestationDataOpts are the options for obtaining attestation data.

type AttestationEventHandlerFunc added in v0.24.2

type AttestationEventHandlerFunc func(context.Context, *spec.VersionedAttestation)

AttestationEventHandlerFunc is the handler for attestation events.

type AttestationPoolOpts added in v0.19.0

type AttestationPoolOpts struct {
	Common CommonOpts

	// Slot is the slot for which the data is obtained.  If not present then
	// data for all slots will be obtained.
	Slot *phase0.Slot

	// CommitteeIndex is the committee index for which the data is obtained.
	// If not present then data for all committee indices will be obtained.
	CommitteeIndex *phase0.CommitteeIndex
}

AttestationPoolOpts are the options for obtaining the attestation pool.

type AttestationRewardsOpts added in v0.23.0

type AttestationRewardsOpts struct {
	Common CommonOpts

	// Epoch is the epoch for which the data is obtained.
	Epoch phase0.Epoch
	// Indices is a list of validator indices to restrict the returned values.
	// If no indices are supplied then no filter will be applied.
	Indices []phase0.ValidatorIndex
	// PubKeys is a list of validator public keys to restrict the returned values.
	// If no public keys are supplied then no filter will be applied.
	PubKeys []phase0.BLSPubKey
}

AttestationRewardsOpts are the options for obtaining attestation rewards.

type AttesterDutiesOpts added in v0.19.0

type AttesterDutiesOpts struct {
	Common CommonOpts

	// Epoch is the epoch for which the data is obtained.
	Epoch phase0.Epoch
	// Indices is a list of validators for which to obtain the duties.
	Indices []phase0.ValidatorIndex
}

AttesterDutiesOpts are the options for obtaining proposer duties.

type AttesterSlashingEventHandlerFunc added in v0.24.2

type AttesterSlashingEventHandlerFunc func(context.Context, *electra.AttesterSlashing)

AttesterSlashingEventHandlerFunc is the handler for attestation_slashing events.

type BLSToExecutionChangeEventHandlerFunc added in v0.24.2

type BLSToExecutionChangeEventHandlerFunc func(context.Context, *capella.SignedBLSToExecutionChange)

BLSToExecutionChangeEventHandlerFunc is the handler for bls_to_execution_change events.

type BeaconBlockHeaderOpts added in v0.19.0

type BeaconBlockHeaderOpts struct {
	Common CommonOpts

	// Block is the ID of the block which the data is obtained.
	Block string
}

BeaconBlockHeaderOpts are the options for obtaining beacon block headers.

type BeaconBlockRootOpts added in v0.19.0

type BeaconBlockRootOpts struct {
	Common CommonOpts

	// Block is the ID of the block which the data is obtained.
	Block string
}

BeaconBlockRootOpts are the options for obtaining the beacon block root.

type BeaconCommitteeSelectionsOpts added in v0.28.1

type BeaconCommitteeSelectionsOpts struct {
	Common CommonOpts

	// Beacon Committee Selections are the selections which the DV should resolve.
	Selections []*apiv1.BeaconCommitteeSelection
}

BeaconCommitteeSelectionsOpts are the options for obtaining beacon committee selections.

type BeaconCommitteesOpts added in v0.19.0

type BeaconCommitteesOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
	// Epoch is the epoch for which the data is obtained.
	// This is optional; if not supplied it will obtain the data at the epoch relating to the state.
	Epoch *phase0.Epoch
}

BeaconCommitteesOpts are the options for obtaining proposer duties.

type BeaconStateOpts added in v0.19.0

type BeaconStateOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
}

BeaconStateOpts are the options for obtaining the beacon state.

type BeaconStateRandaoOpts added in v0.19.0

type BeaconStateRandaoOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
}

BeaconStateRandaoOpts are the options for obtaining the beacon state RANDAO.

type BeaconStateRootOpts added in v0.19.0

type BeaconStateRootOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
}

BeaconStateRootOpts are the options for obtaining the beacon state root.

type BlindedProposalOpts added in v0.19.0

type BlindedProposalOpts struct {
	Common CommonOpts

	// Slot is the slot for which the proposal should be fetched.
	Slot phase0.Slot
	// RandaoReveal is the RANDAO reveal for the proposal.
	RandaoReveal phase0.BLSSignature
	// Graffiti is the graffiti to be included in the beacon block body.
	Graffiti [32]byte
	// SkipRandaoVerification is true if we do not want the server to verify our RANDAO reveal.
	// If this is set then the RANDAO reveal should be passed as the point at infinity (0xc0…00)
	SkipRandaoVerification bool
}

BlindedProposalOpts are the options for obtaining blinded proposals.

type BlobSidecarEventHandlerFunc added in v0.24.2

type BlobSidecarEventHandlerFunc func(context.Context, *apiv1.BlobSidecarEvent)

BlobSidecarEventHandlerFunc is the handler for blob_sidecar events.

type BlobSidecars added in v0.19.0

type BlobSidecars struct {
	Sidecars []*deneb.BlobSidecar `ssz-max:"72"`
}

BlobSidecars is an API construct to allow decoding an array of blob sidecars.

func (*BlobSidecars) HashTreeRoot added in v0.29.0

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

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

func (*BlobSidecars) HashTreeRootWith added in v0.29.0

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

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

func (*BlobSidecars) MarshalSSZ added in v0.29.0

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

MarshalSSZ marshals the *BlobSidecars to SSZ-encoded bytes.

func (*BlobSidecars) MarshalSSZTo added in v0.29.0

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

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

func (*BlobSidecars) SizeSSZ added in v0.29.0

func (t *BlobSidecars) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *BlobSidecars.

func (*BlobSidecars) UnmarshalSSZ added in v0.19.0

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

UnmarshalSSZ unmarshals the *BlobSidecars from SSZ-encoded bytes.

type BlobSidecarsOpts added in v0.19.0

type BlobSidecarsOpts struct {
	Common CommonOpts

	// Block is the ID of the block for which the data is obtained.
	Block string
}

BlobSidecarsOpts are the options for obtaining blob sidecars.

type BlobsOpts added in v0.27.2

type BlobsOpts struct {
	Common CommonOpts

	// Block is the ID of the block for which the data is obtained.
	Block string
}

BlobsOpts are the options for obtaining blobs.

type BlockEventHandlerFunc added in v0.24.2

type BlockEventHandlerFunc func(context.Context, *apiv1.BlockEvent)

BlockEventHandlerFunc is the handler for block events.

type BlockGossipEventHandlerFunc added in v0.24.2

type BlockGossipEventHandlerFunc func(context.Context, *apiv1.BlockGossipEvent)

BlockGossipEventHandlerFunc is the handler for block_gossip events.

type BlockRewardsOpts added in v0.23.0

type BlockRewardsOpts struct {
	Common CommonOpts

	// Block is the ID of the block which the data is obtained.
	Block string
}

BlockRewardsOpts are the options for proposing a block.

type ChainReorgEventHandlerFunc added in v0.24.2

type ChainReorgEventHandlerFunc func(context.Context, *apiv1.ChainReorgEvent)

ChainReorgEventHandlerFunc is the handler for chain_reorg events.

type CommonOpts added in v0.19.5

type CommonOpts struct {
	// Timeout is a specific timeout for this call.
	// If 0 then the default timeout is used.
	Timeout time.Duration
}

CommonOpts are options common for all calls.

type ContributionAndProofEventHandlerFunc added in v0.24.2

type ContributionAndProofEventHandlerFunc func(context.Context, *altair.SignedContributionAndProof)

ContributionAndProofEventHandlerFunc is the handler for contribution_and_proof events.

type DataColumnSidecarEventHandlerFunc added in v0.27.0

type DataColumnSidecarEventHandlerFunc func(context.Context, *apiv1.DataColumnSidecarEvent)

DataColumnSidecarEventHandlerFunc is the handler for data_column_sidecar events.

type DepositContractOpts added in v0.19.5

type DepositContractOpts struct {
	Common CommonOpts
}

DepositContractOpts are the options for obtaining the deposit contract.

type EPBSProposalOpts added in v0.30.0

type EPBSProposalOpts struct {
	Common CommonOpts

	// Slot is the slot for which the proposal should be fetched.
	Slot phase0.Slot
	// RandaoReveal is the RANDAO reveal for the proposal.
	RandaoReveal phase0.BLSSignature
	// Graffiti is the graffiti to be included in the beacon block body.
	Graffiti [32]byte
	// SkipRandaoVerification is true if we do not want the server to verify our RANDAO reveal.
	// If this is set then the RANDAO reveal should be passed as the point at infinity (0xc0…00)
	SkipRandaoVerification bool
	// BuilderConfig supplies the required P2P and direct-builder bid policy.
	BuilderConfig *gloas.BuilderConfig
	// IncludePayload selects whether a self-built proposal carries its execution
	// payload envelope and blobs.
	//
	// True asks a self-building node for the stateless form: everything needed to
	// publish travels in the response, so any beacon node can publish the block.
	// This is what multiple-beacon-node, distributed-validator and failover setups
	// require.  It is a request rather than a guarantee: a block built on an
	// external builder's bid comes back with
	// VersionedEPBSProposal.ExecutionPayloadIncluded false whatever was asked for,
	// because the node does not hold the builder's payload, so those setups must
	// read that field rather than assume this one describes what arrived.
	//
	// False is stateful: the producing node caches the envelope and blobs, so the
	// block must be published via that same node, and the envelope retrieved from
	// it with ExecutionPayloadEnvelope() — but only when the node self-built the
	// block. An external builder's bid comes back excluded regardless of what was
	// asked for, and the response alone does not say which case occurred; that is
	// operational context the caller must already know.
	//
	// The spec marks this parameter required with no default, and the two choices
	// carry materially different operational constraints, so it is a pointer:
	// there is no safe value to assume on the caller's behalf, and leaving it
	// unset is rejected rather than silently resolved to the constraining mode.
	IncludePayload *bool
}

EPBSProposalOpts are the options for obtaining ePBS block proposals.

Post-Gloas there is no blinded proposal: proposers commit to an execution payload bid rather than to a payload, so the axis that replaced blinded versus unblinded is IncludePayload — whether the execution payload envelope travels with the block or stays cached on the producing node.

type Error added in v0.19.0

type Error struct {
	Method     string
	Endpoint   string
	StatusCode int
	Data       []byte
}

Error represents an API error.

func (Error) Error added in v0.19.0

func (e Error) Error() string

type EventHandlerFunc added in v0.24.2

type EventHandlerFunc func(*apiv1.Event)

EventHandlerFunc is the handler for generic events.

type EventsOpts added in v0.24.2

type EventsOpts struct {
	Common CommonOpts

	// Topics are the topics of events to which we want to listen.
	Topics []string

	// Handler is a generic handler function to which to send all events.
	// In general, it is better to use event-specific handlers as they avoid casting, and also provide a context.
	Handler EventHandlerFunc

	// AttestationHandler is a handler for the attestation event.
	AttestationHandler AttestationEventHandlerFunc
	// AttesterSlashingHandler is a handler for the attester_slashing event.
	AttesterSlashingHandler AttesterSlashingEventHandlerFunc
	// BlobSidecarHandler is a handler for the blob_sidecar event.
	BlobSidecarHandler BlobSidecarEventHandlerFunc
	// BlockHandler is a handler for the block event.
	BlockHandler BlockEventHandlerFunc
	// BlockGossipHandler is a handler for the block_gossip event.
	BlockGossipHandler BlockGossipEventHandlerFunc
	// BLSToExecutionChangeHandler is a handler for the bls_to_execution_change event.
	BLSToExecutionChangeHandler BLSToExecutionChangeEventHandlerFunc
	// ChainReorgHandler is a handler for the chain_reorg event.
	ChainReorgHandler ChainReorgEventHandlerFunc
	// ContributionAndProofHandler is a handler for the contribution_and_proof event.
	ContributionAndProofHandler ContributionAndProofEventHandlerFunc
	// DataColumnSidecarHandler is a handler for the data_column_sidecar event.
	DataColumnSidecarHandler DataColumnSidecarEventHandlerFunc
	// ExecutionPayloadHandler is a handler for the execution_payload event
	// (SignedExecutionPayloadEnvelope successfully imported on the fork-choice).
	ExecutionPayloadHandler ExecutionPayloadEventHandlerFunc
	// ExecutionPayloadAvailableHandler is a handler for the execution_payload_available event.
	ExecutionPayloadAvailableHandler ExecutionPayloadAvailableEventHandlerFunc
	// ExecutionPayloadBidHandler is a handler for the execution_payload_bid event.
	ExecutionPayloadBidHandler ExecutionPayloadBidEventHandlerFunc
	// ExecutionPayloadGossipHandler is a handler for the execution_payload_gossip event
	// (SignedExecutionPayloadEnvelope passed gossip validation).
	ExecutionPayloadGossipHandler ExecutionPayloadGossipEventHandlerFunc
	// FastConfirmationHandler is a handler for the fast_confirmation event.
	FastConfirmationHandler FastConfirmationEventHandlerFunc
	// FinalizedCheckpointHandler is a handler for the finalized_checkpoint event.
	FinalizedCheckpointHandler FinalizedCheckpointEventHandlerFunc
	// HeadHandler is a handler for the head event.
	HeadHandler HeadEventHandlerFunc
	// HeadV2Handler is a handler for the head_v2 event.
	HeadV2Handler HeadV2EventHandlerFunc
	// PayloadAttestationMessageHandler is a handler for the payload_attestation_message event.
	PayloadAttestationMessageHandler PayloadAttestationMessageEventHandlerFunc
	// PayloadAttributesHandler is a handler for the payload_attributes event.
	PayloadAttributesHandler PayloadAttributesEventHandlerFunc
	// ProposerPreferencesHandler is a handler for the proposer_preferences event.
	ProposerPreferencesHandler ProposerPreferencesEventHandlerFunc
	// ProposerSlashingHandler is a handler for the proposer_slashing event.
	ProposerSlashingHandler ProposerSlashingEventHandlerFunc
	// SingleAttestationHandler is a handler for the single_attestation event.
	SingleAttestationHandler SingleAttestationEventHandlerFunc
	// VoluntaryExitHandler is a handler for the voluntary_exit event.
	VoluntaryExitHandler VoluntaryExitEventHandlerFunc
}

EventsOpts are the options for obtaining events.

type ExecutionPayloadAvailableEventHandlerFunc added in v0.30.0

type ExecutionPayloadAvailableEventHandlerFunc func(context.Context, *apiv1.ExecutionPayloadAvailableEvent)

ExecutionPayloadAvailableEventHandlerFunc is the handler for execution_payload_available events.

type ExecutionPayloadBidEventHandlerFunc added in v0.30.0

type ExecutionPayloadBidEventHandlerFunc func(context.Context, *gloas.SignedExecutionPayloadBid)

ExecutionPayloadBidEventHandlerFunc is the handler for execution_payload_bid events.

type ExecutionPayloadEnvelopeOpts added in v0.30.0

type ExecutionPayloadEnvelopeOpts struct {
	Common CommonOpts

	// Slot is the slot for which the envelope was built.
	Slot phase0.Slot
	// BeaconBlockRoot is the root of the beacon block the envelope commits to.
	//
	// Passing it makes the lookup re-org resistant: if a re-org happens between
	// producing the block and retrieving the envelope, the caller gets nothing
	// rather than an envelope committed to a block that is no longer on the
	// chain.  The node is expected to check the cached envelope against it, and
	// the returned envelope's own root is checked against it again here, so a
	// node that does not is caught rather than trusted.
	BeaconBlockRoot phase0.Root
}

ExecutionPayloadEnvelopeOpts are the options for obtaining the execution payload envelope a node cached while producing a block.

This is the other half of asking for a proposal with the payload excluded: the node kept the envelope, and this is how the caller retrieves it to sign and publish.

type ExecutionPayloadEventHandlerFunc added in v0.30.0

type ExecutionPayloadEventHandlerFunc func(context.Context, *apiv1.ExecutionPayloadEvent)

ExecutionPayloadEventHandlerFunc is the handler for execution_payload events.

type ExecutionPayloadGossipEventHandlerFunc added in v0.30.0

type ExecutionPayloadGossipEventHandlerFunc func(context.Context, *apiv1.ExecutionPayloadGossipEvent)

ExecutionPayloadGossipEventHandlerFunc is the handler for execution_payload_gossip events.

type FastConfirmationEventHandlerFunc added in v0.30.0

type FastConfirmationEventHandlerFunc func(context.Context, *apiv1.FastConfirmationEvent)

FastConfirmationEventHandlerFunc is the handler for fast_confirmation events.

type FinalityOpts added in v0.19.0

type FinalityOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
}

FinalityOpts are the options for obtaining finality checkpoints.

type FinalizedCheckpointEventHandlerFunc added in v0.24.2

type FinalizedCheckpointEventHandlerFunc func(context.Context, *apiv1.FinalizedCheckpointEvent)

FinalizedCheckpointEventHandlerFunc is the handler for finalized_checkpoint events.

type ForkChoiceOpts added in v0.19.5

type ForkChoiceOpts struct {
	Common CommonOpts
}

ForkChoiceOpts are the options for obtaining the fork choice.

type ForkOpts added in v0.19.0

type ForkOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
}

ForkOpts are the options for obtaining the fork.

type ForkScheduleOpts added in v0.19.5

type ForkScheduleOpts struct {
	Common CommonOpts
}

ForkScheduleOpts are the options for obtaining the fork schedule.

type GenesisOpts added in v0.19.5

type GenesisOpts struct {
	Common CommonOpts
}

GenesisOpts are the options for obtaining genesis information.

type HeadEventHandlerFunc added in v0.24.2

type HeadEventHandlerFunc func(context.Context, *apiv1.HeadEvent)

HeadEventHandlerFunc is the handler for head events.

type HeadV2EventHandlerFunc added in v0.30.0

type HeadV2EventHandlerFunc func(context.Context, *apiv1.HeadEventV2)

HeadV2EventHandlerFunc is the handler for head_v2 events.

type NodePeersOpts added in v0.19.5

type NodePeersOpts struct {
	Common CommonOpts

	// State of the connection (disconnected, connecting, connected, disconnecting)
	State []string
	// Direction of the connection (inbound, outbound)
	Direction []string
}

NodePeersOpts are the options for client side peer filtering.

type NodeSyncingOpts added in v0.19.5

type NodeSyncingOpts struct {
	Common CommonOpts
}

NodeSyncingOpts are the options for obtaining node sync information.

type NodeVersionOpts added in v0.19.5

type NodeVersionOpts struct {
	Common CommonOpts
}

NodeVersionOpts are the options for obtaining the node version.

type PTCDutiesOpts added in v0.30.0

type PTCDutiesOpts struct {
	Common CommonOpts

	// Epoch is the epoch for which the data is obtained.
	Epoch phase0.Epoch
	// Indices is a list of validators for which to obtain the duties.
	Indices []phase0.ValidatorIndex
}

PTCDutiesOpts are the options for obtaining payload timeliness committee duties.

type PayloadAttestationDataOpts added in v0.30.0

type PayloadAttestationDataOpts struct {
	Common CommonOpts

	// Slot is the slot for which the data is obtained.
	Slot phase0.Slot
}

PayloadAttestationDataOpts are the options for obtaining payload attestation data.

type PayloadAttestationMessageEventHandlerFunc added in v0.30.0

type PayloadAttestationMessageEventHandlerFunc func(context.Context, *gloas.PayloadAttestationMessage)

PayloadAttestationMessageEventHandlerFunc is the handler for payload_attestation_message events.

type PayloadAttestationPoolOpts added in v0.30.0

type PayloadAttestationPoolOpts struct {
	Common CommonOpts

	// Slot is the slot for which the data is obtained.  If not present then
	// data for all slots will be obtained.  Note that some beacon nodes
	// require a slot and will reject a request without one.
	Slot *phase0.Slot
}

PayloadAttestationPoolOpts are the options for obtaining the payload attestation pool.

type PayloadAttributesEventHandlerFunc added in v0.24.2

type PayloadAttributesEventHandlerFunc func(context.Context, *apiv1.PayloadAttributesEvent)

PayloadAttributesEventHandlerFunc is the handler for payload_attributes events.

type PendingConsolidationsOpts added in v0.26.0

type PendingConsolidationsOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
}

PendingConsolidationsOpts are the options for obtaining pending consolidations.

type PendingDepositsOpts added in v0.25.1

type PendingDepositsOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
}

PendingDepositsOpts are the options for obtaining pending deposits.

type PendingPartialWithdrawalsOpts added in v0.26.0

type PendingPartialWithdrawalsOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
}

PendingPartialWithdrawalsOpts are the options for obtaining pending partial withdrawals.

type ProposalOpts added in v0.19.0

type ProposalOpts struct {
	Common CommonOpts

	// Slot is the slot for which the proposal should be fetched.
	Slot phase0.Slot
	// RandaoReveal is the RANDAO reveal for the proposal.
	RandaoReveal phase0.BLSSignature
	// Graffiti is the graffiti to be included in the beacon block body.
	Graffiti [32]byte
	// SkipRandaoVerification is true if we do not want the server to verify our RANDAO reveal.
	// If this is set then the RANDAO reveal should be passed as the point at infinity (0xc0…00)
	SkipRandaoVerification bool
	// BuilderBoostFactor is the relative weight of the builder payload versus a locally-produced
	// payload, as per https://ethereum.github.io/beacon-APIs/#/Validator/produceBlockV3
	// This is optional; if not supplied it will use the default value of 100.
	BuilderBoostFactor *uint64
}

ProposalOpts are the options for obtaining proposals.

type ProposerDutiesOpts added in v0.19.0

type ProposerDutiesOpts struct {
	Common CommonOpts

	// Epoch is the epoch for which the data is obtained.
	Epoch phase0.Epoch
	// Indices is a list of validators to restrict the returned values.
	// If no indices are supplied then no filter will be applied.
	Indices []phase0.ValidatorIndex
}

ProposerDutiesOpts are the options for obtaining proposer duties.

type ProposerPreferencesEventHandlerFunc added in v0.30.0

type ProposerPreferencesEventHandlerFunc func(context.Context, *gloas.SignedProposerPreferences)

ProposerPreferencesEventHandlerFunc is the handler for proposer_preferences events.

type ProposerSlashingEventHandlerFunc added in v0.24.2

type ProposerSlashingEventHandlerFunc func(context.Context, *phase0.ProposerSlashing)

ProposerSlashingEventHandlerFunc is the handler for proposer_slashing events.

type Response added in v0.19.0

type Response[T any] struct {
	Data     T
	Metadata map[string]any
}

Response is a response from the beacon API which may contain metadata.

type SignedBeaconBlockOpts added in v0.19.0

type SignedBeaconBlockOpts struct {
	Common CommonOpts

	// Block is the ID of the block which the data is obtained.
	Block string
}

SignedBeaconBlockOpts are the options for obtaining signed beacon blocks.

type SignedExecutionPayloadEnvelopeOpts added in v0.30.0

type SignedExecutionPayloadEnvelopeOpts struct {
	Common CommonOpts

	// Block is the ID of the block which the data is obtained.
	Block string
}

SignedExecutionPayloadEnvelopeOpts are the options for obtaining signed execution payload envelopes.

type SingleAttestationEventHandlerFunc added in v0.24.2

type SingleAttestationEventHandlerFunc func(context.Context, *electra.SingleAttestation)

SingleAttestationEventHandlerFunc is the handler for single_attestation events.

type SpecOpts added in v0.19.5

type SpecOpts struct {
	Common CommonOpts
}

SpecOpts are the options for obtaining the chain specification.

type SubmitAggregateAttestationsOpts added in v0.24.0

type SubmitAggregateAttestationsOpts struct {
	Common CommonOpts

	// SignedAggregateAndProofs are the aggregate and proofs to submit.
	SignedAggregateAndProofs []*spec.VersionedSignedAggregateAndProof
}

SubmitAggregateAttestationsOpts are the options for submitting attestations.

type SubmitAttestationsOpts added in v0.24.0

type SubmitAttestationsOpts struct {
	Common CommonOpts

	// Attestations are the attestations to submit.
	Attestations []*spec.VersionedAttestation
}

SubmitAttestationsOpts are the options for submitting attestations.

type SubmitBlindedProposalOpts added in v0.21.0

type SubmitBlindedProposalOpts struct {
	Common CommonOpts

	// Proposal is the proposal to submit.
	Proposal *VersionedSignedBlindedProposal

	// BroadcastValidation is the validation required of the consensus node before broadcasting the proposal.
	BroadcastValidation *apiv2.BroadcastValidation
}

SubmitBlindedProposalOpts are the options for submitting proposals.

type SubmitExecutionPayloadBidOpts added in v0.30.0

type SubmitExecutionPayloadBidOpts struct {
	Common CommonOpts

	// SignedExecutionPayloadBid is the signed bid to publish. Its Version
	// selects the wire schema and the consensus version header.
	SignedExecutionPayloadBid *spec.VersionedSignedExecutionPayloadBid
}

SubmitExecutionPayloadBidOpts are the options for submitting execution payload bids.

type SubmitExecutionPayloadEnvelopeOpts added in v0.30.0

type SubmitExecutionPayloadEnvelopeOpts struct {
	Common CommonOpts

	// SignedExecutionPayloadEnvelope is the signed envelope to publish.
	// Its Version selects the wire schema and the consensus version header.
	SignedExecutionPayloadEnvelope *spec.VersionedSignedExecutionPayloadEnvelope

	// KZGProofs are the cell KZG proofs for the blobs committed to by the
	// envelope's payload.
	KZGProofs []deneb.KZGProof

	// Blobs are the blobs committed to by the envelope's payload.
	Blobs []deneb.Blob

	// BroadcastValidation is the validation required of the consensus node
	// before broadcasting the envelope.
	BroadcastValidation *apiv2.BroadcastValidation
}

SubmitExecutionPayloadEnvelopeOpts are the options for submitting execution payload envelopes. The submission always uses the stateless request form (SignedExecutionPayloadEnvelopeContents): the signed envelope plus the blobs and KZG cell proofs the beacon node needs to build data column sidecars. The stateful/blinded form only works when the beacon node cached the full envelope from its own block production, so it is not offered here.

type SubmitPayloadAttestationMessagesOpts added in v0.30.0

type SubmitPayloadAttestationMessagesOpts struct {
	Common CommonOpts

	// Messages are the payload attestation messages to submit.  They must all
	// be of the same version.
	Messages []*spec.VersionedPayloadAttestationMessage
}

SubmitPayloadAttestationMessagesOpts are the options for submitting payload attestation messages.

type SubmitProposalOpts added in v0.21.0

type SubmitProposalOpts struct {
	Common CommonOpts

	// Proposal is the proposal to submit.
	Proposal *VersionedSignedProposal

	// BroadcastValidation is the validation required of the consensus node before broadcasting the proposal.
	BroadcastValidation *apiv2.BroadcastValidation

	// BuilderURL is the optional direct-builder route returned by block production.
	BuilderURL string
}

SubmitProposalOpts are the options for submitting proposals.

type SubmitProposerPreferencesOpts added in v0.30.0

type SubmitProposerPreferencesOpts struct {
	Common CommonOpts

	// Preferences are the signed proposer preferences to submit.  Proposer
	// preferences exist only from Gloas onwards, so they are unversioned.  An
	// empty list is a valid submission.
	Preferences []*gloas.SignedProposerPreferences
}

SubmitProposerPreferencesOpts are the options for submitting proposer preferences.

type SyncCommitteeContributionOpts added in v0.19.0

type SyncCommitteeContributionOpts struct {
	Common CommonOpts

	// Slot is the slot for which the data is obtained.
	Slot phase0.Slot
	// SubcommitteeIndex is the index of the sync subcommittee for which the data is obtained.
	SubcommitteeIndex uint64
	// BeaconBlockRoot is the root of the beacon block for which the data is obtained.
	BeaconBlockRoot phase0.Root
}

SyncCommitteeContributionOpts are the options for obtaining sync committee contributions.

type SyncCommitteeDutiesOpts added in v0.19.0

type SyncCommitteeDutiesOpts struct {
	Common CommonOpts

	// Epoch is the epoch for which the data is obtained.
	Epoch phase0.Epoch
	// Indices is a list of validators for which to obtain the duties.
	Indices []phase0.ValidatorIndex
}

SyncCommitteeDutiesOpts are the options for obtaining sync committee duties.

type SyncCommitteeOpts added in v0.19.0

type SyncCommitteeOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
	// Epoch is the epoch for which the data is obtained.
	// This is optional; if not supplied it will obtain the data at the epoch relating to the state.
	Epoch *phase0.Epoch
}

SyncCommitteeOpts are the options for obtaining sync committees.

type SyncCommitteeRewardsOpts added in v0.23.0

type SyncCommitteeRewardsOpts struct {
	Common CommonOpts

	// Block is the ID of the block which the data is obtained.
	Block string
	// Indices is a list of validator indices to restrict the returned values.
	// If no indices are supplied then no filter will be applied.
	Indices []phase0.ValidatorIndex
	// PubKeys is a list of validator public keys to restrict the returned values.
	// If no public keys are supplied then no filter will be applied.
	PubKeys []phase0.BLSPubKey
}

SyncCommitteeRewardsOpts are the options for obtaining sync committee rewards.

type ValidatorBalancesOpts added in v0.19.0

type ValidatorBalancesOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
	// Indices is a list of validator indices to restrict the returned values.
	// If no indices are supplied then no filter will be applied.
	Indices []phase0.ValidatorIndex
	// PubKeys is a list of validator public keys to restrict the returned values.
	// If no public keys are supplied then no filter will be applied.
	PubKeys []phase0.BLSPubKey
}

ValidatorBalancesOpts are the options for obtaining validator balances.

type ValidatorLivenessOpts added in v0.24.1

type ValidatorLivenessOpts struct {
	Common CommonOpts

	// Epoch is the epoch for which the data is obtained.
	Epoch phase0.Epoch
	// Indices is a list of validators for which to obtain the duties.
	Indices []phase0.ValidatorIndex
}

ValidatorLivenessOpts are the options for obtaining validator liveness information.

type ValidatorsOpts added in v0.19.0

type ValidatorsOpts struct {
	Common CommonOpts

	// State is the state at which the data is obtained.
	// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
	State string
	// Indices is a list of validator indices to restrict the returned values.
	// If no indices are supplied then no filter will be applied.
	Indices []phase0.ValidatorIndex
	// PubKeys is a list of validator public keys to restrict the returned values.
	// If no public keys are supplied then no filter will be applied.
	PubKeys []phase0.BLSPubKey
	// ValidatorStates is a list of validator states to restrict the returned values.
	// If no validator states are supplied then no filter will be applied.
	ValidatorStates []apiv1.ValidatorState
}

ValidatorsOpts are the options for obtaining validators.

type VersionedBlindedBeaconBlock

VersionedBlindedBeaconBlock contains a versioned blinded beacon block.

func (*VersionedBlindedBeaconBlock) Attestations

Attestations returns the attestations of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) BodyRoot

func (v *VersionedBlindedBeaconBlock) BodyRoot() (phase0.Root, error)

BodyRoot returns the body root of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) FeeRecipient added in v0.13.3

FeeRecipient returns the fee recipient of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) Graffiti added in v0.18.0

func (v *VersionedBlindedBeaconBlock) Graffiti() ([32]byte, error)

Graffiti returns the graffiti of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) HashTreeRoot added in v0.13.0

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

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

func (*VersionedBlindedBeaconBlock) HashTreeRootWith added in v0.13.0

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

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

func (*VersionedBlindedBeaconBlock) IsEmpty

func (v *VersionedBlindedBeaconBlock) IsEmpty() bool

IsEmpty returns true if there is no block.

func (*VersionedBlindedBeaconBlock) MarshalSSZ added in v0.13.0

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

MarshalSSZ marshals the *VersionedBlindedBeaconBlock to SSZ-encoded bytes.

func (*VersionedBlindedBeaconBlock) MarshalSSZTo added in v0.13.0

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

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

func (*VersionedBlindedBeaconBlock) ParentRoot

func (v *VersionedBlindedBeaconBlock) ParentRoot() (phase0.Root, error)

ParentRoot returns the parent root of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) ProposerIndex added in v0.18.1

ProposerIndex returns the proposer index of the beacon block.

func (*VersionedBlindedBeaconBlock) RandaoReveal added in v0.18.0

RandaoReveal returns the RANDAO reveal of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) Root

Root returns the root of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) SizeSSZ added in v0.13.0

func (t *VersionedBlindedBeaconBlock) SizeSSZ() int

SizeSSZ returns the SSZ encoded size of the *VersionedBlindedBeaconBlock.

func (*VersionedBlindedBeaconBlock) Slot

Slot returns the slot of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) StateRoot

func (v *VersionedBlindedBeaconBlock) StateRoot() (phase0.Root, error)

StateRoot returns the state root of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) String added in v0.12.0

func (v *VersionedBlindedBeaconBlock) String() string

String returns a string version of the structure.

func (*VersionedBlindedBeaconBlock) Timestamp added in v0.14.4

func (v *VersionedBlindedBeaconBlock) Timestamp() (uint64, error)

Timestamp returns the timestamp of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) TransactionsRoot added in v0.13.1

func (v *VersionedBlindedBeaconBlock) TransactionsRoot() (phase0.Root, error)

TransactionsRoot returns the transactions root of the blinded beacon block.

func (*VersionedBlindedBeaconBlock) UnmarshalSSZ added in v0.13.0

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

UnmarshalSSZ unmarshals the *VersionedBlindedBeaconBlock from SSZ-encoded bytes.

type VersionedBlindedProposal added in v0.19.0

VersionedBlindedProposal contains a versioned blinded proposal.

func (*VersionedBlindedProposal) Attestations added in v0.19.0

Attestations returns the attestations of the blinded proposal.

func (*VersionedBlindedProposal) BodyRoot added in v0.19.0

func (v *VersionedBlindedProposal) BodyRoot() (phase0.Root, error)

BodyRoot returns the body root of the blinded proposal.

func (*VersionedBlindedProposal) FeeRecipient added in v0.19.0

FeeRecipient returns the fee recipient of the blinded proposal.

func (*VersionedBlindedProposal) Graffiti added in v0.19.0

func (v *VersionedBlindedProposal) Graffiti() ([32]byte, error)

Graffiti returns the graffiti of the blinded proposal.

func (*VersionedBlindedProposal) IsEmpty added in v0.19.0

func (v *VersionedBlindedProposal) IsEmpty() bool

IsEmpty returns true if there is no proposal.

func (*VersionedBlindedProposal) ParentRoot added in v0.19.0

func (v *VersionedBlindedProposal) ParentRoot() (phase0.Root, error)

ParentRoot returns the parent root of the blinded proposal.

func (*VersionedBlindedProposal) ProposerIndex added in v0.19.0

func (v *VersionedBlindedProposal) ProposerIndex() (phase0.ValidatorIndex, error)

ProposerIndex returns the proposer index of the blinded proposal.

func (*VersionedBlindedProposal) RandaoReveal added in v0.19.0

func (v *VersionedBlindedProposal) RandaoReveal() (phase0.BLSSignature, error)

RandaoReveal returns the RANDAO reveal of the blinded proposal.

func (*VersionedBlindedProposal) Root added in v0.19.0

Root returns the root of the blinded proposal.

func (*VersionedBlindedProposal) Slot added in v0.19.0

Slot returns the slot of the blinded proposal.

func (*VersionedBlindedProposal) StateRoot added in v0.19.0

func (v *VersionedBlindedProposal) StateRoot() (phase0.Root, error)

StateRoot returns the state root of the blinded proposal.

func (*VersionedBlindedProposal) String added in v0.19.0

func (v *VersionedBlindedProposal) String() string

String returns a string version of the structure.

func (*VersionedBlindedProposal) Timestamp added in v0.19.0

func (v *VersionedBlindedProposal) Timestamp() (uint64, error)

Timestamp returns the timestamp of the blinded proposal.

func (*VersionedBlindedProposal) TransactionsRoot added in v0.19.0

func (v *VersionedBlindedProposal) TransactionsRoot() (phase0.Root, error)

TransactionsRoot returns the transactions root of the blinded proposal.

type VersionedBlockRequest added in v0.19.0

type VersionedBlockRequest struct {
	Version   spec.DataVersion
	Bellatrix *bellatrix.SignedBeaconBlock
	Capella   *capella.SignedBeaconBlock
	Deneb     *deneb.SignedBeaconBlock
	Electra   *electra.SignedBeaconBlock
	Fulu      *electra.SignedBeaconBlock
}

VersionedBlockRequest contains a versioned signed beacon block request.

func (*VersionedBlockRequest) Attestations added in v0.19.0

func (v *VersionedBlockRequest) Attestations() ([]spec.VersionedAttestation, error)

Attestations returns the attestations of the beacon block.

func (*VersionedBlockRequest) AttesterSlashings added in v0.19.0

func (v *VersionedBlockRequest) AttesterSlashings() ([]spec.VersionedAttesterSlashing, error)

AttesterSlashings returns the attester slashings of the beacon block.

func (*VersionedBlockRequest) BodyRoot added in v0.19.0

func (v *VersionedBlockRequest) BodyRoot() (phase0.Root, error)

BodyRoot returns the body root of the beacon block.

func (*VersionedBlockRequest) ExecutionBlockHash added in v0.19.0

func (v *VersionedBlockRequest) ExecutionBlockHash() (phase0.Hash32, error)

ExecutionBlockHash returns the block hash of the beacon block.

func (*VersionedBlockRequest) ParentRoot added in v0.19.0

func (v *VersionedBlockRequest) ParentRoot() (phase0.Root, error)

ParentRoot returns the parent root of the beacon block.

func (*VersionedBlockRequest) ProposerSlashings added in v0.19.0

func (v *VersionedBlockRequest) ProposerSlashings() ([]*phase0.ProposerSlashing, error)

ProposerSlashings returns the proposer slashings of the beacon block.

func (*VersionedBlockRequest) Root added in v0.19.0

func (v *VersionedBlockRequest) Root() (phase0.Root, error)

Root returns the root of the beacon block.

func (*VersionedBlockRequest) Slot added in v0.19.0

func (v *VersionedBlockRequest) Slot() (phase0.Slot, error)

Slot returns the slot of the signed beacon block.

func (*VersionedBlockRequest) StateRoot added in v0.19.0

func (v *VersionedBlockRequest) StateRoot() (phase0.Root, error)

StateRoot returns the state root of the beacon block.

func (*VersionedBlockRequest) String added in v0.19.0

func (v *VersionedBlockRequest) String() string

String returns a string version of the structure.

func (*VersionedBlockRequest) SyncAggregate added in v0.19.0

func (v *VersionedBlockRequest) SyncAggregate() (*altair.SyncAggregate, error)

SyncAggregate returns the sync aggregate of the beacon block.

type VersionedEPBSProposal added in v0.30.0

type VersionedEPBSProposal struct {
	Version spec.DataVersion
	// ExecutionPayloadIncluded selects which arm below carries the proposal.
	ExecutionPayloadIncluded bool
	BuilderIndex             *gloas.BuilderIndex
	ConsensusValue           *big.Int
	ExecutionValue           *big.Int
	// Gloas is the proposal when the execution payload is not included.
	Gloas *gloas.BeaconBlock
	// GloasContents is the proposal when the execution payload is included.
	GloasContents *apiv1gloas.BlockContents
	// BeaconBlockBodyRoot is the hash tree root of the proposal's beacon block
	// body, calculated with the codec that decoded the proposal -- the one
	// aware of whatever preset the connected node actually runs.  The
	// generated HashTreeRoot methods on the gloas types inline mainnet preset
	// sizes (for example a 512-bit sync committee bitvector) as Go literals
	// and never consult that codec, so they compute the wrong root on any
	// other preset.  A beacon block's own root has no preset-dependent field
	// of its own: it merkleizes slot, proposer index, parent root, state root
	// and this body root, exactly like phase0.BeaconBlockHeader.  The body
	// root is therefore the only preset-sensitive quantity in a block, and
	// whatever obtains the proposal is responsible for setting this field
	// with the spec-aware root.  BodyRoot errors when it is unset rather than
	// falling back to the generated, potentially wrong, Body.HashTreeRoot().
	BeaconBlockBodyRoot *phase0.Root
}

VersionedEPBSProposal contains a versioned ePBS block proposal, as produced by the gloas-onwards block production endpoint.

func (*VersionedEPBSProposal) Blobs added in v0.30.0

func (v *VersionedEPBSProposal) Blobs() ([]deneb.Blob, error)

Blobs returns the blobs that travelled with the block.

func (*VersionedEPBSProposal) BodyRoot added in v0.30.0

func (v *VersionedEPBSProposal) BodyRoot() (phase0.Root, error)

BodyRoot returns the hash tree root of the proposal's beacon block body, the value a proposer signs over.

It returns the retained BeaconBlockBodyRoot rather than recomputing it: the generated Body.HashTreeRoot() inlines mainnet preset sizes, so recomputing here would silently sign the wrong root on any other preset. There is deliberately no fallback to that computation.

func (*VersionedEPBSProposal) ExecutionPayloadEnvelope added in v0.30.0

func (v *VersionedEPBSProposal) ExecutionPayloadEnvelope() (*gloas.ExecutionPayloadEnvelope, error)

ExecutionPayloadEnvelope returns the execution payload envelope that travelled with the block. It is an error to ask for it when the execution payload was not included: the caller must fetch the envelope from the producing node.

func (*VersionedEPBSProposal) IsEmpty added in v0.30.0

func (v *VersionedEPBSProposal) IsEmpty() bool

IsEmpty returns true if no proposal is populated.

func (*VersionedEPBSProposal) KZGProofs added in v0.30.0

func (v *VersionedEPBSProposal) KZGProofs() ([]deneb.KZGProof, error)

KZGProofs returns the KZG proofs that travelled with the block.

func (*VersionedEPBSProposal) ParentRoot added in v0.30.0

func (v *VersionedEPBSProposal) ParentRoot() (phase0.Root, error)

ParentRoot returns the parent root of the proposal.

func (*VersionedEPBSProposal) ProposerIndex added in v0.30.0

func (v *VersionedEPBSProposal) ProposerIndex() (phase0.ValidatorIndex, error)

ProposerIndex returns the proposer index of the proposal.

func (*VersionedEPBSProposal) RandaoReveal added in v0.30.0

func (v *VersionedEPBSProposal) RandaoReveal() (phase0.BLSSignature, error)

RandaoReveal returns the RANDAO reveal of the proposal.

func (*VersionedEPBSProposal) Root added in v0.30.0

func (v *VersionedEPBSProposal) Root() (phase0.Root, error)

Root returns the hash tree root of the proposal's beacon block.

It composes a phase0.BeaconBlockHeader from the block's own fields plus the retained BodyRoot, rather than calling block.HashTreeRoot(): the generated block hasher recurses into the body and inherits the same mainnet-baked sizes that make Body.HashTreeRoot() wrong on other presets. The header's fields are all preset-independent, so composing it this way can never disagree with BodyRoot() -- do not "simplify" this back to block.HashTreeRoot(), that reintroduces the bug BeaconBlockBodyRoot exists to avoid.

func (*VersionedEPBSProposal) Slot added in v0.30.0

func (v *VersionedEPBSProposal) Slot() (phase0.Slot, error)

Slot returns the slot of the proposal.

func (*VersionedEPBSProposal) StateRoot added in v0.30.0

func (v *VersionedEPBSProposal) StateRoot() (phase0.Root, error)

StateRoot returns the state root of the proposal.

func (*VersionedEPBSProposal) String added in v0.30.0

func (v *VersionedEPBSProposal) String() string

String returns a string version of the structure.

func (*VersionedEPBSProposal) Value added in v0.30.0

func (v *VersionedEPBSProposal) Value() *big.Int

Value returns the total value of the proposal, or nil when its execution value was not supplied by the beacon node.

type VersionedProposal added in v0.19.0

type VersionedProposal struct {
	Version          spec.DataVersion
	Blinded          bool
	ConsensusValue   *big.Int
	ExecutionValue   *big.Int
	Phase0           *phase0.BeaconBlock
	Altair           *altair.BeaconBlock
	Bellatrix        *bellatrix.BeaconBlock
	BellatrixBlinded *apiv1bellatrix.BlindedBeaconBlock
	Capella          *capella.BeaconBlock
	CapellaBlinded   *apiv1capella.BlindedBeaconBlock
	Deneb            *apiv1deneb.BlockContents
	DenebBlinded     *apiv1deneb.BlindedBeaconBlock
	Electra          *apiv1electra.BlockContents
	ElectraBlinded   *apiv1electra.BlindedBeaconBlock
	Fulu             *apiv1fulu.BlockContents
	FuluBlinded      *apiv1electra.BlindedBeaconBlock
}

VersionedProposal contains a versioned proposal.

func (*VersionedProposal) Attestations added in v0.19.0

func (v *VersionedProposal) Attestations() ([]spec.VersionedAttestation, error)

Attestations returns the attestations of the proposal.

func (*VersionedProposal) Blobs added in v0.19.5

func (v *VersionedProposal) Blobs() ([]deneb.Blob, error)

Blobs returns the blobs of the proposal.

func (*VersionedProposal) BodyRoot added in v0.19.0

func (v *VersionedProposal) BodyRoot() (phase0.Root, error)

BodyRoot returns the body root of the proposal.

func (*VersionedProposal) FeeRecipient added in v0.19.0

func (v *VersionedProposal) FeeRecipient() (bellatrix.ExecutionAddress, error)

FeeRecipient returns the fee recipient of the proposal.

func (*VersionedProposal) GasLimit added in v0.22.0

func (v *VersionedProposal) GasLimit() (uint64, error)

GasLimit returns the gas limit of the proposal.

func (*VersionedProposal) Graffiti added in v0.19.0

func (v *VersionedProposal) Graffiti() ([32]byte, error)

Graffiti returns the graffiti of the proposal.

func (*VersionedProposal) IsEmpty added in v0.19.0

func (v *VersionedProposal) IsEmpty() bool

IsEmpty returns true if there is no proposal.

func (*VersionedProposal) KZGProofs added in v0.19.5

func (v *VersionedProposal) KZGProofs() ([]deneb.KZGProof, error)

KZGProofs returns the KZG proofs of the proposal.

func (*VersionedProposal) ParentRoot added in v0.19.0

func (v *VersionedProposal) ParentRoot() (phase0.Root, error)

ParentRoot returns the parent root of the proposal.

func (*VersionedProposal) ProposerIndex added in v0.19.0

func (v *VersionedProposal) ProposerIndex() (phase0.ValidatorIndex, error)

ProposerIndex returns the proposer index of the proposal.

func (*VersionedProposal) RandaoReveal added in v0.19.0

func (v *VersionedProposal) RandaoReveal() (phase0.BLSSignature, error)

RandaoReveal returns the RANDAO reveal of the proposal.

func (*VersionedProposal) Root added in v0.19.0

func (v *VersionedProposal) Root() (phase0.Root, error)

Root returns the root of the proposal.

func (*VersionedProposal) Slot added in v0.19.0

func (v *VersionedProposal) Slot() (phase0.Slot, error)

Slot returns the slot of the proposal.

func (*VersionedProposal) StateRoot added in v0.19.0

func (v *VersionedProposal) StateRoot() (phase0.Root, error)

StateRoot returns the state root of the proposal.

func (*VersionedProposal) String added in v0.19.0

func (v *VersionedProposal) String() string

String returns a string version of the structure.

func (*VersionedProposal) Timestamp added in v0.19.0

func (v *VersionedProposal) Timestamp() (uint64, error)

Timestamp returns the timestamp of the proposal.

func (*VersionedProposal) Transactions added in v0.19.0

func (v *VersionedProposal) Transactions() ([]bellatrix.Transaction, error)

Transactions returns the transactions of the proposal.

func (*VersionedProposal) Value added in v0.21.0

func (v *VersionedProposal) Value() *big.Int

Value returns the value of the proposal, in Wei.

type VersionedSignedBlindedBeaconBlock

VersionedSignedBlindedBeaconBlock contains a versioned signed blinded beacon block.

func (*VersionedSignedBlindedBeaconBlock) Attestations

Attestations returns the attestations of the signed blinded beacon block.

func (*VersionedSignedBlindedBeaconBlock) AttesterSlashings

AttesterSlashings returns the attester slashings of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) BlobKZGCommitments added in v0.24.1

func (v *VersionedSignedBlindedBeaconBlock) BlobKZGCommitments() ([]deneb.KZGCommitment, error)

BlobKZGCommitments returns the blob KZG commitments of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) BodyRoot

BodyRoot returns the body root of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) ExecutionBlockHash added in v0.18.1

func (v *VersionedSignedBlindedBeaconBlock) ExecutionBlockHash() (phase0.Hash32, error)

ExecutionBlockHash returns the hash of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) ExecutionBlockNumber added in v0.18.1

func (v *VersionedSignedBlindedBeaconBlock) ExecutionBlockNumber() (uint64, error)

ExecutionBlockNumber returns the block number of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) ExecutionParentHash added in v0.24.1

func (v *VersionedSignedBlindedBeaconBlock) ExecutionParentHash() (phase0.Hash32, error)

ExecutionParentHash returns the parent hash of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) HashTreeRoot added in v0.18.2

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

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

func (*VersionedSignedBlindedBeaconBlock) HashTreeRootWith added in v0.18.2

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

func (*VersionedSignedBlindedBeaconBlock) MarshalSSZ added in v0.18.2

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

MarshalSSZ marshals the *VersionedSignedBlindedBeaconBlock to SSZ-encoded bytes.

func (*VersionedSignedBlindedBeaconBlock) MarshalSSZTo added in v0.18.2

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

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

func (*VersionedSignedBlindedBeaconBlock) ParentRoot

ParentRoot returns the parent root of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) ProposerIndex added in v0.18.1

ProposerIndex returns the proposer index of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) ProposerSlashings

func (v *VersionedSignedBlindedBeaconBlock) ProposerSlashings() ([]*phase0.ProposerSlashing, error)

ProposerSlashings returns the proposer slashings of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) Root

Root returns the root of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) Signature added in v0.18.1

Signature returns the signature of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) SizeSSZ added in v0.18.2

SizeSSZ returns the SSZ encoded size of the *VersionedSignedBlindedBeaconBlock.

func (*VersionedSignedBlindedBeaconBlock) Slot

Slot returns the slot of the signed beacon block.

func (*VersionedSignedBlindedBeaconBlock) StateRoot

StateRoot returns the state root of the beacon block.

func (*VersionedSignedBlindedBeaconBlock) UnmarshalSSZ added in v0.18.2

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

UnmarshalSSZ unmarshals the *VersionedSignedBlindedBeaconBlock from SSZ-encoded bytes.

type VersionedSignedBlindedProposal added in v0.19.0

VersionedSignedBlindedProposal contains a versioned signed blinded proposal.

func (*VersionedSignedBlindedProposal) Attestations added in v0.19.0

Attestations returns the attestations of the signed blinded proposal.

func (*VersionedSignedBlindedProposal) AttesterSlashings added in v0.19.0

AttesterSlashings returns the attester slashings of the blinded proposal.

func (*VersionedSignedBlindedProposal) BodyRoot added in v0.19.0

BodyRoot returns the body root of the blinded proposal.

func (*VersionedSignedBlindedProposal) ExecutionBlockHash added in v0.19.0

func (v *VersionedSignedBlindedProposal) ExecutionBlockHash() (phase0.Hash32, error)

ExecutionBlockHash returns the hash of the blinded proposal.

func (*VersionedSignedBlindedProposal) ExecutionBlockNumber added in v0.19.0

func (v *VersionedSignedBlindedProposal) ExecutionBlockNumber() (uint64, error)

ExecutionBlockNumber returns the block number of the blinded proposal.

func (*VersionedSignedBlindedProposal) ParentRoot added in v0.19.0

func (v *VersionedSignedBlindedProposal) ParentRoot() (phase0.Root, error)

ParentRoot returns the parent root of the blinded proposal.

func (*VersionedSignedBlindedProposal) ProposerIndex added in v0.19.0

ProposerIndex returns the proposer index of the blinded proposal.

func (*VersionedSignedBlindedProposal) ProposerSlashings added in v0.19.0

func (v *VersionedSignedBlindedProposal) ProposerSlashings() ([]*phase0.ProposerSlashing, error)

ProposerSlashings returns the proposer slashings of the blinded proposal.

func (*VersionedSignedBlindedProposal) Root added in v0.19.0

Root returns the root of the blinded proposal.

func (*VersionedSignedBlindedProposal) Signature added in v0.19.0

Signature returns the signature of the blinded proposal.

func (*VersionedSignedBlindedProposal) Slot added in v0.19.0

Slot returns the slot of the signed blinded proposal.

func (*VersionedSignedBlindedProposal) StateRoot added in v0.19.0

func (v *VersionedSignedBlindedProposal) StateRoot() (phase0.Root, error)

StateRoot returns the state root of the blinded proposal.

type VersionedSignedProposal added in v0.19.0

VersionedSignedProposal contains a versioned signed beacon node proposal.

func (*VersionedSignedProposal) AssertPresent added in v0.21.0

func (v *VersionedSignedProposal) AssertPresent() error

AssertPresent throws an error if the expected proposal given the version and blinded fields is not present.

func (*VersionedSignedProposal) ExecutionBlockHash added in v0.19.6

func (v *VersionedSignedProposal) ExecutionBlockHash() (phase0.Hash32, error)

ExecutionBlockHash returns the hash of the execution payload.

func (*VersionedSignedProposal) ProposerIndex added in v0.20.0

func (v *VersionedSignedProposal) ProposerIndex() (phase0.ValidatorIndex, error)

ProposerIndex returns the proposer index of the signed proposal.

func (*VersionedSignedProposal) Slot added in v0.19.2

Slot returns the slot of the signed proposal.

func (*VersionedSignedProposal) String added in v0.19.0

func (v *VersionedSignedProposal) String() string

String returns a string version of the structure.

type VersionedSignedValidatorRegistration added in v0.12.0

type VersionedSignedValidatorRegistration struct {
	Version spec.BuilderVersion                `json:"version"`
	V1      *apiv1.SignedValidatorRegistration `json:"v1"`
}

VersionedSignedValidatorRegistration contains a versioned SignedValidatorRegistrationV1.

func (*VersionedSignedValidatorRegistration) FeeRecipient added in v0.12.0

FeeRecipient returns the fee recipient of the signed validator registration.

func (*VersionedSignedValidatorRegistration) GasLimit added in v0.12.0

GasLimit returns the gas limit of the signed validator registration.

func (*VersionedSignedValidatorRegistration) HashTreeRoot added in v0.18.2

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

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

func (*VersionedSignedValidatorRegistration) HashTreeRootWith added in v0.18.2

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

func (*VersionedSignedValidatorRegistration) MarshalSSZ added in v0.18.2

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

MarshalSSZ marshals the *VersionedSignedValidatorRegistration to SSZ-encoded bytes.

func (*VersionedSignedValidatorRegistration) MarshalSSZTo added in v0.18.2

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

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

func (*VersionedSignedValidatorRegistration) PubKey added in v0.12.0

PubKey returns the public key of the signed validator registration.

func (*VersionedSignedValidatorRegistration) Root added in v0.13.1

Root returns the root of the validator registration.

func (*VersionedSignedValidatorRegistration) SizeSSZ added in v0.18.2

SizeSSZ returns the SSZ encoded size of the *VersionedSignedValidatorRegistration.

func (*VersionedSignedValidatorRegistration) Timestamp added in v0.12.0

Timestamp returns the timestamp of the signed validator registration.

func (*VersionedSignedValidatorRegistration) UnmarshalSSZ added in v0.18.2

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

UnmarshalSSZ unmarshals the *VersionedSignedValidatorRegistration from SSZ-encoded bytes.

type VersionedValidatorRegistration added in v0.12.0

type VersionedValidatorRegistration struct {
	Version spec.BuilderVersion
	V1      *apiv1.ValidatorRegistration
}

VersionedValidatorRegistration contains a versioned ValidatorRegistrationV1.

func (*VersionedValidatorRegistration) FeeRecipient added in v0.12.0

FeeRecipient returns the fee recipient of the validator registration.

func (*VersionedValidatorRegistration) GasLimit added in v0.12.0

func (v *VersionedValidatorRegistration) GasLimit() (uint64, error)

GasLimit returns the gas limit of the validator registration.

func (*VersionedValidatorRegistration) IsEmpty added in v0.12.0

func (v *VersionedValidatorRegistration) IsEmpty() bool

IsEmpty returns true if there is no block.

func (*VersionedValidatorRegistration) PubKey added in v0.12.0

PubKey returns the public key of the validator registration.

func (*VersionedValidatorRegistration) Root added in v0.13.1

Root returns the root of the validator registration.

func (*VersionedValidatorRegistration) Timestamp added in v0.12.0

func (v *VersionedValidatorRegistration) Timestamp() (time.Time, error)

Timestamp returns the timestamp of the validator registration.

type VoluntaryExitEventHandlerFunc added in v0.24.2

type VoluntaryExitEventHandlerFunc func(context.Context, *phase0.SignedVoluntaryExit)

VoluntaryExitEventHandlerFunc is the handler for voluntary_exit events.

type VoluntaryExitPoolOpts added in v0.19.5

type VoluntaryExitPoolOpts struct {
	Common CommonOpts
}

VoluntaryExitPoolOpts are the options for obtaining the voluntary exit pool.

Source Files

Directories

Path Synopsis
Package metadata contains keys for well-known metadata fields provided in an API response.
Package metadata contains keys for well-known metadata fields provided in an API response.
v1

Jump to

Keyboard shortcuts

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