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

Function json_populate_invreq

lightningd/offer.c:452–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452static void json_populate_invreq(struct json_stream *response,
453 const struct sha256 *invreq_id,
454 const char *b12,
455 const struct json_escape *label,
456 enum offer_status status)
457{
458 json_add_sha256(response, "invreq_id", invreq_id);
459 json_add_bool(response, "active", offer_status_active(status));
460 json_add_bool(response, "single_use", offer_status_single(status));
461 json_add_string(response, "bolt12", b12);
462 json_add_bool(response, "used", offer_status_used(status));
463 if (label)
464 json_add_escaped_string(response, "label", label);
465}
466
467static struct command_result *json_createinvoicerequest(struct command *cmd,
468 const char *buffer,

Callers 3

json_listinvoicerequestsFunction · 0.85

Calls 7

json_add_sha256Function · 0.85
json_add_boolFunction · 0.85
offer_status_activeFunction · 0.85
offer_status_singleFunction · 0.85
offer_status_usedFunction · 0.85
json_add_escaped_stringFunction · 0.85
json_add_stringFunction · 0.50

Tested by

no test coverage detected