| 235 | } |
| 236 | |
| 237 | static struct command_result *create_offer(struct command *cmd, |
| 238 | struct offer_info *offinfo) |
| 239 | { |
| 240 | struct out_req *req; |
| 241 | |
| 242 | /* We simply pass this through. */ |
| 243 | req = jsonrpc_request_start(cmd, "createoffer", |
| 244 | check_result, forward_error, |
| 245 | offinfo); |
| 246 | json_add_string(req->js, "bolt12", |
| 247 | offer_encode(tmpctx, offinfo->offer)); |
| 248 | if (offinfo->label) |
| 249 | json_add_string(req->js, "label", offinfo->label); |
| 250 | json_add_bool(req->js, "single_use", *offinfo->single_use); |
| 251 | json_add_bool(req->js, "force_paths", offinfo->fronting_nodes != NULL); |
| 252 | |
| 253 | return send_outreq(req); |
| 254 | } |
| 255 | |
| 256 | /* Create num_node_ids paths from these node_ids to us (one hop each) */ |
| 257 | static struct blinded_path **offer_onehop_paths(const tal_t *ctx, |
no test coverage detected