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

Function create_invoicereq

plugins/offers_invreq_hook.c:209–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209static struct command_result *create_invoicereq(struct command *cmd,
210 struct invreq *ir)
211{
212 struct out_req *req;
213
214 /* Now, write invoice to db (returns the signed version) */
215 req = jsonrpc_request_start(cmd->plugin, cmd, "createinvoice",
216 createinvoice_done, createinvoice_error, ir);
217
218 json_add_string(req->js, "invstring", invoice_encode(tmpctx, ir->inv));
219 json_add_preimage(req->js, "preimage", &ir->preimage);
220 json_add_label(req->js, ir->inv->offer_id, ir->inv->payer_key,
221 ir->inv->recurrence_counter
222 ? *ir->inv->recurrence_counter : 0);
223 return send_outreq(cmd->plugin, req);
224}
225
226static struct command_result *check_period(struct command *cmd,
227 struct invreq *ir,

Callers 2

check_periodFunction · 0.85

Calls 5

json_add_labelFunction · 0.85
send_outreqFunction · 0.70
json_add_stringFunction · 0.50
invoice_encodeFunction · 0.50
json_add_preimageFunction · 0.50

Tested by

no test coverage detected