Documentation ¶
Index ¶
- Variables
- func New(ctx context.Context, params ...Parameter) (builderclient.Service, error)
- type ContentType
- type Parameter
- func WithAddress(address string) Parameter
- func WithEnforceJSON(enforceJSON bool) Parameter
- func WithExtraHeaders(headers map[string]string) Parameter
- func WithLogLevel(logLevel zerolog.Level) Parameter
- func WithMonitor(monitor metrics.Service) Parameter
- func WithTimeout(timeout time.Duration) Parameter
- type Service
- func (s *Service) Address() string
- func (s *Service) BuilderBid(ctx context.Context, opts *api.BuilderBidOpts) (*api.Response[*spec.VersionedSignedBuilderBid], error)
- func (s *Service) Name() string
- func (s *Service) Pubkey() *phase0.BLSPubKey
- func (s *Service) SubmitValidatorRegistrations(ctx context.Context, opts *api.SubmitValidatorRegistrationsOpts) error
- func (s *Service) UnblindProposal(ctx context.Context, opts *api.UnblindProposalOpts) (*api.Response[*consensusapi.VersionedSignedProposal], error)
Constants ¶
This section is empty.
Variables ¶
var ErrIncorrectType = errors.New("incorrect response type")
ErrIncorrectType is returned when the multi client obtain a response type it is not expecting.
Functions ¶
Types ¶
type ContentType ¶
type ContentType int
ContentType defines the builder spec version.
const ( // ContentTypeUnknown implies an unknown content type. ContentTypeUnknown ContentType = iota // ContentTypeSSZ implies an SSZ content type. ContentTypeSSZ // ContentTypeJSON implies a JSON content type. ContentTypeJSON // ContentTypeText implies a text content type (usually for errors). ContentTypeText )
func ParseFromMediaType ¶
func ParseFromMediaType(input string) (ContentType, error)
ParseFromMediaType parses a content type string as per http://www.iana.org/assignments/media-types/media-types.xhtml
func (*ContentType) MarshalJSON ¶
func (c *ContentType) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
func (ContentType) MediaType ¶
func (c ContentType) MediaType() string
MediaType returns the IANA name of the media type.
func (ContentType) String ¶
func (c ContentType) String() string
String returns a string representation of the type.
func (*ContentType) UnmarshalJSON ¶
func (c *ContentType) UnmarshalJSON(input []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Parameter ¶
type Parameter interface {
// contains filtered or unexported methods
}
Parameter is the interface for service parameters.
func WithAddress ¶
WithAddress provides the address for the endpoint.
func WithEnforceJSON ¶ added in v0.5.0
WithEnforceJSON forces all requests and responses to be in JSON, not sending or requesting SSZ.
func WithExtraHeaders ¶ added in v0.3.1
WithExtraHeaders sets additional headers to be sent with each HTTP request.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithMonitor ¶
WithMonitor sets the monitor for the module.
func WithTimeout ¶
WithTimeout sets the maximum duration for all requests to the endpoint.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a builder client service.
func (*Service) BuilderBid ¶
func (s *Service) BuilderBid(ctx context.Context, opts *api.BuilderBidOpts, ) ( *api.Response[*spec.VersionedSignedBuilderBid], error, )
BuilderBid obtains a builder bid.
func (*Service) SubmitValidatorRegistrations ¶
func (s *Service) SubmitValidatorRegistrations(ctx context.Context, opts *api.SubmitValidatorRegistrationsOpts, ) error
SubmitValidatorRegistrations submits a validator registration.
func (*Service) UnblindProposal ¶ added in v0.4.0
func (s *Service) UnblindProposal(ctx context.Context, opts *api.UnblindProposalOpts, ) ( *api.Response[*consensusapi.VersionedSignedProposal], error, )
UnblindProposal unblinds a proposal.