| 1676 | } |
| 1677 | |
| 1678 | struct command_result *json_dev_rawrequest(struct command *cmd, |
| 1679 | const char *buffer, |
| 1680 | const jsmntok_t *params) |
| 1681 | { |
| 1682 | struct sent *sent = tal(cmd, struct sent); |
| 1683 | u32 *timeout; |
| 1684 | struct pubkey *node_id; |
| 1685 | struct tlv_onionmsg_tlv *payload; |
| 1686 | |
| 1687 | if (!param(cmd, buffer, params, |
| 1688 | p_req("invreq", param_raw_invreq, &sent->invreq), |
| 1689 | p_req("nodeid", param_pubkey, &node_id), |
| 1690 | p_opt_def("timeout", param_number, &timeout, 60), |
| 1691 | NULL)) |
| 1692 | return command_param_failed(); |
| 1693 | |
| 1694 | /* This is how long we'll wait for a reply for. */ |
| 1695 | sent->wait_timeout = *timeout; |
| 1696 | sent->cmd = cmd; |
| 1697 | sent->offer = NULL; |
| 1698 | sent->dev_path_use_scidd = NULL; |
| 1699 | sent->dev_reply_path = NULL; |
| 1700 | sent->their_paths = NULL; |
| 1701 | sent->direct_dest = node_id; |
| 1702 | sent->issuer_key = node_id; |
| 1703 | |
| 1704 | payload = tlv_onionmsg_tlv_new(sent); |
| 1705 | payload->invoice_request = tal_arr(payload, u8, 0); |
| 1706 | towire_tlv_invoice_request(&payload->invoice_request, sent->invreq); |
| 1707 | |
| 1708 | return send_message(cmd, sent, true, payload, sendonionmsg_done); |
| 1709 | } |
nothing calls this directly
no test coverage detected