/// import { http } from "../../adapter"; export { http }; export type RequestBody = { jsonrpc: "2.0"; id: number | string; method: string; params: any; }; export type ResponseBody = { id: number | string; jsonrpc: "2.0"; result?: any; error?: { code: number; message: string; }; }; export type HttpRequest = http.IncomingMessage & { body: RequestBody; query: { [key: string]: any; }; info: URL; }; export type HttpResponse = http.ServerResponse & { send: (headers: any, data: any) => void; success: (data: any) => void; error: (message: string, code?: number) => void; }; export type Handle = (req: HttpRequest, res: HttpResponse) => void;