handle

abstract suspend fun handle(request: JsonRpcRequest): JsonRpcResponse

Handle one request and return its response. Must not throw for protocol-level failures — return a JSON-RPC error response instead.


open suspend fun handle(request: JsonRpcRequest, context: DappRequestContext): JsonRpcResponse

handle with what the transport knew about the request. A transport that carries a deadline calls this; the default ignores the context, so a handler with no use for it implements only the other.