rewards

package
v0.0.0-...-bb812c9 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: Apache-2.0, GPL-3.0, MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttestationRewards

type AttestationRewards struct {
	IdealRewards []IdealAttestationReward `json:"ideal_rewards"`
	TotalRewards []TotalAttestationReward `json:"total_rewards"`
}

type AttestationRewardsResponse

type AttestationRewardsResponse struct {
	Data                AttestationRewards `json:"data"`
	ExecutionOptimistic bool               `json:"execution_optimistic"`
	Finalized           bool               `json:"finalized"`
}

type BlockRewards

type BlockRewards struct {
	ProposerIndex     string `json:"proposer_index"`
	Total             string `json:"total"`
	Attestations      string `json:"attestations"`
	SyncAggregate     string `json:"sync_aggregate"`
	ProposerSlashings string `json:"proposer_slashings"`
	AttesterSlashings string `json:"attester_slashings"`
}

type BlockRewardsResponse

type BlockRewardsResponse struct {
	Data                BlockRewards `json:"data"`
	ExecutionOptimistic bool         `json:"execution_optimistic"`
	Finalized           bool         `json:"finalized"`
}

type IdealAttestationReward

type IdealAttestationReward struct {
	EffectiveBalance string `json:"effective_balance"`
	Head             string `json:"head"`
	Target           string `json:"target"`
	Source           string `json:"source"`
}

type Server

type Server struct {
	Blocker               lookup.Blocker
	OptimisticModeFetcher blockchain.OptimisticModeFetcher
	FinalizationFetcher   blockchain.FinalizationFetcher
	ReplayerBuilder       stategen.ReplayerBuilder
	// TODO: Init
	TimeFetcher blockchain.TimeFetcher
	Stater      lookup.Stater
	HeadFetcher blockchain.HeadFetcher
}

func (*Server) AttestationRewards

func (s *Server) AttestationRewards(w http.ResponseWriter, r *http.Request)

AttestationRewards retrieves attestation reward info for validators specified by array of public keys or validator index. If no array is provided, return reward info for every validator. TODO: Inclusion delay

func (*Server) BlockRewards

func (s *Server) BlockRewards(w http.ResponseWriter, r *http.Request)

BlockRewards is an HTTP handler for Beacon API getBlockRewards.

type TotalAttestationReward

type TotalAttestationReward struct {
	ValidatorIndex string `json:"validator_index"`
	Head           string `json:"head"`
	Target         string `json:"target"`
	Source         string `json:"source"`
	InclusionDelay string `json:"inclusion_delay"`
}

Jump to

Keyboard shortcuts

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