| 654 | } |
| 655 | |
| 656 | static struct command_result *call_createinvoicerequest(struct command *cmd, |
| 657 | struct tlv_invoice_request *invreq, |
| 658 | bool single_use, |
| 659 | const char *label) |
| 660 | { |
| 661 | struct out_req *req; |
| 662 | |
| 663 | req = jsonrpc_request_start(cmd, "createinvoicerequest", |
| 664 | check_result, forward_error, |
| 665 | invreq); |
| 666 | json_add_string(req->js, "bolt12", invrequest_encode(tmpctx, invreq)); |
| 667 | json_add_bool(req->js, "savetodb", true); |
| 668 | json_add_bool(req->js, "single_use", single_use); |
| 669 | if (label) |
| 670 | json_add_string(req->js, "recurrence_label", label); |
| 671 | return send_outreq(req); |
| 672 | } |
| 673 | |
| 674 | struct invrequest_data { |
| 675 | struct tlv_invoice_request *invreq; |
no test coverage detected