Versions in this module Expand all Collapse all v0 v0.8.3 Nov 21, 2024 v0.8.2 Nov 20, 2024 Changes in this version + const FlashbotsBrokenErrorResponseCode + type HTTPError struct + Code int + func (e *HTTPError) Error() string + type RPCClient interface + Call func(ctx context.Context, method string, params ...any) (*RPCResponse, error) + CallBatch func(ctx context.Context, requests RPCRequests) (RPCResponses, error) + CallBatchRaw func(ctx context.Context, requests RPCRequests) (RPCResponses, error) + CallFor func(ctx context.Context, out any, method string, params ...any) error + CallRaw func(ctx context.Context, request *RPCRequest) (*RPCResponse, error) + func NewClient(endpoint string) RPCClient + func NewClientWithOpts(endpoint string, opts *RPCClientOpts) RPCClient + type RPCClientOpts struct + AllowUnknownFields bool + CustomHeaders map[string]string + DefaultRequestID int + HTTPClient *http.Client + RejectBrokenFlashbotsErrors bool + Signer *signature.Signer + type RPCError struct + Code int + Data any + Message string + func (e *RPCError) Error() string + type RPCRequest struct + ID int + JSONRPC string + Method string + Params any + func NewRequest(method string, params ...any) *RPCRequest + func NewRequestWithID(id int, method string, params ...any) *RPCRequest + func NewRequestWithObjectParam(id int, method string, params any) *RPCRequest + type RPCRequests []*RPCRequest + type RPCResponse struct + Error *RPCError + ID int + JSONRPC string + Result any + func (RPCResponse *RPCResponse) GetBool() (bool, error) + func (RPCResponse *RPCResponse) GetFloat() (float64, error) + func (RPCResponse *RPCResponse) GetInt() (int64, error) + func (RPCResponse *RPCResponse) GetObject(toType any) error + func (RPCResponse *RPCResponse) GetString() (string, error) + type RPCResponses []*RPCResponse + func (res RPCResponses) AsMap() map[int]*RPCResponse + func (res RPCResponses) GetByID(id int) *RPCResponse + func (res RPCResponses) HasError() bool