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

Function sign_invoice

plugins/fetchinvoice.c:1508–1522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1506}
1507
1508static struct command_result *sign_invoice(struct command *cmd,
1509 struct sent *sent)
1510{
1511 struct out_req *req;
1512
1513 /* Get invoice signature and put in db so we can receive payment */
1514 req = jsonrpc_request_start(cmd, "createinvoice",
1515 &createinvoice_done,
1516 &forward_error,
1517 sent);
1518 json_add_string(req->js, "invstring", invoice_encode(tmpctx, sent->inv));
1519 json_add_preimage(req->js, "preimage", &sent->inv_preimage);
1520 json_add_escaped_string(req->js, "label", sent->inv_label);
1521 return send_outreq(req);
1522}
1523
1524static struct command_result *param_invreq(struct command *cmd,
1525 const char *name,

Callers 1

json_sendinvoiceFunction · 0.85

Calls 5

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

Tested by

no test coverage detected