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

Function isJRPCNotification

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

Source from the content-addressed store, hash-verified

51 * Type guard to check if a JRPC message is a notification (no `id` property).
52 */
53export function isJRPCNotification<T extends JRPCParams>(request: JRPCNotification<T> | JRPCRequest<T>): request is JRPCNotification<T> {
54 return !hasProperty(request, "id") || request.id === undefined;
55}
56
57/**
58 * Type guard to check if a JRPC message is a request (has `id` property).

Callers 2

jrpcUtils.test.tsFile · 0.90
processMessageFunction · 0.90

Calls 1

hasPropertyFunction · 0.90

Tested by

no test coverage detected