MCPcopy Create free account
hub / github.com/ElementsProject/lightning / jsonrpc_notification_start_noparams

Function jsonrpc_notification_start_noparams

lightningd/jsonrpc.c:1506–1516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1504}
1505
1506struct jsonrpc_notification *jsonrpc_notification_start_noparams(const tal_t *ctx, const char *method)
1507{
1508 struct jsonrpc_notification *n = tal(ctx, struct jsonrpc_notification);
1509 n->method = tal_strdup(n, method);
1510 n->stream = new_json_stream(n, NULL, NULL);
1511 json_object_start(n->stream, NULL);
1512 json_add_string(n->stream, "jsonrpc", "2.0");
1513 json_add_string(n->stream, "method", method);
1514
1515 return n;
1516}
1517
1518struct jsonrpc_notification *jsonrpc_notification_start(const tal_t *ctx, const char *method)
1519{

Callers 2

Calls 3

new_json_streamFunction · 0.85
json_object_startFunction · 0.85
json_add_stringFunction · 0.50

Tested by

no test coverage detected