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

Method sign_input_0

bridge/src/transactions/assert_transactions/assert_final.rs:196–215  ·  view source on GitHub ↗
(
        &mut self,
        context: &VerifierContext,
        connector_d: &ConnectorD,
        secret_nonce: &SecNonce,
    )

Source from the content-addressed store, hash-verified

194 }
195
196 fn sign_input_0(
197 &mut self,
198 context: &VerifierContext,
199 connector_d: &ConnectorD,
200 secret_nonce: &SecNonce,
201 ) {
202 let input_index = 0;
203 pre_sign_musig2_taproot_input(
204 self,
205 context,
206 input_index,
207 TapSighashType::All,
208 secret_nonce,
209 );
210
211 // TODO: Consider verifying the final signature against the n-of-n public key and the tx.
212 if self.musig2_signatures[&input_index].len() == context.n_of_n_public_keys.len() {
213 self.finalize_input_0(context, connector_d);
214 }
215 }
216
217 fn sign_commit_inputs(&mut self, context: &OperatorContext) {
218 let input_indexes = [1, 2];

Callers 1

pre_signMethod · 0.45

Calls 3

lenMethod · 0.80
finalize_input_0Method · 0.45

Tested by

no test coverage detected