(body: string)
| 37 | |
| 38 | // Helper: parse SSE response to get the JSON-RPC result |
| 39 | function parseSSE(body: string): any { |
| 40 | const dataLine = body.split("\n").find((l) => l.startsWith("data: ")) |
| 41 | if (!dataLine) return null |
| 42 | return JSON.parse(dataLine.replace("data: ", "")) |
| 43 | } |
| 44 | |
| 45 | // Helper: connect a mock app to the relay |
| 46 | function connectMockApp( |