MCPcopy Create free account
hub / github.com/BitVM/BitVM / sign_input_0

Method sign_input_0

bridge/src/transactions/take_2.rs:183–202  ·  view source on GitHub ↗
(
        &mut self,
        context: &VerifierContext,
        connector_0: &Connector0,
        secret_nonce: &SecNonce,
    )

Source from the content-addressed store, hash-verified

181 }
182
183 fn sign_input_0(
184 &mut self,
185 context: &VerifierContext,
186 connector_0: &Connector0,
187 secret_nonce: &SecNonce,
188 ) {
189 let input_index = 0;
190 pre_sign_musig2_taproot_input(
191 self,
192 context,
193 input_index,
194 TapSighashType::All,
195 secret_nonce,
196 );
197
198 // TODO: Consider verifying the final signature against the n-of-n public key and the tx.
199 if self.musig2_signatures[&input_index].len() == context.n_of_n_public_keys.len() {
200 self.finalize_input_0(context, connector_0);
201 }
202 }
203
204 fn finalize_input_0(&mut self, context: &dyn BaseContext, connector_0: &Connector0) {
205 let input_index = 0;

Callers 1

pre_signMethod · 0.45

Calls 3

lenMethod · 0.80
finalize_input_0Method · 0.45

Tested by

no test coverage detected