MCPcopy Index your code
hub / github.com/BitVM/BitVM / handle_pegin_confirm_tx_command

Method handle_pegin_confirm_tx_command

bridge/src/client/cli/query_command.rs:167–195  ·  view source on GitHub ↗
(
        &self,
        depositor_public_key: &PublicKey,
        sub_matches: &ArgMatches,
    )

Source from the content-addressed store, hash-verified

165 }
166
167 pub async fn handle_pegin_confirm_tx_command(
168 &self,
169 depositor_public_key: &PublicKey,
170 sub_matches: &ArgMatches,
171 ) -> Response {
172 let amount = sub_matches.get_one::<String>("AMOUNT").unwrap();
173 let recipient_address = sub_matches.get_one::<String>("RECIPIENT_ADDRESS").unwrap();
174 let depositor_taproot_key = XOnlyPublicKey::from(*depositor_public_key);
175 let amount: Amount = Amount::from_sat(amount.parse::<u64>().unwrap());
176 let taproot_address = self.client.generate_connector_z_taproot_address(
177 self.network,
178 recipient_address,
179 &depositor_taproot_key,
180 );
181 let outpoint = self
182 .generate_stub_outpoint(&self.client, &taproot_address, amount)
183 .await;
184 let result = self.client.generate_presign_pegin_confirm_tx(
185 self.network,
186 recipient_address,
187 amount,
188 &depositor_taproot_key,
189 outpoint,
190 );
191 Response::new(
192 ResponseStatus::OK,
193 Some(serde_json::to_value(result).unwrap()),
194 )
195 }
196
197 pub async fn handle_depositor(&mut self, matches: &ArgMatches) -> Response {
198 let pubkey =

Callers 1

handle_depositorMethod · 0.80

Tested by

no test coverage detected