blockprint

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ClientNameUnknown    = ClientName("Unknown")
	ClientNameUncertain  = ClientName("Uncertain")
	ClientNamePrysm      = ClientName("Prysm")
	ClientNameLighthouse = ClientName("Lighthouse")
	ClientNameLodestar   = ClientName("Lodestar")
	ClientNameNimbus     = ClientName("Nimbus")
	ClientNameTeku       = ClientName("Teku")
	ClientNameGrandine   = ClientName("Grandine")
)

Functions

This section is empty.

Types

type BlocksPerClientResponse

type BlocksPerClientResponse struct {
	//nolint:tagliatelle // Defined by API.
	Uncertain uint64 `json:"Uncertain"`
	//nolint:tagliatelle // Defined by API.
	Lighthouse uint64 `json:"Lighthouse"`
	//nolint:tagliatelle // Defined by API.
	Lodestar uint64 `json:"Lodestar"`
	//nolint:tagliatelle // Defined by API.
	Nimbus uint64 `json:"Nimbus"`
	//nolint:tagliatelle // Defined by API.
	Other uint64 `json:"Other"`
	//nolint:tagliatelle // Defined by API.
	Prysm uint64 `json:"Prysm"`
	//nolint:tagliatelle // Defined by API.
	Teku uint64 `json:"Teku"`
	//nolint:tagliatelle // Defined by API.
	Grandine uint64 `json:"Grandine"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint string, headers map[string]string) *Client

func (*Client) BlocksPerClient

func (c *Client) BlocksPerClient(ctx context.Context, startEpoch, endEpoch string) (*BlocksPerClientResponse, error)

func (*Client) BlocksRange

func (c *Client) BlocksRange(ctx context.Context, startSlot phase0.Slot, endSlot ...phase0.Slot) ([]*ProposersBlocksResponse, error)

func (*Client) SyncStatus

func (c *Client) SyncStatus(ctx context.Context) (*SyncStatusResponse, error)

type ClientName

type ClientName string

type ProbabilityMap

type ProbabilityMap map[ClientName]float64

func (ProbabilityMap) Grandine

func (p ProbabilityMap) Grandine() float64

func (ProbabilityMap) Lighthouse

func (p ProbabilityMap) Lighthouse() float64

func (ProbabilityMap) Lodestar

func (p ProbabilityMap) Lodestar() float64

func (ProbabilityMap) Nimbus

func (p ProbabilityMap) Nimbus() float64

func (ProbabilityMap) Prysm

func (p ProbabilityMap) Prysm() float64

func (ProbabilityMap) Teku

func (p ProbabilityMap) Teku() float64

func (ProbabilityMap) Uncertain

func (p ProbabilityMap) Uncertain() float64

type ProposersBlocksResponse

type ProposersBlocksResponse struct {
	//nolint:tagliatelle // Defined by API.
	ProposerIndex uint64 `json:"proposer_index"`
	Slot          uint64 `json:"slot"`
	//nolint:tagliatelle // Defined by API.
	BestGuessSingle ClientName `json:"best_guess_single"`
	//nolint:tagliatelle // Defined by API.
	BestGuessMulti string `json:"best_guess_multi"`
	//nolint:tagliatelle // Defined by API.
	ProbabilityMap *ProbabilityMap `json:"probability_map"`
}

type SyncStatusResponse

type SyncStatusResponse struct {
	//nolint:tagliatelle // Defined by API.
	GreatestBlockSlot uint64 `json:"greatest_block_slot"`
	Synced            bool   `json:"synced"`
}

Jump to

Keyboard shortcuts

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