Skip to content
marie-fourier edited this page Jan 6, 2025 · 1 revision

API packages

api package provides the HTTP interface for Skandha.

This package contains the necessary handlers, routes, and middleware to expose Skandha's functionality over HTTP.

Key features of the api package:

  • Middleware for logging and request validation
  • JSON-RPC request and response handling
  • Comprehensive error handling and response codes
  • Websocket support

Endpoints

Each rpc method starts with special prefix:

  • debug_
  • eth_
  • skandha_
  • web3_

Handlers for each of these prefixes are defined in the modules folder.

Besides that there are some additional features in the modules folder:

  • redirect.ts - this is a simple redirect handler that redirects all rpc methods from constants.ts::RedirectedRPCMethods to underlying blockchain node.
  • subscription.ts - websocket handler
Clone this wiki locally