JsonRpcRouter

class JsonRpcRouter(handler: ConnectedAPIHandler, approvalManager: ApprovalManager = ApprovalManager { true })

JSON-RPC 2.0 message router for the ConnectedAPI.

Parses incoming JSON-RPC requests, routes to the appropriate ConnectedAPIHandler method, and formats JSON-RPC responses.

Protocol: https://www.jsonrpc.org/specification

Constructors

Link copied to clipboard
constructor(handler: ConnectedAPIHandler, approvalManager: ApprovalManager = ApprovalManager { true })

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun handleMessage(message: String): String