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

Function isJRPCSuccess

src/utils/jrpc.ts:94–96  ·  view source on GitHub ↗
(response: JRPCBase)

Source from the content-addressed store, hash-verified

92 * Type guard to check if a JRPC response is a success (has `result`).
93 */
94export function isJRPCSuccess<T>(response: JRPCBase): response is JRPCSuccess<T> {
95 return "result" in response;
96}
97
98/**
99 * Type guard to check if a JRPC response is a failure (has `error`).

Callers 2

jrpcUtils.test.tsFile · 0.90
_checkForCompletionMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected