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

Function json_add_income_event

plugins/bkpr/incomestmt.c:434–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432}
433
434void json_add_income_event(struct json_stream *out, struct income_event *ev)
435{
436 json_object_start(out, NULL);
437 json_add_string(out, "account", ev->acct_name);
438 json_add_string(out, "tag", ev->tag);
439 json_add_amount_msat_only(out, "credit_msat", ev->credit);
440 json_add_amount_msat_only(out, "debit_msat", ev->debit);
441 json_add_string(out, "currency", ev->currency);
442 json_add_u64(out, "timestamp", ev->timestamp);
443
444 if (ev->desc)
445 json_add_string(out, "description", ev->desc);
446
447 if (ev->outpoint)
448 json_add_outpoint(out, "outpoint", ev->outpoint);
449
450 if (ev->txid)
451 json_add_txid(out, "txid", ev->txid);
452
453 if (ev->payment_id)
454 json_add_sha256(out, "payment_id", ev->payment_id);
455
456 json_object_end(out);
457}
458
459const char *csv_filename(const tal_t *ctx, const struct csv_fmt *fmt)
460{

Callers 1

json_list_incomeFunction · 0.85

Calls 8

json_add_outpointFunction · 0.85
json_object_startFunction · 0.50
json_add_stringFunction · 0.50
json_add_u64Function · 0.50
json_add_txidFunction · 0.50
json_add_sha256Function · 0.50
json_object_endFunction · 0.50

Tested by

no test coverage detected