| 1415 | } |
| 1416 | |
| 1417 | static 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 | |
| 1433 | static struct command_result *param_invreq(struct command *cmd, |
| 1434 | const char *name, |
no test coverage detected