Versions in this module Expand all Collapse all v0 v0.8.3 Nov 21, 2024 Changes in this version type JSONRPCHandlerOpts + GetResponseContent []byte v0.8.2 Nov 20, 2024 Changes in this version + var CodeCustomError = -32000 + var CodeInternalError = -32603 + var CodeInvalidParams = -32602 + var CodeInvalidRequest = -32600 + var CodeMethodNotFound = -32601 + var CodeParseError = -32700 + var DefaultMaxRequestBodySizeBytes = 30 * 1024 * 1024 + var ErrMustHaveContext = errors.New("function must have context.Context as a first argument") + var ErrMustReturnError = errors.New("function must return error as a last return value") + var ErrNotFunction = errors.New("not a function") + var ErrTooManyReturnValues = errors.New("too many return values") + var ErrTooMuchArguments = errors.New("too much arguments") + func GetHighPriority(ctx context.Context) bool + func GetOrigin(ctx context.Context) string + func GetSigner(ctx context.Context) common.Address + type JSONRPCHandler struct + func NewJSONRPCHandler(methods Methods, opts JSONRPCHandlerOpts) (*JSONRPCHandler, error) + func (h *JSONRPCHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type JSONRPCHandlerOpts struct + ExtractOriginFromHeader bool + ExtractPriorityFromHeader bool + ExtractUnverifiedRequestSignatureFromHeader bool + Log *slog.Logger + MaxRequestBodySizeBytes int64 + ServerName string + VerifyRequestSignatureFromHeader bool + type Methods map[string]any