import { type Rpc } from "https://deno.land/x/cav@0.0.21/mod.ts";
Cav's endpoint HTTP handler. Rpcs are one of two fundamental building blocks of Cav server applications, the other being Stacks. Stacks are responsible for routing a request, Rpcs are responsible for handling them.
Type Parameters
optional
I extends AnyRpcInit = Record<never, never>Call Signatures
(req: EndpointRequest<ParserInput<I["query"]>, ParserInput<I["message"]>, I["upgrade"] extends true ? true : never>, conn: http.ConnInfo): Promise<EndpointResponse<I["resolve"] extends (...a: any[]) => Promise<infer R> | infer R ? R : "resolve" extends keyof I ? never : undefined>>