server

package
v0.0.0-...-429b8c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParseError     = -32700
	InvalidRequest = -32600
	MethodNotFound = -32601
	InvalidParams  = -32602
	InternalError  = -32603
)

Standard JSON-RPC error codes

Variables

This section is empty.

Functions

This section is empty.

Types

type ForceInclusionServer

type ForceInclusionServer struct {
	// contains filtered or unexported fields
}

ForceInclusionServer provides an Ethereum-compatible JSON-RPC endpoint that accepts transactions and submits them directly to the DA layer for force inclusion

func NewForceInclusionServer

func NewForceInclusionServer(
	addr string,
	daClient block.DAClient,
	cfg config.Config,
	gen genesis.Genesis,
	logger zerolog.Logger,
	executionRPCURL string,
) (*ForceInclusionServer, error)

NewForceInclusionServer creates a new force inclusion server

func (*ForceInclusionServer) Start

func (s *ForceInclusionServer) Start(ctx context.Context) error

Start starts the HTTP server

func (*ForceInclusionServer) Stop

Stop gracefully stops the HTTP server

type JSONRPCRequest

type JSONRPCRequest struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      interface{}     `json:"id"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params"`
}

JSONRPCRequest represents a JSON-RPC 2.0 request

type JSONRPCResponse

type JSONRPCResponse struct {
	JSONRPC string      `json:"jsonrpc"`
	ID      interface{} `json:"id"`
	Result  interface{} `json:"result,omitempty"`
	Error   *RPCError   `json:"error,omitempty"`
}

JSONRPCResponse represents a JSON-RPC 2.0 response

type RPCError

type RPCError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

RPCError represents a JSON-RPC error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL