| 1767 | } |
| 1768 | |
| 1769 | struct command_result *json_dev_rawrequest(struct command *cmd, |
| 1770 | const char *buffer, |
| 1771 | const jsmntok_t *params) |
| 1772 | { |
| 1773 | struct sent *sent = tal(cmd, struct sent); |
| 1774 | u32 *timeout; |
| 1775 | struct pubkey *node_id; |
| 1776 | struct tlv_onionmsg_tlv *payload; |
| 1777 | |
| 1778 | if (!param(cmd, buffer, params, |
| 1779 | p_req("invreq", param_raw_invreq, &sent->invreq), |
| 1780 | p_req("nodeid", param_pubkey, &node_id), |
| 1781 | p_opt_def("timeout", param_number, &timeout, 60), |
| 1782 | NULL)) |
| 1783 | return command_param_failed(); |
| 1784 | |
| 1785 | /* This is how long we'll wait for a reply for. */ |
| 1786 | sent->wait_timeout = *timeout; |
| 1787 | sent->cmd = cmd; |
| 1788 | sent->offer = NULL; |
| 1789 | sent->dev_path_use_scidd = NULL; |
| 1790 | sent->dev_reply_path = NULL; |
| 1791 | sent->their_paths = NULL; |
| 1792 | sent->direct_dest = node_id; |
| 1793 | sent->issuer_key = node_id; |
| 1794 | |
| 1795 | payload = tlv_onionmsg_tlv_new(sent); |
| 1796 | payload->invoice_request = tal_arr(payload, u8, 0); |
| 1797 | towire_tlv_invoice_request(&payload->invoice_request, sent->invreq); |
| 1798 | |
| 1799 | return send_message(cmd, sent, true, payload, sendonionmsg_done); |
| 1800 | } |
nothing calls this directly
no test coverage detected