package
5.2.0
Repository: https://github.com/prysmaticlabs/prysm.git
Documentation: pkg.go.dev

# Packages

Package beacon provides a client for interacting with the standard Eth Beacon Node API.

# Functions

NewClient constructs a new client with the provided options (ex WithTimeout).
Non200Err is a function that parses an HTTP response to handle responses that are not 200 with a formatted error.
WithAuthenticationToken sets an oauth token to be used.
WithAuthorizationToken is a request functional option that adds header for authorization token.
WithMaxBodySize overrides the default max body size of 8MB.
WithRoundTripper replaces the underlying HTTP's transport with a custom one.
WithSSZEncoding is a request functional option that adds SSZ encoding header.
WithTimeout sets the .Timeout attribute of the wrapped http.Client.

# Constants

8MB default, WithMaxBodySize can override.
512MB.
128KB.

# Variables

ErrConnectionIssue represents a connection problem.
ErrInvalidNodeVersion indicates that the /eth/v1/node/version API response format was not recognized.
ErrMalformedHostname is used to indicate if a host name's format is incorrect.
ErrNotFound specifically means that a '404 - NOT FOUND' response was received from the API.
ErrNotOK is used to indicate when an HTTP request to the API failed with any non-2xx response code.

# Structs

Client is a wrapper object around the HTTP client.

# Type aliases

ClientOpt is a functional option for the Client type (http.Client wrapper).
ReqOption is a request functional option.