Documentation
¶
Index ¶
- func NetworkName(ctx context.Context, service any) string
- func NewErroring(_ context.Context, errorRate float64, next consensusclient.Service) (consensusclient.Service, error)
- func NewSleepy(_ context.Context, minSleep time.Duration, maxSleep time.Duration, ...) (consensusclient.Service, error)
- type Erroring
- func (s *Erroring) Address() string
- func (s *Erroring) AggregateAttestation(ctx context.Context, opts *api.AggregateAttestationOpts) (*api.Response[*spec.VersionedAttestation], error)
- func (s *Erroring) AttestationData(ctx context.Context, opts *api.AttestationDataOpts) (*api.Response[*phase0.AttestationData], error)
- func (s *Erroring) AttestationPool(ctx context.Context, opts *api.AttestationPoolOpts) (*api.Response[[]*spec.VersionedAttestation], error)
- func (s *Erroring) AttestationRewards(ctx context.Context, opts *api.AttestationRewardsOpts) (*api.Response[*apiv1.AttestationRewards], error)
- func (s *Erroring) AttesterDuties(ctx context.Context, opts *api.AttesterDutiesOpts) (*api.Response[[]*apiv1.AttesterDuty], error)
- func (s *Erroring) BeaconBlockHeader(ctx context.Context, opts *api.BeaconBlockHeaderOpts) (*api.Response[*apiv1.BeaconBlockHeader], error)
- func (s *Erroring) BeaconBlockRoot(ctx context.Context, opts *api.BeaconBlockRootOpts) (*api.Response[*phase0.Root], error)
- func (s *Erroring) BeaconCommitteeSelections(ctx context.Context, opts *api.BeaconCommitteeSelectionsOpts) (*api.Response[[]*apiv1.BeaconCommitteeSelection], error)
- func (s *Erroring) BeaconCommittees(ctx context.Context, opts *api.BeaconCommitteesOpts) (*api.Response[[]*apiv1.BeaconCommittee], error)
- func (s *Erroring) BeaconState(ctx context.Context, opts *api.BeaconStateOpts) (*api.Response[*spec.VersionedBeaconState], error)
- func (s *Erroring) BeaconStateRoot(ctx context.Context, opts *api.BeaconStateRootOpts) (*api.Response[*phase0.Root], error)
- func (s *Erroring) BlobSidecars(ctx context.Context, opts *api.BlobSidecarsOpts) (*api.Response[[]*deneb.BlobSidecar], error)
- func (s *Erroring) Blobs(ctx context.Context, opts *api.BlobsOpts) (*api.Response[apiv1.Blobs], error)
- func (s *Erroring) BlockRewards(ctx context.Context, opts *api.BlockRewardsOpts) (*api.Response[*apiv1.BlockRewards], error)
- func (s *Erroring) DepositContract(ctx context.Context, opts *api.DepositContractOpts) (*api.Response[*apiv1.DepositContract], error)
- func (s *Erroring) Domain(ctx context.Context, domainType phase0.DomainType, epoch phase0.Epoch) (phase0.Domain, error)
- func (s *Erroring) EpochFromStateID(ctx context.Context, stateID string) (phase0.Epoch, error)deprecated
- func (s *Erroring) Events(ctx context.Context, opts *api.EventsOpts) error
- func (s *Erroring) FarFutureEpoch(ctx context.Context) (phase0.Epoch, error)
- func (s *Erroring) Finality(ctx context.Context, opts *api.FinalityOpts) (*api.Response[*apiv1.Finality], error)
- func (s *Erroring) Fork(ctx context.Context, opts *api.ForkOpts) (*api.Response[*phase0.Fork], error)
- func (s *Erroring) ForkChoice(ctx context.Context, opts *api.ForkChoiceOpts) (*api.Response[*apiv1.ForkChoice], error)
- func (s *Erroring) ForkSchedule(ctx context.Context, opts *api.ForkScheduleOpts) (*api.Response[[]*phase0.Fork], error)
- func (s *Erroring) Genesis(ctx context.Context, opts *api.GenesisOpts) (*api.Response[*apiv1.Genesis], error)
- func (s *Erroring) GenesisDomain(ctx context.Context, domainType phase0.DomainType) (phase0.Domain, error)
- func (s *Erroring) GenesisTime(ctx context.Context) (time.Time, error)deprecated
- func (*Erroring) IsActive() bool
- func (*Erroring) IsSynced() bool
- func (s *Erroring) Name() string
- func (s *Erroring) NodePeers(ctx context.Context, opts *api.NodePeersOpts) (*api.Response[[]*apiv1.Peer], error)
- func (s *Erroring) NodeSyncing(ctx context.Context, opts *api.NodeSyncingOpts) (*api.Response[*apiv1.SyncState], error)
- func (s *Erroring) NodeVersion(ctx context.Context, opts *api.NodeVersionOpts) (*api.Response[string], error)
- func (s *Erroring) PendingDeposits(ctx context.Context, opts *api.PendingDepositsOpts) (*api.Response[[]*electra.PendingDeposit], error)
- func (s *Erroring) Proposal(ctx context.Context, opts *api.ProposalOpts) (*api.Response[*api.VersionedProposal], error)
- func (s *Erroring) ProposerDuties(ctx context.Context, opts *api.ProposerDutiesOpts) (*api.Response[[]*apiv1.ProposerDuty], error)
- func (s *Erroring) SignedBeaconBlock(ctx context.Context, opts *api.SignedBeaconBlockOpts) (*api.Response[*spec.VersionedSignedBeaconBlock], error)
- func (s *Erroring) SlotDuration(ctx context.Context) (time.Duration, error)deprecated
- func (s *Erroring) SlotFromStateID(ctx context.Context, stateID string) (phase0.Slot, error)deprecated
- func (s *Erroring) SlotsPerEpoch(ctx context.Context) (uint64, error)deprecated
- func (s *Erroring) Spec(ctx context.Context, opts *api.SpecOpts) (*api.Response[map[string]any], error)
- func (s *Erroring) SubmitAggregateAttestations(ctx context.Context, opts *api.SubmitAggregateAttestationsOpts) error
- func (s *Erroring) SubmitAttestations(ctx context.Context, attestations *api.SubmitAttestationsOpts) error
- func (s *Erroring) SubmitBeaconBlock(ctx context.Context, block *spec.VersionedSignedBeaconBlock) errordeprecated
- func (s *Erroring) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.BeaconCommitteeSubscription) error
- func (s *Erroring) SubmitBlindedBeaconBlock(ctx context.Context, block *api.VersionedSignedBlindedBeaconBlock) errordeprecated
- func (s *Erroring) SubmitProposalPreparations(ctx context.Context, preparations []*apiv1.ProposalPreparation) error
- func (s *Erroring) SubmitSyncCommitteeContributions(ctx context.Context, ...) error
- func (s *Erroring) SubmitSyncCommitteeMessages(ctx context.Context, messages []*altair.SyncCommitteeMessage) error
- func (s *Erroring) SubmitSyncCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.SyncCommitteeSubscription) error
- func (s *Erroring) SubmitValidatorRegistrations(ctx context.Context, registrations []*api.VersionedSignedValidatorRegistration) error
- func (s *Erroring) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *phase0.SignedVoluntaryExit) error
- func (s *Erroring) SyncCommittee(ctx context.Context, opts *api.SyncCommitteeOpts) (*api.Response[*apiv1.SyncCommittee], error)
- func (s *Erroring) SyncCommitteeContribution(ctx context.Context, opts *api.SyncCommitteeContributionOpts) (*api.Response[*altair.SyncCommitteeContribution], error)
- func (s *Erroring) SyncCommitteeDuties(ctx context.Context, opts *api.SyncCommitteeDutiesOpts) (*api.Response[[]*apiv1.SyncCommitteeDuty], error)
- func (s *Erroring) SyncCommitteeRewards(ctx context.Context, opts *api.SyncCommitteeRewardsOpts) (*api.Response[[]*apiv1.SyncCommitteeReward], error)
- func (s *Erroring) TargetAggregatorsPerCommittee(ctx context.Context) (uint64, error)deprecated
- func (s *Erroring) ValidatorBalances(ctx context.Context, opts *api.ValidatorBalancesOpts) (*api.Response[map[phase0.ValidatorIndex]phase0.Gwei], error)
- func (s *Erroring) ValidatorLiveness(ctx context.Context, opts *api.ValidatorLivenessOpts) (*api.Response[[]*apiv1.ValidatorLiveness], error)
- func (s *Erroring) Validators(ctx context.Context, opts *api.ValidatorsOpts) (*api.Response[map[phase0.ValidatorIndex]*apiv1.Validator], error)
- func (s *Erroring) VoluntaryExitPool(ctx context.Context, opts *api.VoluntaryExitPoolOpts) (*api.Response[[]*phase0.SignedVoluntaryExit], error)
- type Sleepy
- func (s *Sleepy) Address() string
- func (s *Sleepy) AggregateAttestation(ctx context.Context, opts *api.AggregateAttestationOpts) (*api.Response[*spec.VersionedAttestation], error)
- func (s *Sleepy) AttestationData(ctx context.Context, opts *api.AttestationDataOpts) (*api.Response[*phase0.AttestationData], error)
- func (s *Sleepy) AttestationPool(ctx context.Context, opts *api.AttestationPoolOpts) (*api.Response[[]*spec.VersionedAttestation], error)
- func (s *Sleepy) AttestationRewards(ctx context.Context, opts *api.AttestationRewardsOpts) (*api.Response[*apiv1.AttestationRewards], error)
- func (s *Sleepy) AttesterDuties(ctx context.Context, opts *api.AttesterDutiesOpts) (*api.Response[[]*apiv1.AttesterDuty], error)
- func (s *Sleepy) BeaconBlockHeader(ctx context.Context, opts *api.BeaconBlockHeaderOpts) (*api.Response[*apiv1.BeaconBlockHeader], error)
- func (s *Sleepy) BeaconCommitteeSelections(ctx context.Context, opts *api.BeaconCommitteeSelectionsOpts) (*api.Response[[]*apiv1.BeaconCommitteeSelection], error)
- func (s *Sleepy) BeaconState(ctx context.Context, opts *api.BeaconStateOpts) (*api.Response[*spec.VersionedBeaconState], error)
- func (s *Sleepy) BlobSidecars(ctx context.Context, opts *api.BlobSidecarsOpts) (*api.Response[[]*deneb.BlobSidecar], error)
- func (s *Sleepy) Blobs(ctx context.Context, opts *api.BlobsOpts) (*api.Response[apiv1.Blobs], error)
- func (s *Sleepy) BlockRewards(ctx context.Context, opts *api.BlockRewardsOpts) (*api.Response[*apiv1.BlockRewards], error)
- func (s *Sleepy) Domain(ctx context.Context, domainType phase0.DomainType, epoch phase0.Epoch) (phase0.Domain, error)
- func (s *Sleepy) EpochFromStateID(ctx context.Context, stateID string) (phase0.Epoch, error)deprecated
- func (s *Sleepy) Events(ctx context.Context, opts *api.EventsOpts) error
- func (s *Sleepy) FarFutureEpoch(ctx context.Context) (phase0.Epoch, error)
- func (s *Sleepy) Finality(ctx context.Context, opts *api.FinalityOpts) (*api.Response[*apiv1.Finality], error)
- func (s *Sleepy) Fork(ctx context.Context, opts *api.ForkOpts) (*api.Response[*phase0.Fork], error)
- func (s *Sleepy) ForkChoice(ctx context.Context, opts *api.ForkChoiceOpts) (*api.Response[*apiv1.ForkChoice], error)
- func (s *Sleepy) ForkSchedule(ctx context.Context, opts *api.ForkScheduleOpts) (*api.Response[[]*phase0.Fork], error)
- func (s *Sleepy) Genesis(ctx context.Context, opts *api.GenesisOpts) (*api.Response[*apiv1.Genesis], error)
- func (s *Sleepy) GenesisDomain(ctx context.Context, domainType phase0.DomainType) (phase0.Domain, error)
- func (s *Sleepy) GenesisTime(ctx context.Context) (time.Time, error)deprecated
- func (*Sleepy) IsActive() bool
- func (*Sleepy) IsSynced() bool
- func (s *Sleepy) Name() string
- func (s *Sleepy) NodePeers(ctx context.Context, opts *api.NodePeersOpts) (*api.Response[[]*apiv1.Peer], error)
- func (s *Sleepy) NodeSyncing(ctx context.Context, opts *api.NodeSyncingOpts) (*api.Response[*apiv1.SyncState], error)
- func (s *Sleepy) NodeVersion(ctx context.Context, opts *api.NodeVersionOpts) (*api.Response[string], error)
- func (s *Sleepy) PendingConsolidations(ctx context.Context, opts *api.PendingConsolidationsOpts) (*api.Response[[]*electra.PendingConsolidation], error)
- func (s *Sleepy) PendingDeposits(ctx context.Context, opts *api.PendingDepositsOpts) (*api.Response[[]*electra.PendingDeposit], error)
- func (s *Sleepy) PendingPartialWithdrawals(ctx context.Context, opts *api.PendingPartialWithdrawalsOpts) (*api.Response[[]*electra.PendingPartialWithdrawal], error)
- func (s *Sleepy) Proposal(ctx context.Context, opts *api.ProposalOpts) (*api.Response[*api.VersionedProposal], error)
- func (s *Sleepy) ProposerDuties(ctx context.Context, opts *api.ProposerDutiesOpts) (*api.Response[[]*apiv1.ProposerDuty], error)
- func (s *Sleepy) SlotDuration(ctx context.Context) (time.Duration, error)deprecated
- func (s *Sleepy) SlotFromStateID(ctx context.Context, stateID string) (phase0.Slot, error)deprecated
- func (s *Sleepy) SlotsPerEpoch(ctx context.Context) (uint64, error)deprecated
- func (s *Sleepy) Spec(ctx context.Context, opts *api.SpecOpts) (*api.Response[map[string]any], error)
- func (s *Sleepy) SubmitAggregateAttestations(ctx context.Context, opts *api.SubmitAggregateAttestationsOpts) error
- func (s *Sleepy) SubmitAttestations(ctx context.Context, attestations *api.SubmitAttestationsOpts) error
- func (s *Sleepy) SubmitBeaconBlock(ctx context.Context, block *spec.VersionedSignedBeaconBlock) errordeprecated
- func (s *Sleepy) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.BeaconCommitteeSubscription) error
- func (s *Sleepy) SubmitBlindedBeaconBlock(ctx context.Context, block *api.VersionedSignedBlindedBeaconBlock) errordeprecated
- func (s *Sleepy) SubmitProposalPreparations(ctx context.Context, preparations []*apiv1.ProposalPreparation) error
- func (s *Sleepy) SubmitValidatorRegistrations(ctx context.Context, registrations []*api.VersionedSignedValidatorRegistration) error
- func (s *Sleepy) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *phase0.SignedVoluntaryExit) error
- func (s *Sleepy) SyncCommitteeRewards(ctx context.Context, opts *api.SyncCommitteeRewardsOpts) (*api.Response[[]*apiv1.SyncCommitteeReward], error)
- func (s *Sleepy) TargetAggregatorsPerCommittee(ctx context.Context) (uint64, error)deprecated
- func (s *Sleepy) ValidatorBalances(ctx context.Context, opts *api.ValidatorBalancesOpts) (*api.Response[map[phase0.ValidatorIndex]phase0.Gwei], error)
- func (s *Sleepy) ValidatorLiveness(ctx context.Context, opts *api.ValidatorLivenessOpts) (*api.Response[[]*apiv1.ValidatorLiveness], error)
- func (s *Sleepy) Validators(ctx context.Context, opts *api.ValidatorsOpts) (*api.Response[map[phase0.ValidatorIndex]*apiv1.Validator], error)
- func (s *Sleepy) VoluntaryExitPool(ctx context.Context, opts *api.VoluntaryExitPoolOpts) (*api.Response[[]*phase0.SignedVoluntaryExit], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NetworkName ¶
NetworkName returns the network name (Mainnet, Sepolia, Holesky, or Hoodi) for the given service. It identifies the network by querying the genesis validators root and comparing it against known values. Returns "Unknown" if the network cannot be identified or if genesis information is unavailable.
func NewErroring ¶
func NewErroring(_ context.Context, errorRate float64, next consensusclient.Service, ) (consensusclient.Service, error)
NewErroring creates a new Ethereum 2 client that errors at a given rate.
func NewSleepy ¶
func NewSleepy(_ context.Context, minSleep time.Duration, maxSleep time.Duration, next consensusclient.Service, ) (consensusclient.Service, error)
NewSleepy creates a new Ethereum 2 client that sleeps for random amount of time within a set of bounds between minSleep and maxSleep before continuing.
Types ¶
type Erroring ¶
type Erroring struct {
// contains filtered or unexported fields
}
Erroring is an Ethereum 2 client that errors at a given rate.
func (*Erroring) AggregateAttestation ¶
func (s *Erroring) AggregateAttestation(ctx context.Context, opts *api.AggregateAttestationOpts, ) ( *api.Response[*spec.VersionedAttestation], error, )
AggregateAttestation fetches the aggregate attestation for the given options.
func (*Erroring) AttestationData ¶
func (s *Erroring) AttestationData(ctx context.Context, opts *api.AttestationDataOpts, ) ( *api.Response[*phase0.AttestationData], error, )
AttestationData fetches the attestation data for the given slot and committee index.
func (*Erroring) AttestationPool ¶
func (s *Erroring) AttestationPool(ctx context.Context, opts *api.AttestationPoolOpts, ) ( *api.Response[[]*spec.VersionedAttestation], error, )
AttestationPool fetches the attestation pool for the given slot.
func (*Erroring) AttestationRewards ¶
func (s *Erroring) AttestationRewards(ctx context.Context, opts *api.AttestationRewardsOpts, ) ( *api.Response[*apiv1.AttestationRewards], error, )
AttestationRewards provides rewards to the given validators for attesting.
func (*Erroring) AttesterDuties ¶
func (s *Erroring) AttesterDuties(ctx context.Context, opts *api.AttesterDutiesOpts, ) ( *api.Response[[]*apiv1.AttesterDuty], error, )
AttesterDuties obtains attester duties. If validatorIndices is nil it will return all duties for the given epoch.
func (*Erroring) BeaconBlockHeader ¶
func (s *Erroring) BeaconBlockHeader(ctx context.Context, opts *api.BeaconBlockHeaderOpts, ) ( *api.Response[*apiv1.BeaconBlockHeader], error, )
BeaconBlockHeader provides the block header of a given block ID.
func (*Erroring) BeaconBlockRoot ¶
func (s *Erroring) BeaconBlockRoot(ctx context.Context, opts *api.BeaconBlockRootOpts, ) ( *api.Response[*phase0.Root], error, )
BeaconBlockRoot fetches a block's root given a block ID.
func (*Erroring) BeaconCommitteeSelections ¶ added in v0.1.0
func (s *Erroring) BeaconCommitteeSelections(ctx context.Context, opts *api.BeaconCommitteeSelectionsOpts, ) ( *api.Response[[]*apiv1.BeaconCommitteeSelection], error, )
BeaconCommitteeSelections submits beacon committee selections.
func (*Erroring) BeaconCommittees ¶
func (s *Erroring) BeaconCommittees(ctx context.Context, opts *api.BeaconCommitteesOpts, ) ( *api.Response[[]*apiv1.BeaconCommittee], error, )
BeaconCommittees fetches all beacon committees for the epoch at the given state.
func (*Erroring) BeaconState ¶
func (s *Erroring) BeaconState(ctx context.Context, opts *api.BeaconStateOpts, ) ( *api.Response[*spec.VersionedBeaconState], error, )
BeaconState fetches a beacon state.
func (*Erroring) BeaconStateRoot ¶
func (s *Erroring) BeaconStateRoot(ctx context.Context, opts *api.BeaconStateRootOpts, ) ( *api.Response[*phase0.Root], error, )
BeaconStateRoot fetches a beacon state root given a state ID.
func (*Erroring) BlobSidecars ¶
func (s *Erroring) BlobSidecars(ctx context.Context, opts *api.BlobSidecarsOpts, ) ( *api.Response[[]*deneb.BlobSidecar], error, )
BlobSidecars fetches the blobs given a block ID.
func (*Erroring) Blobs ¶
func (s *Erroring) Blobs(ctx context.Context, opts *api.BlobsOpts, ) ( *api.Response[apiv1.Blobs], error, )
Blobs fetches the blobs given a block ID.
func (*Erroring) BlockRewards ¶
func (s *Erroring) BlockRewards(ctx context.Context, opts *api.BlockRewardsOpts, ) ( *api.Response[*apiv1.BlockRewards], error, )
BlockRewards provides rewards for proposing a block.
func (*Erroring) DepositContract ¶
func (s *Erroring) DepositContract(ctx context.Context, opts *api.DepositContractOpts, ) ( *api.Response[*apiv1.DepositContract], error, )
DepositContract provides details of the Ethereum 1 deposit contract for the chain.
func (*Erroring) Domain ¶
func (s *Erroring) Domain(ctx context.Context, domainType phase0.DomainType, epoch phase0.Epoch) (phase0.Domain, error)
Domain provides a domain for a given domain type at a given epoch.
func (*Erroring) Events ¶
Events feeds requested events with the given topics to the supplied handler.
func (*Erroring) FarFutureEpoch ¶
FarFutureEpoch provides the far future epoch of the chain.
func (*Erroring) Finality ¶
func (s *Erroring) Finality(ctx context.Context, opts *api.FinalityOpts, ) ( *api.Response[*apiv1.Finality], error, )
Finality provides the finality given a state ID.
func (*Erroring) Fork ¶
func (s *Erroring) Fork(ctx context.Context, opts *api.ForkOpts, ) ( *api.Response[*phase0.Fork], error, )
Fork fetches fork information for the given state.
func (*Erroring) ForkChoice ¶
func (s *Erroring) ForkChoice(ctx context.Context, opts *api.ForkChoiceOpts, ) ( *api.Response[*apiv1.ForkChoice], error, )
ForkChoice fetches the node's current fork choice context.
func (*Erroring) ForkSchedule ¶
func (s *Erroring) ForkSchedule(ctx context.Context, opts *api.ForkScheduleOpts, ) ( *api.Response[[]*phase0.Fork], error, )
ForkSchedule provides details of past and future changes in the chain's fork version.
func (*Erroring) Genesis ¶
func (s *Erroring) Genesis(ctx context.Context, opts *api.GenesisOpts, ) ( *api.Response[*apiv1.Genesis], error, )
Genesis fetches genesis information for the chain.
func (*Erroring) GenesisDomain ¶
func (s *Erroring) GenesisDomain(ctx context.Context, domainType phase0.DomainType) (phase0.Domain, error)
GenesisDomain provides a domain for a given domain type.
func (*Erroring) NodePeers ¶
func (s *Erroring) NodePeers(ctx context.Context, opts *api.NodePeersOpts, ) ( *api.Response[[]*apiv1.Peer], error, )
NodePeers provides the peers of the node.
func (*Erroring) NodeSyncing ¶
func (s *Erroring) NodeSyncing(ctx context.Context, opts *api.NodeSyncingOpts, ) ( *api.Response[*apiv1.SyncState], error, )
NodeSyncing provides the state of the node's synchronization with the chain.
func (*Erroring) NodeVersion ¶
func (s *Erroring) NodeVersion(ctx context.Context, opts *api.NodeVersionOpts, ) ( *api.Response[string], error, )
NodeVersion returns a free-text string with the node version.
func (*Erroring) PendingDeposits ¶
func (s *Erroring) PendingDeposits(ctx context.Context, opts *api.PendingDepositsOpts, ) ( *api.Response[[]*electra.PendingDeposit], error, )
PendingDeposits provides the pending deposits for a given state.
func (*Erroring) Proposal ¶
func (s *Erroring) Proposal(ctx context.Context, opts *api.ProposalOpts, ) ( *api.Response[*api.VersionedProposal], error, )
Proposal fetches a proposal for signing.
func (*Erroring) ProposerDuties ¶
func (s *Erroring) ProposerDuties(ctx context.Context, opts *api.ProposerDutiesOpts, ) ( *api.Response[[]*apiv1.ProposerDuty], error, )
ProposerDuties obtains proposer duties for the given epoch.
func (*Erroring) SignedBeaconBlock ¶
func (s *Erroring) SignedBeaconBlock(ctx context.Context, opts *api.SignedBeaconBlockOpts, ) ( *api.Response[*spec.VersionedSignedBeaconBlock], error, )
SignedBeaconBlock fetches a signed beacon block given a block ID.
func (*Erroring) Spec ¶
func (s *Erroring) Spec(ctx context.Context, opts *api.SpecOpts, ) ( *api.Response[map[string]any], error, )
Spec provides the spec information of the chain.
func (*Erroring) SubmitAggregateAttestations ¶
func (s *Erroring) SubmitAggregateAttestations(ctx context.Context, opts *api.SubmitAggregateAttestationsOpts) error
SubmitAggregateAttestations submits aggregate attestations.
func (*Erroring) SubmitAttestations ¶
func (s *Erroring) SubmitAttestations(ctx context.Context, attestations *api.SubmitAttestationsOpts) error
SubmitAttestations submits attestations.
func (*Erroring) SubmitBeaconBlock
deprecated
func (*Erroring) SubmitBeaconCommitteeSubscriptions ¶
func (s *Erroring) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.BeaconCommitteeSubscription, ) error
SubmitBeaconCommitteeSubscriptions subscribes to beacon committees.
func (*Erroring) SubmitBlindedBeaconBlock
deprecated
func (*Erroring) SubmitProposalPreparations ¶
func (s *Erroring) SubmitProposalPreparations(ctx context.Context, preparations []*apiv1.ProposalPreparation) error
SubmitProposalPreparations submits proposal preparations.
func (*Erroring) SubmitSyncCommitteeContributions ¶
func (s *Erroring) SubmitSyncCommitteeContributions(ctx context.Context, contributionAndProofs []*altair.SignedContributionAndProof, ) error
SubmitSyncCommitteeContributions submits sync committee contributions.
func (*Erroring) SubmitSyncCommitteeMessages ¶
func (s *Erroring) SubmitSyncCommitteeMessages(ctx context.Context, messages []*altair.SyncCommitteeMessage) error
SubmitSyncCommitteeMessages submits sync committee messages.
func (*Erroring) SubmitSyncCommitteeSubscriptions ¶
func (s *Erroring) SubmitSyncCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.SyncCommitteeSubscription) error
SubmitSyncCommitteeSubscriptions subscribes to sync committees.
func (*Erroring) SubmitValidatorRegistrations ¶
func (s *Erroring) SubmitValidatorRegistrations(ctx context.Context, registrations []*api.VersionedSignedValidatorRegistration, ) error
SubmitValidatorRegistrations submits a validator registration.
func (*Erroring) SubmitVoluntaryExit ¶
func (s *Erroring) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *phase0.SignedVoluntaryExit) error
SubmitVoluntaryExit submits a voluntary exit.
func (*Erroring) SyncCommittee ¶
func (s *Erroring) SyncCommittee(ctx context.Context, opts *api.SyncCommitteeOpts, ) ( *api.Response[*apiv1.SyncCommittee], error, )
SyncCommittee fetches the sync committee for the given state.
func (*Erroring) SyncCommitteeContribution ¶
func (s *Erroring) SyncCommitteeContribution(ctx context.Context, opts *api.SyncCommitteeContributionOpts, ) ( *api.Response[*altair.SyncCommitteeContribution], error, )
SyncCommitteeContribution provides a sync committee contribution.
func (*Erroring) SyncCommitteeDuties ¶
func (s *Erroring) SyncCommitteeDuties(ctx context.Context, opts *api.SyncCommitteeDutiesOpts, ) ( *api.Response[[]*apiv1.SyncCommitteeDuty], error, )
SyncCommitteeDuties obtains sync committee duties. If validatorIndices is nil it will return all duties for the given epoch.
func (*Erroring) SyncCommitteeRewards ¶
func (s *Erroring) SyncCommitteeRewards(ctx context.Context, opts *api.SyncCommitteeRewardsOpts, ) ( *api.Response[[]*apiv1.SyncCommitteeReward], error, )
SyncCommitteeRewards provides rewards to the given validators for being members of a sync committee.
func (*Erroring) ValidatorBalances ¶
func (s *Erroring) ValidatorBalances(ctx context.Context, opts *api.ValidatorBalancesOpts, ) ( *api.Response[map[phase0.ValidatorIndex]phase0.Gwei], error, )
ValidatorBalances provides the validator balances for a given state.
func (*Erroring) ValidatorLiveness ¶
func (s *Erroring) ValidatorLiveness(ctx context.Context, opts *api.ValidatorLivenessOpts, ) ( *api.Response[[]*apiv1.ValidatorLiveness], error, )
ValidatorLiveness provides the liveness data to the given validators.
func (*Erroring) Validators ¶
func (s *Erroring) Validators(ctx context.Context, opts *api.ValidatorsOpts, ) ( *api.Response[map[phase0.ValidatorIndex]*apiv1.Validator], error, )
Validators provides the validators, with their balance and status, for a given state.
func (*Erroring) VoluntaryExitPool ¶
func (s *Erroring) VoluntaryExitPool(ctx context.Context, opts *api.VoluntaryExitPoolOpts, ) ( *api.Response[[]*phase0.SignedVoluntaryExit], error, )
VoluntaryExitPool fetches the voluntary exit pool.
type Sleepy ¶
type Sleepy struct {
// contains filtered or unexported fields
}
Sleepy is an Ethereum 2 client that sleeps for a random amount of time within a set of bounds before continuing.
func (*Sleepy) AggregateAttestation ¶
func (s *Sleepy) AggregateAttestation(ctx context.Context, opts *api.AggregateAttestationOpts, ) ( *api.Response[*spec.VersionedAttestation], error, )
AggregateAttestation fetches the aggregate attestation for the given options.
func (*Sleepy) AttestationData ¶
func (s *Sleepy) AttestationData(ctx context.Context, opts *api.AttestationDataOpts, ) ( *api.Response[*phase0.AttestationData], error, )
AttestationData fetches the attestation data for the given slot and committee index.
func (*Sleepy) AttestationPool ¶
func (s *Sleepy) AttestationPool(ctx context.Context, opts *api.AttestationPoolOpts, ) ( *api.Response[[]*spec.VersionedAttestation], error, )
AttestationPool fetches the attestation pool for the given slot.
func (*Sleepy) AttestationRewards ¶
func (s *Sleepy) AttestationRewards(ctx context.Context, opts *api.AttestationRewardsOpts, ) ( *api.Response[*apiv1.AttestationRewards], error, )
AttestationRewards provides rewards to the given validators for attesting.
func (*Sleepy) AttesterDuties ¶
func (s *Sleepy) AttesterDuties(ctx context.Context, opts *api.AttesterDutiesOpts, ) ( *api.Response[[]*apiv1.AttesterDuty], error, )
AttesterDuties obtains attester duties. If validatorIndices is nil it will return all duties for the given epoch.
func (*Sleepy) BeaconBlockHeader ¶
func (s *Sleepy) BeaconBlockHeader(ctx context.Context, opts *api.BeaconBlockHeaderOpts, ) ( *api.Response[*apiv1.BeaconBlockHeader], error, )
BeaconBlockHeader provides the block header of a given block ID.
func (*Sleepy) BeaconCommitteeSelections ¶ added in v0.1.0
func (s *Sleepy) BeaconCommitteeSelections(ctx context.Context, opts *api.BeaconCommitteeSelectionsOpts) ( *api.Response[[]*apiv1.BeaconCommitteeSelection], error, )
BeaconCommitteeSelections submits beacon committee selections.
func (*Sleepy) BeaconState ¶
func (s *Sleepy) BeaconState(ctx context.Context, opts *api.BeaconStateOpts, ) ( *api.Response[*spec.VersionedBeaconState], error, )
BeaconState fetches a beacon state.
func (*Sleepy) BlobSidecars ¶
func (s *Sleepy) BlobSidecars(ctx context.Context, opts *api.BlobSidecarsOpts, ) ( *api.Response[[]*deneb.BlobSidecar], error, )
BlobSidecars fetches the blobs sidecars given options.
func (*Sleepy) Blobs ¶
func (s *Sleepy) Blobs(ctx context.Context, opts *api.BlobsOpts, ) ( *api.Response[apiv1.Blobs], error, )
Blobs fetches the blobs given a block ID.
func (*Sleepy) BlockRewards ¶
func (s *Sleepy) BlockRewards(ctx context.Context, opts *api.BlockRewardsOpts, ) ( *api.Response[*apiv1.BlockRewards], error, )
BlockRewards provides rewards for proposing a block.
func (*Sleepy) Domain ¶
func (s *Sleepy) Domain(ctx context.Context, domainType phase0.DomainType, epoch phase0.Epoch) (phase0.Domain, error)
Domain provides a domain for a given domain type at a given epoch.
func (*Sleepy) Events ¶
Events feeds requested events with the given topics to the supplied handler.
func (*Sleepy) FarFutureEpoch ¶
FarFutureEpoch provides the far future epoch of the chain.
func (*Sleepy) Finality ¶
func (s *Sleepy) Finality(ctx context.Context, opts *api.FinalityOpts, ) ( *api.Response[*apiv1.Finality], error, )
Finality provides the finality given a state ID.
func (*Sleepy) Fork ¶
func (s *Sleepy) Fork(ctx context.Context, opts *api.ForkOpts, ) ( *api.Response[*phase0.Fork], error, )
Fork fetches fork information for the given state.
func (*Sleepy) ForkChoice ¶
func (s *Sleepy) ForkChoice(ctx context.Context, opts *api.ForkChoiceOpts, ) ( *api.Response[*apiv1.ForkChoice], error, )
ForkChoice fetches the node's current fork choice context.
func (*Sleepy) ForkSchedule ¶
func (s *Sleepy) ForkSchedule(ctx context.Context, opts *api.ForkScheduleOpts, ) ( *api.Response[[]*phase0.Fork], error, )
ForkSchedule provides details of past and future changes in the chain's fork version.
func (*Sleepy) Genesis ¶
func (s *Sleepy) Genesis(ctx context.Context, opts *api.GenesisOpts, ) ( *api.Response[*apiv1.Genesis], error, )
Genesis fetches genesis information for the chain.
func (*Sleepy) GenesisDomain ¶
func (s *Sleepy) GenesisDomain(ctx context.Context, domainType phase0.DomainType) (phase0.Domain, error)
GenesisDomain provides a domain for a given domain type at genesis.
func (*Sleepy) NodePeers ¶
func (s *Sleepy) NodePeers(ctx context.Context, opts *api.NodePeersOpts, ) ( *api.Response[[]*apiv1.Peer], error, )
NodePeers provides the peers of the node.
func (*Sleepy) NodeSyncing ¶
func (s *Sleepy) NodeSyncing(ctx context.Context, opts *api.NodeSyncingOpts, ) ( *api.Response[*apiv1.SyncState], error, )
NodeSyncing provides the state of the node's synchronization with the chain.
func (*Sleepy) NodeVersion ¶
func (s *Sleepy) NodeVersion(ctx context.Context, opts *api.NodeVersionOpts, ) ( *api.Response[string], error, )
NodeVersion returns a free-text string with the node version.
func (*Sleepy) PendingConsolidations ¶
func (s *Sleepy) PendingConsolidations(ctx context.Context, opts *api.PendingConsolidationsOpts, ) ( *api.Response[[]*electra.PendingConsolidation], error, )
PendingConsolidations provides the pending consolidations for a given state.
func (*Sleepy) PendingDeposits ¶
func (s *Sleepy) PendingDeposits(ctx context.Context, opts *api.PendingDepositsOpts, ) ( *api.Response[[]*electra.PendingDeposit], error, )
PendingDeposits provides the pending deposits for a given state.
func (*Sleepy) PendingPartialWithdrawals ¶
func (s *Sleepy) PendingPartialWithdrawals(ctx context.Context, opts *api.PendingPartialWithdrawalsOpts, ) ( *api.Response[[]*electra.PendingPartialWithdrawal], error, )
PendingPartialWithdrawals provides the pending partial withdrawals for a given state.
func (*Sleepy) Proposal ¶
func (s *Sleepy) Proposal(ctx context.Context, opts *api.ProposalOpts, ) ( *api.Response[*api.VersionedProposal], error, )
Proposal fetches a proposal for signing.
func (*Sleepy) ProposerDuties ¶
func (s *Sleepy) ProposerDuties(ctx context.Context, opts *api.ProposerDutiesOpts, ) ( *api.Response[[]*apiv1.ProposerDuty], error, )
ProposerDuties obtains proposer duties for the given epoch.
func (*Sleepy) Spec ¶
func (s *Sleepy) Spec(ctx context.Context, opts *api.SpecOpts, ) ( *api.Response[map[string]any], error, )
Spec provides the spec information of the chain.
func (*Sleepy) SubmitAggregateAttestations ¶
func (s *Sleepy) SubmitAggregateAttestations(ctx context.Context, opts *api.SubmitAggregateAttestationsOpts) error
SubmitAggregateAttestations submits aggregate attestations.
func (*Sleepy) SubmitAttestations ¶
func (s *Sleepy) SubmitAttestations(ctx context.Context, attestations *api.SubmitAttestationsOpts) error
SubmitAttestations submits attestations.
func (*Sleepy) SubmitBeaconBlock
deprecated
func (*Sleepy) SubmitBeaconCommitteeSubscriptions ¶
func (s *Sleepy) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*apiv1.BeaconCommitteeSubscription) error
SubmitBeaconCommitteeSubscriptions subscribes to beacon committees.
func (*Sleepy) SubmitBlindedBeaconBlock
deprecated
func (*Sleepy) SubmitProposalPreparations ¶
func (s *Sleepy) SubmitProposalPreparations(ctx context.Context, preparations []*apiv1.ProposalPreparation) error
SubmitProposalPreparations submits proposal preparations.
func (*Sleepy) SubmitValidatorRegistrations ¶
func (s *Sleepy) SubmitValidatorRegistrations(ctx context.Context, registrations []*api.VersionedSignedValidatorRegistration, ) error
SubmitValidatorRegistrations submits a validator registration.
func (*Sleepy) SubmitVoluntaryExit ¶
func (s *Sleepy) SubmitVoluntaryExit(ctx context.Context, voluntaryExit *phase0.SignedVoluntaryExit) error
SubmitVoluntaryExit submits a voluntary exit.
func (*Sleepy) SyncCommitteeRewards ¶
func (s *Sleepy) SyncCommitteeRewards(ctx context.Context, opts *api.SyncCommitteeRewardsOpts, ) ( *api.Response[[]*apiv1.SyncCommitteeReward], error, )
SyncCommitteeRewards provides rewards to the given validators for being members of a sync committee.
func (*Sleepy) ValidatorBalances ¶
func (s *Sleepy) ValidatorBalances(ctx context.Context, opts *api.ValidatorBalancesOpts, ) ( *api.Response[map[phase0.ValidatorIndex]phase0.Gwei], error, )
ValidatorBalances provides the validator balances for a given state.
func (*Sleepy) ValidatorLiveness ¶
func (s *Sleepy) ValidatorLiveness(ctx context.Context, opts *api.ValidatorLivenessOpts, ) ( *api.Response[[]*apiv1.ValidatorLiveness], error, )
ValidatorLiveness provides the liveness data to the given validators.
func (*Sleepy) Validators ¶
func (s *Sleepy) Validators(ctx context.Context, opts *api.ValidatorsOpts, ) ( *api.Response[map[phase0.ValidatorIndex]*apiv1.Validator], error, )
Validators provides the validators, with their balance and status, for a given state.
func (*Sleepy) VoluntaryExitPool ¶
func (s *Sleepy) VoluntaryExitPool(ctx context.Context, opts *api.VoluntaryExitPoolOpts, ) ( *api.Response[[]*phase0.SignedVoluntaryExit], error, )
VoluntaryExitPool fetches the voluntary exit pool.