Versions in this module Expand all Collapse all v0 v0.0.4 Jan 15, 2025 v0.0.1 Jan 15, 2025 Changes in this version + var ErrInvalidNodeVersion = errors.New("invalid node version response") + var ErrMalformedHostname = errors.New("hostname must include port, separated by one colon, like example.com:3500") + var ErrNotFound = errors.Wrap(ErrNotOK, "recv 404 NotFound response from API") + var ErrNotOK = errors.New("did not receive 2xx response from API") + func Non200Err(response *http.Response) error + type Client struct + func NewClient(host string, opts ...ClientOpt) (*Client, error) + func (c *Client) BaseURL() *url.URL + func (c *Client) Do(req *http.Request) (*http.Response, error) + func (c *Client) Get(ctx context.Context, path string, opts ...ReqOption) ([]byte, error) + func (c *Client) NodeURL() string + func (c *Client) Token() string + type ClientOpt func(*Client) + func WithAuthenticationToken(token string) ClientOpt + func WithRoundTripper(t http.RoundTripper) ClientOpt + func WithTimeout(timeout time.Duration) ClientOpt + type ReqOption func(*http.Request) + func WithAuthorizationToken(token string) ReqOption + func WithSSZEncoding() ReqOption