| 645 | } |
| 646 | |
| 647 | struct command_result * |
| 648 | perform_signpsbt(struct multifundchannel_command *mfc) |
| 649 | { |
| 650 | struct out_req *req; |
| 651 | |
| 652 | /* Now we sign our inputs. You do remember which inputs |
| 653 | * are yours, right? */ |
| 654 | plugin_log(mfc->cmd->plugin, LOG_DBG, |
| 655 | "mfc %"PRIu64": signpsbt.", mfc->id); |
| 656 | |
| 657 | req = jsonrpc_request_start(mfc->cmd->plugin, mfc->cmd, |
| 658 | "signpsbt", |
| 659 | &after_signpsbt, |
| 660 | &mfc_forward_error, |
| 661 | mfc); |
| 662 | json_add_psbt(req->js, "psbt", mfc->psbt); |
| 663 | |
| 664 | /* Use input markers to identify which inputs |
| 665 | * are ours, only sign those */ |
| 666 | json_array_start(req->js, "signonly"); |
| 667 | for (size_t i = 0; i < mfc->psbt->num_inputs; i++) { |
| 668 | if (psbt_input_is_ours(&mfc->psbt->inputs[i])) |
| 669 | json_add_num(req->js, NULL, i); |
| 670 | } |
| 671 | json_array_end(req->js); |
| 672 | return send_outreq(mfc->cmd->plugin, req); |
| 673 | } |
| 674 | |
| 675 | /*~ |
| 676 | Finally with everything set up correctly we `signpsbt`+`sendpsbt` the |
no test coverage detected