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

Function sign_invoice

plugins/fetchinvoice.c:1417–1431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1415}
1416
1417static struct command_result *sign_invoice(struct command *cmd,
1418 struct sent *sent)
1419{
1420 struct out_req *req;
1421
1422 /* Get invoice signature and put in db so we can receive payment */
1423 req = jsonrpc_request_start(cmd, "createinvoice",
1424 &createinvoice_done,
1425 &forward_error,
1426 sent);
1427 json_add_string(req->js, "invstring", invoice_encode(tmpctx, sent->inv));
1428 json_add_preimage(req->js, "preimage", &sent->inv_preimage);
1429 json_add_escaped_string(req->js, "label", sent->inv_label);
1430 return send_outreq(req);
1431}
1432
1433static struct command_result *param_invreq(struct command *cmd,
1434 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