Helper to create JSON-RPC request
| 18 | |
| 19 | // Helper to create JSON-RPC request |
| 20 | static json createRequest(const char* method, const json& params, const json& id) { |
| 21 | json req = json::object(); |
| 22 | req.set("jsonrpc", "2.0"); |
| 23 | req.set("method", method); |
| 24 | req.set("params", params); |
| 25 | req.set("id", id); |
| 26 | return req; |
| 27 | } |
| 28 | |
| 29 | // Helper to extract result from JSON-RPC response |
| 30 | static fl::optional<json> getResult(const json& response) { |