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

Method sign_input_0

bridge/src/transactions/assert_transactions/assert_initial.rs:176–195  ·  view source on GitHub ↗
(
        &mut self,
        context: &VerifierContext,
        connector_b: &ConnectorB,
        secret_nonce: &SecNonce,
    )

Source from the content-addressed store, hash-verified

174 }
175
176 fn sign_input_0(
177 &mut self,
178 context: &VerifierContext,
179 connector_b: &ConnectorB,
180 secret_nonce: &SecNonce,
181 ) {
182 let input_index = 0;
183 pre_sign_musig2_taproot_input(
184 self,
185 context,
186 input_index,
187 TapSighashType::All,
188 secret_nonce,
189 );
190
191 // TODO: Consider verifying the final signature against the n-of-n public key and the tx.
192 if self.musig2_signatures[&input_index].len() == context.n_of_n_public_keys.len() {
193 self.finalize_input_0(context, connector_b);
194 }
195 }
196
197 fn finalize_input_0(&mut self, context: &dyn BaseContext, connector_b: &ConnectorB) {
198 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