(
&mut self,
context: &OperatorContext,
connector_2: &Connector2,
start_time_signing_inputs: &WinternitzSigningInputs,
)
| 128 | } |
| 129 | |
| 130 | fn sign_input_0( |
| 131 | &mut self, |
| 132 | context: &OperatorContext, |
| 133 | connector_2: &Connector2, |
| 134 | start_time_signing_inputs: &WinternitzSigningInputs, |
| 135 | ) { |
| 136 | let input_index = 0; |
| 137 | let script = &self.prev_scripts()[input_index].clone(); |
| 138 | let prev_outs = &self.prev_outs().clone(); |
| 139 | let taproot_spend_info = connector_2.generate_taproot_spend_info(); |
| 140 | let mut unlock_data: Vec<Vec<u8>> = Vec::new(); |
| 141 | |
| 142 | // get schnorr signature |
| 143 | let schnorr_signature = generate_taproot_leaf_schnorr_signature( |
| 144 | self.tx_mut(), |
| 145 | prev_outs, |
| 146 | input_index, |
| 147 | TapSighashType::All, |
| 148 | script, |
| 149 | &context.operator_keypair, |
| 150 | ); |
| 151 | unlock_data.push(schnorr_signature.to_vec()); |
| 152 | |
| 153 | // get winternitz signature |
| 154 | self.start_time_witness = Some(generate_winternitz_witness(start_time_signing_inputs)); |
| 155 | unlock_data.extend(self.start_time_witness.as_ref().unwrap().to_vec()); |
| 156 | |
| 157 | populate_taproot_input_witness( |
| 158 | self.tx_mut(), |
| 159 | input_index, |
| 160 | &taproot_spend_info, |
| 161 | script, |
| 162 | unlock_data, |
| 163 | ); |
| 164 | } |
| 165 | |
| 166 | pub fn sign( |
| 167 | &mut self, |
no test coverage detected