| 1324 | } |
| 1325 | |
| 1326 | struct jsonrpc_notification *jsonrpc_notification_start(const tal_t *ctx, const char *method) |
| 1327 | { |
| 1328 | struct jsonrpc_notification *n = tal(ctx, struct jsonrpc_notification); |
| 1329 | n->method = tal_strdup(n, method); |
| 1330 | n->stream = new_json_stream(n, NULL, NULL); |
| 1331 | json_object_start(n->stream, NULL); |
| 1332 | json_add_string(n->stream, "jsonrpc", "2.0"); |
| 1333 | json_add_string(n->stream, "method", method); |
| 1334 | json_object_start(n->stream, "params"); |
| 1335 | |
| 1336 | return n; |
| 1337 | } |
| 1338 | |
| 1339 | void jsonrpc_notification_end(struct jsonrpc_notification *n) |
| 1340 | { |
no test coverage detected