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

Function jsonrpc_notification_start

lightningd/jsonrpc.c:1326–1337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1324}
1325
1326struct 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
1339void jsonrpc_notification_end(struct jsonrpc_notification *n)
1340{

Callers 15

notify_connectFunction · 0.85
notify_disconnectFunction · 0.85
notify_warningFunction · 0.85
notify_invoice_paymentFunction · 0.85
notify_invoice_creationFunction · 0.85
notify_channel_openedFunction · 0.85
notify_forward_eventFunction · 0.85
notify_sendpay_successFunction · 0.85
notify_sendpay_failureFunction · 0.85
notify_coin_mvtFunction · 0.85

Calls 3

new_json_streamFunction · 0.85
json_object_startFunction · 0.50
json_add_stringFunction · 0.50

Tested by

no test coverage detected