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

Function isNotification

src/utils/jrpc.ts:78–82  ·  view source on GitHub ↗
(
  message: JRPCNotification<Params> | JRPCRequest<Params>
)

Source from the content-addressed store, hash-verified

76 * Unlike {@link isJRPCNotification}, this does NOT treat `{ id: undefined }` as a notification.
77 */
78export function isNotification<Params extends JRPCParams>(
79 message: JRPCNotification<Params> | JRPCRequest<Params>
80): message is JRPCNotification<Params> {
81 return !isRequest(message);
82}
83
84/**
85 * Checks whether the given request has a valid (non-empty string) `method`.

Callers 2

utils.test.tsFile · 0.90
_updateResultMethod · 0.90

Calls 1

isRequestFunction · 0.85

Tested by

no test coverage detected