relay

package
v1.0.24 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRateLimited = errors.New("rate limited")
View Source
var ErrValidatorNotRegistered = errors.New("validator not registered")
View Source
var (
	GetBidsEndpoint = "get_bids"
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(namespace string, config Config, networkName string) (*Client, error)

NewClient creates a new relay client

func (*Client) GetBids

func (c *Client) GetBids(ctx context.Context, params url.Values) ([]*mevrelay.BidTrace, error)

func (*Client) GetProposerPayloadDelivered added in v0.0.197

func (c *Client) GetProposerPayloadDelivered(ctx context.Context, params url.Values) ([]*mevrelay.ProposerPayloadDelivered, error)

func (*Client) GetValidatorRegistrations added in v1.0.24

func (c *Client) GetValidatorRegistrations(ctx context.Context, pubkey string) (*mevrelay.ValidatorRegistration, error)

func (*Client) Name

func (c *Client) Name() string

func (*Client) URL

func (c *Client) URL() string

type Config

type Config struct {
	URL  string `yaml:"url"`
	Name string `yaml:"name"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Metrics

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

func GetMetrics

func GetMetrics(namespace string) *Metrics

func (*Metrics) IncAPIFailures

func (m *Metrics) IncAPIFailures(relay, endpoint, network string)

func (*Metrics) IncAPIRequests

func (m *Metrics) IncAPIRequests(relay, endpoint, network string)

func (*Metrics) IncBidsReceived

func (m *Metrics) IncBidsReceived(relay, network string, count int)

func (*Metrics) IncProposerPayloadDelivered added in v0.0.197

func (m *Metrics) IncProposerPayloadDelivered(relay, network string, count int)

func (*Metrics) IncValidatorRegistrationsReceived added in v1.0.24

func (m *Metrics) IncValidatorRegistrationsReceived(relay, network string, count int)

Jump to

Keyboard shortcuts

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