| 283 | } |
| 284 | |
| 285 | static struct command_result *create_offer(struct command *cmd, |
| 286 | struct offer_info *offinfo) |
| 287 | { |
| 288 | struct out_req *req; |
| 289 | |
| 290 | /* We simply pass this through. */ |
| 291 | req = jsonrpc_request_start(cmd->plugin, cmd, "createoffer", |
| 292 | check_result, forward_error, |
| 293 | offinfo); |
| 294 | json_add_string(req->js, "bolt12", |
| 295 | offer_encode(tmpctx, offinfo->offer)); |
| 296 | if (offinfo->label) |
| 297 | json_add_string(req->js, "label", offinfo->label); |
| 298 | json_add_bool(req->js, "single_use", *offinfo->single_use); |
| 299 | |
| 300 | return send_outreq(cmd->plugin, req); |
| 301 | } |
| 302 | |
| 303 | static struct command_result *currency_done(struct command *cmd, |
| 304 | const char *buf, |
no test coverage detected