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

Function sign_invoice

plugins/fetchinvoice.c:1416–1430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1414}
1415
1416static struct command_result *sign_invoice(struct command *cmd,
1417 struct sent *sent)
1418{
1419 struct out_req *req;
1420
1421 /* Get invoice signature and put in db so we can receive payment */
1422 req = jsonrpc_request_start(cmd->plugin, cmd, "createinvoice",
1423 &createinvoice_done,
1424 &forward_error,
1425 sent);
1426 json_add_string(req->js, "invstring", invoice_encode(tmpctx, sent->inv));
1427 json_add_preimage(req->js, "preimage", &sent->inv_preimage);
1428 json_add_escaped_string(req->js, "label", sent->inv_label);
1429 return send_outreq(cmd->plugin, req);
1430}
1431
1432static bool json_to_bip340sig(const char *buffer, const jsmntok_t *tok,
1433 struct bip340sig *sig)

Callers 2

payersign_doneFunction · 0.85
json_sendinvoiceFunction · 0.85

Calls 5

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

Tested by

no test coverage detected