MCPcopy Create free account
hub / github.com/Web3Auth/Auth / isValidMethod

Function isValidMethod

src/utils/jrpc.ts:87–89  ·  view source on GitHub ↗
(request: Partial<JRPCRequest>)

Source from the content-addressed store, hash-verified

85 * Checks whether the given request has a valid (non-empty string) `method`.
86 */
87export function isValidMethod(request: Partial<JRPCRequest>): boolean {
88 return typeof request.method === "string" && request.method.length > 0;
89}
90
91/**
92 * Type guard to check if a JRPC response is a success (has `result`).

Callers 3

jrpcUtils.test.tsFile · 0.90
_handleMethod · 0.90
createErrorMiddlewareFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected