| 663 | } |
| 664 | |
| 665 | struct command_result * |
| 666 | perform_signpsbt(struct multifundchannel_command *mfc) |
| 667 | { |
| 668 | struct out_req *req; |
| 669 | |
| 670 | /* Now we sign our inputs. You do remember which inputs |
| 671 | * are yours, right? */ |
| 672 | plugin_log(mfc->cmd->plugin, LOG_DBG, |
| 673 | "mfc %"PRIu64": signpsbt.", mfc->id); |
| 674 | |
| 675 | req = jsonrpc_request_start(mfc->cmd, |
| 676 | "signpsbt", |
| 677 | &after_signpsbt, |
| 678 | &mfc_forward_error, |
| 679 | mfc); |
| 680 | json_add_psbt(req->js, "psbt", mfc->psbt); |
| 681 | |
| 682 | /* Use input markers to identify which inputs |
| 683 | * are ours, only sign those */ |
| 684 | json_array_start(req->js, "signonly"); |
| 685 | for (size_t i = 0; i < mfc->psbt->num_inputs; i++) { |
| 686 | if (psbt_input_is_ours(&mfc->psbt->inputs[i])) |
| 687 | json_add_num(req->js, NULL, i); |
| 688 | } |
| 689 | json_array_end(req->js); |
| 690 | return send_outreq(req); |
| 691 | } |
| 692 | |
| 693 | /*~ |
| 694 | Finally with everything set up correctly we `signpsbt`+`sendpsbt` the |
no test coverage detected