| 1506 | } |
| 1507 | |
| 1508 | static 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 | |
| 1524 | static struct command_result *param_invreq(struct command *cmd, |
| 1525 | const char *name, |
no test coverage detected