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

Function invoice_payment_serialize

lightningd/invoice.c:199–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199static void
200invoice_payment_serialize(struct invoice_payment_hook_payload *payload,
201 struct json_stream *stream,
202 struct plugin *plugin)
203{
204 json_object_start(stream, "payment");
205 json_add_escaped_string(stream, "label", payload->label);
206 json_add_preimage(stream, "preimage", &payload->preimage);
207 json_add_amount_msat(stream, "msat", payload->msat);
208
209 if (payload->ld->developer && payload->set)
210 invoice_payment_add_tlvs(stream, payload->set);
211 json_object_end(stream); /* .payment */
212}
213
214/* Set times out or HTLC deleted? Remove set ptr from payload so we
215 * know to ignore plugin return */

Callers

nothing calls this directly

Calls 6

json_object_startFunction · 0.85
json_add_escaped_stringFunction · 0.85
json_add_preimageFunction · 0.85
json_add_amount_msatFunction · 0.85
invoice_payment_add_tlvsFunction · 0.85
json_object_endFunction · 0.85

Tested by

no test coverage detected