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

Function isJRPCRequest

src/utils/jrpc.ts:60–62  ·  view source on GitHub ↗
(request: JRPCNotification<T> | JRPCRequest<T>)

Source from the content-addressed store, hash-verified

58 * Type guard to check if a JRPC message is a request (has `id` property).
59 */
60export function isJRPCRequest<T extends JRPCParams>(request: JRPCNotification<T> | JRPCRequest<T>): request is JRPCRequest<T> {
61 return hasProperty(request, "id") && request.id !== undefined;
62}
63
64/**
65 * V2-compatible type guard to check if a JSON-RPC message is a request (has `id` property).

Callers 1

jrpcUtils.test.tsFile · 0.90

Calls 1

hasPropertyFunction · 0.90

Tested by

no test coverage detected