| 667 | } |
| 668 | |
| 669 | static struct command_result *call_createinvoicerequest(struct command *cmd, |
| 670 | struct tlv_invoice_request *invreq, |
| 671 | bool single_use, |
| 672 | const char *label) |
| 673 | { |
| 674 | struct out_req *req; |
| 675 | |
| 676 | req = jsonrpc_request_start(cmd, "createinvoicerequest", |
| 677 | check_result, forward_error, |
| 678 | invreq); |
| 679 | json_add_string(req->js, "bolt12", invrequest_encode(tmpctx, invreq)); |
| 680 | json_add_bool(req->js, "savetodb", true); |
| 681 | json_add_bool(req->js, "single_use", single_use); |
| 682 | if (label) |
| 683 | json_add_string(req->js, "recurrence_label", label); |
| 684 | return send_outreq(req); |
| 685 | } |
| 686 | |
| 687 | struct invrequest_data { |
| 688 | struct tlv_invoice_request *invreq; |
no test coverage detected